There are more AWS SDK examples available in the AWS Doc SDK Examples
Use DeregisterImage
with a CLI
The following code examples show how to use DeregisterImage
.
- CLI
-
- AWS CLI
-
To deregister an AMI
This example deregisters the specified AMI. If the command succeeds, no output is returned.
Command:
aws ec2 deregister-image --image-id
ami-4fa54026
-
For API details, see DeregisterImage
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell
-
Example 1: This example deregisters the specified AMI.
Unregister-EC2Image -ImageId ami-12345678
-
For API details, see DeregisterImage in AWS Tools for PowerShell Cmdlet Reference.
-
DeleteVpnGateway
DescribeAccountAttributes