Delete a cross-account attachment. When you delete an attachment, Global Accelerator revokes the permission to use the resources in the attachment from all principals in the list of principals. Global Accelerator revokes the permission for specific resources.
For more information, see Working with cross-account attachments and resources in Global Accelerator in the Global Accelerator Developer Guide.
Parameters:
-
attachment_arn
(GenericString)
–
The Amazon Resource Name (ARN) for the cross-account attachment to delete.
Raises:
Source code in docs_src/capo_global_accelerator/_services/global_accelerator.py
| def delete_cross_account_attachment(
self,
attachment_arn: "capo_global_accelerator.types.generic_string.GenericString",
*,
config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
) -> None:
"""<p>Delete a cross-account attachment. When you delete an attachment, Global Accelerator revokes the permission to use the resources in the attachment from all principals in the list of principals. Global Accelerator revokes the permission for specific resources.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/cross-account-resources.html"> Working with cross-account attachments and resources in Global Accelerator</a> in the <i> Global Accelerator Developer Guide</i>.</p>
Args:
attachment_arn: <p>The Amazon Resource Name (ARN) for the cross-account attachment to delete.</p>
Raises:
capo_global_accelerator.errors.access_denied_exception.AccessDeniedException: <p>You don't have access permission.</p>
capo_global_accelerator.errors.attachment_not_found_exception.AttachmentNotFoundException: <p>No cross-account attachment was found.</p>
capo_global_accelerator.errors.internal_service_error_exception.InternalServiceErrorException: <p>There was an internal error for Global Accelerator.</p>
capo_global_accelerator.errors.invalid_argument_exception.InvalidArgumentException: <p>An argument that you specified is invalid.</p>
capo_global_accelerator.errors.transaction_in_progress_exception.TransactionInProgressException: <p>There's already a transaction in progress. Another transaction can't be processed.</p>
capo_global_accelerator.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_global_accelerator.types.delete_cross_account_attachment_request.DeleteCrossAccountAttachmentRequest]",
) -> OperationResponse[None]:
import capo_global_accelerator._operations.global_accelerator_v20180706.delete_cross_account_attachment
output, http_response = (
capo_global_accelerator._operations.global_accelerator_v20180706.delete_cross_account_attachment.delete_cross_account_attachment(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteCrossAccountAttachment")
)
input_: capo_global_accelerator.types.delete_cross_account_attachment_request.DeleteCrossAccountAttachmentRequest = {
"attachment_arn": attachment_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|