- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeMountTargetsCommand
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
.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { EFSClient, DescribeMountTargetsCommand } from "@aws-sdk/client-efs"; // ES Modules import
// const { EFSClient, DescribeMountTargetsCommand } = require("@aws-sdk/client-efs"); // CommonJS import
const client = new EFSClient(config);
const input = { // DescribeMountTargetsRequest
MaxItems: Number("int"),
Marker: "STRING_VALUE",
FileSystemId: "STRING_VALUE",
MountTargetId: "STRING_VALUE",
AccessPointId: "STRING_VALUE",
};
const command = new DescribeMountTargetsCommand(input);
const response = await client.send(command);
// { // DescribeMountTargetsResponse
// Marker: "STRING_VALUE",
// MountTargets: [ // MountTargetDescriptions
// { // MountTargetDescription
// OwnerId: "STRING_VALUE",
// MountTargetId: "STRING_VALUE", // required
// FileSystemId: "STRING_VALUE", // required
// SubnetId: "STRING_VALUE", // required
// LifeCycleState: "creating" || "available" || "updating" || "deleting" || "deleted" || "error", // required
// IpAddress: "STRING_VALUE",
// NetworkInterfaceId: "STRING_VALUE",
// AvailabilityZoneId: "STRING_VALUE",
// AvailabilityZoneName: "STRING_VALUE",
// VpcId: "STRING_VALUE",
// },
// ],
// NextMarker: "STRING_VALUE",
// };
Example Usage
DescribeMountTargetsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AccessPointId | string | undefined | (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 | string | undefined | (Optional) ID of the file system whose mount targets you want to list (String). It must be included in your request if an |
Marker | string | undefined | (Optional) Opaque pagination token returned from a previous |
MaxItems | number | undefined | (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. |
MountTargetId | string | undefined | (Optional) ID of the mount target that you want to have described (String). It must be included in your request if |
DescribeMountTargetsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Marker | string | undefined | If the request included the |
MountTargets | MountTargetDescription[] | undefined | Returns the file system's mount targets as an array of |
NextMarker | string | undefined | If a value is present, there are more mount targets to return. In a subsequent request, you can provide |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessPointNotFound | client | Returned if the specified |
BadRequest | client | Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter. |
FileSystemNotFound | client | Returned if the specified |
InternalServerError | server | Returned if an error occurred on the server side. |
MountTargetNotFound | client | Returned if there is no mount target with the specified ID found in the caller's Amazon Web Services account. |
EFSServiceException | Base exception class for all service exceptions from EFS service. |