Browse Source

1. Re-generate for STS 2015-04-01.

sdk-team 6 years ago
parent
commit
49f04b052e

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-05-30 Version: 1.60.27
+1. Re-generate for STS 2015-04-01.
+
 2019-05-29 Version: 1.60.26
 2019-05-29 Version: 1.60.26
 1, Fix ServiceCode typo in request
 1, Fix ServiceCode typo in request
 
 

+ 61 - 57
services/sts/assume_role.go

@@ -1,3 +1,4 @@
+
 package sts
 package sts
 
 
 //Licensed under the Apache License, Version 2.0 (the "License");
 //Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,93 +17,96 @@ package sts
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 
 
 import (
 import (
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
 )
 )
 
 
 // AssumeRole invokes the sts.AssumeRole API synchronously
 // AssumeRole invokes the sts.AssumeRole API synchronously
 // api document: https://help.aliyun.com/api/sts/assumerole.html
 // api document: https://help.aliyun.com/api/sts/assumerole.html
 func (client *Client) AssumeRole(request *AssumeRoleRequest) (response *AssumeRoleResponse, err error) {
 func (client *Client) AssumeRole(request *AssumeRoleRequest) (response *AssumeRoleResponse, err error) {
-	response = CreateAssumeRoleResponse()
-	err = client.DoAction(request, response)
-	return
+response = CreateAssumeRoleResponse()
+err = client.DoAction(request, response)
+return
 }
 }
 
 
 // AssumeRoleWithChan invokes the sts.AssumeRole API asynchronously
 // AssumeRoleWithChan invokes the sts.AssumeRole API asynchronously
 // api document: https://help.aliyun.com/api/sts/assumerole.html
 // api document: https://help.aliyun.com/api/sts/assumerole.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
 func (client *Client) AssumeRoleWithChan(request *AssumeRoleRequest) (<-chan *AssumeRoleResponse, <-chan error) {
 func (client *Client) AssumeRoleWithChan(request *AssumeRoleRequest) (<-chan *AssumeRoleResponse, <-chan error) {
-	responseChan := make(chan *AssumeRoleResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.AssumeRole(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
+responseChan := make(chan *AssumeRoleResponse, 1)
+errChan := make(chan error, 1)
+err := client.AddAsyncTask(func() {
+defer close(responseChan)
+defer close(errChan)
+response, err :=  client.AssumeRole(request)
+if err != nil {
+errChan <- err
+} else {
+responseChan <- response
+}
+})
+if err != nil {
+errChan <- err
+close(responseChan)
+close(errChan)
+}
+return responseChan, errChan
 }
 }
 
 
 // AssumeRoleWithCallback invokes the sts.AssumeRole API asynchronously
 // AssumeRoleWithCallback invokes the sts.AssumeRole API asynchronously
 // api document: https://help.aliyun.com/api/sts/assumerole.html
 // api document: https://help.aliyun.com/api/sts/assumerole.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) AssumeRoleWithCallback(request *AssumeRoleRequest, callback func(response *AssumeRoleResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *AssumeRoleResponse
-		var err error
-		defer close(result)
-		response, err = client.AssumeRole(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
+func (client *Client) AssumeRoleWithCallback(request *AssumeRoleRequest, callback func(response *AssumeRoleResponse, err error)) (<-chan int) {
+result := make(chan int, 1)
+err := client.AddAsyncTask(func() {
+var response *AssumeRoleResponse
+var err error
+defer close(result)
+response, err = client.AssumeRole(request)
+callback(response, err)
+result <- 1
+})
+if err != nil {
+defer close(result)
+callback(nil, err)
+result <- 0
+}
+return result
 }
 }
 
 
 // AssumeRoleRequest is the request struct for api AssumeRole
 // AssumeRoleRequest is the request struct for api AssumeRole
 type AssumeRoleRequest struct {
 type AssumeRoleRequest struct {
-	*requests.RpcRequest
-	RoleArn         string           `position:"Query" name:"RoleArn"`
-	RoleSessionName string           `position:"Query" name:"RoleSessionName"`
-	DurationSeconds requests.Integer `position:"Query" name:"DurationSeconds"`
-	Policy          string           `position:"Query" name:"Policy"`
+*requests.RpcRequest
+                    RoleSessionName     string `position:"Query" name:"RoleSessionName"`
+                    Policy     string `position:"Query" name:"Policy"`
+                    RoleArn     string `position:"Query" name:"RoleArn"`
+                    DurationSeconds     requests.Integer `position:"Query" name:"DurationSeconds"`
 }
 }
 
 
+
 // AssumeRoleResponse is the response struct for api AssumeRole
 // AssumeRoleResponse is the response struct for api AssumeRole
 type AssumeRoleResponse struct {
 type AssumeRoleResponse struct {
-	*responses.BaseResponse
-	RequestId       string          `json:"RequestId" xml:"RequestId"`
-	Credentials     Credentials     `json:"Credentials" xml:"Credentials"`
-	AssumedRoleUser AssumedRoleUser `json:"AssumedRoleUser" xml:"AssumedRoleUser"`
+*responses.BaseResponse
+            RequestId     string `json:"RequestId" xml:"RequestId"`
+            Credentials Credentials  `json:"Credentials" xml:"Credentials"`
+            AssumedRoleUser AssumedRoleUser  `json:"AssumedRoleUser" xml:"AssumedRoleUser"`
 }
 }
 
 
 // CreateAssumeRoleRequest creates a request to invoke AssumeRole API
 // CreateAssumeRoleRequest creates a request to invoke AssumeRole API
 func CreateAssumeRoleRequest() (request *AssumeRoleRequest) {
 func CreateAssumeRoleRequest() (request *AssumeRoleRequest) {
-	request = &AssumeRoleRequest{
-		RpcRequest: &requests.RpcRequest{},
-	}
-	request.InitWithApiInfo("Sts", "2015-04-01", "AssumeRole", "sts", "openAPI")
-	return
+request = &AssumeRoleRequest{
+RpcRequest: &requests.RpcRequest{},
+}
+request.InitWithApiInfo("Sts", "2015-04-01", "AssumeRole", "sts", "openAPI")
+return
 }
 }
 
 
 // CreateAssumeRoleResponse creates a response to parse from AssumeRole response
 // CreateAssumeRoleResponse creates a response to parse from AssumeRole response
 func CreateAssumeRoleResponse() (response *AssumeRoleResponse) {
 func CreateAssumeRoleResponse() (response *AssumeRoleResponse) {
-	response = &AssumeRoleResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
+response = &AssumeRoleResponse{
+BaseResponse: &responses.BaseResponse{},
+}
+return
 }
 }
+
+

+ 114 - 0
services/sts/assume_role_with_saml.go

@@ -0,0 +1,114 @@
+
+package sts
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// AssumeRoleWithSAML invokes the sts.AssumeRoleWithSAML API synchronously
+// api document: https://help.aliyun.com/api/sts/assumerolewithsaml.html
+func (client *Client) AssumeRoleWithSAML(request *AssumeRoleWithSAMLRequest) (response *AssumeRoleWithSAMLResponse, err error) {
+response = CreateAssumeRoleWithSAMLResponse()
+err = client.DoAction(request, response)
+return
+}
+
+// AssumeRoleWithSAMLWithChan invokes the sts.AssumeRoleWithSAML API asynchronously
+// api document: https://help.aliyun.com/api/sts/assumerolewithsaml.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) AssumeRoleWithSAMLWithChan(request *AssumeRoleWithSAMLRequest) (<-chan *AssumeRoleWithSAMLResponse, <-chan error) {
+responseChan := make(chan *AssumeRoleWithSAMLResponse, 1)
+errChan := make(chan error, 1)
+err := client.AddAsyncTask(func() {
+defer close(responseChan)
+defer close(errChan)
+response, err :=  client.AssumeRoleWithSAML(request)
+if err != nil {
+errChan <- err
+} else {
+responseChan <- response
+}
+})
+if err != nil {
+errChan <- err
+close(responseChan)
+close(errChan)
+}
+return responseChan, errChan
+}
+
+// AssumeRoleWithSAMLWithCallback invokes the sts.AssumeRoleWithSAML API asynchronously
+// api document: https://help.aliyun.com/api/sts/assumerolewithsaml.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) AssumeRoleWithSAMLWithCallback(request *AssumeRoleWithSAMLRequest, callback func(response *AssumeRoleWithSAMLResponse, err error)) (<-chan int) {
+result := make(chan int, 1)
+err := client.AddAsyncTask(func() {
+var response *AssumeRoleWithSAMLResponse
+var err error
+defer close(result)
+response, err = client.AssumeRoleWithSAML(request)
+callback(response, err)
+result <- 1
+})
+if err != nil {
+defer close(result)
+callback(nil, err)
+result <- 0
+}
+return result
+}
+
+// AssumeRoleWithSAMLRequest is the request struct for api AssumeRoleWithSAML
+type AssumeRoleWithSAMLRequest struct {
+*requests.RpcRequest
+                    SAMLAssertion     string `position:"Query" name:"SAMLAssertion"`
+                    RoleArn     string `position:"Query" name:"RoleArn"`
+                    SAMLProviderArn     string `position:"Query" name:"SAMLProviderArn"`
+                    DurationSeconds     requests.Integer `position:"Query" name:"DurationSeconds"`
+                    Policy     string `position:"Query" name:"Policy"`
+}
+
+
+// AssumeRoleWithSAMLResponse is the response struct for api AssumeRoleWithSAML
+type AssumeRoleWithSAMLResponse struct {
+*responses.BaseResponse
+            RequestId     string `json:"RequestId" xml:"RequestId"`
+            Credentials Credentials  `json:"Credentials" xml:"Credentials"`
+            AssumedRoleUser AssumedRoleUser  `json:"AssumedRoleUser" xml:"AssumedRoleUser"`
+            SAMLAssertionInfo SAMLAssertionInfo  `json:"SAMLAssertionInfo" xml:"SAMLAssertionInfo"`
+}
+
+// CreateAssumeRoleWithSAMLRequest creates a request to invoke AssumeRoleWithSAML API
+func CreateAssumeRoleWithSAMLRequest() (request *AssumeRoleWithSAMLRequest) {
+request = &AssumeRoleWithSAMLRequest{
+RpcRequest: &requests.RpcRequest{},
+}
+request.InitWithApiInfo("Sts", "2015-04-01", "AssumeRoleWithSAML", "sts", "openAPI")
+return
+}
+
+// CreateAssumeRoleWithSAMLResponse creates a response to parse from AssumeRoleWithSAML response
+func CreateAssumeRoleWithSAMLResponse() (response *AssumeRoleWithSAMLResponse) {
+response = &AssumeRoleWithSAMLResponse{
+BaseResponse: &responses.BaseResponse{},
+}
+return
+}
+
+

