Skip to content

delete_data_repository_association

delete_data_repository_association(
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    association_id: Optional[DataRepositoryAssociationId] = None,
    client_request_token: Optional[ClientRequestToken] = None,
    delete_data_in_file_system: Optional[DeleteDataInFileSystem] = None,
) -> DeleteDataRepositoryAssociationResponse

Deletes a data repository association on an Amazon FSx for Lustre file system. Deleting the data repository association unlinks the file system from the Amazon S3 bucket. When deleting a data repository association, you have the option of deleting the data in the file system that corresponds to the data repository association. Data repository associations are supported on all FSx for Lustre 2.12 and 2.15 file systems, excluding scratch_1 deployment type.

Parameters:

  • association_id (Optional[DataRepositoryAssociationId], default: None ) –

    The ID of the data repository association that you want to delete.

  • delete_data_in_file_system (Optional[DeleteDataInFileSystem], default: None ) –

    Set to true to delete the data in the file system that corresponds to the data repository association.

Raises:

  • BadRequest –

    A generic error indicating a failure with a client request.

  • DataRepositoryAssociationNotFound –

    No data repository associations were found based upon the supplied parameters.

  • IncompatibleParameterError –

    The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.

  • InternalServerError –

    A generic error indicating a server-side failure.

  • ServiceLimitExceeded –

    An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_fsx/_services/f_sx.py
def delete_data_repository_association(
    self,
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    association_id: Optional[
        "capo_fsx.types.data_repository_association_id.DataRepositoryAssociationId"
    ] = None,
    client_request_token: Optional[
        "capo_fsx.types.client_request_token.ClientRequestToken"
    ] = None,
    delete_data_in_file_system: Optional[
        "capo_fsx.types.delete_data_in_file_system.DeleteDataInFileSystem"
    ] = None,
) -> "capo_fsx.types.delete_data_repository_association_response.DeleteDataRepositoryAssociationResponse":
    """<p>Deletes a data repository association on an Amazon FSx for Lustre file system. Deleting the data repository association unlinks the file system from the Amazon S3 bucket. When deleting a data repository association, you have the option of deleting the data in the file system that corresponds to the data repository association. Data repository associations are supported on all FSx for Lustre 2.12 and 2.15 file systems, excluding <code>scratch_1</code> deployment type.</p>

    Args:
        association_id: <p>The ID of the data repository association that you want to delete.</p>
        delete_data_in_file_system: <p>Set to <code>true</code> to delete the data in the file system that corresponds to the data repository association.</p>

    Raises:
        capo_fsx.errors.bad_request.BadRequest: <p>A generic error indicating a failure with a client request.</p>
        capo_fsx.errors.data_repository_association_not_found.DataRepositoryAssociationNotFound: <p>No data repository associations were found based upon the supplied parameters.</p>
        capo_fsx.errors.incompatible_parameter_error.IncompatibleParameterError: <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
        capo_fsx.errors.internal_server_error.InternalServerError: <p>A generic error indicating a server-side failure.</p>
        capo_fsx.errors.service_limit_exceeded.ServiceLimitExceeded: <p>An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fsx.types.delete_data_repository_association_request.DeleteDataRepositoryAssociationRequest]",
    ) -> OperationResponse[
        "capo_fsx.types.delete_data_repository_association_response.DeleteDataRepositoryAssociationResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.delete_data_repository_association

        output, http_response = (
            capo_fsx._operations.aws_simba_api_service_v20180301.delete_data_repository_association.delete_data_repository_association(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDataRepositoryAssociation")
    )
    input_: capo_fsx.types.delete_data_repository_association_request.DeleteDataRepositoryAssociationRequest = {}
    if association_id is not None:
        input_["association_id"] = association_id
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token
    if delete_data_in_file_system is not None:
        input_["delete_data_in_file_system"] = delete_data_in_file_system

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