Skip to content

describe_snapmirror_relationships async

describe_snapmirror_relationships(
    *,
    config_overrides: Optional[AsyncFSxClientConfig] = None,
    snapmirror_relationship_ids: Optional[SnapmirrorRelationshipIds] = None,
    filters: Optional[SnapmirrorRelationshipFilters] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeSnapmirrorRelationshipsResponse

Returns the description of specific Amazon FSx for NetApp ONTAP SnapMirror relationships, if a SnapmirrorRelationshipIds value is provided. Otherwise, this operation returns all SnapMirror relationships owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling.

When retrieving all SnapMirror relationships, you can optionally specify the MaxResults parameter to limit the number of SnapMirror relationships in a response. If more SnapMirror relationships remain, Amazon FSx returns a NextToken value 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:

  • snapmirror_relationship_ids (Optional[SnapmirrorRelationshipIds], default: None ) –

    The IDs of the SnapMirror relationships that you want to retrieve. If you also specify Filters, only SnapMirror relationships that match both the IDs and the filters are returned. If any IDs aren't found, or if a filter excludes any of them, a SnapmirrorRelationshipNotFound error occurs.

  • filters (Optional[SnapmirrorRelationshipFilters], default: None ) –

    The filters structure. The supported names are file-system-id or destination-volume-id.

Raises:

Source code in docs_src/capo_fsx/_services/async_f_sx.py
async def describe_snapmirror_relationships(
    self,
    *,
    config_overrides: Optional[AsyncFSxClientConfig] = None,
    snapmirror_relationship_ids: Optional[
        "capo_fsx.types.snapmirror_relationship_ids.SnapmirrorRelationshipIds"
    ] = None,
    filters: Optional[
        "capo_fsx.types.snapmirror_relationship_filters.SnapmirrorRelationshipFilters"
    ] = None,
    max_results: Optional["capo_fsx.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_fsx.types.next_token.NextToken"] = None,
) -> "capo_fsx.types.describe_snapmirror_relationships_response.DescribeSnapmirrorRelationshipsResponse":
    """<p>Returns the description of specific Amazon FSx for NetApp ONTAP SnapMirror relationships, if a <code>SnapmirrorRelationshipIds</code> value is provided. Otherwise, this operation returns all SnapMirror relationships 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 SnapMirror relationships, you can optionally specify the <code>MaxResults</code> parameter to limit the number of SnapMirror relationships in a response. If more SnapMirror relationships remain, Amazon FSx returns a <code>NextToken</code> value 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:
        snapmirror_relationship_ids: <p>The IDs of the SnapMirror relationships that you want to retrieve. If you also specify <code>Filters</code>, only SnapMirror relationships that match both the IDs and the filters are returned. If any IDs aren't found, or if a filter excludes any of them, a <code>SnapmirrorRelationshipNotFound</code> error occurs.</p>
        filters: <p>The filters structure. The supported names are <code>file-system-id</code> or <code>destination-volume-id</code>.</p>

    Raises:
        capo_fsx.errors.bad_request.BadRequest: <p>A generic error indicating a failure with a client request.</p>
        capo_fsx.errors.internal_server_error.InternalServerError: <p>A generic error indicating a server-side failure.</p>
        capo_fsx.errors.snapmirror_relationship_not_found.SnapmirrorRelationshipNotFound: <p>No Amazon FSx SnapMirror relationships were found based on the supplied parameters.</p>
        capo_fsx.errors.volume_not_found.VolumeNotFound: <p>No Amazon FSx volumes were found based upon the supplied parameters.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_fsx.types.describe_snapmirror_relationships_request.DescribeSnapmirrorRelationshipsRequest]",
    ) -> AsyncOperationResponse[
        "capo_fsx.types.describe_snapmirror_relationships_response.DescribeSnapmirrorRelationshipsResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.describe_snapmirror_relationships

        (
            output,
            http_response,
        ) = await capo_fsx._operations.aws_simba_api_service_v20180301.describe_snapmirror_relationships.async_describe_snapmirror_relationships(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeSnapmirrorRelationships")
    )
    input_: capo_fsx.types.describe_snapmirror_relationships_request.DescribeSnapmirrorRelationshipsRequest = {}
    if snapmirror_relationship_ids is not None:
        input_["snapmirror_relationship_ids"] = snapmirror_relationship_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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output