client

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Overview

This file is auto-generated, don't edit it. Thanks. *

*

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssumeRoleRequest

type AssumeRoleRequest struct {
	// The validity period of the STS token. Unit: seconds.
	//
	// Minimum value: 900. Maximum value: the value of the `MaxSessionDuration` parameter. Default value: 3600.
	//
	// You can call the CreateRole or UpdateRole operation to configure the `MaxSessionDuration` parameter. For more information, see [CreateRole](~~28710~~) or [UpdateRole](~~28712~~).
	DurationSeconds *int64 `json:"DurationSeconds,omitempty" xml:"DurationSeconds,omitempty"`
	// The external ID of the RAM role.
	//
	// This parameter is provided by an external party and is used to prevent the confused deputy problem.
	//
	// The value must be 2 to 1,224 characters in length and can contain letters, digits, and the following special characters: `= , . @ : / - _`. The regular expression for this parameter is `[\w+=,.@:\/-]*`.
	ExternalId *string `json:"ExternalId,omitempty" xml:"ExternalId,omitempty"`
	// The policy that specifies the permissions of the returned STS token. You can use this parameter to grant the STS token fewer permissions than the permissions granted to the RAM role.
	//
	// *   If you specify this parameter, the permissions of the returned STS token are the permissions that are included in the value of this parameter and owned by the RAM role.
	// *   If you do not specify this parameter, the returned STS token has all the permissions of the RAM role.
	//
	// The value must be 1 to 2,048 characters in length.
	//
	// For more information about policy elements and sample policies, see [Policy elements](~~93738~~) and [Overview of sample policies](~~210969~~).
	Policy *string `json:"Policy,omitempty" xml:"Policy,omitempty"`
	// The Alibaba Cloud Resource Name (ARN) of the RAM role.
	//
	// The trusted entity of the RAM role is an Alibaba Cloud account. For more information, see [Create a RAM role for a trusted Alibaba Cloud account](~~93691~~) or [CreateRole](~~28710~~).
	//
	// Format: `acs:ram::<account_id>:role/<role_name>`.
	//
	// You can view the ARN in the RAM console or by calling operations. The following items describe the validity periods of storage addresses:
	//
	// *   For more information about how to view the ARN in the RAM console, see [How do I find the ARN of the RAM role?](~~39744~~)
	// *   For more information about how to view the ARN by calling operations, see [ListRoles](~~28713~~) or [GetRole](~~28711~~).
	RoleArn *string `json:"RoleArn,omitempty" xml:"RoleArn,omitempty"`
	// The custom name of the role session.
	//
	// Set this parameter based on your business requirements. In most cases, you can set this parameter to the identity of the API caller. For example, you can specify a username. You can specify `RoleSessionName` to identify API callers that assume the same RAM role in ActionTrail logs. This allows you to track the users that perform the operations.
	//
	// The value must be 2 to 64 characters in length and can contain letters, digits, and the following special characters: `. @ - _`.
	RoleSessionName *string `json:"RoleSessionName,omitempty" xml:"RoleSessionName,omitempty"`
}

func (AssumeRoleRequest) GoString

func (s AssumeRoleRequest) GoString() string

func (*AssumeRoleRequest) SetDurationSeconds

func (s *AssumeRoleRequest) SetDurationSeconds(v int64) *AssumeRoleRequest

func (*AssumeRoleRequest) SetExternalId added in v2.0.1

func (s *AssumeRoleRequest) SetExternalId(v string) *AssumeRoleRequest

func (*AssumeRoleRequest) SetPolicy

func (s *AssumeRoleRequest) SetPolicy(v string) *AssumeRoleRequest

func (*AssumeRoleRequest) SetRoleArn

func (s *AssumeRoleRequest) SetRoleArn(v string) *AssumeRoleRequest

func (*AssumeRoleRequest) SetRoleSessionName

func (s *AssumeRoleRequest) SetRoleSessionName(v string) *AssumeRoleRequest

func (AssumeRoleRequest) String

func (s AssumeRoleRequest) String() string

type AssumeRoleResponse

