CloudWatchOmni / Client / get_space_credentials_for_organization
get_space_credentials_for_organization¶
- CloudWatchOmni.Client.get_space_credentials_for_organization(**kwargs)¶
Returns temporary credentials for a space in an organization member account. The credentials are valid for one hour.
The caller must be the organization’s management account or a delegated administrator with access to the target space. The target account must be an active member of the same organization as the domain, and the space must already exist.
See also: AWS API Documentation
Request Syntax
response = client.get_space_credentials_for_organization( context={ 'spaceId': 'string', 'domainId': 'string', 'targetAccountId': 'string' }, credentialType='SPACE_OPERATION' )
- Parameters:
context (dict) –
[REQUIRED]
Context for credential resolution.
spaceId (string) –
The ID of an existing space to return credentials for.
domainId (string) –
The ID of the domain, when returning credentials for a target account that does not yet have a space.
targetAccountId (string) –
The ID of the target member account. Required when domainId is set.
credentialType (string) –
[REQUIRED]
Selects which member-account credential to return. Set this to SPACE_OPERATION.
- Return type:
dict
- Returns:
Response Syntax
{ 'credentials': { 'accessKeyId': 'string', 'secretAccessKey': 'string', 'sessionToken': 'string', 'expiration': datetime(2015, 1, 1) } }
Response Structure
(dict) –
credentials (dict) –
The temporary AWS credentials for the space.
accessKeyId (string) –
The AWS access key ID.
secretAccessKey (string) –
The AWS secret access key.
sessionToken (string) –
The AWS session token.
expiration (datetime) –
The timestamp when the credentials expire.
Exceptions
CloudWatchOmni.Client.exceptions.ThrottlingExceptionCloudWatchOmni.Client.exceptions.ValidationExceptionCloudWatchOmni.Client.exceptions.ResourceNotFoundExceptionCloudWatchOmni.Client.exceptions.AccessDeniedExceptionCloudWatchOmni.Client.exceptions.InternalServerException