Returns an Identity Center authentication token for accessing Amazon Redshift Serverless workgroups.
The token provides secure access to data within the specified workgroups using Identity Center identity propagation. The token expires after a specified duration and must be refreshed for continued access.
The Identity and Access Management (IAM) user or role that runs GetIdentityCenterAuthToken must have appropriate permissions to access the specified workgroups and Identity Center integration must be configured for the workgroups.
Parameters:
-
workgroup_names
(WorkgroupNameList)
–
A list of workgroup names for which to generate the Identity Center authentication token.
Constraints:
-
Must contain between 1 and 20 workgroup names.
-
Each workgroup name must be a valid Amazon Redshift Serverless workgroup identifier.
-
All specified workgroups must have Identity Center integration enabled.
Raises:
Source code in docs_src/capo_redshift_serverless/_services/async_redshift_serverless.py
| async def get_identity_center_auth_token(
self,
workgroup_names: "capo_redshift_serverless.types.workgroup_name_list.WorkgroupNameList",
*,
config_overrides: Optional[AsyncRedshiftServerlessClientConfig] = None,
) -> "capo_redshift_serverless.types.get_identity_center_auth_token_response.GetIdentityCenterAuthTokenResponse":
"""<p>Returns an Identity Center authentication token for accessing Amazon Redshift Serverless workgroups.</p> <p>The token provides secure access to data within the specified workgroups using Identity Center identity propagation. The token expires after a specified duration and must be refreshed for continued access.</p> <p>The Identity and Access Management (IAM) user or role that runs GetIdentityCenterAuthToken must have appropriate permissions to access the specified workgroups and Identity Center integration must be configured for the workgroups.</p>
Args:
workgroup_names: <p>A list of workgroup names for which to generate the Identity Center authentication token.</p> <p>Constraints:</p> <ul> <li> <p>Must contain between 1 and 20 workgroup names.</p> </li> <li> <p>Each workgroup name must be a valid Amazon Redshift Serverless workgroup identifier.</p> </li> <li> <p>All specified workgroups must have Identity Center integration enabled.</p> </li> </ul>
Raises:
capo_redshift_serverless.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_redshift_serverless.errors.conflict_exception.ConflictException: <p>The submitted action has conflicts.</p>
capo_redshift_serverless.errors.dry_run_exception.DryRunException: <p>This exception is thrown when the request was successful, but dry run was enabled so no action was taken.</p>
capo_redshift_serverless.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_redshift_serverless.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
capo_redshift_serverless.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_redshift_serverless.errors.validation_exception.ValidationException: <p>The input failed to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_redshift_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_redshift_serverless.types.get_identity_center_auth_token_request.GetIdentityCenterAuthTokenRequest]",
) -> AsyncOperationResponse[
"capo_redshift_serverless.types.get_identity_center_auth_token_response.GetIdentityCenterAuthTokenResponse"
]:
import capo_redshift_serverless._operations.redshift_serverless.get_identity_center_auth_token
(
output,
http_response,
) = await capo_redshift_serverless._operations.redshift_serverless.get_identity_center_auth_token.async_get_identity_center_auth_token(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetIdentityCenterAuthToken")
)
input_: capo_redshift_serverless.types.get_identity_center_auth_token_request.GetIdentityCenterAuthTokenRequest = {
"workgroup_names": workgroup_names
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|