type AssumeRoleResponse struct {
	Headers    map[string]*string      `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`
	StatusCode *int32                  `json:"statusCode,omitempty" xml:"statusCode,omitempty" require:"true"`
	Body       *AssumeRoleResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`
}

func (AssumeRoleResponse) GoString

func (s AssumeRoleResponse) GoString() string

func (*AssumeRoleResponse) SetBody

func (*AssumeRoleResponse) SetHeaders

func (s *AssumeRoleResponse) SetHeaders(v map[string]*string) *AssumeRoleResponse

func (*AssumeRoleResponse) SetStatusCode

func (s *AssumeRoleResponse) SetStatusCode(v int32) *AssumeRoleResponse

func (AssumeRoleResponse) String

func (s AssumeRoleResponse) String() string

type AssumeRoleResponseBody

type AssumeRoleResponseBody struct {
	// The temporary identity that you use to assume the RAM role.
	AssumedRoleUser *AssumeRoleResponseBodyAssumedRoleUser `json:"AssumedRoleUser,omitempty" xml:"AssumedRoleUser,omitempty" type:"Struct"`
	// The STS credentials.
	Credentials *AssumeRoleResponseBodyCredentials `json:"Credentials,omitempty" xml:"Credentials,omitempty" type:"Struct"`
	// The ID of the request.
	RequestId *string `json:"RequestId,omitempty" xml:"RequestId,omitempty"`
}

func (AssumeRoleResponseBody) GoString

func (s AssumeRoleResponseBody) GoString() string

func (*AssumeRoleResponseBody) SetAssumedRoleUser

func (*AssumeRoleResponseBody) SetCredentials

func (*AssumeRoleResponseBody) SetRequestId

func (AssumeRoleResponseBody) String

func (s AssumeRoleResponseBody) String() string

type AssumeRoleResponseBodyAssumedRoleUser

type AssumeRoleResponseBodyAssumedRoleUser struct {
	// The ARN of the temporary identity that you use to assume the RAM role.
	Arn *string `json:"Arn,omitempty" xml:"Arn,omitempty"`
	// The ID of the temporary identity that you use to assume the RAM role.
	AssumedRoleId *string `json:"AssumedRoleId,omitempty" xml:"AssumedRoleId,omitempty"`
}

func (AssumeRoleResponseBodyAssumedRoleUser) GoString

func (*AssumeRoleResponseBodyAssumedRoleUser) SetArn

func (*AssumeRoleResponseBodyAssumedRoleUser) SetAssumedRoleId

func (AssumeRoleResponseBodyAssumedRoleUser) String

type AssumeRoleResponseBodyCredentials

type AssumeRoleResponseBodyCredentials struct {
	// The AccessKey ID.
	AccessKeyId *string `json:"AccessKeyId,omitempty" xml:"AccessKeyId,omitempty"`
	// The AccessKey secret.
	AccessKeySecret *string `json:"AccessKeySecret,omitempty" xml:"AccessKeySecret,omitempty"`
	// The time when the STS token expires. The time is displayed in UTC.
	Expiration *string `json:"Expiration,omitempty" xml:"Expiration,omitempty"`
	// The STS token.
	//
	// > Alibaba Cloud STS does not impose limits on the length of STS tokens. We strongly recommend that you do not specify a maximum length for STS tokens.
	SecurityToken *string `json:"SecurityToken,omitempty" xml:"SecurityToken,omitempty"`
}

func (AssumeRoleResponseBodyCredentials) GoString

func (*AssumeRoleResponseBodyCredentials) SetAccessKeyId

func (*AssumeRoleResponseBodyCredentials) SetAccessKeySecret

func (*AssumeRoleResponseBodyCredentials) SetExpiration

func (*AssumeRoleResponseBodyCredentials) SetSecurityToken

func (AssumeRoleResponseBodyCredentials) String

type AssumeRoleWithOIDCRequest

type AssumeRoleWithOIDCRequest struct {
	// The validity period of the STS token. Unit: seconds.
	//
	// Default value: 3600. Minimum value: 900. Maximum value: the value of the `MaxSessionDuration` parameter.
	//
	// For more information about how to specify `MaxSessionDuration`, see [CreateRole](~~28710~~) or [UpdateRole](~~28712~~).
	DurationSeconds *int64 `json:"DurationSeconds,omitempty" xml:"DurationSeconds,omitempty"`
	// The Alibaba Cloud Resource Name (ARN) of the OIDC IdP.
	//
	// You can view the ARN in the RAM console or by calling operations.
	//
	// *   For more information about how to view the ARN in the RAM console, see [View the information about an OIDC IdP](~~327123~~).
	// *   For more information about how to view the ARN by calling operations, see [GetOIDCProvider](~~327126~~) or [ListOIDCProviders](~~327127~~).
	OIDCProviderArn *string `json:"OIDCProviderArn,omitempty" xml:"OIDCProviderArn,omitempty"`
	// The OIDC token that is issued by the external IdP.
	//
	// The OIDC token must be 4 to 20,000 characters in length.
	//
	// > You must enter the original OIDC token. You do not need to enter the Base64-encoded OIDC token.
	OIDCToken *string `json:"OIDCToken,omitempty" xml:"OIDCToken,omitempty"`
	// The policy that specifies the permissions of the returned STS token. You can use this parameter to grant the STS token fewer permissions than the permissions granted to the RAM role.
	//
	// *   If you specify this parameter, the permissions of the returned STS token are the permissions that are included in the value of this parameter and owned by the RAM role.
	// *   If you do not specify this parameter, the returned STS token has all the permissions of the RAM role.
	//
	// The value must be 1 to 2,048 characters in length.
	Policy *string `json:"Policy,omitempty" xml:"Policy,omitempty"`
	// The ARN of the RAM role.
	//
	// You can view the ARN in the RAM console or by calling operations.
	//
	// *   For more information about how to view the ARN in the RAM console, see [How do I view the ARN of the RAM role?](~~39744~~)
	// *   For more information about how to view the ARN by calling operations, see [ListRoles](~~28713~~) or [GetRole](~~28711~~).
	RoleArn *string `json:"RoleArn,omitempty" xml:"RoleArn,omitempty"`
	// The custom name of the role session.
	//
	// Set this parameter based on your business requirements. In most cases, this parameter is set to the identity of the user who calls the operation, for example, the username. In ActionTrail logs, you can distinguish the users who assume the same RAM role to perform operations based on the value of the RoleSessionName parameter. This way, you can perform user-specific auditing.
	//
	// The value can contain letters, digits, periods (.), at signs (@), hyphens (-), and underscores (\_).
	//
	// The value must be 2 to 64 characters in length.
	RoleSessionName *string `json:"RoleSessionName,omitempty" xml:"RoleSessionName,omitempty"`
}

func (AssumeRoleWithOIDCRequest) GoString

func (s AssumeRoleWithOIDCRequest) GoString() string

func (*AssumeRoleWithOIDCRequest) SetDurationSeconds

func (s *AssumeRoleWithOIDCRequest) SetDurationSeconds(v int64) *AssumeRoleWithOIDCRequest

func (*AssumeRoleWithOIDCRequest) SetOIDCProviderArn

func (*AssumeRoleWithOIDCRequest) SetOIDCToken

func (*AssumeRoleWithOIDCRequest) SetPolicy

func (*AssumeRoleWithOIDCRequest) SetRoleArn

func (*AssumeRoleWithOIDCRequest) SetRoleSessionName

func (AssumeRoleWithOIDCRequest) String

func (s AssumeRoleWithOIDCRequest) String() string

type AssumeRoleWithOIDCResponse

type AssumeRoleWithOIDCResponse struct {
	Headers    map[string]*string              `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`
	StatusCode *int32                          `json:"statusCode,omitempty" xml:"statusCode,omitempty" require:"true"`
	Body       *AssumeRoleWithOIDCResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`
}