+ 113 - 0
services/sts/assume_role_with_service_identity.go

@@ -0,0 +1,113 @@
+
+package sts
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// AssumeRoleWithServiceIdentity invokes the sts.AssumeRoleWithServiceIdentity API synchronously
+// api document: https://help.aliyun.com/api/sts/assumerolewithserviceidentity.html
+func (client *Client) AssumeRoleWithServiceIdentity(request *AssumeRoleWithServiceIdentityRequest) (response *AssumeRoleWithServiceIdentityResponse, err error) {
+response = CreateAssumeRoleWithServiceIdentityResponse()
+err = client.DoAction(request, response)
+return
+}
+
+// AssumeRoleWithServiceIdentityWithChan invokes the sts.AssumeRoleWithServiceIdentity API asynchronously
+// api document: https://help.aliyun.com/api/sts/assumerolewithserviceidentity.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) AssumeRoleWithServiceIdentityWithChan(request *AssumeRoleWithServiceIdentityRequest) (<-chan *AssumeRoleWithServiceIdentityResponse, <-chan error) {
+responseChan := make(chan *AssumeRoleWithServiceIdentityResponse, 1)
+errChan := make(chan error, 1)
+err := client.AddAsyncTask(func() {
+defer close(responseChan)
+defer close(errChan)
+response, err :=  client.AssumeRoleWithServiceIdentity(request)
+if err != nil {
+errChan <- err
+} else {
+responseChan <- response
+}
+})
+if err != nil {
+errChan <- err
+close(responseChan)
+close(errChan)
+}
+return responseChan, errChan
+}
+
+// AssumeRoleWithServiceIdentityWithCallback invokes the sts.AssumeRoleWithServiceIdentity API asynchronously
+// api document: https://help.aliyun.com/api/sts/assumerolewithserviceidentity.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) AssumeRoleWithServiceIdentityWithCallback(request *AssumeRoleWithServiceIdentityRequest, callback func(response *AssumeRoleWithServiceIdentityResponse, err error)) (<-chan int) {
+result := make(chan int, 1)
+err := client.AddAsyncTask(func() {
+var response *AssumeRoleWithServiceIdentityResponse
+var err error
+defer close(result)
+response, err = client.AssumeRoleWithServiceIdentity(request)
+callback(response, err)
+result <- 1
+})
+if err != nil {
+defer close(result)
+callback(nil, err)
+result <- 0
+}
+return result
+}
+
+// AssumeRoleWithServiceIdentityRequest is the request struct for api AssumeRoleWithServiceIdentity
+type AssumeRoleWithServiceIdentityRequest struct {
+*requests.RpcRequest
+                    RoleSessionName     string `position:"Query" name:"RoleSessionName"`
+                    Policy     string `position:"Query" name:"Policy"`
+                    AssumeRoleFor     string `position:"Query" name:"AssumeRoleFor"`
+                    RoleArn     string `position:"Query" name:"RoleArn"`
+                    DurationSeconds     requests.Integer `position:"Query" name:"DurationSeconds"`
+}
+
+
+// AssumeRoleWithServiceIdentityResponse is the response struct for api AssumeRoleWithServiceIdentity
+type AssumeRoleWithServiceIdentityResponse struct {
+*responses.BaseResponse
+            RequestId     string `json:"RequestId" xml:"RequestId"`
+            Credentials Credentials  `json:"Credentials" xml:"Credentials"`
+            AssumedRoleUser AssumedRoleUser  `json:"AssumedRoleUser" xml:"AssumedRoleUser"`
+}
+
+// CreateAssumeRoleWithServiceIdentityRequest creates a request to invoke AssumeRoleWithServiceIdentity API
+func CreateAssumeRoleWithServiceIdentityRequest() (request *AssumeRoleWithServiceIdentityRequest) {
+request = &AssumeRoleWithServiceIdentityRequest{
+RpcRequest: &requests.RpcRequest{},
+}
+request.InitWithApiInfo("Sts", "2015-04-01", "AssumeRoleWithServiceIdentity", "sts", "openAPI")
+return
+}
+
+// CreateAssumeRoleWithServiceIdentityResponse creates a response to parse from AssumeRoleWithServiceIdentity response
+func CreateAssumeRoleWithServiceIdentityResponse() (response *AssumeRoleWithServiceIdentityResponse) {
+response = &AssumeRoleWithServiceIdentityResponse{
+BaseResponse: &responses.BaseResponse{},
+}
+return
+}
+
+

