getSpaceCredentialsForOrganization
inline suspend fun CloudWatchOmniClient.getSpaceCredentialsForOrganization(crossinline block: GetSpaceCredentialsForOrganizationRequest.Builder.() -> Unit): GetSpaceCredentialsForOrganizationResponse
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.
Samples
// 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.
val resp = cloudWatchOmniClient.getSpaceCredentialsForOrganization {
context = SpaceCredentialRequestContext {
spaceId = "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d"
}
credentialType = OrganizationCredentialType.fromValue("SPACE_OPERATION")
}Content copied to clipboard