Returns a credentials set to be used with just-in-time node access.
Parameters:
-
access_request_id
(AccessRequestId)
–
The ID of a just-in-time node access request.
Raises:
Source code in docs_src/capo_ssm/_services/async_ssm.py
| async def get_access_token(
self,
access_request_id: "capo_ssm.types.access_request_id.AccessRequestId",
*,
config_overrides: Optional[AsyncSSMClientConfig] = None,
) -> "capo_ssm.types.get_access_token_response.GetAccessTokenResponse":
"""<p>Returns a credentials set to be used with just-in-time node access.</p>
Args:
access_request_id: <p>The ID of a just-in-time node access request.</p>
Raises:
capo_ssm.errors.access_denied_exception.AccessDeniedException: <p>The requester doesn't have permissions to perform the requested operation.</p>
capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
capo_ssm.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified parameter to be shared could not be found.</p>
capo_ssm.errors.throttling_exception.ThrottlingException: <p>The request or operation couldn't be performed because the service is throttling requests.</p>
capo_ssm.errors.validation_exception.ValidationException: <p>The request isn't valid. Verify that you entered valid contents for the command and try again.</p>
capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_ssm.types.get_access_token_request.GetAccessTokenRequest]",
) -> AsyncOperationResponse[
"capo_ssm.types.get_access_token_response.GetAccessTokenResponse"
]:
import capo_ssm._operations.amazon_ssm.get_access_token
(
output,
http_response,
) = await capo_ssm._operations.amazon_ssm.get_access_token.async_get_access_token(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_ssm.types.get_access_token_response.GetAccessTokenResponse",
) -> dict[str, Any]:
import capo_ssm.types.get_access_token_response
return capo_ssm.types.get_access_token_response.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetAccessToken", redact_output=_redact_output),
)
input_: capo_ssm.types.get_access_token_request.GetAccessTokenRequest = {
"access_request_id": access_request_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|