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. Set this to SPACE_OPERATION.
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
2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 | |