get_space_credentials_for_organization
¶
get_space_credentials_for_organization(
context: SpaceCredentialRequestContext,
credential_type: OrganizationCredentialType,
*,
config_overrides: Optional[CloudWatchOmniClientConfig] = 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.
>>> 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/cloud_watch_omni.py
2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 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 | |