func (AssumeRoleWithOIDCResponse) GoString

func (s AssumeRoleWithOIDCResponse) GoString() string

func (*AssumeRoleWithOIDCResponse) SetBody

func (*AssumeRoleWithOIDCResponse) SetHeaders

func (*AssumeRoleWithOIDCResponse) SetStatusCode

func (AssumeRoleWithOIDCResponse) String

type AssumeRoleWithOIDCResponseBody

type AssumeRoleWithOIDCResponseBody struct {
	// The temporary identity that you use to assume the RAM role.
	AssumedRoleUser *AssumeRoleWithOIDCResponseBodyAssumedRoleUser `json:"AssumedRoleUser,omitempty" xml:"AssumedRoleUser,omitempty" type:"Struct"`
	// The access credentials.
	Credentials *AssumeRoleWithOIDCResponseBodyCredentials `json:"Credentials,omitempty" xml:"Credentials,omitempty" type:"Struct"`
	// The information about the OIDC token.
	OIDCTokenInfo *AssumeRoleWithOIDCResponseBodyOIDCTokenInfo `json:"OIDCTokenInfo,omitempty" xml:"OIDCTokenInfo,omitempty" type:"Struct"`
	// The ID of the request.
	RequestId *string `json:"RequestId,omitempty" xml:"RequestId,omitempty"`
}

func (AssumeRoleWithOIDCResponseBody) GoString

func (*AssumeRoleWithOIDCResponseBody) SetRequestId

func (AssumeRoleWithOIDCResponseBody) String

type AssumeRoleWithOIDCResponseBodyAssumedRoleUser

type AssumeRoleWithOIDCResponseBodyAssumedRoleUser struct {
	// The ARN of the temporary identity that you use to assume the RAM role.
	Arn *string `json:"Arn,omitempty" xml:"Arn,omitempty"`
	// The ID of the temporary identity that you use to assume the RAM role.
	AssumedRoleId *string `json:"AssumedRoleId,omitempty" xml:"AssumedRoleId,omitempty"`
}

func (AssumeRoleWithOIDCResponseBodyAssumedRoleUser) GoString

func (*AssumeRoleWithOIDCResponseBodyAssumedRoleUser) SetArn

