Sends the exchange token for an accepted delegation request.
The exchange token is sent to the partner via an asynchronous notification channel, established by the partner.
The delegation request must be in the ACCEPTED state when calling this API. After the SendDelegationToken API call is successful, the request transitions to a FINALIZED state and cannot be rolled back. However, a user may reject an accepted request before the SendDelegationToken API is called.
For more details, see Managing Permissions for Delegation Requests.
Parameters:
-
delegation_request_id
(delegationRequestIdType)
–
The unique identifier of the delegation request for which to send the token.
Raises:
-
ConcurrentModificationException
–
The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.
-
InvalidInputException
–
The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
-
NoSuchEntityException
–
The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.
-
ServiceFailureException
–
The request processing has failed because of an unknown error, exception or failure.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_iam/_services/async_iam.py
| async def send_delegation_token(
self,
delegation_request_id: "capo_iam.types.delegation_request_id_type.delegationRequestIdType",
*,
config_overrides: Optional[AsyncIAMClientConfig] = None,
) -> None:
"""<p>Sends the exchange token for an accepted delegation request.</p> <p>The exchange token is sent to the partner via an asynchronous notification channel, established by the partner.</p> <p>The delegation request must be in the <code>ACCEPTED</code> state when calling this API. After the <code>SendDelegationToken</code> API call is successful, the request transitions to a <code>FINALIZED</code> state and cannot be rolled back. However, a user may reject an accepted request before the <code>SendDelegationToken</code> API is called.</p> <p> For more details, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-temporary-delegation.html#temporary-delegation-managing-permissions"> Managing Permissions for Delegation Requests</a>. </p>
Args:
delegation_request_id: <p>The unique identifier of the delegation request for which to send the token.</p>
Raises:
capo_iam.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.</p>
capo_iam.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
capo_iam.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iam.types.send_delegation_token_request.SendDelegationTokenRequest]",
) -> AsyncOperationResponse[None]:
import capo_iam._operations.aws_identity_management_v20100508.send_delegation_token
(
output,
http_response,
) = await capo_iam._operations.aws_identity_management_v20100508.send_delegation_token.async_send_delegation_token(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("SendDelegationToken")
)
input_: capo_iam.types.send_delegation_token_request.SendDelegationTokenRequest = {
"delegation_request_id": delegation_request_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|