{ "smithy": "2.0", "shapes": { "com.amazonaws.accountaccessruntime#AWSAccountAccessRuntime": { "type": "service", "version": "2018-05-10", "operations": [ { "target": "com.amazonaws.accountaccessruntime#GetRoleCredentials" }, { "target": "com.amazonaws.accountaccessruntime#ListRoles" } ], "traits": { "aws.api#service": { "sdkId": "Account Access Runtime", "arnNamespace": "account-access", "endpointPrefix": "account-access-runtime" }, "aws.endpoints#dualStackOnlyEndpoints": {}, "aws.endpoints#standardRegionalEndpoints": {}, "aws.protocols#restJson1": {}, "smithy.api#auth": [ "smithy.api#httpBearerAuth" ], "smithy.api#documentation": "

Use the Account Access Runtime API to list the roles that you can access and retrieve temporary Amazon Web Services credentials for those roles. You authenticate with a bearer token from IAM Identity Center. Each request is scoped to a tenant.

", "smithy.api#httpBearerAuth": {}, "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", "pageSize": "maxResults" }, "smithy.api#title": "Account Access Runtime", "smithy.rules#endpointBdd": { "version": "1.1", "parameters": { "UseFIPS": { "builtIn": "AWS::UseFIPS", "required": true, "default": false, "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", "type": "boolean" }, "Endpoint": { "builtIn": "SDK::Endpoint", "required": false, "documentation": "Override the endpoint used to send this request", "type": "string" }, "Region": { "builtIn": "AWS::Region", "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "string" } }, "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Endpoint" } ] }, { "fn": "isSet", "argv": [ { "ref": "Region" } ] }, { "fn": "aws.partition", "argv": [ { "ref": "Region" } ], "assign": "PartitionResult" }, { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] } ], "results": [ { "conditions": [], "error": "Invalid Configuration: FIPS and custom endpoint are not supported", "type": "error" }, { "conditions": [], "endpoint": { "url": { "ref": "Endpoint" }, "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "endpoint": { "url": "https://account-access-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "endpoint": { "url": "https://account-access-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "error": "Invalid Configuration: Missing Region", "type": "error" } ], "root": 2, "nodeCount": 6, "nodes": "/////wAAAAH/////AAAAAAAAAAYAAAADAAAAAQAAAAQF9eEFAAAAAgAAAAUF9eEFAAAAAwX14QMF9eEEAAAAAwX14QEF9eEC" }, "smithy.rules#endpointRuleSet": { "version": "1.0", "parameters": { "UseFIPS": { "builtIn": "AWS::UseFIPS", "required": true, "default": false, "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", "type": "boolean" }, "Endpoint": { "builtIn": "SDK::Endpoint", "required": false, "documentation": "Override the endpoint used to send this request", "type": "string" }, "Region": { "builtIn": "AWS::Region", "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "string" } }, "rules": [ { "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Endpoint" } ] } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] } ], "error": "Invalid Configuration: FIPS and custom endpoint are not supported", "type": "error" }, { "conditions": [], "endpoint": { "url": { "ref": "Endpoint" }, "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" }, { "conditions": [], "rules": [ { "conditions": [ { "fn": "isSet", "argv": [ { "ref": "Region" } ] } ], "rules": [ { "conditions": [ { "fn": "aws.partition", "argv": [ { "ref": "Region" } ], "assign": "PartitionResult" } ], "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ { "ref": "UseFIPS" }, true ] } ], "endpoint": { "url": "https://account-access-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" }, { "conditions": [], "endpoint": { "url": "https://account-access-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ], "type": "tree" } ], "type": "tree" }, { "conditions": [], "error": "Invalid Configuration: Missing Region", "type": "error" } ], "type": "tree" } ] }, "smithy.rules#endpointTests": { "testCases": [ { "documentation": "For custom endpoint with region not set and fips disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { "Endpoint": "https://example.com", "UseFIPS": false } }, { "documentation": "For custom endpoint with fips enabled", "expect": { "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { "Endpoint": "https://example.com", "UseFIPS": true } }, { "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://account-access-runtime-fips.us-east-1.api.aws" } }, "params": { "Region": "us-east-1", "UseFIPS": true } }, { "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://account-access-runtime.us-east-1.api.aws" } }, "params": { "Region": "us-east-1", "UseFIPS": false } }, { "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://account-access-runtime-fips.cn-northwest-1.api.amazonwebservices.com.cn" } }, "params": { "Region": "cn-northwest-1", "UseFIPS": true } }, { "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://account-access-runtime.cn-northwest-1.api.amazonwebservices.com.cn" } }, "params": { "Region": "cn-northwest-1", "UseFIPS": false } }, { "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { "url": "https://account-access-runtime-fips.us-gov-west-1.api.aws" } }, "params": { "Region": "us-gov-west-1", "UseFIPS": true } }, { "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { "url": "https://account-access-runtime.us-gov-west-1.api.aws" } }, "params": { "Region": "us-gov-west-1", "UseFIPS": false } }, { "documentation": "Missing region", "expect": { "error": "Invalid Configuration: Missing Region" } } ], "version": "1.0" } } }, "com.amazonaws.accountaccessruntime#AccessDeniedException": { "type": "structure", "members": { "message": { "target": "smithy.api#String", "traits": { "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "

You are authenticated but not authorized to perform the requested action, such as assuming a role that you aren't entitled to. This error returns an HTTP 403 status code.

", "smithy.api#error": "client", "smithy.api#httpError": 403 } }, "com.amazonaws.accountaccessruntime#AccessDetails": { "type": "structure", "members": { "accountId": { "target": "com.amazonaws.accountaccessruntime#Account", "traits": { "smithy.api#documentation": "

The 12-digit identifier of the Amazon Web Services account that contains the role.

", "smithy.api#required": {} } }, "accountName": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "

The display name of the Amazon Web Services account, if available. This value can be absent when the account name can't be resolved.

" } }, "roleArn": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role that you can access.

", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "

Describes a role that you can access, including the Amazon Web Services account that contains the role and the role's ARN.

" } }, "com.amazonaws.accountaccessruntime#AccessDetailsList": { "type": "list", "member": { "target": "com.amazonaws.accountaccessruntime#AccessDetails" } }, "com.amazonaws.accountaccessruntime#AccessType": { "type": "enum", "members": { "PROGRAMMATIC_ACCESS": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "PROGRAMMATIC_ACCESS" } } } }, "com.amazonaws.accountaccessruntime#Account": { "type": "string", "traits": { "smithy.api#pattern": "^[0-9]{12}$" } }, "com.amazonaws.accountaccessruntime#CredentialsDetails": { "type": "union", "members": { "programmaticAccess": { "target": "com.amazonaws.accountaccessruntime#ProgrammaticAccessDetails", "traits": { "smithy.api#documentation": "

The access key credentials returned for programmatic access with the CLI or an Amazon Web Services SDK.

" } } }, "traits": { "smithy.api#documentation": "

The temporary credentials returned for a role. Only one member is set, depending on the type of access that you requested.

", "smithy.api#sensitive": {} } }, "com.amazonaws.accountaccessruntime#GetRoleCredentials": { "type": "operation", "input": { "target": "com.amazonaws.accountaccessruntime#GetRoleCredentialsRequest" }, "output": { "target": "com.amazonaws.accountaccessruntime#GetRoleCredentialsResponse" }, "errors": [ { "target": "com.amazonaws.accountaccessruntime#AccessDeniedException" }, { "target": "com.amazonaws.accountaccessruntime#InternalServerException" }, { "target": "com.amazonaws.accountaccessruntime#ThrottlingException" }, { "target": "com.amazonaws.accountaccessruntime#UnauthorizedException" }, { "target": "com.amazonaws.accountaccessruntime#ValidationException" } ], "traits": { "smithy.api#documentation": "

Returns temporary Amazon Web Services credentials for a role that you are entitled to assume within a tenant. You can use these credentials for programmatic access with the CLI or an Amazon Web Services SDK. If you aren't entitled to the role, the request fails with an AccessDeniedException error.

", "smithy.api#http": { "method": "GET", "uri": "/access/credentials", "code": 200 }, "smithy.api#readonly": {} } }, "com.amazonaws.accountaccessruntime#GetRoleCredentialsRequest": { "type": "structure", "members": { "tenantId": { "target": "com.amazonaws.accountaccessruntime#TenantId", "traits": { "smithy.api#documentation": "

The identifier of the tenant that the request applies to. A tenant ID begins with aa- and is 3 to 24 characters long. It can contain lowercase letters, numbers, and hyphens.

", "smithy.api#httpQuery": "tenantId", "smithy.api#required": {} } }, "roleArn": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role to retrieve credentials for. You must be entitled to assume this role.

", "smithy.api#httpQuery": "roleArn", "smithy.api#required": {} } }, "accessType": { "target": "com.amazonaws.accountaccessruntime#AccessType", "traits": { "smithy.api#documentation": "

The type of access to request for the role. Specify PROGRAMMATIC_ACCESS to receive access key credentials for use with the CLI or an Amazon Web Services SDK.

", "smithy.api#httpQuery": "accessType", "smithy.api#required": {} } }, "sessionName": { "target": "com.amazonaws.accountaccessruntime#SessionName", "traits": { "smithy.api#documentation": "

An optional name for the role session. The name can be 2 to 64 characters and can contain alphanumeric characters and the following symbols: plus (+), equal (=), comma (,), period (.), at (@), and hyphen (-). The session name appears in CloudTrail logs for the assumed role session.

", "smithy.api#httpQuery": "sessionName" } }, "sessionDuration": { "target": "smithy.api#Integer", "traits": { "smithy.api#documentation": "

The duration, in seconds, that the returned credentials remain valid. If you don't specify a value, the service uses the default session duration. The maximum value can't exceed the maximum session duration configured for the role.

", "smithy.api#httpQuery": "sessionDuration" } } }, "traits": { "smithy.api#input": {} } }, "com.amazonaws.accountaccessruntime#GetRoleCredentialsResponse": { "type": "structure", "members": { "credentialsDetails": { "target": "com.amazonaws.accountaccessruntime#CredentialsDetails", "traits": { "smithy.api#documentation": "

The temporary credentials that the service returns for the requested role.

" } } }, "traits": { "smithy.api#output": {} } }, "com.amazonaws.accountaccessruntime#InternalServerException": { "type": "structure", "members": { "message": { "target": "smithy.api#String", "traits": { "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "

An internal server error occurred. Retry the request. If the problem persists, contact Amazon Web Services Support. This error returns an HTTP 500 status code.

", "smithy.api#error": "server" } }, "com.amazonaws.accountaccessruntime#ListRoles": { "type": "operation", "input": { "target": "com.amazonaws.accountaccessruntime#ListRolesRequest" }, "output": { "target": "com.amazonaws.accountaccessruntime#ListRolesResponse" }, "errors": [ { "target": "com.amazonaws.accountaccessruntime#InternalServerException" }, { "target": "com.amazonaws.accountaccessruntime#ThrottlingException" }, { "target": "com.amazonaws.accountaccessruntime#UnauthorizedException" }, { "target": "com.amazonaws.accountaccessruntime#ValidationException" } ], "traits": { "smithy.api#documentation": "

Returns the roles that you are entitled to access within a tenant. The results are paginated. Use a returned role with GetRoleCredentials to obtain temporary credentials.

", "smithy.api#http": { "method": "GET", "uri": "/access", "code": 200 }, "smithy.api#paginated": { "items": "roles" }, "smithy.api#readonly": {} } }, "com.amazonaws.accountaccessruntime#ListRolesRequest": { "type": "structure", "members": { "tenantId": { "target": "com.amazonaws.accountaccessruntime#TenantId", "traits": { "smithy.api#documentation": "

The identifier of the tenant whose roles you want to list. A tenant ID begins with aa- and is 3 to 24 characters long. It can contain lowercase letters, numbers, and hyphens.

", "smithy.api#httpQuery": "tenantId", "smithy.api#required": {} } }, "maxResults": { "target": "smithy.api#Integer", "traits": { "smithy.api#documentation": "

The maximum number of roles to return in a single response. If more roles are available than the specified value, the response includes a nextToken value that you can use to retrieve the next page of results. If you don't specify a value, the service uses a default page size.

", "smithy.api#httpQuery": "maxResults" } }, "nextToken": { "target": "com.amazonaws.accountaccessruntime#Token", "traits": { "smithy.api#documentation": "

The pagination token from a previous ListRoles response. Use it to retrieve the next page of results. Omit this parameter on the first call.

", "smithy.api#httpQuery": "nextToken" } } }, "traits": { "smithy.api#input": {} } }, "com.amazonaws.accountaccessruntime#ListRolesResponse": { "type": "structure", "members": { "roles": { "target": "com.amazonaws.accountaccessruntime#AccessDetailsList", "traits": { "smithy.api#documentation": "

The list of roles that you can access in the tenant. Each entry describes an Amazon Web Services account and a role.

", "smithy.api#required": {} } }, "nextToken": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "

The pagination token to include in a subsequent ListRoles request to retrieve the next page of results. This value is absent when there are no more results to return.

" } } }, "traits": { "smithy.api#output": {} } }, "com.amazonaws.accountaccessruntime#ProgrammaticAccessDetails": { "type": "structure", "members": { "accessKeyId": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "

The access key ID for the temporary credentials.

", "smithy.api#required": {} } }, "secretAccessKey": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "

The secret access key for the temporary credentials. Treat this value as a secret.

", "smithy.api#required": {} } }, "sessionToken": { "target": "smithy.api#String", "traits": { "smithy.api#documentation": "

The session token that you must include along with the access key ID and secret access key when you make requests with the temporary credentials.

", "smithy.api#required": {} } }, "expiresAt": { "target": "smithy.api#Timestamp", "traits": { "smithy.api#clientOptional": {}, "smithy.api#documentation": "

The date and time when the temporary credentials expire, after which they can no longer be used.

", "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "

A set of temporary Amazon Web Services credentials for programmatic access. Treat these values as sensitive.

", "smithy.api#sensitive": {} } }, "com.amazonaws.accountaccessruntime#SessionName": { "type": "string", "traits": { "smithy.api#pattern": "^[a-zA-Z0-9_+=,.@-]{2,64}$" } }, "com.amazonaws.accountaccessruntime#TenantId": { "type": "string", "traits": { "smithy.api#length": { "min": 3, "max": 24 }, "smithy.api#pattern": "^[a-z0-9-]+$" } }, "com.amazonaws.accountaccessruntime#ThrottlingException": { "type": "structure", "members": { "message": { "target": "smithy.api#String", "traits": { "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "

The request rate exceeded the allowed limit. Reduce your request rate, and then retry the request. This error returns an HTTP 429 status code.

", "smithy.api#error": "client", "smithy.api#httpError": 429 } }, "com.amazonaws.accountaccessruntime#Token": { "type": "string" }, "com.amazonaws.accountaccessruntime#UnauthorizedException": { "type": "structure", "members": { "message": { "target": "smithy.api#String", "traits": { "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "

The bearer token is missing, invalid, or expired. Obtain a new token, and then retry the request. This error returns an HTTP 401 status code.

", "smithy.api#error": "client", "smithy.api#httpError": 401 } }, "com.amazonaws.accountaccessruntime#ValidationException": { "type": "structure", "members": { "message": { "target": "smithy.api#String", "traits": { "smithy.api#required": {} } } }, "traits": { "smithy.api#documentation": "

The request is missing a required parameter, or a parameter value doesn't satisfy its constraints, such as its length or pattern. Correct the input, and then retry the request. This error returns an HTTP 400 status code.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } } } }