Skip to content

disassociate_drt_log_bucket

disassociate_drt_log_bucket(
    log_bucket: LogBucket, *, config_overrides: Optional[ShieldClientConfig] = None
) -> DisassociateDRTLogBucketResponse

Removes the Shield Response Team's (SRT) access to the specified Amazon S3 bucket containing the logs that you shared previously.

Parameters:

  • log_bucket (LogBucket) –

    The Amazon S3 bucket that contains the logs that you want to share.

Raises:

Source code in docs_src/capo_shield/_services/shield.py
def disassociate_drt_log_bucket(
    self,
    log_bucket: "capo_shield.types.log_bucket.LogBucket",
    *,
    config_overrides: Optional[ShieldClientConfig] = None,
) -> "capo_shield.types.disassociate_drt_log_bucket_response.DisassociateDRTLogBucketResponse":
    """<p>Removes the Shield Response Team's (SRT) access to the specified Amazon S3 bucket containing the logs that you shared previously.</p>

    Args:
        log_bucket: <p>The Amazon S3 bucket that contains the logs that you want to share.</p>

    Raises:
        capo_shield.errors.access_denied_for_dependency_exception.AccessDeniedForDependencyException: <p>In order to grant the necessary access to the Shield Response Team (SRT) the user submitting the request must have the <code>iam:PassRole</code> permission. This error indicates the user did not have the appropriate permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html">Granting a User Permissions to Pass a Role to an Amazon Web Services Service</a>. </p>
        capo_shield.errors.internal_error_exception.InternalErrorException: <p>Exception that indicates that a problem occurred with the service infrastructure. You can retry the request.</p>
        capo_shield.errors.invalid_operation_exception.InvalidOperationException: <p>Exception that indicates that the operation would not cause any change to occur.</p>
        capo_shield.errors.no_associated_role_exception.NoAssociatedRoleException: <p>The ARN of the role that you specified does not exist.</p>
        capo_shield.errors.optimistic_lock_exception.OptimisticLockException: <p>Exception that indicates that the resource state has been modified by another client. Retrieve the resource and then retry your request.</p>
        capo_shield.errors.resource_not_found_exception.ResourceNotFoundException: <p>Exception indicating the specified resource does not exist. If available, this exception includes details in additional properties. </p>
        capo_shield.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_shield.types.disassociate_drt_log_bucket_request.DisassociateDRTLogBucketRequest]",
    ) -> OperationResponse[
        "capo_shield.types.disassociate_drt_log_bucket_response.DisassociateDRTLogBucketResponse"
    ]:
        import capo_shield._operations.aws_shield_20160616.disassociate_drt_log_bucket

        output, http_response = (
            capo_shield._operations.aws_shield_20160616.disassociate_drt_log_bucket.disassociate_drt_log_bucket(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateDRTLogBucket")
    )
    input_: capo_shield.types.disassociate_drt_log_bucket_request.DisassociateDRTLogBucketRequest = {
        "log_bucket": log_bucket
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output