Skip to content

list_mount_targets async

list_mount_targets(
    *,
    config_overrides: Optional[AsyncS3FilesClientConfig] = None,
    file_system_id: Optional[FileSystemId] = None,
    access_point_id: Optional[AccessPointId] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> ListMountTargetsResponse

Returns resource information for all mount targets with optional filtering by file system, access point, and VPC.

Parameters:

  • file_system_id (Optional[FileSystemId], default: None ) –

    Optional filter to list only mount targets associated with the specified S3 File System ID or Amazon Resource Name (ARN). If provided, only mount targets for this file system will be returned in the response.

  • access_point_id (Optional[AccessPointId], default: None ) –

    Optional filter to list only mount targets associated with the specified access point ID or Amazon Resource Name (ARN).

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

    The maximum number of mount targets to return in a single response.

  • next_token (Optional[str], default: None ) –

    A pagination token returned from a previous call to continue listing mount targets.

Raises:

Source code in docs_src/capo_s3files/_services/async_s3_files.py
async def list_mount_targets(
    self,
    *,
    config_overrides: Optional[AsyncS3FilesClientConfig] = None,
    file_system_id: Optional[
        "capo_s3files.types.file_system_id.FileSystemId"
    ] = None,
    access_point_id: Optional[
        "capo_s3files.types.access_point_id.AccessPointId"
    ] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> "capo_s3files.types.list_mount_targets_response.ListMountTargetsResponse":
    """<p>Returns resource information for all mount targets with optional filtering by file system, access point, and VPC.</p>

    Args:
        file_system_id: <p>Optional filter to list only mount targets associated with the specified S3 File System ID or Amazon Resource Name (ARN). If provided, only mount targets for this file system will be returned in the response.</p>
        access_point_id: <p>Optional filter to list only mount targets associated with the specified access point ID or Amazon Resource Name (ARN).</p>
        max_results: <p>The maximum number of mount targets to return in a single response.</p>
        next_token: <p>A pagination token returned from a previous call to continue listing mount targets.</p>

    Raises:
        capo_s3files.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Retry your request using exponential backoff.</p>
        capo_s3files.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_s3files.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify that the resource exists and that you have permission to access it.</p>
        capo_s3files.errors.validation_exception.ValidationException: <p>The input parameters are not valid. Check the parameter values and try again.</p>
        capo_s3files.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_s3files.types.list_mount_targets_request.ListMountTargetsRequest]",
    ) -> AsyncOperationResponse[
        "capo_s3files.types.list_mount_targets_response.ListMountTargetsResponse"
    ]:
        import capo_s3files._operations.s3_files.list_mount_targets

        (
            output,
            http_response,
        ) = await capo_s3files._operations.s3_files.list_mount_targets.async_list_mount_targets(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListMountTargets")
    )
    input_: capo_s3files.types.list_mount_targets_request.ListMountTargetsRequest = {}
    if file_system_id is not None:
        input_["file_system_id"] = file_system_id
    if access_point_id is not None:
        input_["access_point_id"] = access_point_id
    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