+ 53 - 29
services/sts/client.go

@@ -1,3 +1,4 @@
+
 package sts
 package sts
 
 
 //Licensed under the Apache License, Version 2.0 (the "License");
 //Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,66 +17,89 @@ package sts
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 
 
 import (
 import (
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+    "github.com/aliyun/alibaba-cloud-sdk-go/sdk"
+    "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+    "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider"
 )
 )
 
 
 // Client is the sdk client struct, each func corresponds to an OpenAPI
 // Client is the sdk client struct, each func corresponds to an OpenAPI
 type Client struct {
 type Client struct {
-	sdk.Client
+    sdk.Client
 }
 }
 
 
 // NewClient creates a sdk client with environment variables
 // NewClient creates a sdk client with environment variables
 func NewClient() (client *Client, err error) {
 func NewClient() (client *Client, err error) {
-	client = &Client{}
-	err = client.Init()
-	return
+    client = &Client{}
+    err = client.Init()
+    return
+}
+
+// NewClientWithProvider creates a sdk client with providers
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) {
+    client = &Client{}
+    var pc provider.Provider
+    if len(providers) == 0 {
+        pc = provider.DefaultChain
+    } else {
+        pc = provider.NewProviderChain(providers)
+    }
+    err = client.InitWithProviderChain(regionId, pc)
+    return
 }
 }
 
 
 // NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
 // NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
 // this is the common api to create a sdk client
 // this is the common api to create a sdk client
 func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
 func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
