describe_mount_targets
(**kwargs)¶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
.
See also: AWS API Documentation
Request Syntax
response = client.describe_mount_targets(
MaxItems=123,
Marker='string',
FileSystemId='string',
MountTargetId='string',
AccessPointId='string'
)
DescribeMountTargets
operation (String). If present, it specifies to continue the list from where the previous returning call left off.AccessPointId
or MountTargetId
is not included. Accepts either a file system ID or ARN as input.FileSystemId
is not included. Accepts either a mount target ID or ARN as input.FileSystemId
or MountTargetId
is not included in your request. Accepts either an access point ID or ARN as input.dict
Response Syntax
{
'Marker': 'string',
'MountTargets': [
{
'OwnerId': 'string',
'MountTargetId': 'string',
'FileSystemId': 'string',
'SubnetId': 'string',
'LifeCycleState': 'creating'|'available'|'updating'|'deleting'|'deleted'|'error',
'IpAddress': 'string',
'NetworkInterfaceId': 'string',
'AvailabilityZoneId': 'string',
'AvailabilityZoneName': 'string',
'VpcId': 'string'
},
],
'NextMarker': 'string'
}
Response Structure
(dict) --
Marker (string) --
If the request included the Marker
, the response returns that value in this field.
MountTargets (list) --
Returns the file system's mount targets as an array of MountTargetDescription
objects.
(dict) --
Provides a description of a mount target.
OwnerId (string) --
Amazon Web Services account ID that owns the resource.
MountTargetId (string) --
System-assigned mount target ID.
FileSystemId (string) --
The ID of the file system for which the mount target is intended.
SubnetId (string) --
The ID of the mount target's subnet.
LifeCycleState (string) --
Lifecycle state of the mount target.
IpAddress (string) --
Address at which the file system can be mounted by using the mount target.
NetworkInterfaceId (string) --
The ID of the network interface that Amazon EFS created when it created the mount target.
AvailabilityZoneId (string) --
The unique and consistent identifier of the Availability Zone that the mount target resides in. For example, use1-az1
is an AZ ID for the us-east-1 Region and it has the same location in every Amazon Web Services account.
AvailabilityZoneName (string) --
The name of the Availability Zone in which the mount target is located. Availability Zones are independently mapped to names for each Amazon Web Services account. For example, the Availability Zone us-east-1a
for your Amazon Web Services account might not be the same location as us-east-1a
for another Amazon Web Services account.
VpcId (string) --
The virtual private cloud (VPC) ID that the mount target is configured in.
NextMarker (string) --
If a value is present, there are more mount targets to return. In a subsequent request, you can provide Marker
in your request with this value to retrieve the next set of mount targets.
Exceptions
EFS.Client.exceptions.BadRequest
EFS.Client.exceptions.InternalServerError
EFS.Client.exceptions.FileSystemNotFound
EFS.Client.exceptions.MountTargetNotFound
EFS.Client.exceptions.AccessPointNotFound
Examples
This operation describes all of a file system's mount targets.
response = client.describe_mount_targets(
FileSystemId='fs-01234567',
)
print(response)
Expected Output:
{
'MountTargets': [
{
'FileSystemId': 'fs-01234567',
'IpAddress': '192.0.0.2',
'LifeCycleState': 'available',
'MountTargetId': 'fsmt-12340abc',
'NetworkInterfaceId': 'eni-cedf6789',
'OwnerId': '012345678912',
'SubnetId': 'subnet-1234abcd',
},
],
'ResponseMetadata': {
'...': '...',
},
}