|
|
@@ -27,6 +27,7 @@ type Client struct {
|
|
|
}
|
|
|
|
|
|
// NewClient creates a sdk client with environment variables
|
|
|
+// Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/yundun-bastionhost instead
|
|
|
func NewClient() (client *Client, err error) {
|
|
|
client = &Client{}
|
|
|
err = client.Init()
|
|
|
@@ -35,6 +36,7 @@ func NewClient() (client *Client, err error) {
|
|
|
|
|
|
// NewClientWithProvider creates a sdk client with providers
|
|
|
// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
|
|
|
+// Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/yundun-bastionhost instead
|
|
|
func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) {
|
|
|
client = &Client{}
|
|
|
var pc provider.Provider
|
|
|
@@ -49,6 +51,7 @@ func NewClientWithProvider(regionId string, providers ...provider.Provider) (cli
|
|
|
|
|
|
// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
|
|
|
// this is the common api to create a sdk client
|
|
|
+// Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/yundun-bastionhost instead
|
|
|
func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
|
|
|
client = &Client{}
|
|
|
err = client.InitWithOptions(regionId, config, credential)
|
|
|
@@ -57,6 +60,7 @@ func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.C
|
|
|
|
|
|
// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
|
|
|
// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
|
|
|
+// Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/yundun-bastionhost instead
|
|
|
func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
|
|
|
client = &Client{}
|
|
|
err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
|
|
|
@@ -65,6 +69,7 @@ func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (clie
|
|
|
|
|
|
// NewClientWithStsToken is a shortcut to create sdk client with sts token
|
|
|
// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
|
|
|
+// Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/yundun-bastionhost instead
|
|
|
func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
|
|
|
client = &Client{}
|
|
|
err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
|
|
|
@@ -73,6 +78,7 @@ func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToke
|
|
|
|
|
|
// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
|
|
|
// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
|
|
|
+// Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/yundun-bastionhost instead
|
|
|
func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
|
|
|
client = &Client{}
|
|
|
err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
|
|
|
@@ -81,6 +87,7 @@ func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, role
|
|
|
|
|
|
// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy
|
|
|
// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
|
|
|
+// Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/yundun-bastionhost instead
|
|
|
func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) {
|
|
|
client = &Client{}
|
|
|
err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy)
|
|
|
@@ -89,6 +96,7 @@ func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySec
|
|
|
|
|
|
// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
|
|
|
// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
|
|
|
+// Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/yundun-bastionhost instead
|
|
|
func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
|
|
|
client = &Client{}
|
|
|
err = client.InitWithEcsRamRole(regionId, roleName)
|
|
|
@@ -97,6 +105,7 @@ func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client,
|
|
|
|
|
|
// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
|
|
|
// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
|
|
|
+// Deprecated: Please use github.com/aliyun/alibaba-cloud-sdk-go/services/yundun-bastionhost instead
|
|
|
func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
|
|
|
client = &Client{}
|
|
|
err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
|