Deletes an invitation or unlinks a connected account for an environment. Call this operation from the environment owner account. This operation is idempotent—deleting an already-removed invitation or connection has no effect.
Withdraws a pending invitation or removes an active connection, in any state. After you remove the connection, AWS Assurance no longer evaluates that account.
Parameters:
-
environment_arn
(EnvironmentArn)
–
The ARN of this governance environment.
-
invitee_account_id
(InviteeAccountId)
–
The invited or connected account whose invitation or connection to delete.
Raises:
Examples:
Delete an invitation or unlink an account
Unlinks the payments team's member account from the governance environment after the PCI-DSS assessment concludes.
>>> client.delete_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 delete_invitation(
self,
environment_arn: "capo_assurance.types.environment_arn.EnvironmentArn",
invitee_account_id: "capo_assurance.types.invitee_account_id.InviteeAccountId",
*,
config_overrides: Optional[AssuranceClientConfig] = None,
) -> "capo_assurance.types.delete_invitation_output.DeleteInvitationOutput":
"""<p>Deletes an invitation or unlinks a connected account for an environment. Call this operation from the environment owner account. This operation is idempotent—deleting an already-removed invitation or connection has no effect.</p> <p>Withdraws a pending invitation or removes an active connection, in any state. After you remove the connection, AWS Assurance no longer evaluates that account.</p>
Args:
environment_arn: <p>The ARN of this governance environment.</p>
invitee_account_id: <p>The invited or connected account whose invitation or connection to delete.</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:
Delete an invitation or unlink an account
Unlinks the payments team's member account from the governance environment after the PCI-DSS assessment concludes.
>>> client.delete_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.delete_invitation_input.DeleteInvitationInput]",
) -> OperationResponse[
"capo_assurance.types.delete_invitation_output.DeleteInvitationOutput"
]:
import capo_assurance._operations.assurance.delete_invitation
output, http_response = (
capo_assurance._operations.assurance.delete_invitation.delete_invitation(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteInvitation")
)
input_: capo_assurance.types.delete_invitation_input.DeleteInvitationInput = {
"environment_arn": environment_arn,
"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
|