Skip to content

describe_data_repository_associations

describe_data_repository_associations(
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    association_ids: Optional[DataRepositoryAssociationIds] = None,
    filters: Optional[Filters] = None,
    max_results: Optional[LimitedMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeDataRepositoryAssociationsResponse

Returns the description of specific Amazon FSx for Lustre or Amazon File Cache data repository associations, if one or more AssociationIds values are provided in the request, or if filters are used in the request. Data repository associations are supported on Amazon File Cache resources and all FSx for Lustre 2.12 and 2,15 file systems, excluding scratch_1 deployment type.

You can use filters to narrow the response to include just data repository associations for specific file systems (use the file-system-id filter with the ID of the file system) or caches (use the file-cache-id filter with the ID of the cache), or data repository associations for a specific repository type (use the data-repository-type filter with a value of S3 or NFS). If you don't use filters, the response returns all data repository associations owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling.

When retrieving all data repository associations, you can paginate the response by using the optional MaxResults parameter to limit the number of data repository associations returned in a response. If more data repository associations remain, a NextToken value is returned in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

Parameters:

  • association_ids (Optional[DataRepositoryAssociationIds], default: None ) –

    IDs of the data repository associations whose descriptions you want to retrieve (String).

  • max_results (Optional[LimitedMaxResults], default: None ) –

    The maximum number of resources to return in the response. This value must be an integer greater than zero.

Raises:

Source code in docs_src/capo_fsx/_services/f_sx.py
def describe_data_repository_associations(
    self,
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    association_ids: Optional[
        "capo_fsx.types.data_repository_association_ids.DataRepositoryAssociationIds"
    ] = None,
    filters: Optional["capo_fsx.types.filters.Filters"] = None,
    max_results: Optional[
        "capo_fsx.types.limited_max_results.LimitedMaxResults"
    ] = None,
    next_token: Optional["capo_fsx.types.next_token.NextToken"] = None,
) -> "capo_fsx.types.describe_data_repository_associations_response.DescribeDataRepositoryAssociationsResponse":
    """<p>Returns the description of specific Amazon FSx for Lustre or Amazon File Cache data repository associations, if one or more <code>AssociationIds</code> values are provided in the request, or if filters are used in the request. Data repository associations are supported on Amazon File Cache resources and all FSx for Lustre 2.12 and 2,15 file systems, excluding <code>scratch_1</code> deployment type.</p> <p>You can use filters to narrow the response to include just data repository associations for specific file systems (use the <code>file-system-id</code> filter with the ID of the file system) or caches (use the <code>file-cache-id</code> filter with the ID of the cache), or data repository associations for a specific repository type (use the <code>data-repository-type</code> filter with a value of <code>S3</code> or <code>NFS</code>). If you don't use filters, the response returns all data repository associations owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling.</p> <p>When retrieving all data repository associations, you can paginate the response by using the optional <code>MaxResults</code> parameter to limit the number of data repository associations returned in a response. If more data repository associations remain, a <code>NextToken</code> value is returned in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p>

    Args:
        association_ids: <p>IDs of the data repository associations whose descriptions you want to retrieve (String).</p>
        max_results: <p>The maximum number of resources to return in the response. This value must be an integer greater than zero.</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.file_system_not_found.FileSystemNotFound: <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
        capo_fsx.errors.internal_server_error.InternalServerError: <p>A generic error indicating a server-side failure.</p>
        capo_fsx.errors.invalid_data_repository_type.InvalidDataRepositoryType: <p>You have filtered the response to a data repository type that is not supported.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fsx.types.describe_data_repository_associations_request.DescribeDataRepositoryAssociationsRequest]",
    ) -> OperationResponse[
        "capo_fsx.types.describe_data_repository_associations_response.DescribeDataRepositoryAssociationsResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.describe_data_repository_associations

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDataRepositoryAssociations")
    )
    input_: capo_fsx.types.describe_data_repository_associations_request.DescribeDataRepositoryAssociationsRequest = {}
    if association_ids is not None:
        input_["association_ids"] = association_ids
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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