-	client = &Client{}
-	err = client.InitWithOptions(regionId, config, credential)
-	return
+    client = &Client{}
+    err = client.InitWithOptions(regionId, config, credential)
+    return
 }
 }
 
 
 // NewClientWithAccessKey is a shortcut to create sdk client with accesskey
 // NewClientWithAccessKey is a shortcut to create sdk client with accesskey
-// usage: https://help.aliyun.com/document_detail/66217.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
 func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
-	client = &Client{}
-	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
-	return
+    client = &Client{}
+    err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+    return
 }
 }
 
 
 // NewClientWithStsToken is a shortcut to create sdk client with sts token
 // NewClientWithStsToken is a shortcut to create sdk client with sts token
-// usage: https://help.aliyun.com/document_detail/66222.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
 func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
-	client = &Client{}
-	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
-	return
+    client = &Client{}
+    err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+    return
 }
 }
 
 
 // NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
 // NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
-// usage: https://help.aliyun.com/document_detail/66222.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
 func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
-	client = &Client{}
-	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
-	return
+    client = &Client{}
+    err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+    return
+}
+
+// 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
+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)
+    return
 }
 }
 
 
 // NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
 // NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
-// usage: https://help.aliyun.com/document_detail/66223.html
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
 func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
-	client = &Client{}
-	err = client.InitWithEcsRamRole(regionId, roleName)
-	return
+    client = &Client{}
+    err = client.InitWithEcsRamRole(regionId, roleName)
+    return
 }
 }
 
 
 // NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
 // NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
-// attention: rsa key pair auth is only Japan regions available
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
 func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
 func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
-	client = &Client{}
-	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
-	return
+    client = &Client{}
+    err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+    return
 }
 }

+ 57 - 53
services/sts/generate_session_access_key.go