func (*AssumeRoleWithOIDCResponseBodyAssumedRoleUser) SetAssumedRoleId

func (AssumeRoleWithOIDCResponseBodyAssumedRoleUser) String

type AssumeRoleWithOIDCResponseBodyCredentials

type AssumeRoleWithOIDCResponseBodyCredentials struct {
	// The AccessKey ID.
	AccessKeyId *string `json:"AccessKeyId,omitempty" xml:"AccessKeyId,omitempty"`
	// The AccessKey secret.
	AccessKeySecret *string `json:"AccessKeySecret,omitempty" xml:"AccessKeySecret,omitempty"`
	// The time when the STS token expires. The time is displayed in UTC.
	Expiration *string `json:"Expiration,omitempty" xml:"Expiration,omitempty"`
	// The STS token.
	//
	// > Alibaba Cloud STS does not impose limits on the length of STS tokens. We strongly recommend that you do not specify a maximum length for STS tokens.
	SecurityToken *string `json:"SecurityToken,omitempty" xml:"SecurityToken,omitempty"`
}

func (AssumeRoleWithOIDCResponseBodyCredentials) GoString

func (*AssumeRoleWithOIDCResponseBodyCredentials) SetAccessKeyId

func (*AssumeRoleWithOIDCResponseBodyCredentials) SetAccessKeySecret

func (*AssumeRoleWithOIDCResponseBodyCredentials) SetExpiration

func (*AssumeRoleWithOIDCResponseBodyCredentials) SetSecurityToken

func (AssumeRoleWithOIDCResponseBodyCredentials) String

type AssumeRoleWithOIDCResponseBodyOIDCTokenInfo

type AssumeRoleWithOIDCResponseBodyOIDCTokenInfo struct {
	// The audience. If multiple audiences are returned, the audiences are separated by commas (,).
	//
	// The audience is represented by the `aud` field in the OIDC Token.
	ClientIds      *string `json:"ClientIds,omitempty" xml:"ClientIds,omitempty"`
	ExpirationTime *string `json:"ExpirationTime,omitempty" xml:"ExpirationTime,omitempty"`
	IssuanceTime   *string `json:"IssuanceTime,omitempty" xml:"IssuanceTime,omitempty"`
	// The URL of the issuer,
	//
	// which is represented by the `iss` field in the OIDC Token.
	Issuer *string `json:"Issuer,omitempty" xml:"Issuer,omitempty"`
	// The subject,
	//
	// which is represented by the `sub` field in the OIDC Token.
	Subject          *string `json:"Subject,omitempty" xml:"Subject,omitempty"`
	VerificationInfo *string `json:"VerificationInfo,omitempty" xml:"VerificationInfo,omitempty"`
}

func (AssumeRoleWithOIDCResponseBodyOIDCTokenInfo) GoString

func (*AssumeRoleWithOIDCResponseBodyOIDCTokenInfo) SetClientIds

func (*AssumeRoleWithOIDCResponseBodyOIDCTokenInfo) SetExpirationTime added in v2.0.2

func (*AssumeRoleWithOIDCResponseBodyOIDCTokenInfo) SetIssuanceTime added in v2.0.2

func (*AssumeRoleWithOIDCResponseBodyOIDCTokenInfo) SetIssuer

func (*AssumeRoleWithOIDCResponseBodyOIDCTokenInfo) SetSubject

func (*AssumeRoleWithOIDCResponseBodyOIDCTokenInfo) SetVerificationInfo added in v2.0.2

func (AssumeRoleWithOIDCResponseBodyOIDCTokenInfo) String

type AssumeRoleWithSAMLRequest

