There are more AWS SDK examples available in the AWS Doc SDK Examples
Use DeleteMountTarget
with a CLI
The following code examples show how to use DeleteMountTarget
.
- CLI
-
- AWS CLI
-
To delete a mount target
The following
delete-mount-target
example deletes the specified mount target.aws efs delete-mount-target \ --mount-target-id
fsmt-f9a14450
This command produces no output.
For more information, see Creating mount targets in the Amazon Elastic File System User Guide.
-
For API details, see DeleteMountTarget
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell
-
Example 1: Deletes the specified mount target. You are prompted for confirmation before the operation proceeds. To suppress the prompt use the
-Force
switch. Note that this operation forcibly breaks any mounts of the file system via the target - you may want to consider unmounting the file system before running this command, if feasible.Remove-EFSMountTarget -MountTargetId fsmt-1a2b3c4d
-
For API details, see DeleteMountTarget in AWS Tools for PowerShell Cmdlet Reference.
-