Returns the descriptions of all the current mount targets, or a specific mount target, for a file system. When requesting all of the current mount targets, the order of mount targets returned in the response is unspecified.
This operation requires permissions for the elasticfilesystem:DescribeMountTargets action, on either the file system ID that you specify in FileSystemId, or on the file system of the mount target that you specify in MountTargetId.
Parameters:
-
max_items
(Optional[MaxItems], default:
None
)
–
(Optional) Maximum number of mount targets to return in the response. Currently, this number is automatically set to 10, and other values are ignored. The response is paginated at 100 per page if you have more than 100 mount targets.
-
marker
(Optional[Marker], default:
None
)
–
(Optional) Opaque pagination token returned from a previous DescribeMountTargets operation (String). If present, it specifies to continue the list from where the previous returning call left off.
-
file_system_id
(Optional[FileSystemId], default:
None
)
–
(Optional) ID of the file system whose mount targets you want to list (String). It must be included in your request if an AccessPointId or MountTargetId is not included. Accepts either a file system ID or ARN as input.
-
mount_target_id
(Optional[MountTargetId], default:
None
)
–
(Optional) ID of the mount target that you want to have described (String). It must be included in your request if FileSystemId is not included. Accepts either a mount target ID or ARN as input.
-
access_point_id
(Optional[AccessPointId], default:
None
)
–
(Optional) The ID of the access point whose mount targets that you want to list. It must be included in your request if a FileSystemId or MountTargetId is not included in your request. Accepts either an access point ID or ARN as input.
Raises:
-
AccessPointNotFound
–
Returned if the specified AccessPointId value doesn't exist in the requester's Amazon Web Services account.
-
BadRequest
–
Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.
-
FileSystemNotFound
–
Returned if the specified FileSystemId value doesn't exist in the requester's Amazon Web Services account.
-
InternalServerError
–
Returned if an error occurred on the server side.
-
MountTargetNotFound
–
Returned if there is no mount target with the specified ID found in the caller's Amazon Web Services account.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To describe the mount targets for a file system
This operation describes all of a file system's mount targets.
>>> await client.describe_mount_targets(file_system_id='fs-01234567')
Source code in docs_src/capo_efs/_services/async_efs.py
| async def describe_mount_targets(
self,
*,
config_overrides: Optional[AsyncEFSClientConfig] = None,
max_items: Optional["capo_efs.types.max_items.MaxItems"] = None,
marker: Optional["capo_efs.types.marker.Marker"] = None,
file_system_id: Optional["capo_efs.types.file_system_id.FileSystemId"] = None,
mount_target_id: Optional[
"capo_efs.types.mount_target_id.MountTargetId"
] = None,
access_point_id: Optional[
"capo_efs.types.access_point_id.AccessPointId"
] = None,
) -> "capo_efs.types.describe_mount_targets_response.DescribeMountTargetsResponse":
"""<p>Returns the descriptions of all the current mount targets, or a specific mount target, for a file system. When requesting all of the current mount targets, the order of mount targets returned in the response is unspecified.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeMountTargets</code> action, on either the file system ID that you specify in <code>FileSystemId</code>, or on the file system of the mount target that you specify in <code>MountTargetId</code>.</p>
Args:
max_items: <p>(Optional) Maximum number of mount targets to return in the response. Currently, this number is automatically set to 10, and other values are ignored. The response is paginated at 100 per page if you have more than 100 mount targets.</p>
marker: <p>(Optional) Opaque pagination token returned from a previous <code>DescribeMountTargets</code> operation (String). If present, it specifies to continue the list from where the previous returning call left off.</p>
file_system_id: <p>(Optional) ID of the file system whose mount targets you want to list (String). It must be included in your request if an <code>AccessPointId</code> or <code>MountTargetId</code> is not included. Accepts either a file system ID or ARN as input.</p>
mount_target_id: <p>(Optional) ID of the mount target that you want to have described (String). It must be included in your request if <code>FileSystemId</code> is not included. Accepts either a mount target ID or ARN as input.</p>
access_point_id: <p>(Optional) The ID of the access point whose mount targets that you want to list. It must be included in your request if a <code>FileSystemId</code> or <code>MountTargetId</code> is not included in your request. Accepts either an access point ID or ARN as input.</p>
Raises:
capo_efs.errors.access_point_not_found.AccessPointNotFound: <p>Returned if the specified <code>AccessPointId</code> value doesn't exist in the requester's Amazon Web Services account.</p>
capo_efs.errors.bad_request.BadRequest: <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
capo_efs.errors.file_system_not_found.FileSystemNotFound: <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's Amazon Web Services account.</p>
capo_efs.errors.internal_server_error.InternalServerError: <p>Returned if an error occurred on the server side.</p>
capo_efs.errors.mount_target_not_found.MountTargetNotFound: <p>Returned if there is no mount target with the specified ID found in the caller's Amazon Web Services account.</p>
capo_efs.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To describe the mount targets for a file system
This operation describes all of a file system's mount targets.
>>> await client.describe_mount_targets(file_system_id='fs-01234567')
"""
async def _handler(
req: "AsyncOperationRequest[capo_efs.types.describe_mount_targets_request.DescribeMountTargetsRequest]",
) -> AsyncOperationResponse[
"capo_efs.types.describe_mount_targets_response.DescribeMountTargetsResponse"
]:
import capo_efs._operations.magnolio_api_service_v20150201.describe_mount_targets
(
output,
http_response,
) = await capo_efs._operations.magnolio_api_service_v20150201.describe_mount_targets.async_describe_mount_targets(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeMountTargets")
)
input_: capo_efs.types.describe_mount_targets_request.DescribeMountTargetsRequest = {}
if max_items is not None:
input_["max_items"] = max_items
if marker is not None:
input_["marker"] = marker
if file_system_id is not None:
input_["file_system_id"] = file_system_id
if mount_target_id is not None:
input_["mount_target_id"] = mount_target_id
if access_point_id is not None:
input_["access_point_id"] = access_point_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|