Retrieves a single invitation, identified by environmentArn and inviteeAccountId. You can call this operation from the account that owns the environment or from the invited account.
Parameters:
-
environment_arn
(EnvironmentArn)
–
The ARN of the environment the invitation is for.
-
invitee_account_id
(Optional[InviteeAccountId], default:
None
)
–
The AWS account ID of the invited account. Supply this value when you are the environment owner reading a specific invitee's invitation. Omit it when you are the invited account reading your own invitation for the environment.
Raises:
Examples:
Retrieve an invitation
Retrieves the invitation extended to the payments team's member account for the governance environment running the PCI-DSS assessment.
>>> client.get_invitation(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', invitee_account_id='444455556666')
Source code in docs_src/capo_assurance/_services/assurance.py
| def get_invitation(
self,
environment_arn: "capo_assurance.types.environment_arn.EnvironmentArn",
*,
config_overrides: Optional[AssuranceClientConfig] = None,
invitee_account_id: Optional[
"capo_assurance.types.invitee_account_id.InviteeAccountId"
] = None,
) -> "capo_assurance.types.get_invitation_output.GetInvitationOutput":
"""<p>Retrieves a single invitation, identified by <code>environmentArn</code> and <code>inviteeAccountId</code>. You can call this operation from the account that owns the environment or from the invited account.</p>
Args:
environment_arn: <p>The ARN of the environment the invitation is for.</p>
invitee_account_id: <p>The AWS account ID of the invited account. Supply this value when you are the environment owner reading a specific invitee's invitation. Omit it when you are the invited account reading your own invitation for the environment.</p>
Raises:
capo_assurance.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.</p>
capo_assurance.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred.</p>
capo_assurance.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
capo_assurance.errors.throttling_exception.ThrottlingException: <p>The request was throttled.</p>
capo_assurance.errors.validation_exception.ValidationException: <p>The request failed validation.</p>
capo_assurance.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Retrieve an invitation
Retrieves the invitation extended to the payments team's member account for the governance environment running the PCI-DSS assessment.
>>> client.get_invitation(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', invitee_account_id='444455556666')
"""
def _handler(
req: "OperationRequest[capo_assurance.types.get_invitation_input.GetInvitationInput]",
) -> OperationResponse[
"capo_assurance.types.get_invitation_output.GetInvitationOutput"
]:
import capo_assurance._operations.assurance.get_invitation
output, http_response = (
capo_assurance._operations.assurance.get_invitation.get_invitation(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetInvitation")
)
input_: capo_assurance.types.get_invitation_input.GetInvitationInput = {
"environment_arn": environment_arn
}
if invitee_account_id is not None:
input_["invitee_account_id"] = invitee_account_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|