@@ -1,3 +1,4 @@
+
 package sts
 package sts
 
 
 //Licensed under the Apache License, Version 2.0 (the "License");
 //Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,89 +17,92 @@ package sts
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 
 
 import (
 import (
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
 )
 )
 
 
 // GenerateSessionAccessKey invokes the sts.GenerateSessionAccessKey API synchronously
 // GenerateSessionAccessKey invokes the sts.GenerateSessionAccessKey API synchronously
 // api document: https://help.aliyun.com/api/sts/generatesessionaccesskey.html
 // api document: https://help.aliyun.com/api/sts/generatesessionaccesskey.html
 func (client *Client) GenerateSessionAccessKey(request *GenerateSessionAccessKeyRequest) (response *GenerateSessionAccessKeyResponse, err error) {
 func (client *Client) GenerateSessionAccessKey(request *GenerateSessionAccessKeyRequest) (response *GenerateSessionAccessKeyResponse, err error) {
-	response = CreateGenerateSessionAccessKeyResponse()
-	err = client.DoAction(request, response)
-	return
+response = CreateGenerateSessionAccessKeyResponse()
+err = client.DoAction(request, response)
+return
 }
 }
 
 
 // GenerateSessionAccessKeyWithChan invokes the sts.GenerateSessionAccessKey API asynchronously
 // GenerateSessionAccessKeyWithChan invokes the sts.GenerateSessionAccessKey API asynchronously
 // api document: https://help.aliyun.com/api/sts/generatesessionaccesskey.html
 // api document: https://help.aliyun.com/api/sts/generatesessionaccesskey.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
 func (client *Client) GenerateSessionAccessKeyWithChan(request *GenerateSessionAccessKeyRequest) (<-chan *GenerateSessionAccessKeyResponse, <-chan error) {
 func (client *Client) GenerateSessionAccessKeyWithChan(request *GenerateSessionAccessKeyRequest) (<-chan *GenerateSessionAccessKeyResponse, <-chan error) {
-	responseChan := make(chan *GenerateSessionAccessKeyResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.GenerateSessionAccessKey(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
+responseChan := make(chan *GenerateSessionAccessKeyResponse, 1)
+errChan := make(chan error, 1)
+err := client.AddAsyncTask(func() {
+defer close(responseChan)
+defer close(errChan)
+response, err :=  client.GenerateSessionAccessKey(request)
+if err != nil {
+errChan <- err
+} else {
+responseChan <- response
+}
+})
+if err != nil {
+errChan <- err
+close(responseChan)
+close(errChan)
+}
+return responseChan, errChan
 }
 }
 
 
 // GenerateSessionAccessKeyWithCallback invokes the sts.GenerateSessionAccessKey API asynchronously
 // GenerateSessionAccessKeyWithCallback invokes the sts.GenerateSessionAccessKey API asynchronously
 // api document: https://help.aliyun.com/api/sts/generatesessionaccesskey.html
 // api document: https://help.aliyun.com/api/sts/generatesessionaccesskey.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) GenerateSessionAccessKeyWithCallback(request *GenerateSessionAccessKeyRequest, callback func(response *GenerateSessionAccessKeyResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *GenerateSessionAccessKeyResponse
-		var err error
-		defer close(result)
-		response, err = client.GenerateSessionAccessKey(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
+func (client *Client) GenerateSessionAccessKeyWithCallback(request *GenerateSessionAccessKeyRequest, callback func(response *GenerateSessionAccessKeyResponse, err error)) (<-chan int) {
+result := make(chan int, 1)
+err := client.AddAsyncTask(func() {
+var response *GenerateSessionAccessKeyResponse
+var err error
+defer close(result)
+response, err = client.GenerateSessionAccessKey(request)
+callback(response, err)
+result <- 1
+})
+if err != nil {
+defer close(result)
+callback(nil, err)
+result <- 0
+}
+return result
 }
 }
 
 
 // GenerateSessionAccessKeyRequest is the request struct for api GenerateSessionAccessKey
 // GenerateSessionAccessKeyRequest is the request struct for api GenerateSessionAccessKey
 type GenerateSessionAccessKeyRequest struct {
 type GenerateSessionAccessKeyRequest struct {
-	*requests.RpcRequest
-	DurationSeconds requests.Integer `position:"Query" name:"DurationSeconds"`
+*requests.RpcRequest
+                    DurationSeconds     requests.Integer `position:"Query" name:"DurationSeconds"`
 }
 }
 
 
+
 // GenerateSessionAccessKeyResponse is the response struct for api GenerateSessionAccessKey
 // GenerateSessionAccessKeyResponse is the response struct for api GenerateSessionAccessKey
 type GenerateSessionAccessKeyResponse struct {
 type GenerateSessionAccessKeyResponse struct {
-	*responses.BaseResponse
-	RequestId        string           `json:"RequestId" xml:"RequestId"`
-	SessionAccessKey SessionAccessKey `json:"SessionAccessKey" xml:"SessionAccessKey"`
+*responses.BaseResponse
+            RequestId     string `json:"RequestId" xml:"RequestId"`
+            SessionAccessKey SessionAccessKey  `json:"SessionAccessKey" xml:"SessionAccessKey"`
 }
 }
 
 
 // CreateGenerateSessionAccessKeyRequest creates a request to invoke GenerateSessionAccessKey API
 // CreateGenerateSessionAccessKeyRequest creates a request to invoke GenerateSessionAccessKey API
 func CreateGenerateSessionAccessKeyRequest() (request *GenerateSessionAccessKeyRequest) {
 func CreateGenerateSessionAccessKeyRequest() (request *GenerateSessionAccessKeyRequest) {
-	request = &GenerateSessionAccessKeyRequest{
-		RpcRequest: &requests.RpcRequest{},
-	}
-	request.InitWithApiInfo("Sts", "2015-04-01", "GenerateSessionAccessKey", "sts", "openAPI")
-	return
+request = &GenerateSessionAccessKeyRequest{
+RpcRequest: &requests.RpcRequest{},
+}
+request.InitWithApiInfo("Sts", "2015-04-01", "GenerateSessionAccessKey", "sts", "openAPI")
+return
 }
 }
 
 
 // CreateGenerateSessionAccessKeyResponse creates a response to parse from GenerateSessionAccessKey response
 // CreateGenerateSessionAccessKeyResponse creates a response to parse from GenerateSessionAccessKey response
 func CreateGenerateSessionAccessKeyResponse() (response *GenerateSessionAccessKeyResponse) {
 func CreateGenerateSessionAccessKeyResponse() (response *GenerateSessionAccessKeyResponse) {
-	response = &GenerateSessionAccessKeyResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
+response = &GenerateSessionAccessKeyResponse{
+BaseResponse: &responses.BaseResponse{},
+}
+return
 }
 }
+
+

+ 61 - 57
services/sts/get_caller_identity.go

@@ -1,3 +1,4 @@
+
 package sts
 package sts
 
 
 //Licensed under the Apache License, Version 2.0 (the "License");
 //Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,93 +17,96 @@ package sts
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 
 
 import (
 import (
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
 )
 )
 
 
 // GetCallerIdentity invokes the sts.GetCallerIdentity API synchronously
 // GetCallerIdentity invokes the sts.GetCallerIdentity API synchronously
 // api document: https://help.aliyun.com/api/sts/getcalleridentity.html
 // api document: https://help.aliyun.com/api/sts/getcalleridentity.html
 func (client *Client) GetCallerIdentity(request *GetCallerIdentityRequest) (response *GetCallerIdentityResponse, err error) {
 func (client *Client) GetCallerIdentity(request *GetCallerIdentityRequest) (response *GetCallerIdentityResponse, err error) {
-	response = CreateGetCallerIdentityResponse()
-	err = client.DoAction(request, response)
-	return
+response = CreateGetCallerIdentityResponse()
+err = client.DoAction(request, response)
+return
 }
 }
 
 
 // GetCallerIdentityWithChan invokes the sts.GetCallerIdentity API asynchronously
 // GetCallerIdentityWithChan invokes the sts.GetCallerIdentity API asynchronously
 // api document: https://help.aliyun.com/api/sts/getcalleridentity.html
 // api document: https://help.aliyun.com/api/sts/getcalleridentity.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
 func (client *Client) GetCallerIdentityWithChan(request *GetCallerIdentityRequest) (<-chan *GetCallerIdentityResponse, <-chan error) {
 func (client *Client) GetCallerIdentityWithChan(request *GetCallerIdentityRequest) (<-chan *GetCallerIdentityResponse, <-chan error) {
-	responseChan := make(chan *GetCallerIdentityResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.GetCallerIdentity(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
+responseChan := make(chan *GetCallerIdentityResponse, 1)
+errChan := make(chan error, 1)
+err := client.AddAsyncTask(func() {
+defer close(responseChan)
+defer close(errChan)
+response, err :=  client.GetCallerIdentity(request)
+if err != nil {
+errChan <- err
+} else {
+responseChan <- response
+}
+})
+if err != nil {
+errChan <- err
+close(responseChan)
+close(errChan)
+}
+return responseChan, errChan
 }
 }
 
 
 // GetCallerIdentityWithCallback invokes the sts.GetCallerIdentity API asynchronously
 // GetCallerIdentityWithCallback invokes the sts.GetCallerIdentity API asynchronously
 // api document: https://help.aliyun.com/api/sts/getcalleridentity.html
 // api document: https://help.aliyun.com/api/sts/getcalleridentity.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) GetCallerIdentityWithCallback(request *GetCallerIdentityRequest, callback func(response *GetCallerIdentityResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *GetCallerIdentityResponse
-		var err error
-		defer close(result)
-		response, err = client.GetCallerIdentity(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
+func (client *Client) GetCallerIdentityWithCallback(request *GetCallerIdentityRequest, callback func(response *GetCallerIdentityResponse, err error)) (<-chan int) {
+result := make(chan int, 1)
+err := client.AddAsyncTask(func() {
+var response *GetCallerIdentityResponse
+var err error
+defer close(result)
+response, err = client.GetCallerIdentity(request)
+callback(response, err)
+result <- 1
+})
+if err != nil {
+defer close(result)
+callback(nil, err)
+result <- 0
+}
+return result
 }
 }
 
 
 // GetCallerIdentityRequest is the request struct for api GetCallerIdentity
 // GetCallerIdentityRequest is the request struct for api GetCallerIdentity
 type GetCallerIdentityRequest struct {
 type GetCallerIdentityRequest struct {
-	*requests.RpcRequest
+*requests.RpcRequest
 }
 }
 
 
+
 // GetCallerIdentityResponse is the response struct for api GetCallerIdentity
 // GetCallerIdentityResponse is the response struct for api GetCallerIdentity
 type GetCallerIdentityResponse struct {
 type GetCallerIdentityResponse struct {
-	*responses.BaseResponse
-	AccountId    string `json:"AccountId" xml:"AccountId"`
-	UserId       string `json:"UserId" xml:"UserId"`
-	RoleId       string `json:"RoleId" xml:"RoleId"`
-	Arn          string `json:"Arn" xml:"Arn"`
-	IdentityType string `json:"IdentityType" xml:"IdentityType"`
-	PrincipalId  string `json:"PrincipalId" xml:"PrincipalId"`
-	RequestId    string `json:"RequestId" xml:"RequestId"`
+*responses.BaseResponse
+            AccountId     string `json:"AccountId" xml:"AccountId"`
+            UserId     string `json:"UserId" xml:"UserId"`
+            RoleId     string `json:"RoleId" xml:"RoleId"`
+            Arn     string `json:"Arn" xml:"Arn"`
+            IdentityType     string `json:"IdentityType" xml:"IdentityType"`
+            PrincipalId     string `json:"PrincipalId" xml:"PrincipalId"`
+            RequestId     string `json:"RequestId" xml:"RequestId"`
 }
 }
 
 
 // CreateGetCallerIdentityRequest creates a request to invoke GetCallerIdentity API
 // CreateGetCallerIdentityRequest creates a request to invoke GetCallerIdentity API
 func CreateGetCallerIdentityRequest() (request *GetCallerIdentityRequest) {
 func CreateGetCallerIdentityRequest() (request *GetCallerIdentityRequest) {
-	request = &GetCallerIdentityRequest{
-		RpcRequest: &requests.RpcRequest{},
-	}
-	request.InitWithApiInfo("Sts", "2015-04-01", "GetCallerIdentity", "sts", "openAPI")
-	return
+request = &GetCallerIdentityRequest{
+RpcRequest: &requests.RpcRequest{},
+}
+request.InitWithApiInfo("Sts", "2015-04-01", "GetCallerIdentity", "sts", "openAPI")
+return
 }
 }
 
 
 // CreateGetCallerIdentityResponse creates a response to parse from GetCallerIdentity response
 // CreateGetCallerIdentityResponse creates a response to parse from GetCallerIdentity response
 func CreateGetCallerIdentityResponse() (response *GetCallerIdentityResponse) {
 func CreateGetCallerIdentityResponse() (response *GetCallerIdentityResponse) {
-	response = &GetCallerIdentityResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
+response = &GetCallerIdentityResponse{
+BaseResponse: &responses.BaseResponse{},
+}
+return
 }
 }
+
+

+ 111 - 0
services/sts/get_federation_token.go

@@ -0,0 +1,111 @@
+
+package sts
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetFederationToken invokes the sts.GetFederationToken API synchronously
+// api document: https://help.aliyun.com/api/sts/getfederationtoken.html
+func (client *Client) GetFederationToken(request *GetFederationTokenRequest) (response *GetFederationTokenResponse, err error) {
+response = CreateGetFederationTokenResponse()
+err = client.DoAction(request, response)
+return
+}
+
+// GetFederationTokenWithChan invokes the sts.GetFederationToken API asynchronously
+// api document: https://help.aliyun.com/api/sts/getfederationtoken.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetFederationTokenWithChan(request *GetFederationTokenRequest) (<-chan *GetFederationTokenResponse, <-chan error) {
+responseChan := make(chan *GetFederationTokenResponse, 1)
+errChan := make(chan error, 1)
+err := client.AddAsyncTask(func() {
+defer close(responseChan)
+defer close(errChan)
+response, err :=  client.GetFederationToken(request)
+if err != nil {
+errChan <- err
+} else {
+responseChan <- response
+}
+})
+if err != nil {
+errChan <- err
+close(responseChan)
+close(errChan)
+}
+return responseChan, errChan
+}
+
+// GetFederationTokenWithCallback invokes the sts.GetFederationToken API asynchronously
+// api document: https://help.aliyun.com/api/sts/getfederationtoken.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetFederationTokenWithCallback(request *GetFederationTokenRequest, callback func(response *GetFederationTokenResponse, err error)) (<-chan int) {
+result := make(chan int, 1)
+err := client.AddAsyncTask(func() {
+var response *GetFederationTokenResponse
+var err error
+defer close(result)
+response, err = client.GetFederationToken(request)
+callback(response, err)
+result <- 1
+})
+if err != nil {
+defer close(result)
+callback(nil, err)
+result <- 0
+}
+return result
+}
+
+// GetFederationTokenRequest is the request struct for api GetFederationToken
+type GetFederationTokenRequest struct {
+*requests.RpcRequest
+                    Name     string `position:"Query" name:"Name"`
+                    DurationSeconds     requests.Integer `position:"Query" name:"DurationSeconds"`
+                    Policy     string `position:"Query" name:"Policy"`
+}
+
+
+// GetFederationTokenResponse is the response struct for api GetFederationToken
+type GetFederationTokenResponse struct {
+*responses.BaseResponse
+            RequestId     string `json:"RequestId" xml:"RequestId"`
+            Credentials Credentials  `json:"Credentials" xml:"Credentials"`
+            FederatedUser FederatedUser  `json:"FederatedUser" xml:"FederatedUser"`
+}
+
+// CreateGetFederationTokenRequest creates a request to invoke GetFederationToken API
+func CreateGetFederationTokenRequest() (request *GetFederationTokenRequest) {
+request = &GetFederationTokenRequest{
+RpcRequest: &requests.RpcRequest{},
+}
+request.InitWithApiInfo("Sts", "2015-04-01", "GetFederationToken", "sts", "openAPI")
+return
+}
+
+// CreateGetFederationTokenResponse creates a response to parse from GetFederationToken response
+func CreateGetFederationTokenResponse() (response *GetFederationTokenResponse) {
+response = &GetFederationTokenResponse{
+BaseResponse: &responses.BaseResponse{},
+}
+return
+}
+
+

+ 3 - 2
services/sts/struct_assumed_role_user.go

@@ -1,3 +1,4 @@
+
 package sts
 package sts
 
 
 //Licensed under the Apache License, Version 2.0 (the "License");
 //Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,6 +18,6 @@ package sts
 
 
 // AssumedRoleUser is a nested struct in sts response
 // AssumedRoleUser is a nested struct in sts response
 type AssumedRoleUser struct {
 type AssumedRoleUser struct {
-	Arn           string `json:"Arn" xml:"Arn"`
-	AssumedRoleId string `json:"AssumedRoleId" xml:"AssumedRoleId"`
+            AssumedRoleId     string `json:"AssumedRoleId" xml:"AssumedRoleId"`
+            Arn     string `json:"Arn" xml:"Arn"`
 }
 }

+ 5 - 4
services/sts/struct_credentials.go

@@ -1,3 +1,4 @@
+
 package sts
 package sts
 
 
 //Licensed under the Apache License, Version 2.0 (the "License");
 //Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,8 +18,8 @@ package sts
 
 
 // Credentials is a nested struct in sts response
 // Credentials is a nested struct in sts response
 type Credentials struct {
 type Credentials struct {
-	SecurityToken   string `json:"SecurityToken" xml:"SecurityToken"`
-	AccessKeySecret string `json:"AccessKeySecret" xml:"AccessKeySecret"`
-	AccessKeyId     string `json:"AccessKeyId" xml:"AccessKeyId"`
-	Expiration      string `json:"Expiration" xml:"Expiration"`
+            AccessKeySecret     string `json:"AccessKeySecret" xml:"AccessKeySecret"`
+            Expiration     string `json:"Expiration" xml:"Expiration"`
+            AccessKeyId     string `json:"AccessKeyId" xml:"AccessKeyId"`
+            SecurityToken     string `json:"SecurityToken" xml:"SecurityToken"`
 }
 }

+ 23 - 0
services/sts/struct_federated_user.go

@@ -0,0 +1,23 @@
+
+package sts
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// FederatedUser is a nested struct in sts response
+type FederatedUser struct {
+            Arn     string `json:"Arn" xml:"Arn"`
+            FederatedUserId     string `json:"FederatedUserId" xml:"FederatedUserId"`
+}

+ 25 - 0
services/sts/struct_saml_assertion_info.go

@@ -0,0 +1,25 @@
+
+package sts
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// SAMLAssertionInfo is a nested struct in sts response
+type SAMLAssertionInfo struct {
+            SubjectType     string `json:"SubjectType" xml:"SubjectType"`
+            Subject     string `json:"Subject" xml:"Subject"`
+            Recipient     string `json:"Recipient" xml:"Recipient"`
+            Issuer     string `json:"Issuer" xml:"Issuer"`
+}

+ 4 - 3
services/sts/struct_session_access_key.go

@@ -1,3 +1,4 @@
+
 package sts
 package sts
 
 
 //Licensed under the Apache License, Version 2.0 (the "License");
 //Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +18,7 @@ package sts
 
 
 // SessionAccessKey is a nested struct in sts response
 // SessionAccessKey is a nested struct in sts response
 type SessionAccessKey struct {
 type SessionAccessKey struct {
-	SessionAccessKeyId     string `json:"SessionAccessKeyId" xml:"SessionAccessKeyId"`
-	SessionAccessKeySecret string `json:"SessionAccessKeySecret" xml:"SessionAccessKeySecret"`
-	Expiration             string `json:"Expiration" xml:"Expiration"`
+            SessionAccessKeyId     string `json:"SessionAccessKeyId" xml:"SessionAccessKeyId"`
+            SessionAccessKeySecret     string `json:"SessionAccessKeySecret" xml:"SessionAccessKeySecret"`
+            Expiration     string `json:"Expiration" xml:"Expiration"`
 }
 }