get_space_credentials_for_organization
async
¶
get_space_credentials_for_organization(
context: SpaceCredentialRequestContext,
credential_type: OrganizationCredentialType,
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
) -> GetSpaceCredentialsForOrganizationOutput
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.
Parameters:
-
context(SpaceCredentialRequestContext) –Context for credential resolution.
-
credential_type(OrganizationCredentialType) –Selects which member-account credential to return.
Raises:
-
AccessDeniedException–The caller is not authorized to perform this action.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ResourceNotFoundException–The specified resource does not exist.
-
ThrottlingException–The request was throttled due to exceeding the allowed request rate.
-
ValidationException–A parameter is specified incorrectly.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Get space credentials for an organization member account The following example returns temporary, space-scoped AWS credentials for an existing space in an organization member account, selected by spaceId. The credentials are valid for one hour, as reflected by the expiration timestamp. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> await client.get_space_credentials_for_organization(context={'spaceId': 'a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d'}, credential_type='SPACE_OPERATION')
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 | |