type AssumeRoleWithSAMLRequest struct {
	// The validity period of the STS token. Unit: seconds.
	//
	// Minimum value: 900. Maximum value: the value of the `MaxSessionDuration` parameter. Default value: 3600.
	//
	// You can call the CreateRole or UpdateRole operation to configure the `MaxSessionDuration` parameter. For more information, see [CreateRole](~~28710~~) or [UpdateRole](~~28712~~).
	DurationSeconds *int64 `json:"DurationSeconds,omitempty" xml:"DurationSeconds,omitempty"`
	// The policy that specifies the permissions of the returned STS token. You can use this parameter to grant the STS token fewer permissions than the permissions granted to the RAM role.
	//
	// *   If you specify this parameter, the permissions of the returned STS token are the permissions that are included in the value of this parameter and owned by the RAM role.
	// *   If you do not specify this parameter, the returned STS token has all the permissions of the RAM role.
	//
	// The value must be 1 to 2,048 characters in length.
	Policy *string `json:"Policy,omitempty" xml:"Policy,omitempty"`
	// The ARN of the RAM role.
	//
	// The trust entity of the RAM role is a SAML IdP. For more information, see [Create a RAM role for a trusted IdP](~~116805~~) or [CreateRole](~~28710~~).
	//
	// Format: `acs:ram::<account_id>:role/<role_name>`.
	//
	// You can view the ARN in the RAM console or by calling operations.
	//
	// *   For more information about how to view the ARN in the RAM console, see [How do I view the ARN of the RAM role?](~~39744~~).
	// *   For more information about how to view the ARN by calling operations, see [ListRoles](~~28713~~) or [GetRole](~~28711~~).
	RoleArn *string `json:"RoleArn,omitempty" xml:"RoleArn,omitempty"`
	// The Base64-encoded SAML assertion.
	//
	// The value must be 4 to 100,000 characters in length.
	//
	// > A complete SAML response rather than a single SAMLAssertion field must be retrieved from the external IdP.
	SAMLAssertion *string `json:"SAMLAssertion,omitempty" xml:"SAMLAssertion,omitempty"`
	// The Alibaba Cloud Resource Name (ARN) of the SAML IdP that is created in the RAM console.
	//
	// Format: `acs:ram::<account_id>:saml-provider/<saml_provider_id>`.
	//
	// You can view the ARN in the RAM console or by calling operations.
	//
	// *   For more information about how to view the ARN in the RAM console, see [How do I view the ARN of a RAM role?](~~116795~~)
	// *   For more information about how to view the ARN by calling operations, see [GetSAMLProvider](~~186833~~) or [ListSAMLProviders](~~186851~~).
	SAMLProviderArn *string `json:"SAMLProviderArn,omitempty" xml:"SAMLProviderArn,omitempty"`
}

func (AssumeRoleWithSAMLRequest) GoString

func (s AssumeRoleWithSAMLRequest) GoString() string

func (*AssumeRoleWithSAMLRequest) SetDurationSeconds

func (s *AssumeRoleWithSAMLRequest) SetDurationSeconds(v int64) *AssumeRoleWithSAMLRequest

func (*AssumeRoleWithSAMLRequest) SetPolicy

func (*AssumeRoleWithSAMLRequest) SetRoleArn

func (*AssumeRoleWithSAMLRequest) SetSAMLAssertion

func (*AssumeRoleWithSAMLRequest) SetSAMLProviderArn

func (AssumeRoleWithSAMLRequest) String

func (s AssumeRoleWithSAMLRequest) String() string

type AssumeRoleWithSAMLResponse

type AssumeRoleWithSAMLResponse struct {
	Headers    map[string]*string              `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`
	StatusCode *int32                          `json:"statusCode,omitempty" xml:"statusCode,omitempty" require:"true"`
	Body       *AssumeRoleWithSAMLResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`
}

func (AssumeRoleWithSAMLResponse) GoString

func (s AssumeRoleWithSAMLResponse) GoString() string

func (*AssumeRoleWithSAMLResponse) SetBody

func (*AssumeRoleWithSAMLResponse) SetHeaders

func (*AssumeRoleWithSAMLResponse) SetStatusCode

func (AssumeRoleWithSAMLResponse) String

type AssumeRoleWithSAMLResponseBody

type AssumeRoleWithSAMLResponseBody struct {
	// The temporary identity that you use to assume the RAM role.
	AssumedRoleUser *AssumeRoleWithSAMLResponseBodyAssumedRoleUser `json:"AssumedRoleUser,omitempty" xml:"AssumedRoleUser,omitempty" type:"Struct"`
	// The STS credentials.
	Credentials *AssumeRoleWithSAMLResponseBodyCredentials `json:"Credentials,omitempty" xml:"Credentials,omitempty" type:"Struct"`
	// The ID of the request.
	RequestId *string `json:"RequestId,omitempty" xml:"RequestId,omitempty"`
	// The information in the SAML assertion.
	SAMLAssertionInfo *AssumeRoleWithSAMLResponseBodySAMLAssertionInfo `json:"SAMLAssertionInfo,omitempty" xml:"SAMLAssertionInfo,omitempty" type:"Struct"`
}

func (AssumeRoleWithSAMLResponseBody) GoString

func (*AssumeRoleWithSAMLResponseBody) SetRequestId

func (AssumeRoleWithSAMLResponseBody) String

type AssumeRoleWithSAMLResponseBodyAssumedRoleUser

type AssumeRoleWithSAMLResponseBodyAssumedRoleUser struct {
	// The ARN of the temporary identity that you use to assume the RAM role.
	Arn *string `json:"Arn,omitempty" xml:"Arn,omitempty"`
	// The ID of the temporary identity that you use to assume the RAM role.
	AssumedRoleId *string `json:"AssumedRoleId,omitempty" xml:"AssumedRoleId,omitempty"`
}

func (AssumeRoleWithSAMLResponseBodyAssumedRoleUser) GoString

func (*AssumeRoleWithSAMLResponseBodyAssumedRoleUser) SetArn

func (*AssumeRoleWithSAMLResponseBodyAssumedRoleUser) SetAssumedRoleId

func (AssumeRoleWithSAMLResponseBodyAssumedRoleUser) String

type AssumeRoleWithSAMLResponseBodyCredentials

type AssumeRoleWithSAMLResponseBodyCredentials struct {
	// The AccessKey ID.
	AccessKeyId *string `json:"AccessKeyId,omitempty" xml:"AccessKeyId,omitempty"`
	// The AccessKey secret.
	AccessKeySecret *string `json:"AccessKeySecret,omitempty" xml:"AccessKeySecret,omitempty"`
	// The time when the STS token expires. The time is displayed in UTC.
	Expiration *string `json:"Expiration,omitempty" xml:"Expiration,omitempty"`
	// The STS token.
	//
	// > Alibaba Cloud STS does not impose limits on the length of STS tokens. We strongly recommend that you do not specify a maximum length for STS tokens.
	SecurityToken *string `json:"SecurityToken,omitempty" xml:"SecurityToken,omitempty"`
}

func (AssumeRoleWithSAMLResponseBodyCredentials) GoString

func (*AssumeRoleWithSAMLResponseBodyCredentials) SetAccessKeyId

func (*AssumeRoleWithSAMLResponseBodyCredentials) SetAccessKeySecret

func (*AssumeRoleWithSAMLResponseBodyCredentials) SetExpiration

func (*AssumeRoleWithSAMLResponseBodyCredentials) SetSecurityToken

func (AssumeRoleWithSAMLResponseBodyCredentials) String

type AssumeRoleWithSAMLResponseBodySAMLAssertionInfo

type AssumeRoleWithSAMLResponseBodySAMLAssertionInfo struct {
	// The value in the `Issuer` element in the SAML assertion.
	Issuer *string `json:"Issuer,omitempty" xml:"Issuer,omitempty"`
	// The `Recipient` attribute of the SubjectConfirmationData sub-element. SubjectConfirmationData is a sub-element of the `Subject` element in the SAML assertion.
	Recipient *string `json:"Recipient,omitempty" xml:"Recipient,omitempty"`
	// The value in the NameID sub-element of the `Subject` element in the SAML assertion.
	Subject *string `json:"Subject,omitempty" xml:"Subject,omitempty"`
	// The Format attribute of the `NameID` element in the SAML assertion. If the Format attribute is prefixed with `urn:oasis:names:tc:SAML:2.0:nameid-format:`, the prefix is not included in the value of this parameter. For example, if the value of the Format attribute is urn:oasis:names:tc:SAML:2.0:nameid-format:persistent/transient, the value of this parameter is `persistent/transient`.
	SubjectType *string `json:"SubjectType,omitempty" xml:"SubjectType,omitempty"`
}

func (AssumeRoleWithSAMLResponseBodySAMLAssertionInfo) GoString

func (*AssumeRoleWithSAMLResponseBodySAMLAssertionInfo) SetIssuer

func (*AssumeRoleWithSAMLResponseBodySAMLAssertionInfo) SetRecipient

func (*AssumeRoleWithSAMLResponseBodySAMLAssertionInfo) SetSubject

func (*AssumeRoleWithSAMLResponseBodySAMLAssertionInfo) SetSubjectType

func (AssumeRoleWithSAMLResponseBodySAMLAssertionInfo) String

type Client

type Client struct {
	openapi.Client
}

func NewClient

func NewClient(config *openapi.Config) (*Client, error)

func (*Client) AssumeRole

func (client *Client) AssumeRole(request *AssumeRoleRequest) (_result *AssumeRoleResponse, _err error)

*

  • ### Prerequisites
  • You cannot use an Alibaba Cloud account to call this operation. The requester of this operation can only be a RAM user or RAM role. Make sure that the AliyunSTSAssumeRoleAccess policy is attached to the requester. After this policy is attached to the requester, the requester has the management permissions on STS.
  • If you do not attach the AliyunSTSAssumeRoleAccess policy to the requester, the following error message is returned:
  • `You are not authorized to do this action. You should be authorized by RAM.`
  • You can refer to the following information to troubleshoot the error:
  • * Cause of the error: The policy that is required to assume a RAM role is not attached to the requester. To resolve this issue, attach the AliyunSTSAssumeRoleAccess policy or a custom policy to the requester. For more information, see [Can I specify the RAM role that a RAM user can assume?](~~39744~~) and [Grant permissions to a RAM user](~~116146~~).
  • * Cause of the error: The requester is not authorized to assume the RAM role. To resolve this issue, add the requester to the Principal element in the trust policy of the RAM role For more information, see [Edit the trust policy of a RAM role](~~116819~~).
  • ### Best practices
  • An STS token is valid for a period of time after it is issued, and the number of STS tokens that can be issued within an interval is also limited. Therefore, we recommend that you configure a proper validity period for an STS token and repeatedly use the token within this period. This prevents frequent issuing of STS tokens from adversely affecting your services if a large number of requests are sent. For more information about the limit, see [Is the number of STS API requests limited?](~~39744~~) You can configure the `DurationSeconds` parameter to specify a validity period for an STS token.
  • When you upload or download Object Storage Service (OSS) objects on mobile devices, a large number of STS API requests are sent. In this case, repeated use of an STS token may not meet your business requirements. To avoid the limit on STS API requests from affecting access to OSS, you can **add a signature to the URL of an OSS object**. For more information, see [Add signatures to URLs](~~31952~~) and [Obtain signature information from the server and upload data to OSS](~~31926~~). *
  • @param request AssumeRoleRequest
  • @return AssumeRoleResponse

func (*Client) AssumeRoleWithOIDC

func (client *Client) AssumeRoleWithOIDC(request *AssumeRoleWithOIDCRequest) (_result *AssumeRoleWithOIDCResponse, _err error)

*

  • ### Prerequisites
  • * An OIDC token is obtained from an external identity provider (IdP).
  • * An OIDC IdP is created in the RAM console. For more information, see [Create an OIDC IdP](~~327123~~) or [CreateOIDCProvider](~~327135~~).
  • * A RAM role whose trusted entity is an OIDC IdP is created in the RAM console. For more information, see [Create a RAM role for a trusted IdP](~~116805~~) or [CreateRole](~~28710~~). *
  • @param request AssumeRoleWithOIDCRequest
  • @return AssumeRoleWithOIDCResponse

func (*Client) AssumeRoleWithOIDCWithOptions

func (client *Client) AssumeRoleWithOIDCWithOptions(request *AssumeRoleWithOIDCRequest, runtime *util.RuntimeOptions) (_result *AssumeRoleWithOIDCResponse, _err error)

*

  • ### Prerequisites
  • * An OIDC token is obtained from an external identity provider (IdP).
  • * An OIDC IdP is created in the RAM console. For more information, see [Create an OIDC IdP](~~327123~~) or [CreateOIDCProvider](~~327135~~).
  • * A RAM role whose trusted entity is an OIDC IdP is created in the RAM console. For more information, see [Create a RAM role for a trusted IdP](~~116805~~) or [CreateRole](~~28710~~). *
  • @param request AssumeRoleWithOIDCRequest
  • @param runtime runtime options for this request RuntimeOptions
  • @return AssumeRoleWithOIDCResponse

func (*Client) AssumeRoleWithOptions

func (client *Client) AssumeRoleWithOptions(request *AssumeRoleRequest, runtime *util.RuntimeOptions) (_result *AssumeRoleResponse, _err error)

*

  • ### Prerequisites
  • You cannot use an Alibaba Cloud account to call this operation. The requester of this operation can only be a RAM user or RAM role. Make sure that the AliyunSTSAssumeRoleAccess policy is attached to the requester. After this policy is attached to the requester, the requester has the management permissions on STS.
  • If you do not attach the AliyunSTSAssumeRoleAccess policy to the requester, the following error message is returned:
  • `You are not authorized to do this action. You should be authorized by RAM.`
  • You can refer to the following information to troubleshoot the error:
  • * Cause of the error: The policy that is required to assume a RAM role is not attached to the requester. To resolve this issue, attach the AliyunSTSAssumeRoleAccess policy or a custom policy to the requester. For more information, see [Can I specify the RAM role that a RAM user can assume?](~~39744~~) and [Grant permissions to a RAM user](~~116146~~).
  • * Cause of the error: The requester is not authorized to assume the RAM role. To resolve this issue, add the requester to the Principal element in the trust policy of the RAM role For more information, see [Edit the trust policy of a RAM role](~~116819~~).
  • ### Best practices
  • An STS token is valid for a period of time after it is issued, and the number of STS tokens that can be issued within an interval is also limited. Therefore, we recommend that you configure a proper validity period for an STS token and repeatedly use the token within this period. This prevents frequent issuing of STS tokens from adversely affecting your services if a large number of requests are sent. For more information about the limit, see [Is the number of STS API requests limited?](~~39744~~) You can configure the `DurationSeconds` parameter to specify a validity period for an STS token.
  • When you upload or download Object Storage Service (OSS) objects on mobile devices, a large number of STS API requests are sent. In this case, repeated use of an STS token may not meet your business requirements. To avoid the limit on STS API requests from affecting access to OSS, you can **add a signature to the URL of an OSS object**. For more information, see [Add signatures to URLs](~~31952~~) and [Obtain signature information from the server and upload data to OSS](~~31926~~). *
  • @param request AssumeRoleRequest
  • @param runtime runtime options for this request RuntimeOptions
  • @return AssumeRoleResponse

func (*Client) AssumeRoleWithSAML

func (client *Client) AssumeRoleWithSAML(request *AssumeRoleWithSAMLRequest) (_result *AssumeRoleWithSAMLResponse, _err error)

*

  • ###
  • * A SAML response is obtained from an external identity provider (IdP).
  • * A SAML IdP is created in the RAM console. For more information, see [Create a SAML IdP](~~116083~~) or [CreateSAMLProvider](~~186846~~).
  • * A RAM role whose trusted entity is a SAML IdP is created in the RAM console. For more information, see [Create a RAM role for a trusted IdP](~~116805~~) or [CreateRole](~~28710~~). *
  • @param request AssumeRoleWithSAMLRequest
  • @return AssumeRoleWithSAMLResponse

func (*Client) AssumeRoleWithSAMLWithOptions

func (client *Client) AssumeRoleWithSAMLWithOptions(request *AssumeRoleWithSAMLRequest, runtime *util.RuntimeOptions) (_result *AssumeRoleWithSAMLResponse, _err error)

*

  • ###
  • * A SAML response is obtained from an external identity provider (IdP).
  • * A SAML IdP is created in the RAM console. For more information, see [Create a SAML IdP](~~116083~~) or [CreateSAMLProvider](~~186846~~).
  • * A RAM role whose trusted entity is a SAML IdP is created in the RAM console. For more information, see [Create a RAM role for a trusted IdP](~~116805~~) or [CreateRole](~~28710~~). *
  • @param request AssumeRoleWithSAMLRequest
  • @param runtime runtime options for this request RuntimeOptions
  • @return AssumeRoleWithSAMLResponse

func (*Client) GetCallerIdentity

func (client *Client) GetCallerIdentity() (_result *GetCallerIdentityResponse, _err error)

func (*Client) GetCallerIdentityWithOptions

func (client *Client) GetCallerIdentityWithOptions(runtime *util.RuntimeOptions) (_result *GetCallerIdentityResponse, _err error)

func (*Client) GetEndpoint

func (client *Client) GetEndpoint(productId *string, regionId *string, endpointRule *string, network *string, suffix *string, endpointMap map[string]*string, endpoint *string) (_result *string, _err error)

func (*Client) Init

func (client *Client) Init(config *openapi.Config) (_err error)

type GetCallerIdentityResponse

type GetCallerIdentityResponse struct {
	Headers    map[string]*string             `json:"headers,omitempty" xml:"headers,omitempty" require:"true"`
	StatusCode *int32                         `json:"statusCode,omitempty" xml:"statusCode,omitempty" require:"true"`
	Body       *GetCallerIdentityResponseBody `json:"body,omitempty" xml:"body,omitempty" require:"true"`
}

func (GetCallerIdentityResponse) GoString

func (s GetCallerIdentityResponse) GoString() string

func (*GetCallerIdentityResponse) SetBody

func (*GetCallerIdentityResponse) SetHeaders

func (*GetCallerIdentityResponse) SetStatusCode

func (GetCallerIdentityResponse) String

func (s GetCallerIdentityResponse) String() string

type GetCallerIdentityResponseBody

type GetCallerIdentityResponseBody struct {
	AccountId    *string `json:"AccountId,omitempty" xml:"AccountId,omitempty"`
	Arn          *string `json:"Arn,omitempty" xml:"Arn,omitempty"`
	IdentityType *string `json:"IdentityType,omitempty" xml:"IdentityType,omitempty"`
	PrincipalId  *string `json:"PrincipalId,omitempty" xml:"PrincipalId,omitempty"`
	RequestId    *string `json:"RequestId,omitempty" xml:"RequestId,omitempty"`
	RoleId       *string `json:"RoleId,omitempty" xml:"RoleId,omitempty"`
	UserId       *string `json:"UserId,omitempty" xml:"UserId,omitempty"`
}

func (GetCallerIdentityResponseBody) GoString

func (*GetCallerIdentityResponseBody) SetAccountId

func (*GetCallerIdentityResponseBody) SetArn

func (*GetCallerIdentityResponseBody) SetIdentityType

func (*GetCallerIdentityResponseBody) SetPrincipalId

func (*GetCallerIdentityResponseBody) SetRequestId

func (*GetCallerIdentityResponseBody) SetRoleId

func (*GetCallerIdentityResponseBody) SetUserId

func (GetCallerIdentityResponseBody) String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL