Amazon Elastic Compute Cloud 2016-09-15
- Client: Aws\Ec2\Ec2Client
- Service ID: ec2
- Version: 2016-09-15
This page describes the parameters and results for the operations of the Amazon Elastic Compute Cloud (2016-09-15), and shows how to use the Aws\Ec2\Ec2Client object to call the described operations. This documentation is specific to the 2016-09-15 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- AcceptReservedInstancesExchangeQuote ( array $params = [] )
- Purchases Convertible Reserved Instance offerings described in the GetReservedInstancesExchangeQuote call.
- AcceptVpcPeeringConnection ( array $params = [] )
- Accept a VPC peering connection request.
- AllocateAddress ( array $params = [] )
- Acquires an Elastic IP address.
- AllocateHosts ( array $params = [] )
- Allocates a Dedicated Host to your account.
- AssignPrivateIpAddresses ( array $params = [] )
- Assigns one or more secondary private IP addresses to the specified network interface.
- AssociateAddress ( array $params = [] )
- Associates an Elastic IP address with an instance or a network interface.
- AssociateDhcpOptions ( array $params = [] )
- Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.
- AssociateRouteTable ( array $params = [] )
- Associates a subnet with a route table.
- AttachClassicLinkVpc ( array $params = [] )
- Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups.
- AttachInternetGateway ( array $params = [] )
- Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC.
- AttachNetworkInterface ( array $params = [] )
- Attaches a network interface to an instance.
- AttachVolume ( array $params = [] )
- Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.
- AttachVpnGateway ( array $params = [] )
- Attaches a virtual private gateway to a VPC.
- AuthorizeSecurityGroupEgress ( array $params = [] )
- [EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC.
- AuthorizeSecurityGroupIngress ( array $params = [] )
- Adds one or more ingress rules to a security group.
- BundleInstance ( array $params = [] )
- Bundles an Amazon instance store-backed Windows instance.
- CancelBundleTask ( array $params = [] )
- Cancels a bundling operation for an instance store-backed Windows instance.
- CancelConversionTask ( array $params = [] )
- Cancels an active conversion task.
- CancelExportTask ( array $params = [] )
- Cancels an active export task.
- CancelImportTask ( array $params = [] )
- Cancels an in-process import virtual machine or import snapshot task.
- CancelReservedInstancesListing ( array $params = [] )
- Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.
- CancelSpotFleetRequests ( array $params = [] )
- Cancels the specified Spot fleet requests.
- CancelSpotInstanceRequests ( array $params = [] )
- Cancels one or more Spot instance requests.
- ConfirmProductInstance ( array $params = [] )
- Determines whether a product code is associated with an instance.
- CopyImage ( array $params = [] )
- Initiates the copy of an AMI from the specified source region to the current region.
- CopySnapshot ( array $params = [] )
- Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3.
- CreateCustomerGateway ( array $params = [] )
- Provides information to AWS about your VPN customer gateway device.
- CreateDhcpOptions ( array $params = [] )
- Creates a set of DHCP options for your VPC.
- CreateFlowLogs ( array $params = [] )
- Creates one or more flow logs to capture IP traffic for a specific network interface, subnet, or VPC.
- CreateImage ( array $params = [] )
- Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.
- CreateInstanceExportTask ( array $params = [] )
- Exports a running or stopped instance to an S3 bucket.
- CreateInternetGateway ( array $params = [] )
- Creates an Internet gateway for use with a VPC.
- CreateKeyPair ( array $params = [] )
- Creates a 2048-bit RSA key pair with the specified name.
- CreateNatGateway ( array $params = [] )
- Creates a NAT gateway in the specified subnet.
- CreateNetworkAcl ( array $params = [] )
- Creates a network ACL in a VPC.
- CreateNetworkAclEntry ( array $params = [] )
- Creates an entry (a rule) in a network ACL with the specified rule number.
- CreateNetworkInterface ( array $params = [] )
- Creates a network interface in the specified subnet.
- CreatePlacementGroup ( array $params = [] )
- Creates a placement group that you launch cluster instances into.
- CreateReservedInstancesListing ( array $params = [] )
- Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance Marketplace.
- CreateRoute ( array $params = [] )
- Creates a route in a route table within a VPC.
- CreateRouteTable ( array $params = [] )
- Creates a route table for the specified VPC.
- CreateSecurityGroup ( array $params = [] )
- Creates a security group.
- CreateSnapshot ( array $params = [] )
- Creates a snapshot of an EBS volume and stores it in Amazon S3.
- CreateSpotDatafeedSubscription ( array $params = [] )
- Creates a data feed for Spot instances, enabling you to view Spot instance usage logs.
- CreateSubnet ( array $params = [] )
- Creates a subnet in an existing VPC.
- CreateTags ( array $params = [] )
- Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources.
- CreateVolume ( array $params = [] )
- Creates an EBS volume that can be attached to an instance in the same Availability Zone.
- CreateVpc ( array $params = [] )
- Creates a VPC with the specified CIDR block.
- CreateVpcEndpoint ( array $params = [] )
- Creates a VPC endpoint for a specified AWS service.
- CreateVpcPeeringConnection ( array $params = [] )
- Requests a VPC peering connection between two VPCs: a requester VPC that you own and a peer VPC with which to create the connection.
- CreateVpnConnection ( array $params = [] )
- Creates a VPN connection between an existing virtual private gateway and a VPN customer gateway.
- CreateVpnConnectionRoute ( array $params = [] )
- Creates a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway.
- CreateVpnGateway ( array $params = [] )
- Creates a virtual private gateway.
- DeleteCustomerGateway ( array $params = [] )
- Deletes the specified customer gateway.
- DeleteDhcpOptions ( array $params = [] )
- Deletes the specified set of DHCP options.
- DeleteFlowLogs ( array $params = [] )
- Deletes one or more flow logs.
- DeleteInternetGateway ( array $params = [] )
- Deletes the specified Internet gateway.
- DeleteKeyPair ( array $params = [] )
- Deletes the specified key pair, by removing the public key from Amazon EC2.
- DeleteNatGateway ( array $params = [] )
- Deletes the specified NAT gateway.
- DeleteNetworkAcl ( array $params = [] )
- Deletes the specified network ACL.
- DeleteNetworkAclEntry ( array $params = [] )
- Deletes the specified ingress or egress entry (rule) from the specified network ACL.
- DeleteNetworkInterface ( array $params = [] )
- Deletes the specified network interface.
- DeletePlacementGroup ( array $params = [] )
- Deletes the specified placement group.
- DeleteRoute ( array $params = [] )
- Deletes the specified route from the specified route table.
- DeleteRouteTable ( array $params = [] )
- Deletes the specified route table.
- DeleteSecurityGroup ( array $params = [] )
- Deletes a security group.
- DeleteSnapshot ( array $params = [] )
- Deletes the specified snapshot.
- DeleteSpotDatafeedSubscription ( array $params = [] )
- Deletes the data feed for Spot instances.
- DeleteSubnet ( array $params = [] )
- Deletes the specified subnet.
- DeleteTags ( array $params = [] )
- Deletes the specified set of tags from the specified set of resources.
- DeleteVolume ( array $params = [] )
- Deletes the specified EBS volume.
- DeleteVpc ( array $params = [] )
- Deletes the specified VPC.
- DeleteVpcEndpoints ( array $params = [] )
- Deletes one or more specified VPC endpoints.
- DeleteVpcPeeringConnection ( array $params = [] )
- Deletes a VPC peering connection.
- DeleteVpnConnection ( array $params = [] )
- Deletes the specified VPN connection.
- DeleteVpnConnectionRoute ( array $params = [] )
- Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway.
- DeleteVpnGateway ( array $params = [] )
- Deletes the specified virtual private gateway.
- DeregisterImage ( array $params = [] )
- Deregisters the specified AMI.
- DescribeAccountAttributes ( array $params = [] )
- Describes attributes of your AWS account.
- DescribeAddresses ( array $params = [] )
- Describes one or more of your Elastic IP addresses.
- DescribeAvailabilityZones ( array $params = [] )
- Describes one or more of the Availability Zones that are available to you.
- DescribeBundleTasks ( array $params = [] )
- Describes one or more of your bundling tasks.
- DescribeClassicLinkInstances ( array $params = [] )
- Describes one or more of your linked EC2-Classic instances.
- DescribeConversionTasks ( array $params = [] )
- Describes one or more of your conversion tasks.
- DescribeCustomerGateways ( array $params = [] )
- Describes one or more of your VPN customer gateways.
- DescribeDhcpOptions ( array $params = [] )
- Describes one or more of your DHCP options sets.
- DescribeExportTasks ( array $params = [] )
- Describes one or more of your export tasks.
- DescribeFlowLogs ( array $params = [] )
- Describes one or more flow logs.
- DescribeHostReservationOfferings ( array $params = [] )
- Describes the Dedicated Host Reservations that are available to purchase.
- DescribeHostReservations ( array $params = [] )
- Describes Dedicated Host Reservations which are associated with Dedicated Hosts in your account.
- DescribeHosts ( array $params = [] )
- Describes one or more of your Dedicated Hosts.
- DescribeIdFormat ( array $params = [] )
- Describes the ID format settings for your resources on a per-region basis, for example, to view which resource types are enabled for longer IDs.
- DescribeIdentityIdFormat ( array $params = [] )
- Describes the ID format settings for resources for the specified IAM user, IAM role, or root user.
- DescribeImageAttribute ( array $params = [] )
- Describes the specified attribute of the specified AMI.
- DescribeImages ( array $params = [] )
- Describes one or more of the images (AMIs, AKIs, and ARIs) available to you.
- DescribeImportImageTasks ( array $params = [] )
- Displays details about an import virtual machine or import snapshot tasks that are already created.
- DescribeImportSnapshotTasks ( array $params = [] )
- Describes your import snapshot tasks.
- DescribeInstanceAttribute ( array $params = [] )
- Describes the specified attribute of the specified instance.
- DescribeInstanceStatus ( array $params = [] )
- Describes the status of one or more instances.
- DescribeInstances ( array $params = [] )
- Describes one or more of your instances.
- DescribeInternetGateways ( array $params = [] )
- Describes one or more of your Internet gateways.
- DescribeKeyPairs ( array $params = [] )
- Describes one or more of your key pairs.
- DescribeMovingAddresses ( array $params = [] )
- Describes your Elastic IP addresses that are being moved to the EC2-VPC platform, or that are being restored to the EC2-Classic platform.
- DescribeNatGateways ( array $params = [] )
- Describes one or more of the your NAT gateways.
- DescribeNetworkAcls ( array $params = [] )
- Describes one or more of your network ACLs.
- DescribeNetworkInterfaceAttribute ( array $params = [] )
- Describes a network interface attribute.
- DescribeNetworkInterfaces ( array $params = [] )
- Describes one or more of your network interfaces.
- DescribePlacementGroups ( array $params = [] )
- Describes one or more of your placement groups.
- DescribePrefixLists ( array $params = [] )
- Describes available AWS services in a prefix list format, which includes the prefix list name and prefix list ID of the service and the IP address range for the service.
- DescribeRegions ( array $params = [] )
- Describes one or more regions that are currently available to you.
- DescribeReservedInstances ( array $params = [] )
- Describes one or more of the Reserved Instances that you purchased.
- DescribeReservedInstancesListings ( array $params = [] )
- Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.
- DescribeReservedInstancesModifications ( array $params = [] )
- Describes the modifications made to your Reserved Instances.
- DescribeReservedInstancesOfferings ( array $params = [] )
- Describes Reserved Instance offerings that are available for purchase.
- DescribeRouteTables ( array $params = [] )
- Describes one or more of your route tables.
- DescribeScheduledInstanceAvailability ( array $params = [] )
- Finds available schedules that meet the specified criteria.
- DescribeScheduledInstances ( array $params = [] )
- Describes one or more of your Scheduled Instances.
- DescribeSecurityGroupReferences ( array $params = [] )
- [EC2-VPC only] Describes the VPCs on the other side of a VPC peering connection that are referencing the security groups you've specified in this request.
- DescribeSecurityGroups ( array $params = [] )
- Describes one or more of your security groups.
- DescribeSnapshotAttribute ( array $params = [] )
- Describes the specified attribute of the specified snapshot.
- DescribeSnapshots ( array $params = [] )
- Describes one or more of the EBS snapshots available to you.
- DescribeSpotDatafeedSubscription ( array $params = [] )
- Describes the data feed for Spot instances.
- DescribeSpotFleetInstances ( array $params = [] )
- Describes the running instances for the specified Spot fleet.
- DescribeSpotFleetRequestHistory ( array $params = [] )
- Describes the events for the specified Spot fleet request during the specified time.
- DescribeSpotFleetRequests ( array $params = [] )
- Describes your Spot fleet requests.
- DescribeSpotInstanceRequests ( array $params = [] )
- Describes the Spot instance requests that belong to your account.
- DescribeSpotPriceHistory ( array $params = [] )
- Describes the Spot price history.
- DescribeStaleSecurityGroups ( array $params = [] )
- [EC2-VPC only] Describes the stale security group rules for security groups in a specified VPC.
- DescribeSubnets ( array $params = [] )
- Describes one or more of your subnets.
- DescribeTags ( array $params = [] )
- Describes one or more of the tags for your EC2 resources.
- DescribeVolumeAttribute ( array $params = [] )
- Describes the specified attribute of the specified volume.
- DescribeVolumeStatus ( array $params = [] )
- Describes the status of the specified volumes.
- DescribeVolumes ( array $params = [] )
- Describes the specified EBS volumes.
- DescribeVpcAttribute ( array $params = [] )
- Describes the specified attribute of the specified VPC.
- DescribeVpcClassicLink ( array $params = [] )
- Describes the ClassicLink status of one or more VPCs.
- DescribeVpcClassicLinkDnsSupport ( array $params = [] )
- Describes the ClassicLink DNS support status of one or more VPCs.
- DescribeVpcEndpointServices ( array $params = [] )
- Describes all supported AWS services that can be specified when creating a VPC endpoint.
- DescribeVpcEndpoints ( array $params = [] )
- Describes one or more of your VPC endpoints.
- DescribeVpcPeeringConnections ( array $params = [] )
- Describes one or more of your VPC peering connections.
- DescribeVpcs ( array $params = [] )
- Describes one or more of your VPCs.
- DescribeVpnConnections ( array $params = [] )
- Describes one or more of your VPN connections.
- DescribeVpnGateways ( array $params = [] )
- Describes one or more of your virtual private gateways.
- DetachClassicLinkVpc ( array $params = [] )
- Unlinks (detaches) a linked EC2-Classic instance from a VPC.
- DetachInternetGateway ( array $params = [] )
- Detaches an Internet gateway from a VPC, disabling connectivity between the Internet and the VPC.
- DetachNetworkInterface ( array $params = [] )
- Detaches a network interface from an instance.
- DetachVolume ( array $params = [] )
- Detaches an EBS volume from an instance.
- DetachVpnGateway ( array $params = [] )
- Detaches a virtual private gateway from a VPC.
- DisableVgwRoutePropagation ( array $params = [] )
- Disables a virtual private gateway (VGW) from propagating routes to a specified route table of a VPC.
- DisableVpcClassicLink ( array $params = [] )
- Disables ClassicLink for a VPC.
- DisableVpcClassicLinkDnsSupport ( array $params = [] )
- Disables ClassicLink DNS support for a VPC.
- DisassociateAddress ( array $params = [] )
- Disassociates an Elastic IP address from the instance or network interface it's associated with.
- DisassociateRouteTable ( array $params = [] )
- Disassociates a subnet from a route table.
- EnableVgwRoutePropagation ( array $params = [] )
- Enables a virtual private gateway (VGW) to propagate routes to the specified route table of a VPC.
- EnableVolumeIO ( array $params = [] )
- Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.
- EnableVpcClassicLink ( array $params = [] )
- Enables a VPC for ClassicLink.
- EnableVpcClassicLinkDnsSupport ( array $params = [] )
- Enables a VPC to support DNS hostname resolution for ClassicLink.
- GetConsoleOutput ( array $params = [] )
- Gets the console output for the specified instance.
- GetConsoleScreenshot ( array $params = [] )
- Retrieve a JPG-format screenshot of a running instance to help with troubleshooting.
- GetHostReservationPurchasePreview ( array $params = [] )
- Preview a reservation purchase with configurations that match those of your Dedicated Host.
- GetPasswordData ( array $params = [] )
- Retrieves the encrypted administrator password for an instance running Windows.
- GetReservedInstancesExchangeQuote ( array $params = [] )
- Returns details about the values and term of your specified Convertible Reserved Instances.
- ImportImage ( array $params = [] )
- Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI).
- ImportInstance ( array $params = [] )
- Creates an import instance task using metadata from the specified disk image.
- ImportKeyPair ( array $params = [] )
- Imports the public key from an RSA key pair that you created with a third-party tool.
- ImportSnapshot ( array $params = [] )
- Imports a disk into an EBS snapshot.
- ImportVolume ( array $params = [] )
- Creates an import volume task using metadata from the specified disk image.
- ModifyHosts ( array $params = [] )
- Modify the auto-placement setting of a Dedicated Host.
- ModifyIdFormat ( array $params = [] )
- Modifies the ID format for the specified resource on a per-region basis.
- ModifyIdentityIdFormat ( array $params = [] )
- Modifies the ID format of a resource for a specified IAM user, IAM role, or the root user for an account; or all IAM users, IAM roles, and the root user for an account.
- ModifyImageAttribute ( array $params = [] )
- Modifies the specified attribute of the specified AMI.
- ModifyInstanceAttribute ( array $params = [] )
- Modifies the specified attribute of the specified instance.
- ModifyInstancePlacement ( array $params = [] )
- Set the instance affinity value for a specific stopped instance and modify the instance tenancy setting.
- ModifyNetworkInterfaceAttribute ( array $params = [] )
- Modifies the specified network interface attribute.
- ModifyReservedInstances ( array $params = [] )
- Modifies the Availability Zone, instance count, instance type, or network platform (EC2-Classic or EC2-VPC) of your Standard Reserved Instances.
- ModifySnapshotAttribute ( array $params = [] )
- Adds or removes permission settings for the specified snapshot.
- ModifySpotFleetRequest ( array $params = [] )
- Modifies the specified Spot fleet request.
- ModifySubnetAttribute ( array $params = [] )
- Modifies a subnet attribute.
- ModifyVolumeAttribute ( array $params = [] )
- Modifies a volume attribute.
- ModifyVpcAttribute ( array $params = [] )
- Modifies the specified attribute of the specified VPC.
- ModifyVpcEndpoint ( array $params = [] )
- Modifies attributes of a specified VPC endpoint.
- ModifyVpcPeeringConnectionOptions ( array $params = [] )
- Modifies the VPC peering connection options on one side of a VPC peering connection.
- MonitorInstances ( array $params = [] )
- Enables monitoring for a running instance.
- MoveAddressToVpc ( array $params = [] )
- Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform.
- PurchaseHostReservation ( array $params = [] )
- Purchase a reservation with configurations that match those of your Dedicated Host.
- PurchaseReservedInstancesOffering ( array $params = [] )
- Purchases a Reserved Instance for use with your account.
- PurchaseScheduledInstances ( array $params = [] )
- Purchases one or more Scheduled Instances with the specified schedule.
- RebootInstances ( array $params = [] )
- Requests a reboot of one or more instances.
- RegisterImage ( array $params = [] )
- Registers an AMI.
- RejectVpcPeeringConnection ( array $params = [] )
- Rejects a VPC peering connection request.
- ReleaseAddress ( array $params = [] )
- Releases the specified Elastic IP address.
- ReleaseHosts ( array $params = [] )
- When you no longer want to use an On-Demand Dedicated Host it can be released.
- ReplaceNetworkAclAssociation ( array $params = [] )
- Changes which network ACL a subnet is associated with.
- ReplaceNetworkAclEntry ( array $params = [] )
- Replaces an entry (rule) in a network ACL.
- ReplaceRoute ( array $params = [] )
- Replaces an existing route within a route table in a VPC.
- ReplaceRouteTableAssociation ( array $params = [] )
- Changes the route table associated with a given subnet in a VPC.
- ReportInstanceStatus ( array $params = [] )
- Submits feedback about the status of an instance.
- RequestSpotFleet ( array $params = [] )
- Creates a Spot fleet request.
- RequestSpotInstances ( array $params = [] )
- Creates a Spot instance request.
- ResetImageAttribute ( array $params = [] )
- Resets an attribute of an AMI to its default value.
- ResetInstanceAttribute ( array $params = [] )
- Resets an attribute of an instance to its default value.
- ResetNetworkInterfaceAttribute ( array $params = [] )
- Resets a network interface attribute.
- ResetSnapshotAttribute ( array $params = [] )
- Resets permission settings for the specified snapshot.
- RestoreAddressToClassic ( array $params = [] )
- Restores an Elastic IP address that was previously moved to the EC2-VPC platform back to the EC2-Classic platform.
- RevokeSecurityGroupEgress ( array $params = [] )
- [EC2-VPC only] Removes one or more egress rules from a security group for EC2-VPC.
- RevokeSecurityGroupIngress ( array $params = [] )
- Removes one or more ingress rules from a security group.
- RunInstances ( array $params = [] )
- Launches the specified number of instances using an AMI for which you have permissions.
- RunScheduledInstances ( array $params = [] )
- Launches the specified Scheduled Instances.
- StartInstances ( array $params = [] )
- Starts an Amazon EBS-backed AMI that you've previously stopped.
- StopInstances ( array $params = [] )
- Stops an Amazon EBS-backed instance.
- TerminateInstances ( array $params = [] )
- Shuts down one or more instances.
- UnassignPrivateIpAddresses ( array $params = [] )
- Unassigns one or more secondary private IP addresses from a network interface.
- UnmonitorInstances ( array $params = [] )
- Disables monitoring for a running instance.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
- DescribeAccountAttributes
- DescribeAddresses
- DescribeAvailabilityZones
- DescribeBundleTasks
- DescribeConversionTasks
- DescribeCustomerGateways
- DescribeDhcpOptions
- DescribeExportTasks
- DescribeImages
- DescribeInstanceStatus
- DescribeInstances
- DescribeInternetGateways
- DescribeKeyPairs
- DescribeNetworkAcls
- DescribeNetworkInterfaces
- DescribePlacementGroups
- DescribeRegions
- DescribeReservedInstances
- DescribeReservedInstancesListings
- DescribeReservedInstancesOfferings
- DescribeReservedInstancesModifications
- DescribeRouteTables
- DescribeSecurityGroups
- DescribeSnapshots
- DescribeSpotInstanceRequests
- DescribeSpotFleetRequests
- DescribeSpotPriceHistory
- DescribeSubnets
- DescribeTags
- DescribeVolumeStatus
- DescribeVolumes
- DescribeVpcs
- DescribeVpcPeeringConnections
- DescribeVpnConnections
- DescribeVpnGateways
Waiters
Waiters allow you to poll a resource until it enters into a desired state. A waiter has a name used to describe what it does, and is associated with an API operation. When creating a waiter, you can provide the API operation parameters associated with the corresponding operation. Waiters can be accessed using the getWaiter($waiterName, $operationParameters) method of a client object. This client supports the following waiters:
Waiter name | API Operation | Delay | Max Attempts |
---|---|---|---|
InstanceExists | DescribeInstances | 5 | 40 |
BundleTaskComplete | DescribeBundleTasks | 15 | 40 |
ConversionTaskCancelled | DescribeConversionTasks | 15 | 40 |
ConversionTaskCompleted | DescribeConversionTasks | 15 | 40 |
ConversionTaskDeleted | DescribeConversionTasks | 15 | 40 |
CustomerGatewayAvailable | DescribeCustomerGateways | 15 | 40 |
ExportTaskCancelled | DescribeExportTasks | 15 | 40 |
ExportTaskCompleted | DescribeExportTasks | 15 | 40 |
ImageExists | DescribeImages | 15 | 40 |
ImageAvailable | DescribeImages | 15 | 40 |
InstanceRunning | DescribeInstances | 15 | 40 |
InstanceStatusOk | DescribeInstanceStatus | 15 | 40 |
InstanceStopped | DescribeInstances | 15 | 40 |
InstanceTerminated | DescribeInstances | 15 | 40 |
KeyPairExists | DescribeKeyPairs | 5 | 6 |
NatGatewayAvailable | DescribeNatGateways | 15 | 40 |
NetworkInterfaceAvailable | DescribeNetworkInterfaces | 20 | 10 |
PasswordDataAvailable | GetPasswordData | 15 | 40 |
SnapshotCompleted | DescribeSnapshots | 15 | 40 |
SpotInstanceRequestFulfilled | DescribeSpotInstanceRequests | 15 | 40 |
SubnetAvailable | DescribeSubnets | 15 | 40 |
SystemStatusOk | DescribeInstanceStatus | 15 | 40 |
VolumeAvailable | DescribeVolumes | 15 | 40 |
VolumeDeleted | DescribeVolumes | 15 | 40 |
VolumeInUse | DescribeVolumes | 15 | 40 |
VpcAvailable | DescribeVpcs | 15 | 40 |
VpcExists | DescribeVpcs | 1 | 5 |
VpnConnectionAvailable | DescribeVpnConnections | 15 | 40 |
VpnConnectionDeleted | DescribeVpnConnections | 15 | 40 |
VpcPeeringConnectionExists | DescribeVpcPeeringConnections | 15 | 40 |
Operations
AcceptReservedInstancesExchangeQuote
$result = $client->acceptReservedInstancesExchangeQuote
([/* ... */]); $promise = $client->acceptReservedInstancesExchangeQuoteAsync
([/* ... */]);
Purchases Convertible Reserved Instance offerings described in the GetReservedInstancesExchangeQuote call.
Parameter Syntax
$result = $client->acceptReservedInstancesExchangeQuote([ 'DryRun' => true || false, 'ReservedInstanceIds' => ['<string>', ...], // REQUIRED 'TargetConfigurations' => [ [ 'InstanceCount' => <integer>, 'OfferingId' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - ReservedInstanceIds
-
- Required: Yes
- Type: Array of strings
The IDs of the Convertible Reserved Instances that you want to exchange for other Convertible Reserved Instances of the same or higher value.
- TargetConfigurations
-
- Type: Array of TargetConfigurationRequest structures
The configurations of the Convertible Reserved Instance offerings you are purchasing in this exchange.
Result Syntax
[ 'ExchangeId' => '<string>', ]
Result Details
Members
- ExchangeId
-
- Type: string
The ID of the successful exchange.
Errors
There are no errors described for this operation.
AcceptVpcPeeringConnection
$result = $client->acceptVpcPeeringConnection
([/* ... */]); $promise = $client->acceptVpcPeeringConnectionAsync
([/* ... */]);
Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the pending-acceptance
state, and you must be the owner of the peer VPC. Use the DescribeVpcPeeringConnections
request to view your outstanding VPC peering connection requests.
Parameter Syntax
$result = $client->acceptVpcPeeringConnection([ 'DryRun' => true || false, 'VpcPeeringConnectionId' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcPeeringConnectionId
-
- Type: string
The ID of the VPC peering connection.
Result Syntax
[ 'VpcPeeringConnection' => [ 'AccepterVpcInfo' => [ 'CidrBlock' => '<string>', 'OwnerId' => '<string>', 'PeeringOptions' => [ 'AllowDnsResolutionFromRemoteVpc' => true || false, 'AllowEgressFromLocalClassicLinkToRemoteVpc' => true || false, 'AllowEgressFromLocalVpcToRemoteClassicLink' => true || false, ], 'VpcId' => '<string>', ], 'ExpirationTime' => <DateTime>, 'RequesterVpcInfo' => [ 'CidrBlock' => '<string>', 'OwnerId' => '<string>', 'PeeringOptions' => [ 'AllowDnsResolutionFromRemoteVpc' => true || false, 'AllowEgressFromLocalClassicLinkToRemoteVpc' => true || false, 'AllowEgressFromLocalVpcToRemoteClassicLink' => true || false, ], 'VpcId' => '<string>', ], 'Status' => [ 'Code' => 'initiating-request|pending-acceptance|active|deleted|rejected|failed|expired|provisioning|deleting', 'Message' => '<string>', ], 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcPeeringConnectionId' => '<string>', ], ]
Result Details
Members
- VpcPeeringConnection
-
- Type: VpcPeeringConnection structure
Information about the VPC peering connection.
Errors
There are no errors described for this operation.
AllocateAddress
$result = $client->allocateAddress
([/* ... */]); $promise = $client->allocateAddressAsync
([/* ... */]);
Acquires an Elastic IP address.
An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->allocateAddress([ 'Domain' => 'vpc|standard', 'DryRun' => true || false, ]);
Parameter Details
Members
- Domain
-
- Type: string
Set to
vpc
to allocate the address for use with instances in a VPC.Default: The address is for use with instances in EC2-Classic.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[ 'AllocationId' => '<string>', 'Domain' => 'vpc|standard', 'PublicIp' => '<string>', ]
Result Details
Members
- AllocationId
-
- Type: string
[EC2-VPC] The ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.
- Domain
-
- Type: string
Indicates whether this Elastic IP address is for use with instances in EC2-Classic (
standard
) or instances in a VPC (vpc
). - PublicIp
-
- Type: string
The Elastic IP address.
Errors
There are no errors described for this operation.
Examples
Example 1: To allocate an Elastic IP address for EC2-VPC
This example allocates an Elastic IP address to use with an instance in a VPC.
$result = $client->allocateAddress([ 'Domain' => 'vpc', ]);
Result syntax:
[ 'AllocationId' => 'eipalloc-64d5890a', 'Domain' => 'vpc', 'PublicIp' => '203.0.113.0', ]
Example 2: To allocate an Elastic IP address for EC2-Classic
This example allocates an Elastic IP address to use with an instance in EC2-Classic.
$result = $client->allocateAddress([ ]);
Result syntax:
[ 'Domain' => 'standard', 'PublicIp' => '198.51.100.0', ]
AllocateHosts
$result = $client->allocateHosts
([/* ... */]); $promise = $client->allocateHostsAsync
([/* ... */]);
Allocates a Dedicated Host to your account. At minimum you need to specify the instance size type, Availability Zone, and quantity of hosts you want to allocate.
Parameter Syntax
$result = $client->allocateHosts([ 'AutoPlacement' => 'on|off', 'AvailabilityZone' => '<string>', // REQUIRED 'ClientToken' => '<string>', 'InstanceType' => '<string>', // REQUIRED 'Quantity' => <integer>, // REQUIRED ]);
Parameter Details
Members
- AutoPlacement
-
- Type: string
This is enabled by default. This property allows instances to be automatically placed onto available Dedicated Hosts, when you are launching instances without specifying a host ID.
Default: Enabled
- AvailabilityZone
-
- Required: Yes
- Type: string
The Availability Zone for the Dedicated Hosts.
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
- InstanceType
-
- Required: Yes
- Type: string
Specify the instance type that you want your Dedicated Hosts to be configured for. When you specify the instance type, that is the only instance type that you can launch onto that host.
- Quantity
-
- Required: Yes
- Type: int
The number of Dedicated Hosts you want to allocate to your account with these parameters.
Result Syntax
[ 'HostIds' => ['<string>', ...], ]
Result Details
Members
- HostIds
-
- Type: Array of strings
The ID of the allocated Dedicated Host. This is used when you want to launch an instance onto a specific host.
Errors
There are no errors described for this operation.
AssignPrivateIpAddresses
$result = $client->assignPrivateIpAddresses
([/* ... */]); $promise = $client->assignPrivateIpAddressesAsync
([/* ... */]);
Assigns one or more secondary private IP addresses to the specified network interface. You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see Instance Types in the Amazon Elastic Compute Cloud User Guide. For more information about Elastic IP addresses, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.
AssignPrivateIpAddresses is available only in EC2-VPC.
Parameter Syntax
$result = $client->assignPrivateIpAddresses([ 'AllowReassignment' => true || false, 'NetworkInterfaceId' => '<string>', // REQUIRED 'PrivateIpAddresses' => ['<string>', ...], 'SecondaryPrivateIpAddressCount' => <integer>, ]);
Parameter Details
Members
- AllowReassignment
-
- Type: boolean
Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.
- NetworkInterfaceId
-
- Required: Yes
- Type: string
The ID of the network interface.
- PrivateIpAddresses
-
- Type: Array of strings
One or more IP addresses to be assigned as a secondary private IP address to the network interface. You can't specify this parameter when also specifying a number of secondary IP addresses.
If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.
- SecondaryPrivateIpAddressCount
-
- Type: int
The number of secondary IP addresses to assign to the network interface. You can't specify this parameter when also specifying private IP addresses.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To assign a specific secondary private IP address to an interface
This example assigns the specified secondary private IP address to the specified network interface.
$result = $client->assignPrivateIpAddresses([ 'NetworkInterfaceId' => 'eni-e5aa89a3', 'PrivateIpAddresses' => [ '10.0.0.82', ], ]);
Example 2: To assign secondary private IP addresses that Amazon EC2 selects to an interface
This example assigns two secondary private IP addresses to the specified network interface. Amazon EC2 automatically assigns these IP addresses from the available IP addresses in the CIDR block range of the subnet the network interface is associated with.
$result = $client->assignPrivateIpAddresses([ 'NetworkInterfaceId' => 'eni-e5aa89a3', 'SecondaryPrivateIpAddressCount' => 2, ]);
AssociateAddress
$result = $client->associateAddress
([/* ... */]); $promise = $client->associateAddressAsync
([/* ... */]);
Associates an Elastic IP address with an instance or a network interface.
An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.
[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance.
[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation.
This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the Elastic IP Addresses section of Amazon EC2 Pricing.
Parameter Syntax
$result = $client->associateAddress([ 'AllocationId' => '<string>', 'AllowReassociation' => true || false, 'DryRun' => true || false, 'InstanceId' => '<string>', 'NetworkInterfaceId' => '<string>', 'PrivateIpAddress' => '<string>', 'PublicIp' => '<string>', ]);
Parameter Details
Members
- AllocationId
-
- Type: string
[EC2-VPC] The allocation ID. This is required for EC2-VPC.
- AllowReassociation
-
- Type: boolean
[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Type: string
The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.
- NetworkInterfaceId
-
- Type: string
[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
- PrivateIpAddress
-
- Type: string
[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
- PublicIp
-
- Type: string
The Elastic IP address. This is required for EC2-Classic.
Result Syntax
[ 'AssociationId' => '<string>', ]
Result Details
Members
- AssociationId
-
- Type: string
[EC2-VPC] The ID that represents the association of the Elastic IP address with an instance.
Errors
There are no errors described for this operation.
Examples
Example 1: To associate an Elastic IP address in EC2-VPC
This example associates the specified Elastic IP address with the specified instance in a VPC.
$result = $client->associateAddress([ 'AllocationId' => 'eipalloc-64d5890a', 'InstanceId' => 'i-0b263919b6498b123', ]);
Result syntax:
[ 'AssociationId' => 'eipassoc-2bebb745', ]
Example 2: To associate an Elastic IP address with a network interface
This example associates the specified Elastic IP address with the specified network interface.
$result = $client->associateAddress([ 'AllocationId' => 'eipalloc-64d5890a', 'NetworkInterfaceId' => 'eni-1a2b3c4d', ]);
Result syntax:
[ 'AssociationId' => 'eipassoc-2bebb745', ]
Example 3: To associate an Elastic IP address in EC2-Classic
This example associates an Elastic IP address with an instance in EC2-Classic.
$result = $client->associateAddress([ 'InstanceId' => 'i-07ffe74c7330ebf53', 'PublicIp' => '198.51.100.0', ]);
AssociateDhcpOptions
$result = $client->associateDhcpOptions
([/* ... */]); $promise = $client->associateDhcpOptionsAsync
([/* ... */]);
Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.
After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.
For more information, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->associateDhcpOptions([ 'DhcpOptionsId' => '<string>', // REQUIRED 'DryRun' => true || false, 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DhcpOptionsId
-
- Required: Yes
- Type: string
The ID of the DHCP options set, or
default
to associate no DHCP options with the VPC. - DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To associate a DHCP options set with a VPC
This example associates the specified DHCP options set with the specified VPC.
$result = $client->associateDhcpOptions([ 'DhcpOptionsId' => 'dopt-d9070ebb', 'VpcId' => 'vpc-a01106c2', ]);
Example 2: To associate the default DHCP options set with a VPC
This example associates the default DHCP options set with the specified VPC.
$result = $client->associateDhcpOptions([ 'DhcpOptionsId' => 'default', 'VpcId' => 'vpc-a01106c2', ]);
AssociateRouteTable
$result = $client->associateRouteTable
([/* ... */]); $promise = $client->associateRouteTableAsync
([/* ... */]);
Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table from the subnet later. A route table can be associated with multiple subnets.
For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->associateRouteTable([ 'DryRun' => true || false, 'RouteTableId' => '<string>', // REQUIRED 'SubnetId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - RouteTableId
-
- Required: Yes
- Type: string
The ID of the route table.
- SubnetId
-
- Required: Yes
- Type: string
The ID of the subnet.
Result Syntax
[ 'AssociationId' => '<string>', ]
Result Details
Members
- AssociationId
-
- Type: string
The route table association ID (needed to disassociate the route table).
Errors
There are no errors described for this operation.
Examples
Example 1: To associate a route table with a subnet
This example associates the specified route table with the specified subnet.
$result = $client->associateRouteTable([ 'RouteTableId' => 'rtb-22574640', 'SubnetId' => 'subnet-9d4a7b6', ]);
Result syntax:
[ 'AssociationId' => 'rtbassoc-781d0d1a', ]
AttachClassicLinkVpc
$result = $client->attachClassicLinkVpc
([/* ... */]); $promise = $client->attachClassicLinkVpcAsync
([/* ... */]);
Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the running
state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.
After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.
Linking your instance to a VPC is sometimes referred to as attaching your instance.
Parameter Syntax
$result = $client->attachClassicLinkVpc([ 'DryRun' => true || false, 'Groups' => ['<string>', ...], // REQUIRED 'InstanceId' => '<string>', // REQUIRED 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Groups
-
- Required: Yes
- Type: Array of strings
The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.
- InstanceId
-
- Required: Yes
- Type: string
The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.
- VpcId
-
- Required: Yes
- Type: string
The ID of a ClassicLink-enabled VPC.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Returns
true
if the request succeeds; otherwise, it returns an error.
Errors
There are no errors described for this operation.
AttachInternetGateway
$result = $client->attachInternetGateway
([/* ... */]); $promise = $client->attachInternetGatewayAsync
([/* ... */]);
Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC. For more information about your VPC and Internet gateway, see the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->attachInternetGateway([ 'DryRun' => true || false, 'InternetGatewayId' => '<string>', // REQUIRED 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InternetGatewayId
-
- Required: Yes
- Type: string
The ID of the Internet gateway.
- VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To attach an Internet gateway to a VPC
This example attaches the specified Internet gateway to the specified VPC.
$result = $client->attachInternetGateway([ 'InternetGatewayId' => 'igw-c0a643a9', 'VpcId' => 'vpc-a01106c2', ]);
AttachNetworkInterface
$result = $client->attachNetworkInterface
([/* ... */]); $promise = $client->attachNetworkInterfaceAsync
([/* ... */]);
Attaches a network interface to an instance.
Parameter Syntax
$result = $client->attachNetworkInterface([ 'DeviceIndex' => <integer>, // REQUIRED 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED 'NetworkInterfaceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DeviceIndex
-
- Required: Yes
- Type: int
The index of the device for the network interface attachment.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the instance.
- NetworkInterfaceId
-
- Required: Yes
- Type: string
The ID of the network interface.
Result Syntax
[ 'AttachmentId' => '<string>', ]
Result Details
Members
- AttachmentId
-
- Type: string
The ID of the network interface attachment.
Errors
There are no errors described for this operation.
Examples
Example 1: To attach a network interface to an instance
This example attaches the specified network interface to the specified instance.
$result = $client->attachNetworkInterface([ 'DeviceIndex' => 1, 'InstanceId' => 'i-1234567890abcdef0', 'NetworkInterfaceId' => 'eni-e5aa89a3', ]);
Result syntax:
[ 'AttachmentId' => 'eni-attach-66c4350a', ]
AttachVolume
$result = $client->attachVolume
([/* ... */]); $promise = $client->attachVolumeAsync
([/* ... */]);
Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.
Encrypted EBS volumes may only be attached to instances that support Amazon EBS encryption. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
For a list of supported device names, see Attaching an EBS Volume to an Instance. Any device names that aren't reserved for instance store volumes can be used for EBS volumes. For more information, see Amazon EC2 Instance Store in the Amazon Elastic Compute Cloud User Guide.
If a volume has an AWS Marketplace product code:
-
The volume can be attached only to a stopped instance.
-
AWS Marketplace product codes are copied from the volume to the instance.
-
You must be subscribed to the product.
-
The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance.
For an overview of the AWS Marketplace, see Introducing AWS Marketplace.
For more information about EBS volumes, see Attaching Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->attachVolume([ 'Device' => '<string>', // REQUIRED 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED 'VolumeId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Device
-
- Required: Yes
- Type: string
The device name to expose to the instance (for example,
/dev/sdh
orxvdh
). - DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the instance.
- VolumeId
-
- Required: Yes
- Type: string
The ID of the EBS volume. The volume and instance must be within the same Availability Zone.
Result Syntax
[ 'AttachTime' => <DateTime>, 'DeleteOnTermination' => true || false, 'Device' => '<string>', 'InstanceId' => '<string>', 'State' => 'attaching|attached|detaching|detached', 'VolumeId' => '<string>', ]
Result Details
Members
- AttachTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time stamp when the attachment initiated.
- DeleteOnTermination
-
- Type: boolean
Indicates whether the EBS volume is deleted on instance termination.
- Device
-
- Type: string
The device name.
- InstanceId
-
- Type: string
The ID of the instance.
- State
-
- Type: string
The attachment state of the volume.
- VolumeId
-
- Type: string
The ID of the volume.
Errors
There are no errors described for this operation.
Examples
Example 1: To attach a volume to an instance
This example attaches a volume (``vol-1234567890abcdef0``) to an instance (``i-01474ef662b89480``) as ``/dev/sdf``.
$result = $client->attachVolume([ 'Device' => '/dev/sdf', 'InstanceId' => 'i-01474ef662b89480', 'VolumeId' => 'vol-1234567890abcdef0', ]);
Result syntax:
[ 'AttachTime' =>, 'Device' => '/dev/sdf', 'InstanceId' => 'i-01474ef662b89480', 'State' => 'attaching', 'VolumeId' => 'vol-1234567890abcdef0', ]
AttachVpnGateway
$result = $client->attachVpnGateway
([/* ... */]); $promise = $client->attachVpnGatewayAsync
([/* ... */]);
Attaches a virtual private gateway to a VPC. For more information, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->attachVpnGateway([ 'DryRun' => true || false, 'VpcId' => '<string>', // REQUIRED 'VpnGatewayId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
- VpnGatewayId
-
- Required: Yes
- Type: string
The ID of the virtual private gateway.
Result Syntax
[ 'VpcAttachment' => [ 'State' => 'attaching|attached|detaching|detached', 'VpcId' => '<string>', ], ]
Result Details
Members
- VpcAttachment
-
- Type: VpcAttachment structure
Information about the attachment.
Errors
There are no errors described for this operation.
AuthorizeSecurityGroupEgress
$result = $client->authorizeSecurityGroupEgress
([/* ... */]); $promise = $client->authorizeSecurityGroupEgressAsync
([/* ... */]);
[EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination CIDR IP address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for use in EC2-Classic. For more information, see Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.
You can have up to 50 rules per security group (covering both ingress and egress rules).
Each rule consists of the protocol (for example, TCP), plus either a CIDR range or a source group. For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.
Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.
Parameter Syntax
$result = $client->authorizeSecurityGroupEgress([ 'CidrIp' => '<string>', 'DryRun' => true || false, 'FromPort' => <integer>, 'GroupId' => '<string>', // REQUIRED 'IpPermissions' => [ [ 'FromPort' => <integer>, 'IpProtocol' => '<string>', 'IpRanges' => [ [ 'CidrIp' => '<string>', ], // ... ], 'PrefixListIds' => [ [ 'PrefixListId' => '<string>', ], // ... ], 'ToPort' => <integer>, 'UserIdGroupPairs' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', 'PeeringStatus' => '<string>', 'UserId' => '<string>', 'VpcId' => '<string>', 'VpcPeeringConnectionId' => '<string>', ], // ... ], ], // ... ], 'IpProtocol' => '<string>', 'SourceSecurityGroupName' => '<string>', 'SourceSecurityGroupOwnerId' => '<string>', 'ToPort' => <integer>, ]);
Parameter Details
Members
- CidrIp
-
- Type: string
The CIDR IP address range. We recommend that you specify the CIDR range in a set of IP permissions instead.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - FromPort
-
- Type: int
The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.
- GroupId
-
- Required: Yes
- Type: string
The ID of the security group.
- IpPermissions
-
- Type: Array of IpPermission structures
A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.
- IpProtocol
-
- Type: string
The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.
- SourceSecurityGroupName
-
- Type: string
The name of a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.
- SourceSecurityGroupOwnerId
-
- Type: string
The AWS account number for a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.
- ToPort
-
- Type: int
The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
AuthorizeSecurityGroupIngress
$result = $client->authorizeSecurityGroupIngress
([/* ... */]); $promise = $client->authorizeSecurityGroupIngressAsync
([/* ... */]);
Adds one or more ingress rules to a security group.
EC2-Classic: You can have up to 100 rules per group.
EC2-VPC: You can have up to 50 rules per group (covering both ingress and egress rules).
Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.
[EC2-Classic] This action gives one or more CIDR IP address ranges permission to access a security group in your account, or gives one or more security groups (called the source groups) permission to access a security group for your account. A source group can be for your own AWS account, or another.
[EC2-VPC] This action gives one or more CIDR IP address ranges permission to access a security group in your VPC, or gives one or more other security groups (called the source groups) permission to access a security group for your VPC. The security groups must all be for the same VPC.
Parameter Syntax
$result = $client->authorizeSecurityGroupIngress([ 'CidrIp' => '<string>', 'DryRun' => true || false, 'FromPort' => <integer>, 'GroupId' => '<string>', 'GroupName' => '<string>', 'IpPermissions' => [ [ 'FromPort' => <integer>, 'IpProtocol' => '<string>', 'IpRanges' => [ [ 'CidrIp' => '<string>', ], // ... ], 'PrefixListIds' => [ [ 'PrefixListId' => '<string>', ], // ... ], 'ToPort' => <integer>, 'UserIdGroupPairs' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', 'PeeringStatus' => '<string>', 'UserId' => '<string>', 'VpcId' => '<string>', 'VpcPeeringConnectionId' => '<string>', ], // ... ], ], // ... ], 'IpProtocol' => '<string>', 'SourceSecurityGroupName' => '<string>', 'SourceSecurityGroupOwnerId' => '<string>', 'ToPort' => <integer>, ]);
Parameter Details
Members
- CidrIp
-
- Type: string
The CIDR IP address range. You can't specify this parameter when specifying a source security group.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - FromPort
-
- Type: int
The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use
-1
to specify all ICMP types. - GroupId
-
- Type: string
The ID of the security group. Required for a nondefault VPC.
- GroupName
-
- Type: string
[EC2-Classic, default VPC] The name of the security group.
- IpPermissions
-
- Type: Array of IpPermission structures
A set of IP permissions. Can be used to specify multiple rules in a single command.
- IpProtocol
-
- Type: string
The IP protocol name (
tcp
,udp
,icmp
) or number (see Protocol Numbers). (VPC only) Use-1
to specify all traffic. If you specify-1
, traffic on all ports is allowed, regardless of any ports you specify. - SourceSecurityGroupName
-
- Type: string
[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For EC2-VPC, the source security group must be in the same VPC.
- SourceSecurityGroupOwnerId
-
- Type: string
[EC2-Classic] The AWS account number for the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.
- ToPort
-
- Type: int
The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use
-1
to specify all ICMP codes for the ICMP type.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
BundleInstance
$result = $client->bundleInstance
([/* ... */]); $promise = $client->bundleInstanceAsync
([/* ... */]);
Bundles an Amazon instance store-backed Windows instance.
During bundling, only the root device volume (C:\) is bundled. Data on other instance store volumes is not preserved.
This action is not applicable for Linux/Unix instances or Windows instances that are backed by Amazon EBS.
For more information, see Creating an Instance Store-Backed Windows AMI.
Parameter Syntax
$result = $client->bundleInstance([ 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED 'Storage' => [ // REQUIRED 'S3' => [ 'AWSAccessKeyId' => '<string>', 'Bucket' => '<string>', 'Prefix' => '<string>', 'UploadPolicy' => <string || resource || Psr\Http\Message\StreamInterface>, 'UploadPolicySignature' => '<string>', ], ], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the instance to bundle.
Type: String
Default: None
Required: Yes
- Storage
-
- Required: Yes
- Type: Storage structure
The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.
Result Syntax
[ 'BundleTask' => [ 'BundleId' => '<string>', 'BundleTaskError' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'InstanceId' => '<string>', 'Progress' => '<string>', 'StartTime' => <DateTime>, 'State' => 'pending|waiting-for-shutdown|bundling|storing|cancelling|complete|failed', 'Storage' => [ 'S3' => [ 'AWSAccessKeyId' => '<string>', 'Bucket' => '<string>', 'Prefix' => '<string>', 'UploadPolicy' => <string || resource || Psr\Http\Message\StreamInterface>, 'UploadPolicySignature' => '<string>', ], ], 'UpdateTime' => <DateTime>, ], ]
Result Details
Members
- BundleTask
-
- Type: BundleTask structure
Information about the bundle task.
Errors
There are no errors described for this operation.
CancelBundleTask
$result = $client->cancelBundleTask
([/* ... */]); $promise = $client->cancelBundleTaskAsync
([/* ... */]);
Cancels a bundling operation for an instance store-backed Windows instance.
Parameter Syntax
$result = $client->cancelBundleTask([ 'BundleId' => '<string>', // REQUIRED 'DryRun' => true || false, ]);
Parameter Details
Members
- BundleId
-
- Required: Yes
- Type: string
The ID of the bundle task.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[ 'BundleTask' => [ 'BundleId' => '<string>', 'BundleTaskError' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'InstanceId' => '<string>', 'Progress' => '<string>', 'StartTime' => <DateTime>, 'State' => 'pending|waiting-for-shutdown|bundling|storing|cancelling|complete|failed', 'Storage' => [ 'S3' => [ 'AWSAccessKeyId' => '<string>', 'Bucket' => '<string>', 'Prefix' => '<string>', 'UploadPolicy' => <string || resource || Psr\Http\Message\StreamInterface>, 'UploadPolicySignature' => '<string>', ], ], 'UpdateTime' => <DateTime>, ], ]
Result Details
Members
- BundleTask
-
- Type: BundleTask structure
Information about the bundle task.
Errors
There are no errors described for this operation.
CancelConversionTask
$result = $client->cancelConversionTask
([/* ... */]); $promise = $client->cancelConversionTaskAsync
([/* ... */]);
Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is in the process of transferring the final disk image, the command fails and returns an exception.
For more information, see Importing a Virtual Machine Using the Amazon EC2 CLI.
Parameter Syntax
$result = $client->cancelConversionTask([ 'ConversionTaskId' => '<string>', // REQUIRED 'DryRun' => true || false, 'ReasonMessage' => '<string>', ]);
Parameter Details
Members
- ConversionTaskId
-
- Required: Yes
- Type: string
The ID of the conversion task.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - ReasonMessage
-
- Type: string
The reason for canceling the conversion task.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
CancelExportTask
$result = $client->cancelExportTask
([/* ... */]); $promise = $client->cancelExportTaskAsync
([/* ... */]);
Cancels an active export task. The request removes all artifacts of the export, including any partially-created Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error.
Parameter Syntax
$result = $client->cancelExportTask([ 'ExportTaskId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ExportTaskId
-
- Required: Yes
- Type: string
The ID of the export task. This is the ID returned by
CreateInstanceExportTask
.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
CancelImportTask
$result = $client->cancelImportTask
([/* ... */]); $promise = $client->cancelImportTaskAsync
([/* ... */]);
Cancels an in-process import virtual machine or import snapshot task.
Parameter Syntax
$result = $client->cancelImportTask([ 'CancelReason' => '<string>', 'DryRun' => true || false, 'ImportTaskId' => '<string>', ]);
Parameter Details
Members
- CancelReason
-
- Type: string
The reason for canceling the task.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - ImportTaskId
-
- Type: string
The ID of the import image or import snapshot task to be canceled.
Result Syntax
[ 'ImportTaskId' => '<string>', 'PreviousState' => '<string>', 'State' => '<string>', ]
Result Details
Members
- ImportTaskId
-
- Type: string
The ID of the task being canceled.
- PreviousState
-
- Type: string
The current state of the task being canceled.
- State
-
- Type: string
The current state of the task being canceled.
Errors
There are no errors described for this operation.
CancelReservedInstancesListing
$result = $client->cancelReservedInstancesListing
([/* ... */]); $promise = $client->cancelReservedInstancesListingAsync
([/* ... */]);
Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.
For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->cancelReservedInstancesListing([ 'ReservedInstancesListingId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ReservedInstancesListingId
-
- Required: Yes
- Type: string
The ID of the Reserved Instance listing.
Result Syntax
[ 'ReservedInstancesListings' => [ [ 'ClientToken' => '<string>', 'CreateDate' => <DateTime>, 'InstanceCounts' => [ [ 'InstanceCount' => <integer>, 'State' => 'available|sold|cancelled|pending', ], // ... ], 'PriceSchedules' => [ [ 'Active' => true || false, 'CurrencyCode' => 'USD', 'Price' => <float>, 'Term' => <integer>, ], // ... ], 'ReservedInstancesId' => '<string>', 'ReservedInstancesListingId' => '<string>', 'Status' => 'active|pending|cancelled|closed', 'StatusMessage' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'UpdateDate' => <DateTime>, ], // ... ], ]
Result Details
Members
- ReservedInstancesListings
-
- Type: Array of ReservedInstancesListing structures
The Reserved Instance listing.
Errors
There are no errors described for this operation.
CancelSpotFleetRequests
$result = $client->cancelSpotFleetRequests
([/* ... */]); $promise = $client->cancelSpotFleetRequestsAsync
([/* ... */]);
Cancels the specified Spot fleet requests.
After you cancel a Spot fleet request, the Spot fleet launches no new Spot instances. You must specify whether the Spot fleet should also terminate its Spot instances. If you terminate the instances, the Spot fleet request enters the cancelled_terminating
state. Otherwise, the Spot fleet request enters the cancelled_running
state and the instances continue to run until they are interrupted or you terminate them manually.
Parameter Syntax
$result = $client->cancelSpotFleetRequests([ 'DryRun' => true || false, 'SpotFleetRequestIds' => ['<string>', ...], // REQUIRED 'TerminateInstances' => true || false, // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - SpotFleetRequestIds
-
- Required: Yes
- Type: Array of strings
The IDs of the Spot fleet requests.
- TerminateInstances
-
- Required: Yes
- Type: boolean
Indicates whether to terminate instances for a Spot fleet request if it is canceled successfully.
Result Syntax
[ 'SuccessfulFleetRequests' => [ [ 'CurrentSpotFleetRequestState' => 'submitted|active|cancelled|failed|cancelled_running|cancelled_terminating|modifying', 'PreviousSpotFleetRequestState' => 'submitted|active|cancelled|failed|cancelled_running|cancelled_terminating|modifying', 'SpotFleetRequestId' => '<string>', ], // ... ], 'UnsuccessfulFleetRequests' => [ [ 'Error' => [ 'Code' => 'fleetRequestIdDoesNotExist|fleetRequestIdMalformed|fleetRequestNotInCancellableState|unexpectedError', 'Message' => '<string>', ], 'SpotFleetRequestId' => '<string>', ], // ... ], ]
Result Details
Members
- SuccessfulFleetRequests
-
- Type: Array of CancelSpotFleetRequestsSuccessItem structures
Information about the Spot fleet requests that are successfully canceled.
- UnsuccessfulFleetRequests
-
- Type: Array of CancelSpotFleetRequestsErrorItem structures
Information about the Spot fleet requests that are not successfully canceled.
Errors
There are no errors described for this operation.
Examples
Example 1: To cancel a Spot fleet request
This example cancels the specified Spot fleet request and terminates its associated Spot Instances.
$result = $client->cancelSpotFleetRequests([ 'SpotFleetRequestIds' => [ 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ], 'TerminateInstances' => 1, ]);
Result syntax:
[ 'SuccessfulFleetRequests' => [ [ 'CurrentSpotFleetRequestState' => 'cancelled_running', 'PreviousSpotFleetRequestState' => 'active', 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ], ], ]
Example 2: To cancel a Spot fleet request without terminating its Spot Instances
This example cancels the specified Spot fleet request without terminating its associated Spot Instances.
$result = $client->cancelSpotFleetRequests([ 'SpotFleetRequestIds' => [ 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ], 'TerminateInstances' => , ]);
Result syntax:
[ 'SuccessfulFleetRequests' => [ [ 'CurrentSpotFleetRequestState' => 'cancelled_terminating', 'PreviousSpotFleetRequestState' => 'active', 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ], ], ]
CancelSpotInstanceRequests
$result = $client->cancelSpotInstanceRequests
([/* ... */]); $promise = $client->cancelSpotInstanceRequestsAsync
([/* ... */]);
Cancels one or more Spot instance requests. Spot instances are instances that Amazon EC2 starts on your behalf when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot instance capacity and current Spot instance requests. For more information, see Spot Instance Requests in the Amazon Elastic Compute Cloud User Guide.
Canceling a Spot instance request does not terminate running Spot instances associated with the request.
Parameter Syntax
$result = $client->cancelSpotInstanceRequests([ 'DryRun' => true || false, 'SpotInstanceRequestIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - SpotInstanceRequestIds
-
- Required: Yes
- Type: Array of strings
One or more Spot instance request IDs.
Result Syntax
[ 'CancelledSpotInstanceRequests' => [ [ 'SpotInstanceRequestId' => '<string>', 'State' => 'active|open|closed|cancelled|completed', ], // ... ], ]
Result Details
Members
- CancelledSpotInstanceRequests
-
- Type: Array of CancelledSpotInstanceRequest structures
One or more Spot instance requests.
Errors
There are no errors described for this operation.
Examples
Example 1: To cancel Spot Instance requests
This example cancels a Spot Instance request.
$result = $client->cancelSpotInstanceRequests([ 'SpotInstanceRequestIds' => [ 'sir-08b93456', ], ]);
Result syntax:
[ 'CancelledSpotInstanceRequests' => [ [ 'SpotInstanceRequestId' => 'sir-08b93456', 'State' => 'cancelled', ], ], ]
ConfirmProductInstance
$result = $client->confirmProductInstance
([/* ... */]); $promise = $client->confirmProductInstanceAsync
([/* ... */]);
Determines whether a product code is associated with an instance. This action can only be used by the owner of the product code. It is useful when a product code owner needs to verify whether another user's instance is eligible for support.
Parameter Syntax
$result = $client->confirmProductInstance([ 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED 'ProductCode' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the instance.
- ProductCode
-
- Required: Yes
- Type: string
The product code. This must be a product code that you own.
Result Syntax
[ 'OwnerId' => '<string>', 'Return' => true || false, ]
Result Details
Members
- OwnerId
-
- Type: string
The AWS account ID of the instance owner. This is only present if the product code is attached to the instance.
- Return
-
- Type: boolean
The return value of the request. Returns
true
if the specified product code is owned by the requester and associated with the specified instance.
Errors
There are no errors described for this operation.
Examples
Example 1: To confirm the product instance
This example determines whether the specified product code is associated with the specified instance.
$result = $client->confirmProductInstance([ 'InstanceId' => 'i-1234567890abcdef0', 'ProductCode' => '774F4FF8', ]);
Result syntax:
[ 'OwnerId' => '123456789012', ]
CopyImage
$result = $client->copyImage
([/* ... */]); $promise = $client->copyImageAsync
([/* ... */]);
Initiates the copy of an AMI from the specified source region to the current region. You specify the destination region by using its endpoint when making the request.
For more information, see Copying AMIs in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->copyImage([ 'ClientToken' => '<string>', 'Description' => '<string>', 'DryRun' => true || false, 'Encrypted' => true || false, 'KmsKeyId' => '<string>', 'Name' => '<string>', // REQUIRED 'SourceImageId' => '<string>', // REQUIRED 'SourceRegion' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
- Description
-
- Type: string
A description for the new AMI in the destination region.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Encrypted
-
- Type: boolean
Specifies whether the destination snapshots of the copied image should be encrypted. The default CMK for EBS is used unless a non-default AWS Key Management Service (AWS KMS) CMK is specified with
KmsKeyId
. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide. - KmsKeyId
-
- Type: string
The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when encrypting the snapshots of an image during a copy operation. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the
arn:aws:kms
namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekey
namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. The specified CMK must exist in the region that the snapshot is being copied to. If aKmsKeyId
is specified, theEncrypted
flag must also be set. - Name
-
- Required: Yes
- Type: string
The name of the new AMI in the destination region.
- SourceImageId
-
- Required: Yes
- Type: string
The ID of the AMI to copy.
- SourceRegion
-
- Required: Yes
- Type: string
The name of the region that contains the AMI to copy.
Result Syntax
[ 'ImageId' => '<string>', ]
Result Details
Members
- ImageId
-
- Type: string
The ID of the new AMI.
Errors
There are no errors described for this operation.
CopySnapshot
$result = $client->copySnapshot
([/* ... */]); $promise = $client->copySnapshotAsync
([/* ... */]);
Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy the snapshot within the same region or from one region to another. You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs). The snapshot is copied to the regional endpoint that you send the HTTP request to.
Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted, unless the Encrypted
flag is specified during the snapshot copy operation. By default, encrypted snapshot copies use the default AWS Key Management Service (AWS KMS) customer master key (CMK); however, you can specify a non-default CMK with the KmsKeyId
parameter.
To copy an encrypted snapshot that has been shared from another account, you must have permissions for the CMK used to encrypt the snapshot.
Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.
For more information, see Copying an Amazon EBS Snapshot in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->copySnapshot([ 'Description' => '<string>', 'DestinationRegion' => '<string>', 'DryRun' => true || false, 'Encrypted' => true || false, 'KmsKeyId' => '<string>', 'PresignedUrl' => '<string>', 'SourceRegion' => '<string>', // REQUIRED 'SourceSnapshotId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Description
-
- Type: string
A description for the EBS snapshot.
- DestinationRegion
-
- Type: string
The SDK will populate this parameter on your behalf using the configured region value of the client. - DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Encrypted
-
- Type: boolean
Specifies whether the destination snapshot should be encrypted. You can encrypt a copy of an unencrypted snapshot using this flag, but you cannot use it to create an unencrypted copy from an encrypted snapshot. Your default CMK for EBS is used unless a non-default AWS Key Management Service (AWS KMS) CMK is specified with
KmsKeyId
. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide. - KmsKeyId
-
- Type: string
The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when creating the snapshot copy. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the
arn:aws:kms
namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekey
namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. The specified CMK must exist in the region that the snapshot is being copied to. If aKmsKeyId
is specified, theEncrypted
flag must also be set. - PresignedUrl
-
- Type: string
The SDK will compute this value for you on your behalf. - SourceRegion
-
- Required: Yes
- Type: string
The ID of the region that contains the snapshot to be copied.
- SourceSnapshotId
-
- Required: Yes
- Type: string
The ID of the EBS snapshot to copy.
Result Syntax
[ 'SnapshotId' => '<string>', ]
Result Details
Members
- SnapshotId
-
- Type: string
The ID of the new snapshot.
Errors
There are no errors described for this operation.
Examples
Example 1: To copy a snapshot
This example copies a snapshot with the snapshot ID of ``snap-066877671789bd71b`` from the ``us-west-2`` region to the ``us-east-1`` region and adds a short description to identify the snapshot.
$result = $client->copySnapshot([ 'Description' => 'This is my copied snapshot.', 'DestinationRegion' => 'us-east-1', 'SourceRegion' => 'us-west-2', 'SourceSnapshotId' => 'snap-066877671789bd71b', ]);
Result syntax:
[ 'SnapshotId' => 'snap-066877671789bd71b', ]
CreateCustomerGateway
$result = $client->createCustomerGateway
([/* ... */]); $promise = $client->createCustomerGatewayAsync
([/* ... */]);
Provides information to AWS about your VPN customer gateway device. The customer gateway is the appliance at your end of the VPN connection. (The device on the AWS side of the VPN connection is the virtual private gateway.) You must provide the Internet-routable IP address of the customer gateway's external interface. The IP address must be static and may be behind a device performing network address translation (NAT).
For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN (in the 64512 - 65534 range).
Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with the exception of 7224, which is reserved in the us-east-1
region, and 9059, which is reserved in the eu-west-1
region.
For more information about VPN customer gateways, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.
You cannot create more than one customer gateway with the same VPN type, IP address, and BGP ASN parameter values. If you run an identical request more than one time, the first request creates the customer gateway, and subsequent requests return information about the existing customer gateway. The subsequent requests do not create new customer gateway resources.
Parameter Syntax
$result = $client->createCustomerGateway([ 'BgpAsn' => <integer>, // REQUIRED 'DryRun' => true || false, 'PublicIp' => '<string>', // REQUIRED 'Type' => 'ipsec.1', // REQUIRED ]);
Parameter Details
Members
- BgpAsn
-
- Required: Yes
- Type: int
For devices that support BGP, the customer gateway's BGP ASN.
Default: 65000
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - PublicIp
-
- Required: Yes
- Type: string
The Internet-routable IP address for the customer gateway's outside interface. The address must be static.
- Type
-
- Required: Yes
- Type: string
The type of VPN connection that this customer gateway supports (
ipsec.1
).
Result Syntax
[ 'CustomerGateway' => [ 'BgpAsn' => '<string>', 'CustomerGatewayId' => '<string>', 'IpAddress' => '<string>', 'State' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'Type' => '<string>', ], ]
Result Details
Members
- CustomerGateway
-
- Type: CustomerGateway structure
Information about the customer gateway.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a customer gateway
This example creates a customer gateway with the specified IP address for its outside interface.
$result = $client->createCustomerGateway([ 'BgpAsn' => 65534, 'PublicIp' => '12.1.2.3', 'Type' => 'ipsec.1', ]);
Result syntax:
[ 'CustomerGateway' => [ 'BgpAsn' => '65534', 'CustomerGatewayId' => 'cgw-0e11f167', 'IpAddress' => '12.1.2.3', 'State' => 'available', 'Type' => 'ipsec.1', ], ]
CreateDhcpOptions
$result = $client->createDhcpOptions
([/* ... */]); $promise = $client->createDhcpOptionsAsync
([/* ... */]);
Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see RFC 2132.
-
domain-name-servers
- The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. If you want your instance to receive a custom DNS hostname as specified indomain-name
, you must setdomain-name-servers
to a custom DNS server. -
domain-name
- If you're using AmazonProvidedDNS in "us-east-1", specify "ec2.internal". If you're using AmazonProvidedDNS in another region, specify "region.compute.internal" (for example, "ap-northeast-1.compute.internal"). Otherwise, specify a domain name (for example, "MyCompany.com"). This value is used to complete unqualified DNS hostnames. Important: Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name. -
ntp-servers
- The IP addresses of up to four Network Time Protocol (NTP) servers. -
netbios-name-servers
- The IP addresses of up to four NetBIOS name servers. -
netbios-node-type
- The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see RFC 2132.
Your VPC automatically starts out with a set of DHCP options that includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC has an Internet gateway, make sure to set the domain-name-servers
option either to AmazonProvidedDNS
or to a domain name server of your choice. For more information about DHCP options, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createDhcpOptions([ 'DhcpConfigurations' => [ // REQUIRED [ 'Key' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'DryRun' => true || false, ]);
Parameter Details
Members
- DhcpConfigurations
-
- Required: Yes
- Type: Array of NewDhcpConfiguration structures
A DHCP configuration option.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[ 'DhcpOptions' => [ 'DhcpConfigurations' => [ [ 'Key' => '<string>', 'Values' => [ [ 'Value' => '<string>', ], // ... ], ], // ... ], 'DhcpOptionsId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ], ]
Result Details
Members
- DhcpOptions
-
- Type: DhcpOptions structure
A set of DHCP options.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a DHCP options set
This example creates a DHCP options set.
$result = $client->createDhcpOptions([ 'DhcpConfigurations' => [ [ 'Key' => 'domain-name-servers', 'Values' => [ '10.2.5.1', '10.2.5.2', ], ], ], ]);
Result syntax:
[ 'DhcpOptions' => [ 'DhcpConfigurations' => [ [ 'Key' => 'domain-name-servers', 'Values' => [ [ 'Value' => '10.2.5.2', ], [ 'Value' => '10.2.5.1', ], ], ], ], 'DhcpOptionsId' => 'dopt-d9070ebb', ], ]
CreateFlowLogs
$result = $client->createFlowLogs
([/* ... */]); $promise = $client->createFlowLogsAsync
([/* ... */]);
Creates one or more flow logs to capture IP traffic for a specific network interface, subnet, or VPC. Flow logs are delivered to a specified log group in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request, a log stream is created in CloudWatch Logs for each network interface in the subnet or VPC. Log streams can include information about accepted and rejected traffic to a network interface. You can view the data in your log streams using Amazon CloudWatch Logs.
In your request, you must also specify an IAM role that has permission to publish logs to CloudWatch Logs.
Parameter Syntax
$result = $client->createFlowLogs([ 'ClientToken' => '<string>', 'DeliverLogsPermissionArn' => '<string>', // REQUIRED 'LogGroupName' => '<string>', // REQUIRED 'ResourceIds' => ['<string>', ...], // REQUIRED 'ResourceType' => 'VPC|Subnet|NetworkInterface', // REQUIRED 'TrafficType' => 'ACCEPT|REJECT|ALL', // REQUIRED ]);
Parameter Details
Members
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.
- DeliverLogsPermissionArn
-
- Required: Yes
- Type: string
The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs log group.
- LogGroupName
-
- Required: Yes
- Type: string
The name of the CloudWatch log group.
- ResourceIds
-
- Required: Yes
- Type: Array of strings
One or more subnet, network interface, or VPC IDs.
Constraints: Maximum of 1000 resources
- ResourceType
-
- Required: Yes
- Type: string
The type of resource on which to create the flow log.
- TrafficType
-
- Required: Yes
- Type: string
The type of traffic to log.
Result Syntax
[ 'ClientToken' => '<string>', 'FlowLogIds' => ['<string>', ...], 'Unsuccessful' => [ [ 'Error' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'ResourceId' => '<string>', ], // ... ], ]
Result Details
Members
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure the idempotency of the request.
- FlowLogIds
-
- Type: Array of strings
The IDs of the flow logs.
- Unsuccessful
-
- Type: Array of UnsuccessfulItem structures
Information about the flow logs that could not be created successfully.
Errors
There are no errors described for this operation.
CreateImage
$result = $client->createImage
([/* ... */]); $promise = $client->createImageAsync
([/* ... */]);
Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.
If you customized your instance with instance store volumes or EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.
For more information, see Creating Amazon EBS-Backed Linux AMIs in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->createImage([ 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'Description' => '<string>', 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'NoReboot' => true || false, ]);
Parameter Details
Members
- BlockDeviceMappings
-
- Type: Array of BlockDeviceMapping structures
Information about one or more block device mappings.
- Description
-
- Type: string
A description for the new image.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the instance.
- Name
-
- Required: Yes
- Type: string
A name for the new image.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
- NoReboot
-
- Type: boolean
By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.
Result Syntax
[ 'ImageId' => '<string>', ]
Result Details
Members
- ImageId
-
- Type: string
The ID of the new AMI.
Errors
There are no errors described for this operation.
CreateInstanceExportTask
$result = $client->createInstanceExportTask
([/* ... */]); $promise = $client->createInstanceExportTaskAsync
([/* ... */]);
Exports a running or stopped instance to an S3 bucket.
For information about the supported operating systems, image formats, and known limitations for the types of instances you can export, see Exporting an Instance as a VM Using VM Import/Export in the VM Import/Export User Guide.
Parameter Syntax
$result = $client->createInstanceExportTask([ 'Description' => '<string>', 'ExportToS3Task' => [ 'ContainerFormat' => 'ova', 'DiskImageFormat' => 'VMDK|RAW|VHD', 'S3Bucket' => '<string>', 'S3Prefix' => '<string>', ], 'InstanceId' => '<string>', // REQUIRED 'TargetEnvironment' => 'citrix|vmware|microsoft', ]);
Parameter Details
Members
- Description
-
- Type: string
A description for the conversion task or the resource being exported. The maximum length is 255 bytes.
- ExportToS3Task
-
- Type: ExportToS3TaskSpecification structure
The format and location for an instance export task.
- InstanceId
-
- Required: Yes
- Type: string
The ID of the instance.
- TargetEnvironment
-
- Type: string
The target virtualization environment.
Result Syntax
[ 'ExportTask' => [ 'Description' => '<string>', 'ExportTaskId' => '<string>', 'ExportToS3Task' => [ 'ContainerFormat' => 'ova', 'DiskImageFormat' => 'VMDK|RAW|VHD', 'S3Bucket' => '<string>', 'S3Key' => '<string>', ], 'InstanceExportDetails' => [ 'InstanceId' => '<string>', 'TargetEnvironment' => 'citrix|vmware|microsoft', ], 'State' => 'active|cancelling|cancelled|completed', 'StatusMessage' => '<string>', ], ]
Result Details
Members
- ExportTask
-
- Type: ExportTask structure
Information about the instance export task.
Errors
There are no errors described for this operation.
CreateInternetGateway
$result = $client->createInternetGateway
([/* ... */]); $promise = $client->createInternetGatewayAsync
([/* ... */]);
Creates an Internet gateway for use with a VPC. After creating the Internet gateway, you attach it to a VPC using AttachInternetGateway.
For more information about your VPC and Internet gateway, see the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createInternetGateway([ 'DryRun' => true || false, ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[ 'InternetGateway' => [ 'Attachments' => [ [ 'State' => 'attaching|attached|detaching|detached', 'VpcId' => '<string>', ], // ... ], 'InternetGatewayId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ], ]
Result Details
Members
- InternetGateway
-
- Type: InternetGateway structure
Information about the Internet gateway.
Errors
There are no errors described for this operation.
Examples
Example 1: To create an Internet gateway
This example creates an Internet gateway.
$result = $client->createInternetGateway([ ]);
Result syntax:
[ 'InternetGateway' => [ 'Attachments' => [ ], 'InternetGatewayId' => 'igw-c0a643a9', 'Tags' => [ ], ], ]
CreateKeyPair
$result = $client->createKeyPair
([/* ... */]); $promise = $client->createKeyPairAsync
([/* ... */]);
Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error.
You can have up to five thousand key pairs per region.
The key pair returned to you is available only in the region in which you create it. To create a key pair that is available in all regions, use ImportKeyPair.
For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->createKeyPair([ 'DryRun' => true || false, 'KeyName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - KeyName
-
- Required: Yes
- Type: string
A unique name for the key pair.
Constraints: Up to 255 ASCII characters
Result Syntax
[ 'KeyFingerprint' => '<string>', 'KeyMaterial' => '<string>', 'KeyName' => '<string>', ]
Result Details
Members
- KeyFingerprint
-
- Type: string
The SHA-1 digest of the DER encoded private key.
- KeyMaterial
-
- Type: string
An unencrypted PEM encoded RSA private key.
- KeyName
-
- Type: string
The name of the key pair.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a key pair
This example creates a key pair named my-key-pair.
$result = $client->createKeyPair([ 'KeyName' => 'my-key-pair', ]);
CreateNatGateway
$result = $client->createNatGateway
([/* ... */]); $promise = $client->createNatGatewayAsync
([/* ... */]);
Creates a NAT gateway in the specified subnet. A NAT gateway can be used to enable instances in a private subnet to connect to the Internet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. For more information, see NAT Gateways in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createNatGateway([ 'AllocationId' => '<string>', // REQUIRED 'ClientToken' => '<string>', 'SubnetId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AllocationId
-
- Required: Yes
- Type: string
The allocation ID of an Elastic IP address to associate with the NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.
Constraint: Maximum 64 ASCII characters.
- SubnetId
-
- Required: Yes
- Type: string
The subnet in which to create the NAT gateway.
Result Syntax
[ 'ClientToken' => '<string>', 'NatGateway' => [ 'CreateTime' => <DateTime>, 'DeleteTime' => <DateTime>, 'FailureCode' => '<string>', 'FailureMessage' => '<string>', 'NatGatewayAddresses' => [ [ 'AllocationId' => '<string>', 'NetworkInterfaceId' => '<string>', 'PrivateIp' => '<string>', 'PublicIp' => '<string>', ], // ... ], 'NatGatewayId' => '<string>', 'ProvisionedBandwidth' => [ 'ProvisionTime' => <DateTime>, 'Provisioned' => '<string>', 'RequestTime' => <DateTime>, 'Requested' => '<string>', 'Status' => '<string>', ], 'State' => 'pending|failed|available|deleting|deleted', 'SubnetId' => '<string>', 'VpcId' => '<string>', ], ]
Result Details
Members
- ClientToken
-
- Type: string
Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.
- NatGateway
-
- Type: NatGateway structure
Information about the NAT gateway.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a NAT gateway
This example creates a NAT gateway in subnet subnet-1a2b3c4d and associates an Elastic IP address with the allocation ID eipalloc-37fc1a52 with the NAT gateway.
$result = $client->createNatGateway([ 'AllocationId' => 'eipalloc-37fc1a52', 'SubnetId' => 'subnet-1a2b3c4d', ]);
Result syntax:
[ 'NatGateway' => [ 'CreateTime' =>, 'NatGatewayAddresses' => [ [ 'AllocationId' => 'eipalloc-37fc1a52', ], ], 'NatGatewayId' => 'nat-08d48af2a8e83edfd', 'State' => 'pending', 'SubnetId' => 'subnet-1a2b3c4d', 'VpcId' => 'vpc-1122aabb', ], ]
CreateNetworkAcl
$result = $client->createNetworkAcl
([/* ... */]); $promise = $client->createNetworkAclAsync
([/* ... */]);
Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.
For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createNetworkAcl([ 'DryRun' => true || false, 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[ 'NetworkAcl' => [ 'Associations' => [ [ 'NetworkAclAssociationId' => '<string>', 'NetworkAclId' => '<string>', 'SubnetId' => '<string>', ], // ... ], 'Entries' => [ [ 'CidrBlock' => '<string>', 'Egress' => true || false, 'IcmpTypeCode' => [ 'Code' => <integer>, 'Type' => <integer>, ], 'PortRange' => [ 'From' => <integer>, 'To' => <integer>, ], 'Protocol' => '<string>', 'RuleAction' => 'allow|deny', 'RuleNumber' => <integer>, ], // ... ], 'IsDefault' => true || false, 'NetworkAclId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], ]
Result Details
Members
- NetworkAcl
-
- Type: NetworkAcl structure
Information about the network ACL.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a network ACL
This example creates a network ACL for the specified VPC.
$result = $client->createNetworkAcl([ 'VpcId' => 'vpc-a01106c2', ]);
Result syntax:
[ 'NetworkAcl' => [ 'Associations' => [ ], 'Entries' => [ [ 'CidrBlock' => '0.0.0.0/0', 'Egress' => 1, 'Protocol' => '-1', 'RuleAction' => 'deny', 'RuleNumber' => 32767, ], [ 'CidrBlock' => '0.0.0.0/0', 'Egress' => , 'Protocol' => '-1', 'RuleAction' => 'deny', 'RuleNumber' => 32767, ], ], 'IsDefault' => , 'NetworkAclId' => 'acl-5fb85d36', 'Tags' => [ ], 'VpcId' => 'vpc-a01106c2', ], ]
CreateNetworkAclEntry
$result = $client->createNetworkAclEntry
([/* ... */]); $promise = $client->createNetworkAclEntryAsync
([/* ... */]);
Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of ingress rules and a separate set of egress rules.
We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.
After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.
For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createNetworkAclEntry([ 'CidrBlock' => '<string>', // REQUIRED 'DryRun' => true || false, 'Egress' => true || false, // REQUIRED 'IcmpTypeCode' => [ 'Code' => <integer>, 'Type' => <integer>, ], 'NetworkAclId' => '<string>', // REQUIRED 'PortRange' => [ 'From' => <integer>, 'To' => <integer>, ], 'Protocol' => '<string>', // REQUIRED 'RuleAction' => 'allow|deny', // REQUIRED 'RuleNumber' => <integer>, // REQUIRED ]);
Parameter Details
Members
- CidrBlock
-
- Required: Yes
- Type: string
The network range to allow or deny, in CIDR notation (for example
172.16.0.0/24
). - DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Egress
-
- Required: Yes
- Type: boolean
Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).
- IcmpTypeCode
-
- Type: IcmpTypeCode structure
ICMP protocol: The ICMP type and code. Required if specifying ICMP for the protocol.
- NetworkAclId
-
- Required: Yes
- Type: string
The ID of the network ACL.
- PortRange
-
- Type: PortRange structure
TCP or UDP protocols: The range of ports the rule applies to.
- Protocol
-
- Required: Yes
- Type: string
The protocol. A value of -1 means all protocols.
- RuleAction
-
- Required: Yes
- Type: string
Indicates whether to allow or deny the traffic that matches the rule.
- RuleNumber
-
- Required: Yes
- Type: int
The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.
Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To create a network ACL entry
This example creates an entry for the specified network ACL. The rule allows ingress traffic from anywhere (0.0.0.0/0) on UDP port 53 (DNS) into any associated subnet.
$result = $client->createNetworkAclEntry([ 'CidrBlock' => '0.0.0.0/0', 'Egress' => , 'NetworkAclId' => 'acl-5fb85d36', 'PortRange' => [ 'From' => 53, 'To' => 53, ], 'Protocol' => 'udp', 'RuleAction' => 'allow', 'RuleNumber' => 100, ]);
CreateNetworkInterface
$result = $client->createNetworkInterface
([/* ... */]); $promise = $client->createNetworkInterfaceAsync
([/* ... */]);
Creates a network interface in the specified subnet.
For more information about network interfaces, see Elastic Network Interfaces in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->createNetworkInterface([ 'Description' => '<string>', 'DryRun' => true || false, 'Groups' => ['<string>', ...], 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Primary' => true || false, 'PrivateIpAddress' => '<string>', // REQUIRED ], // ... ], 'SecondaryPrivateIpAddressCount' => <integer>, 'SubnetId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Description
-
- Type: string
A description for the network interface.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Groups
-
- Type: Array of strings
The IDs of one or more security groups.
- PrivateIpAddress
-
- Type: string
The primary private IP address of the network interface. If you don't specify an IP address, Amazon EC2 selects one for you from the subnet range. If you specify an IP address, you cannot indicate any IP addresses specified in
privateIpAddresses
as primary (only one IP address can be designated as primary). - PrivateIpAddresses
-
- Type: Array of PrivateIpAddressSpecification structures
One or more private IP addresses.
- SecondaryPrivateIpAddressCount
-
- Type: int
The number of secondary private IP addresses to assign to a network interface. When you specify a number of secondary IP addresses, Amazon EC2 selects these IP addresses within the subnet range. You can't specify this option and specify more than one private IP address using
privateIpAddresses
.The number of IP addresses you can assign to a network interface varies by instance type. For more information, see Private IP Addresses Per ENI Per Instance Type in the Amazon Elastic Compute Cloud User Guide.
- SubnetId
-
- Required: Yes
- Type: string
The ID of the subnet to associate with the network interface.
Result Syntax
[ 'NetworkInterface' => [ 'Association' => [ 'AllocationId' => '<string>', 'AssociationId' => '<string>', 'IpOwnerId' => '<string>', 'PublicDnsName' => '<string>', 'PublicIp' => '<string>', ], 'Attachment' => [ 'AttachTime' => <DateTime>, 'AttachmentId' => '<string>', 'DeleteOnTermination' => true || false, 'DeviceIndex' => <integer>, 'InstanceId' => '<string>', 'InstanceOwnerId' => '<string>', 'Status' => 'attaching|attached|detaching|detached', ], 'AvailabilityZone' => '<string>', 'Description' => '<string>', 'Groups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'InterfaceType' => 'interface|natGateway', 'MacAddress' => '<string>', 'NetworkInterfaceId' => '<string>', 'OwnerId' => '<string>', 'PrivateDnsName' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Association' => [ 'AllocationId' => '<string>', 'AssociationId' => '<string>', 'IpOwnerId' => '<string>', 'PublicDnsName' => '<string>', 'PublicIp' => '<string>', ], 'Primary' => true || false, 'PrivateDnsName' => '<string>', 'PrivateIpAddress' => '<string>', ], // ... ], 'RequesterId' => '<string>', 'RequesterManaged' => true || false, 'SourceDestCheck' => true || false, 'Status' => 'available|attaching|in-use|detaching', 'SubnetId' => '<string>', 'TagSet' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], ]
Result Details
Members
- NetworkInterface
-
- Type: NetworkInterface structure
Information about the network interface.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a network interface
This example creates a network interface for the specified subnet.
$result = $client->createNetworkInterface([ 'Description' => 'my network interface', 'Groups' => [ 'sg-903004f8', ], 'PrivateIpAddress' => '10.0.2.17', 'SubnetId' => 'subnet-9d4a7b6c', ]);
Result syntax:
[ 'NetworkInterface' => [ 'AvailabilityZone' => 'us-east-1d', 'Description' => 'my network interface', 'Groups' => [ [ 'GroupId' => 'sg-903004f8', 'GroupName' => 'default', ], ], 'MacAddress' => '02:1a:80:41:52:9c', 'NetworkInterfaceId' => 'eni-e5aa89a3', 'OwnerId' => '123456789012', 'PrivateIpAddress' => '10.0.2.17', 'PrivateIpAddresses' => [ [ 'Primary' => 1, 'PrivateIpAddress' => '10.0.2.17', ], ], 'RequesterManaged' => , 'SourceDestCheck' => 1, 'Status' => 'pending', 'SubnetId' => 'subnet-9d4a7b6c', 'TagSet' => [ ], 'VpcId' => 'vpc-a01106c2', ], ]
CreatePlacementGroup
$result = $client->createPlacementGroup
([/* ... */]); $promise = $client->createPlacementGroupAsync
([/* ... */]);
Creates a placement group that you launch cluster instances into. You must give the group a name that's unique within the scope of your account.
For more information about placement groups and cluster instances, see Cluster Instances in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->createPlacementGroup([ 'DryRun' => true || false, 'GroupName' => '<string>', // REQUIRED 'Strategy' => 'cluster', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - GroupName
-
- Required: Yes
- Type: string
A name for the placement group.
Constraints: Up to 255 ASCII characters
- Strategy
-
- Required: Yes
- Type: string
The placement strategy.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To create a placement group
This example creates a placement group with the specified name.
$result = $client->createPlacementGroup([ 'GroupName' => 'my-cluster', 'Strategy' => 'cluster', ]);
Result syntax:
[ ]
CreateReservedInstancesListing
$result = $client->createReservedInstancesListing
([/* ... */]); $promise = $client->createReservedInstancesListingAsync
([/* ... */]);
Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Standard Reserved Instance listing at a time. To get a list of your Standard Reserved Instances, you can use the DescribeReservedInstances operation.
The Reserved Instance Marketplace matches sellers who want to resell Standard Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.
To sell your Standard Reserved Instances, you must first register as a seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Standard Reserved Instances, and specify the upfront price to receive for them. Your Standard Reserved Instance listings then become available for purchase. To view the details of your Standard Reserved Instance listing, you can use the DescribeReservedInstancesListings operation.
For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->createReservedInstancesListing([ 'ClientToken' => '<string>', // REQUIRED 'InstanceCount' => <integer>, // REQUIRED 'PriceSchedules' => [ // REQUIRED [ 'CurrencyCode' => 'USD', 'Price' => <float>, 'Term' => <integer>, ], // ... ], 'ReservedInstancesId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ClientToken
-
- Required: Yes
- Type: string
Unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see Ensuring Idempotency.
- InstanceCount
-
- Required: Yes
- Type: int
The number of instances that are a part of a Reserved Instance account to be listed in the Reserved Instance Marketplace. This number should be less than or equal to the instance count associated with the Reserved Instance ID specified in this call.
- PriceSchedules
-
- Required: Yes
- Type: Array of PriceScheduleSpecification structures
A list specifying the price of the Standard Reserved Instance for each month remaining in the Reserved Instance term.
- ReservedInstancesId
-
- Required: Yes
- Type: string
The ID of the active Standard Reserved Instance.
Result Syntax
[ 'ReservedInstancesListings' => [ [ 'ClientToken' => '<string>', 'CreateDate' => <DateTime>, 'InstanceCounts' => [ [ 'InstanceCount' => <integer>, 'State' => 'available|sold|cancelled|pending', ], // ... ], 'PriceSchedules' => [ [ 'Active' => true || false, 'CurrencyCode' => 'USD', 'Price' => <float>, 'Term' => <integer>, ], // ... ], 'ReservedInstancesId' => '<string>', 'ReservedInstancesListingId' => '<string>', 'Status' => 'active|pending|cancelled|closed', 'StatusMessage' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'UpdateDate' => <DateTime>, ], // ... ], ]
Result Details
Members
- ReservedInstancesListings
-
- Type: Array of ReservedInstancesListing structures
Information about the Standard Reserved Instance listing.
Errors
There are no errors described for this operation.
CreateRoute
$result = $client->createRoute
([/* ... */]); $promise = $client->createRouteAsync
([/* ... */]);
Creates a route in a route table within a VPC.
You must specify one of the following targets: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, or network interface.
When determining how to route traffic, we use the route with the most specific match. For example, let's say the traffic is destined for 192.0.2.3
, and the route table includes the following two routes:
-
192.0.2.0/24
(goes to some target A) -
192.0.2.0/28
(goes to some target B)
Both routes apply to the traffic destined for 192.0.2.3
. However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.
For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createRoute([ 'DestinationCidrBlock' => '<string>', // REQUIRED 'DryRun' => true || false, 'GatewayId' => '<string>', 'InstanceId' => '<string>', 'NatGatewayId' => '<string>', 'NetworkInterfaceId' => '<string>', 'RouteTableId' => '<string>', // REQUIRED 'VpcPeeringConnectionId' => '<string>', ]);
Parameter Details
Members
- DestinationCidrBlock
-
- Required: Yes
- Type: string
The CIDR address block used for the destination match. Routing decisions are based on the most specific match.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - GatewayId
-
- Type: string
The ID of an Internet gateway or virtual private gateway attached to your VPC.
- InstanceId
-
- Type: string
The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.
- NatGatewayId
-
- Type: string
The ID of a NAT gateway.
- NetworkInterfaceId
-
- Type: string
The ID of a network interface.
- RouteTableId
-
- Required: Yes
- Type: string
The ID of the route table for the route.
- VpcPeeringConnectionId
-
- Type: string
The ID of a VPC peering connection.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Returns
true
if the request succeeds; otherwise, it returns an error.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a route
This example creates a route for the specified route table. The route matches all traffic (0.0.0.0/0) and routes it to the specified Internet gateway.
$result = $client->createRoute([ 'DestinationCidrBlock' => '0.0.0.0/0', 'GatewayId' => 'igw-c0a643a9', 'RouteTableId' => 'rtb-22574640', ]);
CreateRouteTable
$result = $client->createRouteTable
([/* ... */]); $promise = $client->createRouteTableAsync
([/* ... */]);
Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.
For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createRouteTable([ 'DryRun' => true || false, 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[ 'RouteTable' => [ 'Associations' => [ [ 'Main' => true || false, 'RouteTableAssociationId' => '<string>', 'RouteTableId' => '<string>', 'SubnetId' => '<string>', ], // ... ], 'PropagatingVgws' => [ [ 'GatewayId' => '<string>', ], // ... ], 'RouteTableId' => '<string>', 'Routes' => [ [ 'DestinationCidrBlock' => '<string>', 'DestinationPrefixListId' => '<string>', 'GatewayId' => '<string>', 'InstanceId' => '<string>', 'InstanceOwnerId' => '<string>', 'NatGatewayId' => '<string>', 'NetworkInterfaceId' => '<string>', 'Origin' => 'CreateRouteTable|CreateRoute|EnableVgwRoutePropagation', 'State' => 'active|blackhole', 'VpcPeeringConnectionId' => '<string>', ], // ... ], 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], ]
Result Details
Members
- RouteTable
-
- Type: RouteTable structure
Information about the route table.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a route table
This example creates a route table for the specified VPC.
$result = $client->createRouteTable([ 'VpcId' => 'vpc-a01106c2', ]);
Result syntax:
[ 'RouteTable' => [ 'Associations' => [ ], 'PropagatingVgws' => [ ], 'RouteTableId' => 'rtb-22574640', 'Routes' => [ [ 'DestinationCidrBlock' => '10.0.0.0/16', 'GatewayId' => 'local', 'State' => 'active', ], ], 'Tags' => [ ], 'VpcId' => 'vpc-a01106c2', ], ]
CreateSecurityGroup
$result = $client->createSecurityGroup
([/* ... */]); $promise = $client->createSecurityGroupAsync
([/* ... */]);
Creates a security group.
A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.
EC2-Classic: You can have up to 500 security groups.
EC2-VPC: You can create up to 500 security groups per VPC.
When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.
You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.
You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress, AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress, and RevokeSecurityGroupEgress.
Parameter Syntax
$result = $client->createSecurityGroup([ 'Description' => '<string>', // REQUIRED 'DryRun' => true || false, 'GroupName' => '<string>', // REQUIRED 'VpcId' => '<string>', ]);
Parameter Details
Members
- Description
-
- Required: Yes
- Type: string
A description for the security group. This is informational only.
Constraints: Up to 255 characters in length
Constraints for EC2-Classic: ASCII characters
Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - GroupName
-
- Required: Yes
- Type: string
The name of the security group.
Constraints: Up to 255 characters in length
Constraints for EC2-Classic: ASCII characters
Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
- VpcId
-
- Type: string
[EC2-VPC] The ID of the VPC. Required for EC2-VPC.
Result Syntax
[ 'GroupId' => '<string>', ]
Result Details
Members
- GroupId
-
- Type: string
The ID of the security group.
Errors
There are no errors described for this operation.
CreateSnapshot
$result = $client->createSnapshot
([/* ... */]); $promise = $client->createSnapshotAsync
([/* ... */]);
Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.
When a snapshot is created, any AWS Marketplace product codes that are associated with the source volume are propagated to the snapshot.
You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your EBS volume at the time the snapshot command is issued; this may exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is pending
.
To create a snapshot for EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.
Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.
For more information, see Amazon Elastic Block Store and Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->createSnapshot([ 'Description' => '<string>', 'DryRun' => true || false, 'VolumeId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Description
-
- Type: string
A description for the snapshot.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VolumeId
-
- Required: Yes
- Type: string
The ID of the EBS volume.
Result Syntax
[ 'DataEncryptionKeyId' => '<string>', 'Description' => '<string>', 'Encrypted' => true || false, 'KmsKeyId' => '<string>', 'OwnerAlias' => '<string>', 'OwnerId' => '<string>', 'Progress' => '<string>', 'SnapshotId' => '<string>', 'StartTime' => <DateTime>, 'State' => 'pending|completed|error', 'StateMessage' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VolumeId' => '<string>', 'VolumeSize' => <integer>, ]
Result Details
Members
- DataEncryptionKeyId
-
- Type: string
The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by the DescribeSnapshots API operation.
- Description
-
- Type: string
The description for the snapshot.
- Encrypted
-
- Type: boolean
Indicates whether the snapshot is encrypted.
- KmsKeyId
-
- Type: string
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the parent volume.
- OwnerAlias
-
- Type: string
Value from an Amazon-maintained list (
amazon
|aws-marketplace
|microsoft
) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. - OwnerId
-
- Type: string
The AWS account ID of the EBS snapshot owner.
- Progress
-
- Type: string
The progress of the snapshot, as a percentage.
- SnapshotId
-
- Type: string
The ID of the snapshot. Each snapshot receives a unique identifier when it is created.
- StartTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time stamp when the snapshot was initiated.
- State
-
- Type: string
The snapshot state.
- StateMessage
-
- Type: string
Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by the DescribeSnapshots API operation.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the snapshot.
- VolumeId
-
- Type: string
The ID of the volume that was used to create the snapshot. Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.
- VolumeSize
-
- Type: int
The size of the volume, in GiB.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a snapshot
This example creates a snapshot of the volume with a volume ID of ``vol-1234567890abcdef0`` and a short description to identify the snapshot.
$result = $client->createSnapshot([ 'Description' => 'This is my root volume snapshot.', 'VolumeId' => 'vol-1234567890abcdef0', ]);
Result syntax:
[ 'Description' => 'This is my root volume snapshot.', 'OwnerId' => '012345678910', 'SnapshotId' => 'snap-066877671789bd71b', 'StartTime' =>, 'State' => 'pending', 'Tags' => [ ], 'VolumeId' => 'vol-1234567890abcdef0', 'VolumeSize' => 8, ]
CreateSpotDatafeedSubscription
$result = $client->createSpotDatafeedSubscription
([/* ... */]); $promise = $client->createSpotDatafeedSubscriptionAsync
([/* ... */]);
Creates a data feed for Spot instances, enabling you to view Spot instance usage logs. You can create one data feed per AWS account. For more information, see Spot Instance Data Feed in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->createSpotDatafeedSubscription([ 'Bucket' => '<string>', // REQUIRED 'DryRun' => true || false, 'Prefix' => '<string>', ]);
Parameter Details
Members
- Bucket
-
- Required: Yes
- Type: string
The Amazon S3 bucket in which to store the Spot instance data feed.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Prefix
-
- Type: string
A prefix for the data feed file names.
Result Syntax
[ 'SpotDatafeedSubscription' => [ 'Bucket' => '<string>', 'Fault' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'OwnerId' => '<string>', 'Prefix' => '<string>', 'State' => 'Active|Inactive', ], ]
Result Details
Members
- SpotDatafeedSubscription
-
- Type: SpotDatafeedSubscription structure
The Spot instance data feed subscription.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a Spot Instance datafeed
This example creates a Spot Instance data feed for your AWS account.
$result = $client->createSpotDatafeedSubscription([ 'Bucket' => 'my-s3-bucket', 'Prefix' => 'spotdata', ]);
Result syntax:
[ 'SpotDatafeedSubscription' => [ 'Bucket' => 'my-s3-bucket', 'OwnerId' => '123456789012', 'Prefix' => 'spotdata', 'State' => 'Active', ], ]
CreateSubnet
$result = $client->createSubnet
([/* ... */]); $promise = $client->createSubnetAsync
([/* ... */]);
Creates a subnet in an existing VPC.
When you create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. After you create a subnet, you can't change its CIDR block. The subnet's CIDR block can be the same as the VPC's CIDR block (assuming you want only a single subnet in the VPC), or a subset of the VPC's CIDR block. If you create more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest subnet (and VPC) you can create uses a /28 netmask (16 IP addresses), and the largest uses a /16 netmask (65,536 IP addresses).
AWS reserves both the first four and the last IP address in each subnet's CIDR block. They're not available for use.
If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.
If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP address doesn't change if you stop and restart the instance (unlike a similar instance launched outside a VPC, which gets a new IP address when restarted). It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.
For more information about subnets, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createSubnet([ 'AvailabilityZone' => '<string>', 'CidrBlock' => '<string>', // REQUIRED 'DryRun' => true || false, 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AvailabilityZone
-
- Type: string
The Availability Zone for the subnet.
Default: AWS selects one for you. If you create more than one subnet in your VPC, we may not necessarily select a different zone for each subnet.
- CidrBlock
-
- Required: Yes
- Type: string
The network range for the subnet, in CIDR notation. For example,
10.0.0.0/24
. - DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[ 'Subnet' => [ 'AvailabilityZone' => '<string>', 'AvailableIpAddressCount' => <integer>, 'CidrBlock' => '<string>', 'DefaultForAz' => true || false, 'MapPublicIpOnLaunch' => true || false, 'State' => 'pending|available', 'SubnetId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], ]
Result Details
Members
- Subnet
-
- Type: Subnet structure
Information about the subnet.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a subnet
This example creates a subnet in the specified VPC with the specified CIDR block. We recommend that you let us select an Availability Zone for you.
$result = $client->createSubnet([ 'CidrBlock' => '10.0.1.0/24', 'VpcId' => 'vpc-a01106c2', ]);
Result syntax:
[ 'Subnet' => [ 'AvailabilityZone' => 'us-west-2c', 'AvailableIpAddressCount' => 251, 'CidrBlock' => '10.0.1.0/24', 'State' => 'pending', 'SubnetId' => 'subnet-9d4a7b6c', 'VpcId' => 'vpc-a01106c2', ], ]
CreateTags
$result = $client->createTags
([/* ... */]); $promise = $client->createTagsAsync
([/* ... */]);
Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.
For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide. For more information about creating IAM policies that control users' access to resources based on tags, see Supported Resource-Level Permissions for Amazon EC2 API Actions in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->createTags([ 'DryRun' => true || false, 'Resources' => ['<string>', ...], // REQUIRED 'Tags' => [ // REQUIRED [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Resources
-
- Required: Yes
- Type: Array of strings
The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
- Tags
-
- Required: Yes
- Type: Array of Tag structures
One or more tags. The
value
parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To add a tag to a resource
This example adds the tag Stack=production to the specified image, or overwrites an existing tag for the AMI where the tag key is Stack.
$result = $client->createTags([ 'Resources' => [ 'ami-78a54011', ], 'Tags' => [ [ 'Key' => 'Stack', 'Value' => 'production', ], ], ]);
CreateVolume
$result = $client->createVolume
([/* ... */]); $promise = $client->createVolumeAsync
([/* ... */]);
Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see Regions and Endpoints.
You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.
You can create encrypted volumes with the Encrypted
parameter. Encrypted volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
For more information, see Creating or Restoring an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->createVolume([ 'AvailabilityZone' => '<string>', // REQUIRED 'DryRun' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'KmsKeyId' => '<string>', 'Size' => <integer>, 'SnapshotId' => '<string>', 'VolumeType' => 'standard|io1|gp2|sc1|st1', ]);
Parameter Details
Members
- AvailabilityZone
-
- Required: Yes
- Type: string
The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Encrypted
-
- Type: boolean
Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
- Iops
-
- Type: int
Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 30 IOPS/GiB.
Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes
- KmsKeyId
-
- Type: string
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the
arn:aws:kms
namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekey
namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. If aKmsKeyId
is specified, theEncrypted
flag must also be set. - Size
-
- Type: int
The size of the volume, in GiBs.
Constraints: 1-16384 for
gp2
, 4-16384 forio1
, 500-16384 forst1
, 500-16384 forsc1
, and 1-1024 forstandard
. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
- SnapshotId
-
- Type: string
The snapshot from which to create the volume.
- VolumeType
-
- Type: string
The volume type. This can be
gp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.Default:
standard
Result Syntax
[ 'Attachments' => [ [ 'AttachTime' => <DateTime>, 'DeleteOnTermination' => true || false, 'Device' => '<string>', 'InstanceId' => '<string>', 'State' => 'attaching|attached|detaching|detached', 'VolumeId' => '<string>', ], // ... ], 'AvailabilityZone' => '<string>', 'CreateTime' => <DateTime>, 'Encrypted' => true || false, 'Iops' => <integer>, 'KmsKeyId' => '<string>', 'Size' => <integer>, 'SnapshotId' => '<string>', 'State' => 'creating|available|in-use|deleting|deleted|error', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VolumeId' => '<string>', 'VolumeType' => 'standard|io1|gp2|sc1|st1', ]
Result Details
Members
- Attachments
-
- Type: Array of VolumeAttachment structures
Information about the volume attachments.
- AvailabilityZone
-
- Type: string
The Availability Zone for the volume.
- CreateTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time stamp when volume creation was initiated.
- Encrypted
-
- Type: boolean
Indicates whether the volume will be encrypted.
- Iops
-
- Type: int
The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for
gp2
volumes.Condition: This parameter is required for requests to create
io1
volumes; it is not used in requests to creategp2
,st1
,sc1
, orstandard
volumes. - KmsKeyId
-
- Type: string
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.
- Size
-
- Type: int
The size of the volume, in GiBs.
- SnapshotId
-
- Type: string
The snapshot from which the volume was created, if applicable.
- State
-
- Type: string
The volume state.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the volume.
- VolumeId
-
- Type: string
The ID of the volume.
- VolumeType
-
- Type: string
The volume type. This can be
gp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a new volume
This example creates an 80 GiB General Purpose (SSD) volume in the Availability Zone ``us-east-1a``.
$result = $client->createVolume([ 'AvailabilityZone' => 'us-east-1a', 'Size' => 80, 'VolumeType' => 'gp2', ]);
Result syntax:
[ 'AvailabilityZone' => 'us-east-1a', 'CreateTime' =>, 'Encrypted' => , 'Iops' => 240, 'Size' => 80, 'SnapshotId' => '', 'State' => 'creating', 'VolumeId' => 'vol-6b60b7c7', 'VolumeType' => 'gp2', ]
Example 2: To create a new Provisioned IOPS (SSD) volume from a snapshot
This example creates a new Provisioned IOPS (SSD) volume with 1000 provisioned IOPS from a snapshot in the Availability Zone ``us-east-1a``.
$result = $client->createVolume([ 'AvailabilityZone' => 'us-east-1a', 'Iops' => 1000, 'SnapshotId' => 'snap-066877671789bd71b', 'VolumeType' => 'io1', ]);
Result syntax:
[ 'Attachments' => [ ], 'AvailabilityZone' => 'us-east-1a', 'CreateTime' =>, 'Iops' => 1000, 'Size' => 500, 'SnapshotId' => 'snap-066877671789bd71b', 'State' => 'creating', 'Tags' => [ ], 'VolumeId' => 'vol-1234567890abcdef0', 'VolumeType' => 'io1', ]
CreateVpc
$result = $client->createVpc
([/* ... */]); $promise = $client->createVpcAsync
([/* ... */]);
Creates a VPC with the specified CIDR block.
The smallest VPC you can create uses a /28 netmask (16 IP addresses), and the largest uses a /16 netmask (65,536 IP addresses). To help you decide how big to make your VPC, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.
By default, each instance you launch in the VPC has the default DHCP options, which includes only a default DNS server that we provide (AmazonProvidedDNS). For more information about DHCP options, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.
You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see Dedicated Instances in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createVpc([ 'CidrBlock' => '<string>', // REQUIRED 'DryRun' => true || false, 'InstanceTenancy' => 'default|dedicated|host', ]);
Parameter Details
Members
- CidrBlock
-
- Required: Yes
- Type: string
The network range for the VPC, in CIDR notation. For example,
10.0.0.0/16
. - DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceTenancy
-
- Type: string
The tenancy options for instances launched into the VPC. For
default
, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. Fordedicated
, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy ofdedicated
orhost
into a dedicated tenancy VPC.Important: The
host
value cannot be used with this parameter. Use thedefault
ordedicated
values only.Default:
default
Result Syntax
[ 'Vpc' => [ 'CidrBlock' => '<string>', 'DhcpOptionsId' => '<string>', 'InstanceTenancy' => 'default|dedicated|host', 'IsDefault' => true || false, 'State' => 'pending|available', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], ]
Result Details
Members
- Vpc
-
- Type: Vpc structure
Information about the VPC.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a VPC
This example creates a VPC with the specified CIDR block.
$result = $client->createVpc([ 'CidrBlock' => '10.0.0.0/16', ]);
Result syntax:
[ 'Vpc' => [ 'CidrBlock' => '10.0.0.0/16', 'DhcpOptionsId' => 'dopt-7a8b9c2d', 'InstanceTenancy' => 'default', 'State' => 'pending', 'VpcId' => 'vpc-a01106c2', ], ]
CreateVpcEndpoint
$result = $client->createVpcEndpoint
([/* ... */]); $promise = $client->createVpcEndpointAsync
([/* ... */]);
Creates a VPC endpoint for a specified AWS service. An endpoint enables you to create a private connection between your VPC and another AWS service in your account. You can specify an endpoint policy to attach to the endpoint that will control access to the service from your VPC. You can also specify the VPC route tables that use the endpoint.
Currently, only endpoints to Amazon S3 are supported.
Parameter Syntax
$result = $client->createVpcEndpoint([ 'ClientToken' => '<string>', 'DryRun' => true || false, 'PolicyDocument' => '<string>', 'RouteTableIds' => ['<string>', ...], 'ServiceName' => '<string>', // REQUIRED 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - PolicyDocument
-
- Type: string
A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.
- RouteTableIds
-
- Type: Array of strings
One or more route table IDs.
- ServiceName
-
- Required: Yes
- Type: string
The AWS service name, in the form
com.amazonaws.region.service
. To get a list of available services, use the DescribeVpcEndpointServices request. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC in which the endpoint will be used.
Result Syntax
[ 'ClientToken' => '<string>', 'VpcEndpoint' => [ 'CreationTimestamp' => <DateTime>, 'PolicyDocument' => '<string>', 'RouteTableIds' => ['<string>', ...], 'ServiceName' => '<string>', 'State' => 'Pending|Available|Deleting|Deleted', 'VpcEndpointId' => '<string>', 'VpcId' => '<string>', ], ]
Result Details
Members
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure the idempotency of the request.
- VpcEndpoint
-
- Type: VpcEndpoint structure
Information about the endpoint.
Errors
There are no errors described for this operation.
CreateVpcPeeringConnection
$result = $client->createVpcPeeringConnection
([/* ... */]); $promise = $client->createVpcPeeringConnectionAsync
([/* ... */]);
Requests a VPC peering connection between two VPCs: a requester VPC that you own and a peer VPC with which to create the connection. The peer VPC can belong to another AWS account. The requester VPC and peer VPC cannot have overlapping CIDR blocks.
The owner of the peer VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.
A CreateVpcPeeringConnection
request between VPCs with overlapping CIDR blocks results in the VPC peering connection having a status of failed
.
Parameter Syntax
$result = $client->createVpcPeeringConnection([ 'DryRun' => true || false, 'PeerOwnerId' => '<string>', 'PeerVpcId' => '<string>', 'VpcId' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - PeerOwnerId
-
- Type: string
The AWS account ID of the owner of the peer VPC.
Default: Your AWS account ID
- PeerVpcId
-
- Type: string
The ID of the VPC with which you are creating the VPC peering connection.
- VpcId
-
- Type: string
The ID of the requester VPC.
Result Syntax
[ 'VpcPeeringConnection' => [ 'AccepterVpcInfo' => [ 'CidrBlock' => '<string>', 'OwnerId' => '<string>', 'PeeringOptions' => [ 'AllowDnsResolutionFromRemoteVpc' => true || false, 'AllowEgressFromLocalClassicLinkToRemoteVpc' => true || false, 'AllowEgressFromLocalVpcToRemoteClassicLink' => true || false, ], 'VpcId' => '<string>', ], 'ExpirationTime' => <DateTime>, 'RequesterVpcInfo' => [ 'CidrBlock' => '<string>', 'OwnerId' => '<string>', 'PeeringOptions' => [ 'AllowDnsResolutionFromRemoteVpc' => true || false, 'AllowEgressFromLocalClassicLinkToRemoteVpc' => true || false, 'AllowEgressFromLocalVpcToRemoteClassicLink' => true || false, ], 'VpcId' => '<string>', ], 'Status' => [ 'Code' => 'initiating-request|pending-acceptance|active|deleted|rejected|failed|expired|provisioning|deleting', 'Message' => '<string>', ], 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcPeeringConnectionId' => '<string>', ], ]
Result Details
Members
- VpcPeeringConnection
-
- Type: VpcPeeringConnection structure
Information about the VPC peering connection.
Errors
There are no errors described for this operation.
CreateVpnConnection
$result = $client->createVpnConnection
([/* ... */]); $promise = $client->createVpnConnectionAsync
([/* ... */]);
Creates a VPN connection between an existing virtual private gateway and a VPN customer gateway. The only supported connection type is ipsec.1
.
The response includes information that you need to give to your network administrator to configure your customer gateway.
We strongly recommend that you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway.
If you decide to shut down your VPN connection for any reason and later create a new VPN connection, you must reconfigure your customer gateway with the new information returned from this call.
This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.
For more information about VPN connections, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createVpnConnection([ 'CustomerGatewayId' => '<string>', // REQUIRED 'DryRun' => true || false, 'Options' => [ 'StaticRoutesOnly' => true || false, ], 'Type' => '<string>', // REQUIRED 'VpnGatewayId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- CustomerGatewayId
-
- Required: Yes
- Type: string
The ID of the customer gateway.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Options
-
- Type: VpnConnectionOptionsSpecification structure
Indicates whether the VPN connection requires static routes. If you are creating a VPN connection for a device that does not support BGP, you must specify
true
.Default:
false
- Type
-
- Required: Yes
- Type: string
The type of VPN connection (
ipsec.1
). - VpnGatewayId
-
- Required: Yes
- Type: string
The ID of the virtual private gateway.
Result Syntax
[ 'VpnConnection' => [ 'CustomerGatewayConfiguration' => '<string>', 'CustomerGatewayId' => '<string>', 'Options' => [ 'StaticRoutesOnly' => true || false, ], 'Routes' => [ [ 'DestinationCidrBlock' => '<string>', 'Source' => 'Static', 'State' => 'pending|available|deleting|deleted', ], // ... ], 'State' => 'pending|available|deleting|deleted', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'Type' => 'ipsec.1', 'VgwTelemetry' => [ [ 'AcceptedRouteCount' => <integer>, 'LastStatusChange' => <DateTime>, 'OutsideIpAddress' => '<string>', 'Status' => 'UP|DOWN', 'StatusMessage' => '<string>', ], // ... ], 'VpnConnectionId' => '<string>', 'VpnGatewayId' => '<string>', ], ]
Result Details
Members
- VpnConnection
-
- Type: VpnConnection structure
Information about the VPN connection.
Errors
There are no errors described for this operation.
CreateVpnConnectionRoute
$result = $client->createVpnConnectionRoute
([/* ... */]); $promise = $client->createVpnConnectionRouteAsync
([/* ... */]);
Creates a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.
For more information about VPN connections, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createVpnConnectionRoute([ 'DestinationCidrBlock' => '<string>', // REQUIRED 'VpnConnectionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DestinationCidrBlock
-
- Required: Yes
- Type: string
The CIDR block associated with the local subnet of the customer network.
- VpnConnectionId
-
- Required: Yes
- Type: string
The ID of the VPN connection.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
CreateVpnGateway
$result = $client->createVpnGateway
([/* ... */]); $promise = $client->createVpnGatewayAsync
([/* ... */]);
Creates a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself.
For more information about virtual private gateways, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->createVpnGateway([ 'AvailabilityZone' => '<string>', 'DryRun' => true || false, 'Type' => 'ipsec.1', // REQUIRED ]);
Parameter Details
Members
- AvailabilityZone
-
- Type: string
The Availability Zone for the virtual private gateway.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Type
-
- Required: Yes
- Type: string
The type of VPN connection this virtual private gateway supports.
Result Syntax
[ 'VpnGateway' => [ 'AvailabilityZone' => '<string>', 'State' => 'pending|available|deleting|deleted', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'Type' => 'ipsec.1', 'VpcAttachments' => [ [ 'State' => 'attaching|attached|detaching|detached', 'VpcId' => '<string>', ], // ... ], 'VpnGatewayId' => '<string>', ], ]
Result Details
Members
- VpnGateway
-
- Type: VpnGateway structure
Information about the virtual private gateway.
Errors
There are no errors described for this operation.
DeleteCustomerGateway
$result = $client->deleteCustomerGateway
([/* ... */]); $promise = $client->deleteCustomerGatewayAsync
([/* ... */]);
Deletes the specified customer gateway. You must delete the VPN connection before you can delete the customer gateway.
Parameter Syntax
$result = $client->deleteCustomerGateway([ 'CustomerGatewayId' => '<string>', // REQUIRED 'DryRun' => true || false, ]);
Parameter Details
Members
- CustomerGatewayId
-
- Required: Yes
- Type: string
The ID of the customer gateway.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a customer gateway
This example deletes the specified customer gateway.
$result = $client->deleteCustomerGateway([ 'CustomerGatewayId' => 'cgw-0e11f167', ]);
DeleteDhcpOptions
$result = $client->deleteDhcpOptions
([/* ... */]); $promise = $client->deleteDhcpOptionsAsync
([/* ... */]);
Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.
Parameter Syntax
$result = $client->deleteDhcpOptions([ 'DhcpOptionsId' => '<string>', // REQUIRED 'DryRun' => true || false, ]);
Parameter Details
Members
- DhcpOptionsId
-
- Required: Yes
- Type: string
The ID of the DHCP options set.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a DHCP options set
This example deletes the specified DHCP options set.
$result = $client->deleteDhcpOptions([ 'DhcpOptionsId' => 'dopt-d9070ebb', ]);
DeleteFlowLogs
$result = $client->deleteFlowLogs
([/* ... */]); $promise = $client->deleteFlowLogsAsync
([/* ... */]);
Deletes one or more flow logs.
Parameter Syntax
$result = $client->deleteFlowLogs([ 'FlowLogIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- FlowLogIds
-
- Required: Yes
- Type: Array of strings
One or more flow log IDs.
Result Syntax
[ 'Unsuccessful' => [ [ 'Error' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'ResourceId' => '<string>', ], // ... ], ]
Result Details
Members
- Unsuccessful
-
- Type: Array of UnsuccessfulItem structures
Information about the flow logs that could not be deleted successfully.
Errors
There are no errors described for this operation.
DeleteInternetGateway
$result = $client->deleteInternetGateway
([/* ... */]); $promise = $client->deleteInternetGatewayAsync
([/* ... */]);
Deletes the specified Internet gateway. You must detach the Internet gateway from the VPC before you can delete it.
Parameter Syntax
$result = $client->deleteInternetGateway([ 'DryRun' => true || false, 'InternetGatewayId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InternetGatewayId
-
- Required: Yes
- Type: string
The ID of the Internet gateway.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete an Internet gateway
This example deletes the specified Internet gateway.
$result = $client->deleteInternetGateway([ 'InternetGatewayId' => 'igw-c0a643a9', ]);
DeleteKeyPair
$result = $client->deleteKeyPair
([/* ... */]); $promise = $client->deleteKeyPairAsync
([/* ... */]);
Deletes the specified key pair, by removing the public key from Amazon EC2.
Parameter Syntax
$result = $client->deleteKeyPair([ 'DryRun' => true || false, 'KeyName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - KeyName
-
- Required: Yes
- Type: string
The name of the key pair.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a key pair
This example deletes the specified key pair.
$result = $client->deleteKeyPair([ 'KeyName' => 'my-key-pair', ]);
DeleteNatGateway
$result = $client->deleteNatGateway
([/* ... */]); $promise = $client->deleteNatGatewayAsync
([/* ... */]);
Deletes the specified NAT gateway. Deleting a NAT gateway disassociates its Elastic IP address, but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway routes in your route tables.
Parameter Syntax
$result = $client->deleteNatGateway([ 'NatGatewayId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- NatGatewayId
-
- Required: Yes
- Type: string
The ID of the NAT gateway.
Result Syntax
[ 'NatGatewayId' => '<string>', ]
Result Details
Members
- NatGatewayId
-
- Type: string
The ID of the NAT gateway.
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a NAT gateway
This example deletes the specified NAT gateway.
$result = $client->deleteNatGateway([ 'NatGatewayId' => 'nat-04ae55e711cec5680', ]);
Result syntax:
[ 'NatGatewayId' => 'nat-04ae55e711cec5680', ]
DeleteNetworkAcl
$result = $client->deleteNetworkAcl
([/* ... */]); $promise = $client->deleteNetworkAclAsync
([/* ... */]);
Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.
Parameter Syntax
$result = $client->deleteNetworkAcl([ 'DryRun' => true || false, 'NetworkAclId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - NetworkAclId
-
- Required: Yes
- Type: string
The ID of the network ACL.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a network ACL
This example deletes the specified network ACL.
$result = $client->deleteNetworkAcl([ 'NetworkAclId' => 'acl-5fb85d36', ]);
DeleteNetworkAclEntry
$result = $client->deleteNetworkAclEntry
([/* ... */]); $promise = $client->deleteNetworkAclEntryAsync
([/* ... */]);
Deletes the specified ingress or egress entry (rule) from the specified network ACL.
Parameter Syntax
$result = $client->deleteNetworkAclEntry([ 'DryRun' => true || false, 'Egress' => true || false, // REQUIRED 'NetworkAclId' => '<string>', // REQUIRED 'RuleNumber' => <integer>, // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Egress
-
- Required: Yes
- Type: boolean
Indicates whether the rule is an egress rule.
- NetworkAclId
-
- Required: Yes
- Type: string
The ID of the network ACL.
- RuleNumber
-
- Required: Yes
- Type: int
The rule number of the entry to delete.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a network ACL entry
This example deletes ingress rule number 100 from the specified network ACL.
$result = $client->deleteNetworkAclEntry([ 'Egress' => 1, 'NetworkAclId' => 'acl-5fb85d36', 'RuleNumber' => 100, ]);
DeleteNetworkInterface
$result = $client->deleteNetworkInterface
([/* ... */]); $promise = $client->deleteNetworkInterfaceAsync
([/* ... */]);
Deletes the specified network interface. You must detach the network interface before you can delete it.
Parameter Syntax
$result = $client->deleteNetworkInterface([ 'DryRun' => true || false, 'NetworkInterfaceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - NetworkInterfaceId
-
- Required: Yes
- Type: string
The ID of the network interface.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a network interface
This example deletes the specified network interface.
$result = $client->deleteNetworkInterface([ 'NetworkInterfaceId' => 'eni-e5aa89a3', ]);
DeletePlacementGroup
$result = $client->deletePlacementGroup
([/* ... */]); $promise = $client->deletePlacementGroupAsync
([/* ... */]);
Deletes the specified placement group. You must terminate all instances in the placement group before you can delete the placement group. For more information about placement groups and cluster instances, see Cluster Instances in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->deletePlacementGroup([ 'DryRun' => true || false, 'GroupName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - GroupName
-
- Required: Yes
- Type: string
The name of the placement group.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a placement group
This example deletes the specified placement group.
$result = $client->deletePlacementGroup([ 'GroupName' => 'my-cluster', ]);
Result syntax:
[ ]
DeleteRoute
$result = $client->deleteRoute
([/* ... */]); $promise = $client->deleteRouteAsync
([/* ... */]);
Deletes the specified route from the specified route table.
Parameter Syntax
$result = $client->deleteRoute([ 'DestinationCidrBlock' => '<string>', // REQUIRED 'DryRun' => true || false, 'RouteTableId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DestinationCidrBlock
-
- Required: Yes
- Type: string
The CIDR range for the route. The value you specify must match the CIDR for the route exactly.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - RouteTableId
-
- Required: Yes
- Type: string
The ID of the route table.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a route
This example deletes the specified route from the specified route table.
$result = $client->deleteRoute([ 'DestinationCidrBlock' => '0.0.0.0/0', 'RouteTableId' => 'rtb-22574640', ]);
DeleteRouteTable
$result = $client->deleteRouteTable
([/* ... */]); $promise = $client->deleteRouteTableAsync
([/* ... */]);
Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.
Parameter Syntax
$result = $client->deleteRouteTable([ 'DryRun' => true || false, 'RouteTableId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - RouteTableId
-
- Required: Yes
- Type: string
The ID of the route table.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a route table
This example deletes the specified route table.
$result = $client->deleteRouteTable([ 'RouteTableId' => 'rtb-22574640', ]);
DeleteSecurityGroup
$result = $client->deleteSecurityGroup
([/* ... */]); $promise = $client->deleteSecurityGroupAsync
([/* ... */]);
Deletes a security group.
If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with InvalidGroup.InUse
in EC2-Classic or DependencyViolation
in EC2-VPC.
Parameter Syntax
$result = $client->deleteSecurityGroup([ 'DryRun' => true || false, 'GroupId' => '<string>', 'GroupName' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - GroupId
-
- Type: string
The ID of the security group. Required for a nondefault VPC.
- GroupName
-
- Type: string
[EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
DeleteSnapshot
$result = $client->deleteSnapshot
([/* ... */]); $promise = $client->deleteSnapshotAsync
([/* ... */]);
Deletes the specified snapshot.
When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.
You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.
For more information, see Deleting an Amazon EBS Snapshot in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->deleteSnapshot([ 'DryRun' => true || false, 'SnapshotId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - SnapshotId
-
- Required: Yes
- Type: string
The ID of the EBS snapshot.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a snapshot
This example deletes a snapshot with the snapshot ID of ``snap-1234567890abcdef0``. If the command succeeds, no output is returned.
$result = $client->deleteSnapshot([ 'SnapshotId' => 'snap-1234567890abcdef0', ]);
Result syntax:
[ ]
DeleteSpotDatafeedSubscription
$result = $client->deleteSpotDatafeedSubscription
([/* ... */]); $promise = $client->deleteSpotDatafeedSubscriptionAsync
([/* ... */]);
Deletes the data feed for Spot instances.
Parameter Syntax
$result = $client->deleteSpotDatafeedSubscription([ 'DryRun' => true || false, ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To cancel a Spot Instance data feed subscription
This example deletes a Spot data feed subscription for the account.
$result = $client->deleteSpotDatafeedSubscription([ ]);
DeleteSubnet
$result = $client->deleteSubnet
([/* ... */]); $promise = $client->deleteSubnetAsync
([/* ... */]);
Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.
Parameter Syntax
$result = $client->deleteSubnet([ 'DryRun' => true || false, 'SubnetId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - SubnetId
-
- Required: Yes
- Type: string
The ID of the subnet.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a subnet
This example deletes the specified subnet.
$result = $client->deleteSubnet([ 'SubnetId' => 'subnet-9d4a7b6c', ]);
DeleteTags
$result = $client->deleteTags
([/* ... */]); $promise = $client->deleteTagsAsync
([/* ... */]);
Deletes the specified set of tags from the specified set of resources. This call is designed to follow a DescribeTags
request.
For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->deleteTags([ 'DryRun' => true || false, 'Resources' => ['<string>', ...], // REQUIRED 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Resources
-
- Required: Yes
- Type: Array of strings
The ID of the resource. For example, ami-1a2b3c4d. You can specify more than one resource ID.
- Tags
-
- Type: Array of Tag structures
One or more tags to delete. If you omit the
value
parameter, we delete the tag regardless of its value. If you specify this parameter with an empty string as the value, we delete the key only if its value is an empty string.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a tag from a resource
This example deletes the tag Stack=test from the specified image.
$result = $client->deleteTags([ 'Resources' => [ 'ami-78a54011', ], 'Tags' => [ [ 'Key' => 'Stack', 'Value' => 'test', ], ], ]);
DeleteVolume
$result = $client->deleteVolume
([/* ... */]); $promise = $client->deleteVolumeAsync
([/* ... */]);
Deletes the specified EBS volume. The volume must be in the available
state (not attached to an instance).
The volume may remain in the deleting
state for several minutes.
For more information, see Deleting an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->deleteVolume([ 'DryRun' => true || false, 'VolumeId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VolumeId
-
- Required: Yes
- Type: string
The ID of the volume.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a volume
This example deletes an available volume with the volume ID of ``vol-049df61146c4d7901``. If the command succeeds, no output is returned.
$result = $client->deleteVolume([ 'VolumeId' => 'vol-049df61146c4d7901', ]);
Result syntax:
[ ]
DeleteVpc
$result = $client->deleteVpc
([/* ... */]); $promise = $client->deleteVpcAsync
([/* ... */]);
Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.
Parameter Syntax
$result = $client->deleteVpc([ 'DryRun' => true || false, 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To delete a VPC
This example deletes the specified VPC.
$result = $client->deleteVpc([ 'VpcId' => 'vpc-a01106c2', ]);
DeleteVpcEndpoints
$result = $client->deleteVpcEndpoints
([/* ... */]); $promise = $client->deleteVpcEndpointsAsync
([/* ... */]);
Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes the endpoint routes in the route tables that were associated with the endpoint.
Parameter Syntax
$result = $client->deleteVpcEndpoints([ 'DryRun' => true || false, 'VpcEndpointIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcEndpointIds
-
- Required: Yes
- Type: Array of strings
One or more endpoint IDs.
Result Syntax
[ 'Unsuccessful' => [ [ 'Error' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'ResourceId' => '<string>', ], // ... ], ]
Result Details
Members
- Unsuccessful
-
- Type: Array of UnsuccessfulItem structures
Information about the endpoints that were not successfully deleted.
Errors
There are no errors described for this operation.
DeleteVpcPeeringConnection
$result = $client->deleteVpcPeeringConnection
([/* ... */]); $promise = $client->deleteVpcPeeringConnectionAsync
([/* ... */]);
Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the peer VPC can delete the VPC peering connection if it's in the active
state. The owner of the requester VPC can delete a VPC peering connection in the pending-acceptance
state.
Parameter Syntax
$result = $client->deleteVpcPeeringConnection([ 'DryRun' => true || false, 'VpcPeeringConnectionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcPeeringConnectionId
-
- Required: Yes
- Type: string
The ID of the VPC peering connection.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Returns
true
if the request succeeds; otherwise, it returns an error.
Errors
There are no errors described for this operation.
DeleteVpnConnection
$result = $client->deleteVpnConnection
([/* ... */]); $promise = $client->deleteVpnConnectionAsync
([/* ... */]);
Deletes the specified VPN connection.
If you're deleting the VPC and its associated components, we recommend that you detach the virtual private gateway from the VPC and delete the VPC before deleting the VPN connection. If you believe that the tunnel credentials for your VPN connection have been compromised, you can delete the VPN connection and create a new one that has new keys, without needing to delete the VPC or virtual private gateway. If you create a new VPN connection, you must reconfigure the customer gateway using the new configuration information returned with the new VPN connection ID.
Parameter Syntax
$result = $client->deleteVpnConnection([ 'DryRun' => true || false, 'VpnConnectionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpnConnectionId
-
- Required: Yes
- Type: string
The ID of the VPN connection.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
DeleteVpnConnectionRoute
$result = $client->deleteVpnConnectionRoute
([/* ... */]); $promise = $client->deleteVpnConnectionRouteAsync
([/* ... */]);
Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.
Parameter Syntax
$result = $client->deleteVpnConnectionRoute([ 'DestinationCidrBlock' => '<string>', // REQUIRED 'VpnConnectionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DestinationCidrBlock
-
- Required: Yes
- Type: string
The CIDR block associated with the local subnet of the customer network.
- VpnConnectionId
-
- Required: Yes
- Type: string
The ID of the VPN connection.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
DeleteVpnGateway
$result = $client->deleteVpnGateway
([/* ... */]); $promise = $client->deleteVpnGatewayAsync
([/* ... */]);
Deletes the specified virtual private gateway. We recommend that before you delete a virtual private gateway, you detach it from the VPC and delete the VPN connection. Note that you don't need to delete the virtual private gateway if you plan to delete and recreate the VPN connection between your VPC and your network.
Parameter Syntax
$result = $client->deleteVpnGateway([ 'DryRun' => true || false, 'VpnGatewayId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpnGatewayId
-
- Required: Yes
- Type: string
The ID of the virtual private gateway.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
DeregisterImage
$result = $client->deregisterImage
([/* ... */]); $promise = $client->deregisterImageAsync
([/* ... */]);
Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances.
This command does not delete the AMI.
Parameter Syntax
$result = $client->deregisterImage([ 'DryRun' => true || false, 'ImageId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - ImageId
-
- Required: Yes
- Type: string
The ID of the AMI.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
DescribeAccountAttributes
$result = $client->describeAccountAttributes
([/* ... */]); $promise = $client->describeAccountAttributesAsync
([/* ... */]);
Describes attributes of your AWS account. The following are the supported account attributes:
-
supported-platforms
: Indicates whether your account can launch instances into EC2-Classic and EC2-VPC, or only into EC2-VPC. -
default-vpc
: The ID of the default VPC for your account, ornone
. -
max-instances
: The maximum number of On-Demand instances that you can run. -
vpc-max-security-groups-per-interface
: The maximum number of security groups that you can assign to a network interface. -
max-elastic-ips
: The maximum number of Elastic IP addresses that you can allocate for use with EC2-Classic. -
vpc-max-elastic-ips
: The maximum number of Elastic IP addresses that you can allocate for use with EC2-VPC.
Parameter Syntax
$result = $client->describeAccountAttributes([ 'AttributeNames' => ['<string>', ...], 'DryRun' => true || false, ]);
Parameter Details
Members
- AttributeNames
-
- Type: Array of strings
One or more account attribute names.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[ 'AccountAttributes' => [ [ 'AttributeName' => '<string>', 'AttributeValues' => [ [ 'AttributeValue' => '<string>', ], // ... ], ], // ... ], ]
Result Details
Members
- AccountAttributes
-
- Type: Array of AccountAttribute structures
Information about one or more account attributes.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a single attribute for your AWS account
This example describes the supported-platforms attribute for your AWS account.
$result = $client->describeAccountAttributes([ 'AttributeNames' => [ 'supported-platforms', ], ]);
Result syntax:
[ 'AccountAttributes' => [ [ 'AttributeName' => 'supported-platforms', 'AttributeValues' => [ [ 'AttributeValue' => 'EC2', ], [ 'AttributeValue' => 'VPC', ], ], ], ], ]
Example 2: To describe all attributes for your AWS account
This example describes the attributes for your AWS account.
$result = $client->describeAccountAttributes([ ]);
Result syntax:
[ 'AccountAttributes' => [ [ 'AttributeName' => 'supported-platforms', 'AttributeValues' => [ [ 'AttributeValue' => 'EC2', ], [ 'AttributeValue' => 'VPC', ], ], ], [ 'AttributeName' => 'vpc-max-security-groups-per-interface', 'AttributeValues' => [ [ 'AttributeValue' => '5', ], ], ], [ 'AttributeName' => 'max-elastic-ips', 'AttributeValues' => [ [ 'AttributeValue' => '5', ], ], ], [ 'AttributeName' => 'max-instances', 'AttributeValues' => [ [ 'AttributeValue' => '20', ], ], ], [ 'AttributeName' => 'vpc-max-elastic-ips', 'AttributeValues' => [ [ 'AttributeValue' => '5', ], ], ], [ 'AttributeName' => 'default-vpc', 'AttributeValues' => [ [ 'AttributeValue' => 'none', ], ], ], ], ]
DescribeAddresses
$result = $client->describeAddresses
([/* ... */]); $promise = $client->describeAddressesAsync
([/* ... */]);
Describes one or more of your Elastic IP addresses.
An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeAddresses([ 'AllocationIds' => ['<string>', ...], 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'PublicIps' => ['<string>', ...], ]);
Parameter Details
Members
- AllocationIds
-
- Type: Array of strings
[EC2-VPC] One or more allocation IDs.
Default: Describes all your Elastic IP addresses.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters. Filter names and values are case-sensitive.
-
allocation-id
- [EC2-VPC] The allocation ID for the address. -
association-id
- [EC2-VPC] The association ID for the address. -
domain
- Indicates whether the address is for use in EC2-Classic (standard
) or in a VPC (vpc
). -
instance-id
- The ID of the instance the address is associated with, if any. -
network-interface-id
- [EC2-VPC] The ID of the network interface that the address is associated with, if any. -
network-interface-owner-id
- The AWS account ID of the owner. -
private-ip-address
- [EC2-VPC] The private IP address associated with the Elastic IP address. -
public-ip
- The Elastic IP address.
- PublicIps
-
- Type: Array of strings
[EC2-Classic] One or more Elastic IP addresses.
Default: Describes all your Elastic IP addresses.
Result Syntax
[ 'Addresses' => [ [ 'AllocationId' => '<string>', 'AssociationId' => '<string>', 'Domain' => 'vpc|standard', 'InstanceId' => '<string>', 'NetworkInterfaceId' => '<string>', 'NetworkInterfaceOwnerId' => '<string>', 'PrivateIpAddress' => '<string>', 'PublicIp' => '<string>', ], // ... ], ]
Result Details
Members
- Addresses
-
- Type: Array of Address structures
Information about one or more Elastic IP addresses.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe your Elastic IP addresses
This example describes your Elastic IP addresses.
$result = $client->describeAddresses([ ]);
Result syntax:
[ 'Addresses' => [ [ 'Domain' => 'standard', 'InstanceId' => 'i-1234567890abcdef0', 'PublicIp' => '198.51.100.0', ], [ 'AllocationId' => 'eipalloc-12345678', 'AssociationId' => 'eipassoc-12345678', 'Domain' => 'vpc', 'InstanceId' => 'i-1234567890abcdef0', 'NetworkInterfaceId' => 'eni-12345678', 'NetworkInterfaceOwnerId' => '123456789012', 'PrivateIpAddress' => '10.0.1.241', 'PublicIp' => '203.0.113.0', ], ], ]
Example 2: To describe your Elastic IP addresses for EC2-VPC
This example describes your Elastic IP addresses for use with instances in a VPC.
$result = $client->describeAddresses([ 'Filters' => [ [ 'Name' => 'domain', 'Values' => [ 'vpc', ], ], ], ]);
Result syntax:
[ 'Addresses' => [ [ 'AllocationId' => 'eipalloc-12345678', 'AssociationId' => 'eipassoc-12345678', 'Domain' => 'vpc', 'InstanceId' => 'i-1234567890abcdef0', 'NetworkInterfaceId' => 'eni-12345678', 'NetworkInterfaceOwnerId' => '123456789012', 'PrivateIpAddress' => '10.0.1.241', 'PublicIp' => '203.0.113.0', ], ], ]
Example 3: To describe your Elastic IP addresses for EC2-Classic
This example describes your Elastic IP addresses for use with instances in EC2-Classic.
$result = $client->describeAddresses([ 'Filters' => [ [ 'Name' => 'domain', 'Values' => [ 'standard', ], ], ], ]);
Result syntax:
[ 'Addresses' => [ [ 'Domain' => 'standard', 'InstanceId' => 'i-1234567890abcdef0', 'PublicIp' => '198.51.100.0', ], ], ]
DescribeAvailabilityZones
$result = $client->describeAvailabilityZones
([/* ... */]); $promise = $client->describeAvailabilityZonesAsync
([/* ... */]);
Describes one or more of the Availability Zones that are available to you. The results include zones only for the region you're currently using. If there is an event impacting an Availability Zone, you can use this request to view the state and any provided message for that Availability Zone.
For more information, see Regions and Availability Zones in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeAvailabilityZones([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'ZoneNames' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
message
- Information about the Availability Zone. -
region-name
- The name of the region for the Availability Zone (for example,us-east-1
). -
state
- The state of the Availability Zone (available
|information
|impaired
|unavailable
). -
zone-name
- The name of the Availability Zone (for example,us-east-1a
).
- ZoneNames
-
- Type: Array of strings
The names of one or more Availability Zones.
Result Syntax
[ 'AvailabilityZones' => [ [ 'Messages' => [ [ 'Message' => '<string>', ], // ... ], 'RegionName' => '<string>', 'State' => 'available|information|impaired|unavailable', 'ZoneName' => '<string>', ], // ... ], ]
Result Details
Members
- AvailabilityZones
-
- Type: Array of AvailabilityZone structures
Information about one or more Availability Zones.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe your Availability Zones
This example describes the Availability Zones that are available to you. The response includes Availability Zones only for the current region.
$result = $client->describeAvailabilityZones([ ]);
Result syntax:
[ 'AvailabilityZones' => [ [ 'Messages' => [ ], 'RegionName' => 'us-east-1', 'State' => 'available', 'ZoneName' => 'us-east-1b', ], [ 'Messages' => [ ], 'RegionName' => 'us-east-1', 'State' => 'available', 'ZoneName' => 'us-east-1c', ], [ 'Messages' => [ ], 'RegionName' => 'us-east-1', 'State' => 'available', 'ZoneName' => 'us-east-1d', ], [ 'Messages' => [ ], 'RegionName' => 'us-east-1', 'State' => 'available', 'ZoneName' => 'us-east-1e', ], ], ]
DescribeBundleTasks
$result = $client->describeBundleTasks
([/* ... */]); $promise = $client->describeBundleTasksAsync
([/* ... */]);
Describes one or more of your bundling tasks.
Completed bundle tasks are listed for only a limited time. If your bundle task is no longer in the list, you can still register an AMI from it. Just use RegisterImage
with the Amazon S3 bucket name and image manifest name you provided to the bundle task.
Parameter Syntax
$result = $client->describeBundleTasks([ 'BundleIds' => ['<string>', ...], 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], ]);
Parameter Details
Members
- BundleIds
-
- Type: Array of strings
One or more bundle task IDs.
Default: Describes all your bundle tasks.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
bundle-id
- The ID of the bundle task. -
error-code
- If the task failed, the error code returned. -
error-message
- If the task failed, the error message returned. -
instance-id
- The ID of the instance. -
progress
- The level of task completion, as a percentage (for example, 20%). -
s3-bucket
- The Amazon S3 bucket to store the AMI. -
s3-prefix
- The beginning of the AMI name. -
start-time
- The time the task started (for example, 2013-09-15T17:15:20.000Z). -
state
- The state of the task (pending
|waiting-for-shutdown
|bundling
|storing
|cancelling
|complete
|failed
). -
update-time
- The time of the most recent update for the task.
Result Syntax
[ 'BundleTasks' => [ [ 'BundleId' => '<string>', 'BundleTaskError' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'InstanceId' => '<string>', 'Progress' => '<string>', 'StartTime' => <DateTime>, 'State' => 'pending|waiting-for-shutdown|bundling|storing|cancelling|complete|failed', 'Storage' => [ 'S3' => [ 'AWSAccessKeyId' => '<string>', 'Bucket' => '<string>', 'Prefix' => '<string>', 'UploadPolicy' => <string || resource || Psr\Http\Message\StreamInterface>, 'UploadPolicySignature' => '<string>', ], ], 'UpdateTime' => <DateTime>, ], // ... ], ]
Result Details
Members
- BundleTasks
-
- Type: Array of BundleTask structures
Information about one or more bundle tasks.
Errors
There are no errors described for this operation.
DescribeClassicLinkInstances
$result = $client->describeClassicLinkInstances
([/* ... */]); $promise = $client->describeClassicLinkInstancesAsync
([/* ... */]);
Describes one or more of your linked EC2-Classic instances. This request only returns information about EC2-Classic instances linked to a VPC through ClassicLink; you cannot use this request to return information about other instances.
Parameter Syntax
$result = $client->describeClassicLinkInstances([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'InstanceIds' => ['<string>', ...], 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
group-id
- The ID of a VPC security group that's associated with the instance. -
instance-id
- The ID of the instance. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
vpc-id
- The ID of the VPC that the instance is linked to.
- InstanceIds
-
- Type: Array of strings
One or more instance IDs. Must be instances linked to a VPC through ClassicLink.
- MaxResults
-
- Type: int
The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned
NextToken
value. This value can be between 5 and 1000; ifMaxResults
is given a value larger than 1000, only 1000 results are returned. You cannot specify this parameter and the instance IDs parameter in the same request.Constraint: If the value is greater than 1000, we return only 1000 items.
- NextToken
-
- Type: string
The token to retrieve the next page of results.
Result Syntax
[ 'Instances' => [ [ 'Groups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'InstanceId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- Instances
-
- Type: Array of ClassicLinkInstance structures
Information about one or more linked EC2-Classic instances.
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return.
Errors
There are no errors described for this operation.
DescribeConversionTasks
$result = $client->describeConversionTasks
([/* ... */]); $promise = $client->describeConversionTasksAsync
([/* ... */]);
Describes one or more of your conversion tasks. For more information, see the VM Import/Export User Guide.
For information about the import manifest referenced by this API action, see VM Import Manifest.
Parameter Syntax
$result = $client->describeConversionTasks([ 'ConversionTaskIds' => ['<string>', ...], 'DryRun' => true || false, ]);
Parameter Details
Members
- ConversionTaskIds
-
- Type: Array of strings
One or more conversion task IDs.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[ 'ConversionTasks' => [ [ 'ConversionTaskId' => '<string>', 'ExpirationTime' => '<string>', 'ImportInstance' => [ 'Description' => '<string>', 'InstanceId' => '<string>', 'Platform' => 'Windows', 'Volumes' => [ [ 'AvailabilityZone' => '<string>', 'BytesConverted' => <integer>, 'Description' => '<string>', 'Image' => [ 'Checksum' => '<string>', 'Format' => 'VMDK|RAW|VHD', 'ImportManifestUrl' => '<string>', 'Size' => <integer>, ], 'Status' => '<string>', 'StatusMessage' => '<string>', 'Volume' => [ 'Id' => '<string>', 'Size' => <integer>, ], ], // ... ], ], 'ImportVolume' => [ 'AvailabilityZone' => '<string>', 'BytesConverted' => <integer>, 'Description' => '<string>', 'Image' => [ 'Checksum' => '<string>', 'Format' => 'VMDK|RAW|VHD', 'ImportManifestUrl' => '<string>', 'Size' => <integer>, ], 'Volume' => [ 'Id' => '<string>', 'Size' => <integer>, ], ], 'State' => 'active|cancelling|cancelled|completed', 'StatusMessage' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ], // ... ], ]
Result Details
Members
- ConversionTasks
-
- Type: Array of ConversionTask structures
Information about the conversion tasks.
Errors
There are no errors described for this operation.
DescribeCustomerGateways
$result = $client->describeCustomerGateways
([/* ... */]); $promise = $client->describeCustomerGatewaysAsync
([/* ... */]);
Describes one or more of your VPN customer gateways.
For more information about VPN customer gateways, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->describeCustomerGateways([ 'CustomerGatewayIds' => ['<string>', ...], 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], ]);
Parameter Details
Members
- CustomerGatewayIds
-
- Type: Array of strings
One or more customer gateway IDs.
Default: Describes all your customer gateways.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
bgp-asn
- The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). -
customer-gateway-id
- The ID of the customer gateway. -
ip-address
- The IP address of the customer gateway's Internet-routable external interface. -
state
- The state of the customer gateway (pending
|available
|deleting
|deleted
). -
type
- The type of customer gateway. Currently, the only supported type isipsec.1
. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter.
Result Syntax
[ 'CustomerGateways' => [ [ 'BgpAsn' => '<string>', 'CustomerGatewayId' => '<string>', 'IpAddress' => '<string>', 'State' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'Type' => '<string>', ], // ... ], ]
Result Details
Members
- CustomerGateways
-
- Type: Array of CustomerGateway structures
Information about one or more customer gateways.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a customer gateway
This example describes the specified customer gateway.
$result = $client->describeCustomerGateways([ 'CustomerGatewayIds' => [ 'cgw-0e11f167', ], ]);
Result syntax:
[ 'CustomerGateways' => [ [ 'BgpAsn' => '65534', 'CustomerGatewayId' => 'cgw-0e11f167', 'IpAddress' => '12.1.2.3', 'State' => 'available', 'Type' => 'ipsec.1', ], ], ]
DescribeDhcpOptions
$result = $client->describeDhcpOptions
([/* ... */]); $promise = $client->describeDhcpOptionsAsync
([/* ... */]);
Describes one or more of your DHCP options sets.
For more information about DHCP options sets, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->describeDhcpOptions([ 'DhcpOptionsIds' => ['<string>', ...], 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], ]);
Parameter Details
Members
- DhcpOptionsIds
-
- Type: Array of strings
The IDs of one or more DHCP options sets.
Default: Describes all your DHCP options sets.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
dhcp-options-id
- The ID of a set of DHCP options. -
key
- The key for one of the options (for example,domain-name
). -
value
- The value for one of the options. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter.
Result Syntax
[ 'DhcpOptions' => [ [ 'DhcpConfigurations' => [ [ 'Key' => '<string>', 'Values' => [ [ 'Value' => '<string>', ], // ... ], ], // ... ], 'DhcpOptionsId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ], // ... ], ]
Result Details
Members
- DhcpOptions
-
- Type: Array of DhcpOptions structures
Information about one or more DHCP options sets.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a DHCP options set
This example describes the specified DHCP options set.
$result = $client->describeDhcpOptions([ 'DhcpOptionsIds' => [ 'dopt-d9070ebb', ], ]);
Result syntax:
[ 'DhcpOptions' => [ [ 'DhcpConfigurations' => [ [ 'Key' => 'domain-name-servers', 'Values' => [ [ 'Value' => '10.2.5.2', ], [ 'Value' => '10.2.5.1', ], ], ], ], 'DhcpOptionsId' => 'dopt-d9070ebb', ], ], ]
DescribeExportTasks
$result = $client->describeExportTasks
([/* ... */]); $promise = $client->describeExportTasksAsync
([/* ... */]);
Describes one or more of your export tasks.
Parameter Syntax
$result = $client->describeExportTasks([ 'ExportTaskIds' => ['<string>', ...], ]);
Parameter Details
Members
- ExportTaskIds
-
- Type: Array of strings
One or more export task IDs.
Result Syntax
[ 'ExportTasks' => [ [ 'Description' => '<string>', 'ExportTaskId' => '<string>', 'ExportToS3Task' => [ 'ContainerFormat' => 'ova', 'DiskImageFormat' => 'VMDK|RAW|VHD', 'S3Bucket' => '<string>', 'S3Key' => '<string>', ], 'InstanceExportDetails' => [ 'InstanceId' => '<string>', 'TargetEnvironment' => 'citrix|vmware|microsoft', ], 'State' => 'active|cancelling|cancelled|completed', 'StatusMessage' => '<string>', ], // ... ], ]
Result Details
Members
- ExportTasks
-
- Type: Array of ExportTask structures
Information about the export tasks.
Errors
There are no errors described for this operation.
DescribeFlowLogs
$result = $client->describeFlowLogs
([/* ... */]); $promise = $client->describeFlowLogsAsync
([/* ... */]);
Describes one or more flow logs. To view the information in your flow logs (the log streams for the network interfaces), you must use the CloudWatch Logs console or the CloudWatch Logs API.
Parameter Syntax
$result = $client->describeFlowLogs([ 'Filter' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'FlowLogIds' => ['<string>', ...], 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- Filter
-
- Type: Array of Filter structures
One or more filters.
-
deliver-log-status
- The status of the logs delivery (SUCCESS
|FAILED
). -
flow-log-id
- The ID of the flow log. -
log-group-name
- The name of the log group. -
resource-id
- The ID of the VPC, subnet, or network interface. -
traffic-type
- The type of traffic (ACCEPT
|REJECT
|ALL
)
- FlowLogIds
-
- Type: Array of strings
One or more flow log IDs.
- MaxResults
-
- Type: int
The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned
NextToken
value. This value can be between 5 and 1000; ifMaxResults
is given a value larger than 1000, only 1000 results are returned. You cannot specify this parameter and the flow log IDs parameter in the same request. - NextToken
-
- Type: string
The token to retrieve the next page of results.
Result Syntax
[ 'FlowLogs' => [ [ 'CreationTime' => <DateTime>, 'DeliverLogsErrorMessage' => '<string>', 'DeliverLogsPermissionArn' => '<string>', 'DeliverLogsStatus' => '<string>', 'FlowLogId' => '<string>', 'FlowLogStatus' => '<string>', 'LogGroupName' => '<string>', 'ResourceId' => '<string>', 'TrafficType' => 'ACCEPT|REJECT|ALL', ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- FlowLogs
-
- Type: Array of FlowLog structures
Information about the flow logs.
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return.
Errors
There are no errors described for this operation.
DescribeHostReservationOfferings
$result = $client->describeHostReservationOfferings
([/* ... */]); $promise = $client->describeHostReservationOfferingsAsync
([/* ... */]);
Describes the Dedicated Host Reservations that are available to purchase.
The results describe all the Dedicated Host Reservation offerings, including offerings that may not match the instance family and region of your Dedicated Hosts. When purchasing an offering, ensure that the the instance family and region of the offering matches that of the Dedicated Host/s it will be associated with. For an overview of supported instance types, see Dedicated Hosts Overview in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeHostReservationOfferings([ 'Filter' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'MaxDuration' => <integer>, 'MaxResults' => <integer>, 'MinDuration' => <integer>, 'NextToken' => '<string>', 'OfferingId' => '<string>', ]);
Parameter Details
Members
- Filter
-
- Type: Array of Filter structures
One or more filters.
-
instance-family
- The instance family of the offering (e.g.,m4
). -
payment-option
- The payment option (No Upfront
|Partial Upfront
|All Upfront
).
- MaxDuration
-
- Type: int
This is the maximum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 94608000 for three years.
- MaxResults
-
- Type: int
The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned
nextToken
value. This value can be between 5 and 500; ifmaxResults
is given a larger value than 500, you will receive an error. - MinDuration
-
- Type: int
This is the minimum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 31536000 for one year.
- NextToken
-
- Type: string
The token to use to retrieve the next page of results.
- OfferingId
-
- Type: string
The ID of the reservation offering.
Result Syntax
[ 'NextToken' => '<string>', 'OfferingSet' => [ [ 'CurrencyCode' => 'USD', 'Duration' => <integer>, 'HourlyPrice' => '<string>', 'InstanceFamily' => '<string>', 'OfferingId' => '<string>', 'PaymentOption' => 'AllUpfront|PartialUpfront|NoUpfront', 'UpfrontPrice' => '<string>', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return. - OfferingSet
-
- Type: Array of HostOffering structures
Information about the offerings.
Errors
There are no errors described for this operation.
DescribeHostReservations
$result = $client->describeHostReservations
([/* ... */]); $promise = $client->describeHostReservationsAsync
([/* ... */]);
Describes Dedicated Host Reservations which are associated with Dedicated Hosts in your account.
Parameter Syntax
$result = $client->describeHostReservations([ 'Filter' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'HostReservationIdSet' => ['<string>', ...], 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- Filter
-
- Type: Array of Filter structures
One or more filters.
-
instance-family
- The instance family (e.g.,m4
). -
payment-option
- The payment option (No Upfront
|Partial Upfront
|All Upfront
). -
state
- The state of the reservation (payment-pending
|payment-failed
|active
|retired
).
- HostReservationIdSet
-
- Type: Array of strings
One or more host reservation IDs.
- MaxResults
-
- Type: int
The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned
nextToken
value. This value can be between 5 and 500; ifmaxResults
is given a larger value than 500, you will receive an error. - NextToken
-
- Type: string
The token to use to retrieve the next page of results.
Result Syntax
[ 'HostReservationSet' => [ [ 'Count' => <integer>, 'CurrencyCode' => 'USD', 'Duration' => <integer>, 'End' => <DateTime>, 'HostIdSet' => ['<string>', ...], 'HostReservationId' => '<string>', 'HourlyPrice' => '<string>', 'InstanceFamily' => '<string>', 'OfferingId' => '<string>', 'PaymentOption' => 'AllUpfront|PartialUpfront|NoUpfront', 'Start' => <DateTime>, 'State' => 'payment-pending|payment-failed|active|retired', 'UpfrontPrice' => '<string>', ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- HostReservationSet
-
- Type: Array of HostReservation structures
Details about the reservation's configuration.
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return.
Errors
There are no errors described for this operation.
DescribeHosts
$result = $client->describeHosts
([/* ... */]); $promise = $client->describeHostsAsync
([/* ... */]);
Describes one or more of your Dedicated Hosts.
The results describe only the Dedicated Hosts in the region you're currently using. All listed instances consume capacity on your Dedicated Host. Dedicated Hosts that have recently been released will be listed with the state released
.
Parameter Syntax
$result = $client->describeHosts([ 'Filter' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'HostIds' => ['<string>', ...], 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- Filter
-
- Type: Array of Filter structures
One or more filters.
-
instance-type
- The instance type size that the Dedicated Host is configured to support. -
auto-placement
- Whether auto-placement is enabled or disabled (on
|off
). -
host-reservation-id
- The ID of the reservation assigned to this host. -
client-token
- The idempotency token you provided when you launched the instance -
state
- The allocation state of the Dedicated Host (available
|under-assessment
|permanent-failure
|released
|released-permanent-failure
). -
availability-zone
- The Availability Zone of the host.
- HostIds
-
- Type: Array of strings
The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.
- MaxResults
-
- Type: int
The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned
nextToken
value. This value can be between 5 and 500; ifmaxResults
is given a larger value than 500, you will receive an error. You cannot specify this parameter and the host IDs parameter in the same request. - NextToken
-
- Type: string
The token to retrieve the next page of results.
Result Syntax
[ 'Hosts' => [ [ 'AutoPlacement' => 'on|off', 'AvailabilityZone' => '<string>', 'AvailableCapacity' => [ 'AvailableInstanceCapacity' => [ [ 'AvailableCapacity' => <integer>, 'InstanceType' => '<string>', 'TotalCapacity' => <integer>, ], // ... ], 'AvailableVCpus' => <integer>, ], 'ClientToken' => '<string>', 'HostId' => '<string>', 'HostProperties' => [ 'Cores' => <integer>, 'InstanceType' => '<string>', 'Sockets' => <integer>, 'TotalVCpus' => <integer>, ], 'HostReservationId' => '<string>', 'Instances' => [ [ 'InstanceId' => '<string>', 'InstanceType' => '<string>', ], // ... ], 'State' => 'available|under-assessment|permanent-failure|released|released-permanent-failure', ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- Hosts
-
- Type: Array of Host structures
Information about the Dedicated Hosts.
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return.
Errors
There are no errors described for this operation.
DescribeIdFormat
$result = $client->describeIdFormat
([/* ... */]); $promise = $client->describeIdFormatAsync
([/* ... */]);
Describes the ID format settings for your resources on a per-region basis, for example, to view which resource types are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types.
The following resource types support longer IDs: instance
| reservation
| snapshot
| volume
.
These settings apply to the IAM user who makes the request; they do not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user, unless they explicitly override the settings by running the ModifyIdFormat command. Resources created with longer IDs are visible to all IAM users, regardless of these settings and provided that they have permission to use the relevant Describe
command for the resource type.
Parameter Syntax
$result = $client->describeIdFormat([ 'Resource' => '<string>', ]);
Parameter Details
Members
- Resource
-
- Type: string
The type of resource:
instance
|reservation
|snapshot
|volume
Result Syntax
[ 'Statuses' => [ [ 'Deadline' => <DateTime>, 'Resource' => '<string>', 'UseLongIds' => true || false, ], // ... ], ]
Result Details
Members
- Statuses
-
- Type: Array of IdFormat structures
Information about the ID format for the resource.
Errors
There are no errors described for this operation.
DescribeIdentityIdFormat
$result = $client->describeIdentityIdFormat
([/* ... */]); $promise = $client->describeIdentityIdFormatAsync
([/* ... */]);
Describes the ID format settings for resources for the specified IAM user, IAM role, or root user. For example, you can view the resource types that are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types. For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide.
The following resource types support longer IDs: instance
| reservation
| snapshot
| volume
.
These settings apply to the principal specified in the request. They do not apply to the principal that makes the request.
Parameter Syntax
$result = $client->describeIdentityIdFormat([ 'PrincipalArn' => '<string>', // REQUIRED 'Resource' => '<string>', ]);
Parameter Details
Members
- PrincipalArn
-
- Required: Yes
- Type: string
The ARN of the principal, which can be an IAM role, IAM user, or the root user.
- Resource
-
- Type: string
The type of resource:
instance
|reservation
|snapshot
|volume
Result Syntax
[ 'Statuses' => [ [ 'Deadline' => <DateTime>, 'Resource' => '<string>', 'UseLongIds' => true || false, ], // ... ], ]
Result Details
Members
- Statuses
-
- Type: Array of IdFormat structures
Information about the ID format for the resources.
Errors
There are no errors described for this operation.
DescribeImageAttribute
$result = $client->describeImageAttribute
([/* ... */]); $promise = $client->describeImageAttributeAsync
([/* ... */]);
Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.
Parameter Syntax
$result = $client->describeImageAttribute([ 'Attribute' => 'description|kernel|ramdisk|launchPermission|productCodes|blockDeviceMapping|sriovNetSupport', // REQUIRED 'DryRun' => true || false, 'ImageId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Attribute
-
- Required: Yes
- Type: string
The AMI attribute.
Note: Depending on your account privileges, the
blockDeviceMapping
attribute may return aClient.AuthFailure
error. If this happens, use DescribeImages to get information about the block device mapping for the AMI. - DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - ImageId
-
- Required: Yes
- Type: string
The ID of the AMI.
Result Syntax
[ 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'Description' => [ 'Value' => '<string>', ], 'ImageId' => '<string>', 'KernelId' => [ 'Value' => '<string>', ], 'LaunchPermissions' => [ [ 'Group' => 'all', 'UserId' => '<string>', ], // ... ], 'ProductCodes' => [ [ 'ProductCodeId' => '<string>', 'ProductCodeType' => 'devpay|marketplace', ], // ... ], 'RamdiskId' => [ 'Value' => '<string>', ], 'SriovNetSupport' => [ 'Value' => '<string>', ], ]
Result Details
Members
- BlockDeviceMappings
-
- Type: Array of BlockDeviceMapping structures
One or more block device mapping entries.
- Description
-
- Type: AttributeValue structure
A description for the AMI.
- ImageId
-
- Type: string
The ID of the AMI.
- KernelId
-
- Type: AttributeValue structure
The kernel ID.
- LaunchPermissions
-
- Type: Array of LaunchPermission structures
One or more launch permissions.
- ProductCodes
-
- Type: Array of ProductCode structures
One or more product codes.
- RamdiskId
-
- Type: AttributeValue structure
The RAM disk ID.
- SriovNetSupport
-
- Type: AttributeValue structure
Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
Errors
There are no errors described for this operation.
DescribeImages
$result = $client->describeImages
([/* ... */]); $promise = $client->describeImagesAsync
([/* ... */]);
Describes one or more of the images (AMIs, AKIs, and ARIs) available to you. Images available to you include public images, private images that you own, and private images owned by other AWS accounts but for which you have explicit launch permissions.
Deregistered images are included in the returned results for an unspecified interval after deregistration.
Parameter Syntax
$result = $client->describeImages([ 'DryRun' => true || false, 'ExecutableUsers' => ['<string>', ...], 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'ImageIds' => ['<string>', ...], 'Owners' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - ExecutableUsers
-
- Type: Array of strings
Scopes the images by users with explicit launch permissions. Specify an AWS account ID,
self
(the sender of the request), orall
(public AMIs). - Filters
-
- Type: Array of Filter structures
One or more filters.
-
architecture
- The image architecture (i386
|x86_64
). -
block-device-mapping.delete-on-termination
- A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination. -
block-device-mapping.device-name
- The device name for the EBS volume (for example,/dev/sdh
). -
block-device-mapping.snapshot-id
- The ID of the snapshot used for the EBS volume. -
block-device-mapping.volume-size
- The volume size of the EBS volume, in GiB. -
block-device-mapping.volume-type
- The volume type of the EBS volume (gp2
|io1
|st1
|sc1
|standard
). -
description
- The description of the image (provided during image creation). -
hypervisor
- The hypervisor type (ovm
|xen
). -
image-id
- The ID of the image. -
image-type
- The image type (machine
|kernel
|ramdisk
). -
is-public
- A Boolean that indicates whether the image is public. -
kernel-id
- The kernel ID. -
manifest-location
- The location of the image manifest. -
name
- The name of the AMI (provided during image creation). -
owner-alias
- String value from an Amazon-maintained list (amazon
|aws-marketplace
|microsoft
) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. -
owner-id
- The AWS account ID of the image owner. -
platform
- The platform. To only list Windows-based AMIs, usewindows
. -
product-code
- The product code. -
product-code.type
- The type of the product code (devpay
|marketplace
). -
ramdisk-id
- The RAM disk ID. -
root-device-name
- The name of the root device volume (for example,/dev/sda1
). -
root-device-type
- The type of the root device volume (ebs
|instance-store
). -
state
- The state of the image (available
|pending
|failed
). -
state-reason-code
- The reason code for the state change. -
state-reason-message
- The message for the state change. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
virtualization-type
- The virtualization type (paravirtual
|hvm
).
- ImageIds
-
- Type: Array of strings
One or more image IDs.
Default: Describes all images available to you.
- Owners
-
- Type: Array of strings
Filters the images by the owner. Specify an AWS account ID,
self
(owner is the sender of the request), or an AWS owner alias (valid values areamazon
|aws-marketplace
|microsoft
). Omitting this option returns all images for which you have launch permissions, regardless of ownership.
Result Syntax
[ 'Images' => [ [ 'Architecture' => 'i386|x86_64', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'CreationDate' => '<string>', 'Description' => '<string>', 'EnaSupport' => true || false, 'Hypervisor' => 'ovm|xen', 'ImageId' => '<string>', 'ImageLocation' => '<string>', 'ImageOwnerAlias' => '<string>', 'ImageType' => 'machine|kernel|ramdisk', 'KernelId' => '<string>', 'Name' => '<string>', 'OwnerId' => '<string>', 'Platform' => 'Windows', 'ProductCodes' => [ [ 'ProductCodeId' => '<string>', 'ProductCodeType' => 'devpay|marketplace', ], // ... ], 'Public' => true || false, 'RamdiskId' => '<string>', 'RootDeviceName' => '<string>', 'RootDeviceType' => 'ebs|instance-store', 'SriovNetSupport' => '<string>', 'State' => 'pending|available|invalid|deregistered|transient|failed|error', 'StateReason' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VirtualizationType' => 'hvm|paravirtual', ], // ... ], ]
Result Details
Members
- Images
-
- Type: Array of Image structures
Information about one or more images.
Errors
There are no errors described for this operation.
DescribeImportImageTasks
$result = $client->describeImportImageTasks
([/* ... */]); $promise = $client->describeImportImageTasksAsync
([/* ... */]);
Displays details about an import virtual machine or import snapshot tasks that are already created.
Parameter Syntax
$result = $client->describeImportImageTasks([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'ImportTaskIds' => ['<string>', ...], 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
Filter tasks using the
task-state
filter and one of the following values: active, completed, deleting, deleted. - ImportTaskIds
-
- Type: Array of strings
A list of import image task IDs.
- MaxResults
-
- Type: int
The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned
NextToken
value. - NextToken
-
- Type: string
A token that indicates the next page of results.
Result Syntax
[ 'ImportImageTasks' => [ [ 'Architecture' => '<string>', 'Description' => '<string>', 'Hypervisor' => '<string>', 'ImageId' => '<string>', 'ImportTaskId' => '<string>', 'LicenseType' => '<string>', 'Platform' => '<string>', 'Progress' => '<string>', 'SnapshotDetails' => [ [ 'Description' => '<string>', 'DeviceName' => '<string>', 'DiskImageSize' => <float>, 'Format' => '<string>', 'Progress' => '<string>', 'SnapshotId' => '<string>', 'Status' => '<string>', 'StatusMessage' => '<string>', 'Url' => '<string>', 'UserBucket' => [ 'S3Bucket' => '<string>', 'S3Key' => '<string>', ], ], // ... ], 'Status' => '<string>', 'StatusMessage' => '<string>', ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- ImportImageTasks
-
- Type: Array of ImportImageTask structures
A list of zero or more import image tasks that are currently active or were completed or canceled in the previous 7 days.
- NextToken
-
- Type: string
The token to use to get the next page of results. This value is
null
when there are no more results to return.
Errors
There are no errors described for this operation.
DescribeImportSnapshotTasks
$result = $client->describeImportSnapshotTasks
([/* ... */]); $promise = $client->describeImportSnapshotTasksAsync
([/* ... */]);
Describes your import snapshot tasks.
Parameter Syntax
$result = $client->describeImportSnapshotTasks([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'ImportTaskIds' => ['<string>', ...], 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
- ImportTaskIds
-
- Type: Array of strings
A list of import snapshot task IDs.
- MaxResults
-
- Type: int
The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned
NextToken
value. - NextToken
-
- Type: string
A token that indicates the next page of results.
Result Syntax
[ 'ImportSnapshotTasks' => [ [ 'Description' => '<string>', 'ImportTaskId' => '<string>', 'SnapshotTaskDetail' => [ 'Description' => '<string>', 'DiskImageSize' => <float>, 'Format' => '<string>', 'Progress' => '<string>', 'SnapshotId' => '<string>', 'Status' => '<string>', 'StatusMessage' => '<string>', 'Url' => '<string>', 'UserBucket' => [ 'S3Bucket' => '<string>', 'S3Key' => '<string>', ], ], ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- ImportSnapshotTasks
-
- Type: Array of ImportSnapshotTask structures
A list of zero or more import snapshot tasks that are currently active or were completed or canceled in the previous 7 days.
- NextToken
-
- Type: string
The token to use to get the next page of results. This value is
null
when there are no more results to return.
Errors
There are no errors described for this operation.
DescribeInstanceAttribute
$result = $client->describeInstanceAttribute
([/* ... */]); $promise = $client->describeInstanceAttributeAsync
([/* ... */]);
Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Valid attribute values are: instanceType
| kernel
| ramdisk
| userData
| disableApiTermination
| instanceInitiatedShutdownBehavior
| rootDeviceName
| blockDeviceMapping
| productCodes
| sourceDestCheck
| groupSet
| ebsOptimized
| sriovNetSupport
Parameter Syntax
$result = $client->describeInstanceAttribute([ 'Attribute' => 'instanceType|kernel|ramdisk|userData|disableApiTermination|instanceInitiatedShutdownBehavior|rootDeviceName|blockDeviceMapping|productCodes|sourceDestCheck|groupSet|ebsOptimized|sriovNetSupport|enaSupport', // REQUIRED 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Attribute
-
- Required: Yes
- Type: string
The instance attribute.
Note: The
enaSupport
attribute is not supported at this time. - DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the instance.
Result Syntax
[ 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'AttachTime' => <DateTime>, 'DeleteOnTermination' => true || false, 'Status' => 'attaching|attached|detaching|detached', 'VolumeId' => '<string>', ], ], // ... ], 'DisableApiTermination' => [ 'Value' => true || false, ], 'EbsOptimized' => [ 'Value' => true || false, ], 'EnaSupport' => [ 'Value' => true || false, ], 'Groups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'InstanceId' => '<string>', 'InstanceInitiatedShutdownBehavior' => [ 'Value' => '<string>', ], 'InstanceType' => [ 'Value' => '<string>', ], 'KernelId' => [ 'Value' => '<string>', ], 'ProductCodes' => [ [ 'ProductCodeId' => '<string>', 'ProductCodeType' => 'devpay|marketplace', ], // ... ], 'RamdiskId' => [ 'Value' => '<string>', ], 'RootDeviceName' => [ 'Value' => '<string>', ], 'SourceDestCheck' => [ 'Value' => true || false, ], 'SriovNetSupport' => [ 'Value' => '<string>', ], 'UserData' => [ 'Value' => '<string>', ], ]
Result Details
Members
- BlockDeviceMappings
-
- Type: Array of InstanceBlockDeviceMapping structures
The block device mapping of the instance.
- DisableApiTermination
-
- Type: AttributeBooleanValue structure
If the value is
true
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can. - EbsOptimized
-
- Type: AttributeBooleanValue structure
Indicates whether the instance is optimized for EBS I/O.
- EnaSupport
-
- Type: AttributeBooleanValue structure
Indicates whether enhanced networking with ENA is enabled.
- Groups
-
- Type: Array of GroupIdentifier structures
The security groups associated with the instance.
- InstanceId
-
- Type: string
The ID of the instance.
- InstanceInitiatedShutdownBehavior
-
- Type: AttributeValue structure
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
- InstanceType
-
- Type: AttributeValue structure
The instance type.
- KernelId
-
- Type: AttributeValue structure
The kernel ID.
- ProductCodes
-
- Type: Array of ProductCode structures
A list of product codes.
- RamdiskId
-
- Type: AttributeValue structure
The RAM disk ID.
- RootDeviceName
-
- Type: AttributeValue structure
The name of the root device (for example,
/dev/sda1
or/dev/xvda
). - SourceDestCheck
-
- Type: AttributeBooleanValue structure
Indicates whether source/destination checking is enabled. A value of
true
means checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT. - SriovNetSupport
-
- Type: AttributeValue structure
Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
- UserData
-
- Type: AttributeValue structure
The user data.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe the instance type
This example describes the instance type of the specified instance.
$result = $client->describeInstanceAttribute([ 'Attribute' => 'instanceType', 'InstanceId' => 'i-1234567890abcdef0', ]);
Result syntax:
[ 'InstanceId' => 'i-1234567890abcdef0', 'InstanceType' => [ 'Value' => 't1.micro', ], ]
Example 2: To describe the disableApiTermination attribute
This example describes the ``disableApiTermination`` attribute of the specified instance.
$result = $client->describeInstanceAttribute([ 'Attribute' => 'disableApiTermination', 'InstanceId' => 'i-1234567890abcdef0', ]);
Result syntax:
[ 'DisableApiTermination' => [ 'Value' => false, ], 'InstanceId' => 'i-1234567890abcdef0', ]
Example 3: To describe the block device mapping for an instance
This example describes the ``blockDeviceMapping`` attribute of the specified instance.
$result = $client->describeInstanceAttribute([ 'Attribute' => 'blockDeviceMapping', 'InstanceId' => 'i-1234567890abcdef0', ]);
Result syntax:
[ 'BlockDeviceMappings' => [ [ 'DeviceName' => '/dev/sda1', 'Ebs' => [ 'AttachTime' =>, 'DeleteOnTermination' => 1, 'Status' => 'attached', 'VolumeId' => 'vol-049df61146c4d7901', ], ], [ 'DeviceName' => '/dev/sdf', 'Ebs' => [ 'AttachTime' => , 'DeleteOnTermination' => , 'Status' => 'attached', 'VolumeId' => 'vol-049df61146c4d7901', ], ], ], 'InstanceId' => 'i-1234567890abcdef0', ]
DescribeInstanceStatus
$result = $client->describeInstanceStatus
([/* ... */]); $promise = $client->describeInstanceStatusAsync
([/* ... */]);
Describes the status of one or more instances. By default, only running instances are described, unless specified otherwise.
Instance status includes the following components:
-
Status checks - Amazon EC2 performs status checks on running EC2 instances to identify hardware and software issues. For more information, see Status Checks for Your Instances and Troubleshooting Instances with Failed Status Checks in the Amazon Elastic Compute Cloud User Guide.
-
Scheduled events - Amazon EC2 can schedule events (such as reboot, stop, or terminate) for your instances related to hardware issues, software updates, or system maintenance. For more information, see Scheduled Events for Your Instances in the Amazon Elastic Compute Cloud User Guide.
-
Instance state - You can manage your instances from the moment you launch them through their termination. For more information, see Instance Lifecycle in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeInstanceStatus([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'IncludeAllInstances' => true || false, 'InstanceIds' => ['<string>', ...], 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
availability-zone
- The Availability Zone of the instance. -
event.code
- The code for the scheduled event (instance-reboot
|system-reboot
|system-maintenance
|instance-retirement
|instance-stop
). -
event.description
- A description of the event. -
event.not-after
- The latest end time for the scheduled event (for example,2014-09-15T17:15:20.000Z
). -
event.not-before
- The earliest start time for the scheduled event (for example,2014-09-15T17:15:20.000Z
). -
instance-state-code
- The code for the instance state, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). -
instance-state-name
- The state of the instance (pending
|running
|shutting-down
|terminated
|stopping
|stopped
). -
instance-status.reachability
- Filters on instance status where the name isreachability
(passed
|failed
|initializing
|insufficient-data
). -
instance-status.status
- The status of the instance (ok
|impaired
|initializing
|insufficient-data
|not-applicable
). -
system-status.reachability
- Filters on system status where the name isreachability
(passed
|failed
|initializing
|insufficient-data
). -
system-status.status
- The system status of the instance (ok
|impaired
|initializing
|insufficient-data
|not-applicable
).
- IncludeAllInstances
-
- Type: boolean
When
true
, includes the health status for all instances. Whenfalse
, includes the health status for running instances only.Default:
false
- InstanceIds
-
- Type: Array of strings
One or more instance IDs.
Default: Describes all your instances.
Constraints: Maximum 100 explicitly specified instance IDs.
- MaxResults
-
- Type: int
The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned
NextToken
value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call. - NextToken
-
- Type: string
The token to retrieve the next page of results.
Result Syntax
[ 'InstanceStatuses' => [ [ 'AvailabilityZone' => '<string>', 'Events' => [ [ 'Code' => 'instance-reboot|system-reboot|system-maintenance|instance-retirement|instance-stop', 'Description' => '<string>', 'NotAfter' => <DateTime>, 'NotBefore' => <DateTime>, ], // ... ], 'InstanceId' => '<string>', 'InstanceState' => [ 'Code' => <integer>, 'Name' => 'pending|running|shutting-down|terminated|stopping|stopped', ], 'InstanceStatus' => [ 'Details' => [ [ 'ImpairedSince' => <DateTime>, 'Name' => 'reachability', 'Status' => 'passed|failed|insufficient-data|initializing', ], // ... ], 'Status' => 'ok|impaired|insufficient-data|not-applicable|initializing', ], 'SystemStatus' => [ 'Details' => [ [ 'ImpairedSince' => <DateTime>, 'Name' => 'reachability', 'Status' => 'passed|failed|insufficient-data|initializing', ], // ... ], 'Status' => 'ok|impaired|insufficient-data|not-applicable|initializing', ], ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- InstanceStatuses
-
- Type: Array of InstanceStatus structures
One or more instance status descriptions.
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return.
Errors
There are no errors described for this operation.
DescribeInstances
$result = $client->describeInstances
([/* ... */]); $promise = $client->describeInstancesAsync
([/* ... */]);
Describes one or more of your instances.
If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you specify an instance ID that is not valid, an error is returned. If you specify an instance that you do not own, it is not included in the returned results.
Recently terminated instances might appear in the returned results. This interval is usually less than one hour.
If you describe instances in the rare case where an Availability Zone is experiencing a service disruption and you specify instance IDs that are in the affected zone, or do not specify any instance IDs at all, the call fails. If you describe instances and specify only instance IDs that are in an unaffected zone, the call works normally.
Parameter Syntax
$result = $client->describeInstances([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'InstanceIds' => ['<string>', ...], 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
affinity
- The affinity setting for an instance running on a Dedicated Host (default
|host
). -
architecture
- The instance architecture (i386
|x86_64
). -
availability-zone
- The Availability Zone of the instance. -
block-device-mapping.attach-time
- The attach time for an EBS volume mapped to the instance, for example,2010-09-15T17:15:20.000Z
. -
block-device-mapping.delete-on-termination
- A Boolean that indicates whether the EBS volume is deleted on instance termination. -
block-device-mapping.device-name
- The device name for the EBS volume (for example,/dev/sdh
orxvdh
). -
block-device-mapping.status
- The status for the EBS volume (attaching
|attached
|detaching
|detached
). -
block-device-mapping.volume-id
- The volume ID of the EBS volume. -
client-token
- The idempotency token you provided when you launched the instance. -
dns-name
- The public DNS name of the instance. -
group-id
- The ID of the security group for the instance. EC2-Classic only. -
group-name
- The name of the security group for the instance. EC2-Classic only. -
host-id
- The ID of the Dedicated Host on which the instance is running, if applicable. -
hypervisor
- The hypervisor type of the instance (ovm
|xen
). -
iam-instance-profile.arn
- The instance profile associated with the instance. Specified as an ARN. -
image-id
- The ID of the image used to launch the instance. -
instance-id
- The ID of the instance. -
instance-lifecycle
- Indicates whether this is a Spot Instance or a Scheduled Instance (spot
|scheduled
). -
instance-state-code
- The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped). -
instance-state-name
- The state of the instance (pending
|running
|shutting-down
|terminated
|stopping
|stopped
). -
instance-type
- The type of instance (for example,t2.micro
). -
instance.group-id
- The ID of the security group for the instance. -
instance.group-name
- The name of the security group for the instance. -
ip-address
- The public IP address of the instance. -
kernel-id
- The kernel ID. -
key-name
- The name of the key pair used when the instance was launched. -
launch-index
- When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on). -
launch-time
- The time when the instance was launched. -
monitoring-state
- Indicates whether monitoring is enabled for the instance (disabled
|enabled
). -
owner-id
- The AWS account ID of the instance owner. -
placement-group-name
- The name of the placement group for the instance. -
platform
- The platform. Usewindows
if you have Windows instances; otherwise, leave blank. -
private-dns-name
- The private DNS name of the instance. -
private-ip-address
- The private IP address of the instance. -
product-code
- The product code associated with the AMI used to launch the instance. -
product-code.type
- The type of product code (devpay
|marketplace
). -
ramdisk-id
- The RAM disk ID. -
reason
- The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter. -
requester-id
- The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). -
reservation-id
- The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID. -
root-device-name
- The name of the root device for the instance (for example,/dev/sda1
or/dev/xvda
). -
root-device-type
- The type of root device that the instance uses (ebs
|instance-store
). -
source-dest-check
- Indicates whether the instance performs source/destination checking. A value oftrue
means that checking is enabled, andfalse
means checking is disabled. The value must befalse
for the instance to perform network address translation (NAT) in your VPC. -
spot-instance-request-id
- The ID of the Spot instance request. -
state-reason-code
- The reason code for the state change. -
state-reason-message
- A message that describes the state change. -
subnet-id
- The ID of the subnet for the instance. -
tag
:key=value - The key/value combination of a tag assigned to the resource, wheretag
:key is the tag's key. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
tenancy
- The tenancy of an instance (dedicated
|default
|host
). -
virtualization-type
- The virtualization type of the instance (paravirtual
|hvm
). -
vpc-id
- The ID of the VPC that the instance is running in. -
network-interface.description
- The description of the network interface. -
network-interface.subnet-id
- The ID of the subnet for the network interface. -
network-interface.vpc-id
- The ID of the VPC for the network interface. -
network-interface.network-interface-id
- The ID of the network interface. -
network-interface.owner-id
- The ID of the owner of the network interface. -
network-interface.availability-zone
- The Availability Zone for the network interface. -
network-interface.requester-id
- The requester ID for the network interface. -
network-interface.requester-managed
- Indicates whether the network interface is being managed by AWS. -
network-interface.status
- The status of the network interface (available
) |in-use
). -
network-interface.mac-address
- The MAC address of the network interface. -
network-interface.private-dns-name
- The private DNS name of the network interface. -
network-interface.source-dest-check
- Whether the network interface performs source/destination checking. A value oftrue
means checking is enabled, andfalse
means checking is disabled. The value must befalse
for the network interface to perform network address translation (NAT) in your VPC. -
network-interface.group-id
- The ID of a security group associated with the network interface. -
network-interface.group-name
- The name of a security group associated with the network interface. -
network-interface.attachment.attachment-id
- The ID of the interface attachment. -
network-interface.attachment.instance-id
- The ID of the instance to which the network interface is attached. -
network-interface.attachment.instance-owner-id
- The owner ID of the instance to which the network interface is attached. -
network-interface.addresses.private-ip-address
- The private IP address associated with the network interface. -
network-interface.attachment.device-index
- The device index to which the network interface is attached. -
network-interface.attachment.status
- The status of the attachment (attaching
|attached
|detaching
|detached
). -
network-interface.attachment.attach-time
- The time that the network interface was attached to an instance. -
network-interface.attachment.delete-on-termination
- Specifies whether the attachment is deleted when an instance is terminated. -
network-interface.addresses.primary
- Specifies whether the IP address of the network interface is the primary private IP address. -
network-interface.addresses.association.public-ip
- The ID of the association of an Elastic IP address with a network interface. -
network-interface.addresses.association.ip-owner-id
- The owner ID of the private IP address associated with the network interface. -
association.public-ip
- The address of the Elastic IP address bound to the network interface. -
association.ip-owner-id
- The owner of the Elastic IP address associated with the network interface. -
association.allocation-id
- The allocation ID returned when you allocated the Elastic IP address for your network interface. -
association.association-id
- The association ID returned when the network interface was associated with an IP address.
- InstanceIds
-
- Type: Array of strings
One or more instance IDs.
Default: Describes all your instances.
- MaxResults
-
- Type: int
The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned
NextToken
value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call. - NextToken
-
- Type: string
The token to request the next page of results.
Result Syntax
[ 'NextToken' => '<string>', 'Reservations' => [ [ 'Groups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'Instances' => [ [ 'AmiLaunchIndex' => <integer>, 'Architecture' => 'i386|x86_64', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'AttachTime' => <DateTime>, 'DeleteOnTermination' => true || false, 'Status' => 'attaching|attached|detaching|detached', 'VolumeId' => '<string>', ], ], // ... ], 'ClientToken' => '<string>', 'EbsOptimized' => true || false, 'EnaSupport' => true || false, 'Hypervisor' => 'ovm|xen', 'IamInstanceProfile' => [ 'Arn' => '<string>', 'Id' => '<string>', ], 'ImageId' => '<string>', 'InstanceId' => '<string>', 'InstanceLifecycle' => 'spot|scheduled', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'KernelId' => '<string>', 'KeyName' => '<string>', 'LaunchTime' => <DateTime>, 'Monitoring' => [ 'State' => 'disabled|disabling|enabled|pending', ], 'NetworkInterfaces' => [ [ 'Association' => [ 'IpOwnerId' => '<string>', 'PublicDnsName' => '<string>', 'PublicIp' => '<string>', ], 'Attachment' => [ 'AttachTime' => <DateTime>, 'AttachmentId' => '<string>', 'DeleteOnTermination' => true || false, 'DeviceIndex' => <integer>, 'Status' => 'attaching|attached|detaching|detached', ], 'Description' => '<string>', 'Groups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'MacAddress' => '<string>', 'NetworkInterfaceId' => '<string>', 'OwnerId' => '<string>', 'PrivateDnsName' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Association' => [ 'IpOwnerId' => '<string>', 'PublicDnsName' => '<string>', 'PublicIp' => '<string>', ], 'Primary' => true || false, 'PrivateDnsName' => '<string>', 'PrivateIpAddress' => '<string>', ], // ... ], 'SourceDestCheck' => true || false, 'Status' => 'available|attaching|in-use|detaching', 'SubnetId' => '<string>', 'VpcId' => '<string>', ], // ... ], 'Placement' => [ 'Affinity' => '<string>', 'AvailabilityZone' => '<string>', 'GroupName' => '<string>', 'HostId' => '<string>', 'Tenancy' => 'default|dedicated|host', ], 'Platform' => 'Windows', 'PrivateDnsName' => '<string>', 'PrivateIpAddress' => '<string>', 'ProductCodes' => [ [ 'ProductCodeId' => '<string>', 'ProductCodeType' => 'devpay|marketplace', ], // ... ], 'PublicDnsName' => '<string>', 'PublicIpAddress' => '<string>', 'RamdiskId' => '<string>', 'RootDeviceName' => '<string>', 'RootDeviceType' => 'ebs|instance-store', 'SecurityGroups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'SourceDestCheck' => true || false, 'SpotInstanceRequestId' => '<string>', 'SriovNetSupport' => '<string>', 'State' => [ 'Code' => <integer>, 'Name' => 'pending|running|shutting-down|terminated|stopping|stopped', ], 'StateReason' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'StateTransitionReason' => '<string>', 'SubnetId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VirtualizationType' => 'hvm|paravirtual', 'VpcId' => '<string>', ], // ... ], 'OwnerId' => '<string>', 'RequesterId' => '<string>', 'ReservationId' => '<string>', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return. - Reservations
-
- Type: Array of Reservation structures
Zero or more reservations.
Errors
There are no errors described for this operation.
DescribeInternetGateways
$result = $client->describeInternetGateways
([/* ... */]); $promise = $client->describeInternetGatewaysAsync
([/* ... */]);
Describes one or more of your Internet gateways.
Parameter Syntax
$result = $client->describeInternetGateways([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'InternetGatewayIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
attachment.state
- The current state of the attachment between the gateway and the VPC (available
). Present only if a VPC is attached. -
attachment.vpc-id
- The ID of an attached VPC. -
internet-gateway-id
- The ID of the Internet gateway. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter.
- InternetGatewayIds
-
- Type: Array of strings
One or more Internet gateway IDs.
Default: Describes all your Internet gateways.
Result Syntax
[ 'InternetGateways' => [ [ 'Attachments' => [ [ 'State' => 'attaching|attached|detaching|detached', 'VpcId' => '<string>', ], // ... ], 'InternetGatewayId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ], // ... ], ]
Result Details
Members
- InternetGateways
-
- Type: Array of InternetGateway structures
Information about one or more Internet gateways.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe the Internet gateway for a VPC
This example describes the Internet gateway for the specified VPC.
$result = $client->describeInternetGateways([ 'Filters' => [ [ 'Name' => 'attachment.vpc-id', 'Values' => [ 'vpc-a01106c2', ], ], ], ]);
Result syntax:
[ 'InternetGateways' => [ [ 'Attachments' => [ [ 'State' => 'available', 'VpcId' => 'vpc-a01106c2', ], ], 'InternetGatewayId' => 'igw-c0a643a9', 'Tags' => [ ], ], ], ]
DescribeKeyPairs
$result = $client->describeKeyPairs
([/* ... */]); $promise = $client->describeKeyPairsAsync
([/* ... */]);
Describes one or more of your key pairs.
For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeKeyPairs([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'KeyNames' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
fingerprint
- The fingerprint of the key pair. -
key-name
- The name of the key pair.
- KeyNames
-
- Type: Array of strings
One or more key pair names.
Default: Describes all your key pairs.
Result Syntax
[ 'KeyPairs' => [ [ 'KeyFingerprint' => '<string>', 'KeyName' => '<string>', ], // ... ], ]
Result Details
Members
- KeyPairs
-
- Type: Array of KeyPairInfo structures
Information about one or more key pairs.
Errors
There are no errors described for this operation.
Examples
Example 1: To display a key pair
This example displays the fingerprint for the specified key.
$result = $client->describeKeyPairs([ 'KeyNames' => [ 'my-key-pair', ], ]);
Result syntax:
[ 'KeyPairs' => [ [ 'KeyFingerprint' => '1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f', 'KeyName' => 'my-key-pair', ], ], ]
DescribeMovingAddresses
$result = $client->describeMovingAddresses
([/* ... */]); $promise = $client->describeMovingAddressesAsync
([/* ... */]);
Describes your Elastic IP addresses that are being moved to the EC2-VPC platform, or that are being restored to the EC2-Classic platform. This request does not return information about any other Elastic IP addresses in your account.
Parameter Syntax
$result = $client->describeMovingAddresses([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'MaxResults' => <integer>, 'NextToken' => '<string>', 'PublicIps' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
moving-status
- The status of the Elastic IP address (MovingToVpc
|RestoringToClassic
).
- MaxResults
-
- Type: int
The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned
NextToken
value. This value can be between 5 and 1000; ifMaxResults
is given a value outside of this range, an error is returned.Default: If no value is provided, the default is 1000.
- NextToken
-
- Type: string
The token to use to retrieve the next page of results.
- PublicIps
-
- Type: Array of strings
One or more Elastic IP addresses.
Result Syntax
[ 'MovingAddressStatuses' => [ [ 'MoveStatus' => 'movingToVpc|restoringToClassic', 'PublicIp' => '<string>', ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- MovingAddressStatuses
-
- Type: Array of MovingAddressStatus structures
The status for each Elastic IP address.
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe your moving addresses
This example describes all of your moving Elastic IP addresses.
$result = $client->describeMovingAddresses([ ]);
Result syntax:
[ 'MovingAddressStatuses' => [ [ 'MoveStatus' => 'MovingToVpc', 'PublicIp' => '198.51.100.0', ], ], ]
DescribeNatGateways
$result = $client->describeNatGateways
([/* ... */]); $promise = $client->describeNatGatewaysAsync
([/* ... */]);
Describes one or more of the your NAT gateways.
Parameter Syntax
$result = $client->describeNatGateways([ 'Filter' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'MaxResults' => <integer>, 'NatGatewayIds' => ['<string>', ...], 'NextToken' => '<string>', ]);
Parameter Details
Members
- Filter
-
- Type: Array of Filter structures
One or more filters.
-
nat-gateway-id
- The ID of the NAT gateway. -
state
- The state of the NAT gateway (pending
|failed
|available
|deleting
|deleted
). -
subnet-id
- The ID of the subnet in which the NAT gateway resides. -
vpc-id
- The ID of the VPC in which the NAT gateway resides.
- MaxResults
-
- Type: int
The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.
Constraint: If the value specified is greater than 1000, we return only 1000 items.
- NatGatewayIds
-
- Type: Array of strings
One or more NAT gateway IDs.
- NextToken
-
- Type: string
The token to retrieve the next page of results.
Result Syntax
[ 'NatGateways' => [ [ 'CreateTime' => <DateTime>, 'DeleteTime' => <DateTime>, 'FailureCode' => '<string>', 'FailureMessage' => '<string>', 'NatGatewayAddresses' => [ [ 'AllocationId' => '<string>', 'NetworkInterfaceId' => '<string>', 'PrivateIp' => '<string>', 'PublicIp' => '<string>', ], // ... ], 'NatGatewayId' => '<string>', 'ProvisionedBandwidth' => [ 'ProvisionTime' => <DateTime>, 'Provisioned' => '<string>', 'RequestTime' => <DateTime>, 'Requested' => '<string>', 'Status' => '<string>', ], 'State' => 'pending|failed|available|deleting|deleted', 'SubnetId' => '<string>', 'VpcId' => '<string>', ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- NatGateways
-
- Type: Array of NatGateway structures
Information about the NAT gateways.
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a NAT gateway
This example describes the NAT gateway for the specified VPC.
$result = $client->describeNatGateways([ 'Filter' => [ [ 'Name' => 'vpc-id', 'Values' => [ 'vpc-1a2b3c4d', ], ], ], ]);
Result syntax:
[ 'NatGateways' => [ [ 'CreateTime' =>, 'NatGatewayAddresses' => [ [ 'AllocationId' => 'eipalloc-89c620ec', 'NetworkInterfaceId' => 'eni-9dec76cd', 'PrivateIp' => '10.0.0.149', 'PublicIp' => '198.11.222.333', ], ], 'NatGatewayId' => 'nat-05dba92075d71c408', 'State' => 'available', 'SubnetId' => 'subnet-847e4dc2', 'VpcId' => 'vpc-1a2b3c4d', ], ], ]
DescribeNetworkAcls
$result = $client->describeNetworkAcls
([/* ... */]); $promise = $client->describeNetworkAclsAsync
([/* ... */]);
Describes one or more of your network ACLs.
For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->describeNetworkAcls([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'NetworkAclIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
association.association-id
- The ID of an association ID for the ACL. -
association.network-acl-id
- The ID of the network ACL involved in the association. -
association.subnet-id
- The ID of the subnet involved in the association. -
default
- Indicates whether the ACL is the default network ACL for the VPC. -
entry.cidr
- The CIDR range specified in the entry. -
entry.egress
- Indicates whether the entry applies to egress traffic. -
entry.icmp.code
- The ICMP code specified in the entry, if any. -
entry.icmp.type
- The ICMP type specified in the entry, if any. -
entry.port-range.from
- The start of the port range specified in the entry. -
entry.port-range.to
- The end of the port range specified in the entry. -
entry.protocol
- The protocol specified in the entry (tcp
|udp
|icmp
or a protocol number). -
entry.rule-action
- Allows or denies the matching traffic (allow
|deny
). -
entry.rule-number
- The number of an entry (in other words, rule) in the ACL's set of entries. -
network-acl-id
- The ID of the network ACL. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
vpc-id
- The ID of the VPC for the network ACL.
- NetworkAclIds
-
- Type: Array of strings
One or more network ACL IDs.
Default: Describes all your network ACLs.
Result Syntax
[ 'NetworkAcls' => [ [ 'Associations' => [ [ 'NetworkAclAssociationId' => '<string>', 'NetworkAclId' => '<string>', 'SubnetId' => '<string>', ], // ... ], 'Entries' => [ [ 'CidrBlock' => '<string>', 'Egress' => true || false, 'IcmpTypeCode' => [ 'Code' => <integer>, 'Type' => <integer>, ], 'PortRange' => [ 'From' => <integer>, 'To' => <integer>, ], 'Protocol' => '<string>', 'RuleAction' => 'allow|deny', 'RuleNumber' => <integer>, ], // ... ], 'IsDefault' => true || false, 'NetworkAclId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], // ... ], ]
Result Details
Members
- NetworkAcls
-
- Type: Array of NetworkAcl structures
Information about one or more network ACLs.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a network ACL
This example describes the specified network ACL.
$result = $client->describeNetworkAcls([ 'NetworkAclIds' => [ 'acl-5fb85d36', ], ]);
Result syntax:
[ 'NetworkAcls' => [ [ 'Associations' => [ [ 'NetworkAclAssociationId' => 'aclassoc-66ea5f0b', 'NetworkAclId' => 'acl-9aeb5ef7', 'SubnetId' => 'subnet-65ea5f08', ], ], 'Entries' => [ [ 'CidrBlock' => '0.0.0.0/0', 'Egress' => 1, 'Protocol' => '-1', 'RuleAction' => 'deny', 'RuleNumber' => 32767, ], [ 'CidrBlock' => '0.0.0.0/0', 'Egress' => , 'Protocol' => '-1', 'RuleAction' => 'deny', 'RuleNumber' => 32767, ], ], 'IsDefault' => , 'NetworkAclId' => 'acl-5fb85d36', 'Tags' => [ ], 'VpcId' => 'vpc-a01106c2', ], ], ]
DescribeNetworkInterfaceAttribute
$result = $client->describeNetworkInterfaceAttribute
([/* ... */]); $promise = $client->describeNetworkInterfaceAttributeAsync
([/* ... */]);
Describes a network interface attribute. You can specify only one attribute at a time.
Parameter Syntax
$result = $client->describeNetworkInterfaceAttribute([ 'Attribute' => 'description|groupSet|sourceDestCheck|attachment', 'DryRun' => true || false, 'NetworkInterfaceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Attribute
-
- Type: string
The attribute of the network interface.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - NetworkInterfaceId
-
- Required: Yes
- Type: string
The ID of the network interface.
Result Syntax
[ 'Attachment' => [ 'AttachTime' => <DateTime>, 'AttachmentId' => '<string>', 'DeleteOnTermination' => true || false, 'DeviceIndex' => <integer>, 'InstanceId' => '<string>', 'InstanceOwnerId' => '<string>', 'Status' => 'attaching|attached|detaching|detached', ], 'Description' => [ 'Value' => '<string>', ], 'Groups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'NetworkInterfaceId' => '<string>', 'SourceDestCheck' => [ 'Value' => true || false, ], ]
Result Details
Members
- Attachment
-
- Type: NetworkInterfaceAttachment structure
The attachment (if any) of the network interface.
- Description
-
- Type: AttributeValue structure
The description of the network interface.
- Groups
-
- Type: Array of GroupIdentifier structures
The security groups associated with the network interface.
- NetworkInterfaceId
-
- Type: string
The ID of the network interface.
- SourceDestCheck
-
- Type: AttributeBooleanValue structure
Indicates whether source/destination checking is enabled.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe the attachment attribute of a network interface
This example describes the attachment attribute of the specified network interface.
$result = $client->describeNetworkInterfaceAttribute([ 'Attribute' => 'attachment', 'NetworkInterfaceId' => 'eni-686ea200', ]);
Result syntax:
[ 'Attachment' => [ 'AttachTime' =>, 'AttachmentId' => 'eni-attach-43348162', 'DeleteOnTermination' => 1, 'DeviceIndex' => 0, 'InstanceId' => 'i-1234567890abcdef0', 'InstanceOwnerId' => '123456789012', 'Status' => 'attached', ], 'NetworkInterfaceId' => 'eni-686ea200', ]
Example 2: To describe the description attribute of a network interface
This example describes the description attribute of the specified network interface.
$result = $client->describeNetworkInterfaceAttribute([ 'Attribute' => 'description', 'NetworkInterfaceId' => 'eni-686ea200', ]);
Result syntax:
[ 'Description' => [ 'Value' => 'My description', ], 'NetworkInterfaceId' => 'eni-686ea200', ]
Example 3: To describe the groupSet attribute of a network interface
This example describes the groupSet attribute of the specified network interface.
$result = $client->describeNetworkInterfaceAttribute([ 'Attribute' => 'groupSet', 'NetworkInterfaceId' => 'eni-686ea200', ]);
Result syntax:
[ 'Groups' => [ [ 'GroupId' => 'sg-903004f8', 'GroupName' => 'my-security-group', ], ], 'NetworkInterfaceId' => 'eni-686ea200', ]
Example 4: To describe the sourceDestCheck attribute of a network interface
This example describes the sourceDestCheck attribute of the specified network interface.
$result = $client->describeNetworkInterfaceAttribute([ 'Attribute' => 'sourceDestCheck', 'NetworkInterfaceId' => 'eni-686ea200', ]);
Result syntax:
[ 'NetworkInterfaceId' => 'eni-686ea200', 'SourceDestCheck' => [ 'Value' => 1, ], ]
DescribeNetworkInterfaces
$result = $client->describeNetworkInterfaces
([/* ... */]); $promise = $client->describeNetworkInterfacesAsync
([/* ... */]);
Describes one or more of your network interfaces.
Parameter Syntax
$result = $client->describeNetworkInterfaces([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'NetworkInterfaceIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
addresses.private-ip-address
- The private IP addresses associated with the network interface. -
addresses.primary
- Whether the private IP address is the primary IP address associated with the network interface. -
addresses.association.public-ip
- The association ID returned when the network interface was associated with the Elastic IP address. -
addresses.association.owner-id
- The owner ID of the addresses associated with the network interface. -
association.association-id
- The association ID returned when the network interface was associated with an IP address. -
association.allocation-id
- The allocation ID returned when you allocated the Elastic IP address for your network interface. -
association.ip-owner-id
- The owner of the Elastic IP address associated with the network interface. -
association.public-ip
- The address of the Elastic IP address bound to the network interface. -
association.public-dns-name
- The public DNS name for the network interface. -
attachment.attachment-id
- The ID of the interface attachment. -
attachment.attach.time
- The time that the network interface was attached to an instance. -
attachment.delete-on-termination
- Indicates whether the attachment is deleted when an instance is terminated. -
attachment.device-index
- The device index to which the network interface is attached. -
attachment.instance-id
- The ID of the instance to which the network interface is attached. -
attachment.instance-owner-id
- The owner ID of the instance to which the network interface is attached. -
attachment.nat-gateway-id
- The ID of the NAT gateway to which the network interface is attached. -
attachment.status
- The status of the attachment (attaching
|attached
|detaching
|detached
). -
availability-zone
- The Availability Zone of the network interface. -
description
- The description of the network interface. -
group-id
- The ID of a security group associated with the network interface. -
group-name
- The name of a security group associated with the network interface. -
mac-address
- The MAC address of the network interface. -
network-interface-id
- The ID of the network interface. -
owner-id
- The AWS account ID of the network interface owner. -
private-ip-address
- The private IP address or addresses of the network interface. -
private-dns-name
- The private DNS name of the network interface. -
requester-id
- The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on). -
requester-managed
- Indicates whether the network interface is being managed by an AWS service (for example, AWS Management Console, Auto Scaling, and so on). -
source-desk-check
- Indicates whether the network interface performs source/destination checking. A value oftrue
means checking is enabled, andfalse
means checking is disabled. The value must befalse
for the network interface to perform network address translation (NAT) in your VPC. -
status
- The status of the network interface. If the network interface is not attached to an instance, the status isavailable
; if a network interface is attached to an instance the status isin-use
. -
subnet-id
- The ID of the subnet for the network interface. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
vpc-id
- The ID of the VPC for the network interface.
- NetworkInterfaceIds
-
- Type: Array of strings
One or more network interface IDs.
Default: Describes all your network interfaces.
Result Syntax
[ 'NetworkInterfaces' => [ [ 'Association' => [ 'AllocationId' => '<string>', 'AssociationId' => '<string>', 'IpOwnerId' => '<string>', 'PublicDnsName' => '<string>', 'PublicIp' => '<string>', ], 'Attachment' => [ 'AttachTime' => <DateTime>, 'AttachmentId' => '<string>', 'DeleteOnTermination' => true || false, 'DeviceIndex' => <integer>, 'InstanceId' => '<string>', 'InstanceOwnerId' => '<string>', 'Status' => 'attaching|attached|detaching|detached', ], 'AvailabilityZone' => '<string>', 'Description' => '<string>', 'Groups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'InterfaceType' => 'interface|natGateway', 'MacAddress' => '<string>', 'NetworkInterfaceId' => '<string>', 'OwnerId' => '<string>', 'PrivateDnsName' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Association' => [ 'AllocationId' => '<string>', 'AssociationId' => '<string>', 'IpOwnerId' => '<string>', 'PublicDnsName' => '<string>', 'PublicIp' => '<string>', ], 'Primary' => true || false, 'PrivateDnsName' => '<string>', 'PrivateIpAddress' => '<string>', ], // ... ], 'RequesterId' => '<string>', 'RequesterManaged' => true || false, 'SourceDestCheck' => true || false, 'Status' => 'available|attaching|in-use|detaching', 'SubnetId' => '<string>', 'TagSet' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], // ... ], ]
Result Details
Members
- NetworkInterfaces
-
- Type: Array of NetworkInterface structures
Information about one or more network interfaces.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a network interface
$result = $client->describeNetworkInterfaces([ 'NetworkInterfaceIds' => [ 'eni-e5aa89a3', ], ]);
Result syntax:
[ 'NetworkInterfaces' => [ [ 'Association' => [ 'AssociationId' => 'eipassoc-0fbb766a', 'IpOwnerId' => '123456789012', 'PublicDnsName' => 'ec2-203-0-113-12.compute-1.amazonaws.com', 'PublicIp' => '203.0.113.12', ], 'Attachment' => [ 'AttachTime' =>, 'AttachmentId' => 'eni-attach-66c4350a', 'DeleteOnTermination' => , 'DeviceIndex' => 1, 'InstanceId' => 'i-1234567890abcdef0', 'InstanceOwnerId' => '123456789012', 'Status' => 'attached', ], 'AvailabilityZone' => 'us-east-1d', 'Description' => 'my network interface', 'Groups' => [ [ 'GroupId' => 'sg-8637d3e3', 'GroupName' => 'default', ], ], 'MacAddress' => '02:2f:8f:b0:cf:75', 'NetworkInterfaceId' => 'eni-e5aa89a3', 'OwnerId' => '123456789012', 'PrivateDnsName' => 'ip-10-0-1-17.ec2.internal', 'PrivateIpAddress' => '10.0.1.17', 'PrivateIpAddresses' => [ [ 'Association' => [ 'AssociationId' => 'eipassoc-0fbb766a', 'IpOwnerId' => '123456789012', 'PublicDnsName' => 'ec2-203-0-113-12.compute-1.amazonaws.com', 'PublicIp' => '203.0.113.12', ], 'Primary' => 1, 'PrivateDnsName' => 'ip-10-0-1-17.ec2.internal', 'PrivateIpAddress' => '10.0.1.17', ], ], 'RequesterManaged' => , 'SourceDestCheck' => 1, 'Status' => 'in-use', 'SubnetId' => 'subnet-b61f49f0', 'TagSet' => [ ], 'VpcId' => 'vpc-a01106c2', ], ], ]
DescribePlacementGroups
$result = $client->describePlacementGroups
([/* ... */]); $promise = $client->describePlacementGroupsAsync
([/* ... */]);
Describes one or more of your placement groups. For more information about placement groups and cluster instances, see Cluster Instances in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describePlacementGroups([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'GroupNames' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
group-name
- The name of the placement group. -
state
- The state of the placement group (pending
|available
|deleting
|deleted
). -
strategy
- The strategy of the placement group (cluster
).
- GroupNames
-
- Type: Array of strings
One or more placement group names.
Default: Describes all your placement groups, or only those otherwise specified.
Result Syntax
[ 'PlacementGroups' => [ [ 'GroupName' => '<string>', 'State' => 'pending|available|deleting|deleted', 'Strategy' => 'cluster', ], // ... ], ]
Result Details
Members
- PlacementGroups
-
- Type: Array of PlacementGroup structures
One or more placement groups.
Errors
There are no errors described for this operation.
DescribePrefixLists
$result = $client->describePrefixLists
([/* ... */]); $promise = $client->describePrefixListsAsync
([/* ... */]);
Describes available AWS services in a prefix list format, which includes the prefix list name and prefix list ID of the service and the IP address range for the service. A prefix list ID is required for creating an outbound security group rule that allows traffic from a VPC to access an AWS service through a VPC endpoint.
Parameter Syntax
$result = $client->describePrefixLists([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'MaxResults' => <integer>, 'NextToken' => '<string>', 'PrefixListIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
prefix-list-id
: The ID of a prefix list. -
prefix-list-name
: The name of a prefix list.
- MaxResults
-
- Type: int
The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.
Constraint: If the value specified is greater than 1000, we return only 1000 items.
- NextToken
-
- Type: string
The token for the next set of items to return. (You received this token from a prior call.)
- PrefixListIds
-
- Type: Array of strings
One or more prefix list IDs.
Result Syntax
[ 'NextToken' => '<string>', 'PrefixLists' => [ [ 'Cidrs' => ['<string>', ...], 'PrefixListId' => '<string>', 'PrefixListName' => '<string>', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.
- PrefixLists
-
- Type: Array of PrefixList structures
All available prefix lists.
Errors
There are no errors described for this operation.
DescribeRegions
$result = $client->describeRegions
([/* ... */]); $promise = $client->describeRegionsAsync
([/* ... */]);
Describes one or more regions that are currently available to you.
For a list of the regions supported by Amazon EC2, see Regions and Endpoints.
Parameter Syntax
$result = $client->describeRegions([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'RegionNames' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
endpoint
- The endpoint of the region (for example,ec2.us-east-1.amazonaws.com
). -
region-name
- The name of the region (for example,us-east-1
).
- RegionNames
-
- Type: Array of strings
The names of one or more regions.
Result Syntax
[ 'Regions' => [ [ 'Endpoint' => '<string>', 'RegionName' => '<string>', ], // ... ], ]
Result Details
Members
- Regions
-
- Type: Array of Region structures
Information about one or more regions.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe your regions
This example describes all the regions that are available to you.
$result = $client->describeRegions([ ]);
Result syntax:
[ 'Regions' => [ [ 'Endpoint' => 'ec2.ap-south-1.amazonaws.com', 'RegionName' => 'ap-south-1', ], [ 'Endpoint' => 'ec2.eu-west-1.amazonaws.com', 'RegionName' => 'eu-west-1', ], [ 'Endpoint' => 'ec2.ap-southeast-1.amazonaws.com', 'RegionName' => 'ap-southeast-1', ], [ 'Endpoint' => 'ec2.ap-southeast-2.amazonaws.com', 'RegionName' => 'ap-southeast-2', ], [ 'Endpoint' => 'ec2.eu-central-1.amazonaws.com', 'RegionName' => 'eu-central-1', ], [ 'Endpoint' => 'ec2.ap-northeast-2.amazonaws.com', 'RegionName' => 'ap-northeast-2', ], [ 'Endpoint' => 'ec2.ap-northeast-1.amazonaws.com', 'RegionName' => 'ap-northeast-1', ], [ 'Endpoint' => 'ec2.us-east-1.amazonaws.com', 'RegionName' => 'us-east-1', ], [ 'Endpoint' => 'ec2.sa-east-1.amazonaws.com', 'RegionName' => 'sa-east-1', ], [ 'Endpoint' => 'ec2.us-west-1.amazonaws.com', 'RegionName' => 'us-west-1', ], [ 'Endpoint' => 'ec2.us-west-2.amazonaws.com', 'RegionName' => 'us-west-2', ], ], ]
DescribeReservedInstances
$result = $client->describeReservedInstances
([/* ... */]); $promise = $client->describeReservedInstancesAsync
([/* ... */]);
Describes one or more of the Reserved Instances that you purchased.
For more information about Reserved Instances, see Reserved Instances in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeReservedInstances([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'OfferingClass' => 'standard|convertible', 'OfferingType' => 'Heavy Utilization|Medium Utilization|Light Utilization|No Upfront|Partial Upfront|All Upfront', 'ReservedInstancesIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
availability-zone
- The Availability Zone where the Reserved Instance can be used. -
duration
- The duration of the Reserved Instance (one year or three years), in seconds (31536000
|94608000
). -
end
- The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z). -
fixed-price
- The purchase price of the Reserved Instance (for example, 9800.0). -
instance-type
- The instance type that is covered by the reservation. -
scope
- The scope of the Reserved Instance (Region
orAvailability Zone
). -
product-description
- The Reserved Instance product platform description. Instances that include(Amazon VPC)
in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC (Linux/UNIX
|Linux/UNIX (Amazon VPC)
|SUSE Linux
|SUSE Linux (Amazon VPC)
|Red Hat Enterprise Linux
|Red Hat Enterprise Linux (Amazon VPC)
|Windows
|Windows (Amazon VPC)
|Windows with SQL Server Standard
|Windows with SQL Server Standard (Amazon VPC)
|Windows with SQL Server Web
|Windows with SQL Server Web (Amazon VPC)
|Windows with SQL Server Enterprise
|Windows with SQL Server Enterprise (Amazon VPC)
). -
reserved-instances-id
- The ID of the Reserved Instance. -
start
- The time at which the Reserved Instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z). -
state
- The state of the Reserved Instance (payment-pending
|active
|payment-failed
|retired
). -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
usage-price
- The usage price of the Reserved Instance, per hour (for example, 0.84).
- OfferingClass
-
- Type: string
Describes whether the Reserved Instance is Standard or Convertible.
- OfferingType
-
- Type: string
The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the
Medium Utilization
Reserved Instance offering type. - ReservedInstancesIds
-
- Type: Array of strings
One or more Reserved Instance IDs.
Default: Describes all your Reserved Instances, or only those otherwise specified.
Result Syntax
[ 'ReservedInstances' => [ [ 'AvailabilityZone' => '<string>', 'CurrencyCode' => 'USD', 'Duration' => <integer>, 'End' => <DateTime>, 'FixedPrice' => <float>, 'InstanceCount' => <integer>, 'InstanceTenancy' => 'default|dedicated|host', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'OfferingClass' => 'standard|convertible', 'OfferingType' => 'Heavy Utilization|Medium Utilization|Light Utilization|No Upfront|Partial Upfront|All Upfront', 'ProductDescription' => 'Linux/UNIX|Linux/UNIX (Amazon VPC)|Windows|Windows (Amazon VPC)', 'RecurringCharges' => [ [ 'Amount' => <float>, 'Frequency' => 'Hourly', ], // ... ], 'ReservedInstancesId' => '<string>', 'Scope' => 'Availability Zone|Region', 'Start' => <DateTime>, 'State' => 'payment-pending|active|payment-failed|retired', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'UsagePrice' => <float>, ], // ... ], ]
Result Details
Members
- ReservedInstances
-
- Type: Array of ReservedInstances structures
A list of Reserved Instances.
Errors
There are no errors described for this operation.
DescribeReservedInstancesListings
$result = $client->describeReservedInstancesListings
([/* ... */]); $promise = $client->describeReservedInstancesListingsAsync
([/* ... */]);
Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.
The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.
As a seller, you choose to list some or all of your Reserved Instances, and you specify the upfront price to receive for them. Your Reserved Instances are then listed in the Reserved Instance Marketplace and are available for purchase.
As a buyer, you specify the configuration of the Reserved Instance to purchase, and the Marketplace matches what you're searching for with what's available. The Marketplace first sells the lowest priced Reserved Instances to you, and continues to sell available Reserved Instance listings to you until your demand is met. You are charged based on the total price of all of the listings that you purchase.
For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeReservedInstancesListings([ 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'ReservedInstancesId' => '<string>', 'ReservedInstancesListingId' => '<string>', ]);
Parameter Details
Members
- Filters
-
- Type: Array of Filter structures
One or more filters.
-
reserved-instances-id
- The ID of the Reserved Instances. -
reserved-instances-listing-id
- The ID of the Reserved Instances listing. -
status
- The status of the Reserved Instance listing (pending
|active
|cancelled
|closed
). -
status-message
- The reason for the status.
- ReservedInstancesId
-
- Type: string
One or more Reserved Instance IDs.
- ReservedInstancesListingId
-
- Type: string
One or more Reserved Instance listing IDs.
Result Syntax
[ 'ReservedInstancesListings' => [ [ 'ClientToken' => '<string>', 'CreateDate' => <DateTime>, 'InstanceCounts' => [ [ 'InstanceCount' => <integer>, 'State' => 'available|sold|cancelled|pending', ], // ... ], 'PriceSchedules' => [ [ 'Active' => true || false, 'CurrencyCode' => 'USD', 'Price' => <float>, 'Term' => <integer>, ], // ... ], 'ReservedInstancesId' => '<string>', 'ReservedInstancesListingId' => '<string>', 'Status' => 'active|pending|cancelled|closed', 'StatusMessage' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'UpdateDate' => <DateTime>, ], // ... ], ]
Result Details
Members
- ReservedInstancesListings
-
- Type: Array of ReservedInstancesListing structures
Information about the Reserved Instance listing.
Errors
There are no errors described for this operation.
DescribeReservedInstancesModifications
$result = $client->describeReservedInstancesModifications
([/* ... */]); $promise = $client->describeReservedInstancesModificationsAsync
([/* ... */]);
Describes the modifications made to your Reserved Instances. If no parameter is specified, information about all your Reserved Instances modification requests is returned. If a modification ID is specified, only information about the specific modification is returned.
For more information, see Modifying Reserved Instances in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeReservedInstancesModifications([ 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'NextToken' => '<string>', 'ReservedInstancesModificationIds' => ['<string>', ...], ]);
Parameter Details
Members
- Filters
-
- Type: Array of Filter structures
One or more filters.
-
client-token
- The idempotency token for the modification request. -
create-date
- The time when the modification request was created. -
effective-date
- The time when the modification becomes effective. -
modification-result.reserved-instances-id
- The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification isfulfilled
. -
modification-result.target-configuration.availability-zone
- The Availability Zone for the new Reserved Instances. -
modification-result.target-configuration.instance-count
- The number of new Reserved Instances. -
modification-result.target-configuration.instance-type
- The instance type of the new Reserved Instances. -
modification-result.target-configuration.platform
- The network platform of the new Reserved Instances (EC2-Classic
|EC2-VPC
). -
reserved-instances-id
- The ID of the Reserved Instances modified. -
reserved-instances-modification-id
- The ID of the modification request. -
status
- The status of the Reserved Instances modification request (processing
|fulfilled
|failed
). -
status-message
- The reason for the status. -
update-date
- The time when the modification request was last updated.
- NextToken
-
- Type: string
The token to retrieve the next page of results.
- ReservedInstancesModificationIds
-
- Type: Array of strings
IDs for the submitted modification request.
Result Syntax
[ 'NextToken' => '<string>', 'ReservedInstancesModifications' => [ [ 'ClientToken' => '<string>', 'CreateDate' => <DateTime>, 'EffectiveDate' => <DateTime>, 'ModificationResults' => [ [ 'ReservedInstancesId' => '<string>', 'TargetConfiguration' => [ 'AvailabilityZone' => '<string>', 'InstanceCount' => <integer>, 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'Platform' => '<string>', 'Scope' => 'Availability Zone|Region', ], ], // ... ], 'ReservedInstancesIds' => [ [ 'ReservedInstancesId' => '<string>', ], // ... ], 'ReservedInstancesModificationId' => '<string>', 'Status' => '<string>', 'StatusMessage' => '<string>', 'UpdateDate' => <DateTime>, ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return. - ReservedInstancesModifications
-
- Type: Array of ReservedInstancesModification structures
The Reserved Instance modification information.
Errors
There are no errors described for this operation.
DescribeReservedInstancesOfferings
$result = $client->describeReservedInstancesOfferings
([/* ... */]); $promise = $client->describeReservedInstancesOfferingsAsync
([/* ... */]);
Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.
If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances.
For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeReservedInstancesOfferings([ 'AvailabilityZone' => '<string>', 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'IncludeMarketplace' => true || false, 'InstanceTenancy' => 'default|dedicated|host', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'MaxDuration' => <integer>, 'MaxInstanceCount' => <integer>, 'MaxResults' => <integer>, 'MinDuration' => <integer>, 'NextToken' => '<string>', 'OfferingClass' => 'standard|convertible', 'OfferingType' => 'Heavy Utilization|Medium Utilization|Light Utilization|No Upfront|Partial Upfront|All Upfront', 'ProductDescription' => 'Linux/UNIX|Linux/UNIX (Amazon VPC)|Windows|Windows (Amazon VPC)', 'ReservedInstancesOfferingIds' => ['<string>', ...], ]);
Parameter Details
Members
- AvailabilityZone
-
- Type: string
The Availability Zone in which the Reserved Instance can be used.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
availability-zone
- The Availability Zone where the Reserved Instance can be used. -
duration
- The duration of the Reserved Instance (for example, one year or three years), in seconds (31536000
|94608000
). -
fixed-price
- The purchase price of the Reserved Instance (for example, 9800.0). -
instance-type
- The instance type that is covered by the reservation. -
marketplace
- Set totrue
to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from both AWS and the Reserved Instance Marketplace are listed. -
product-description
- The Reserved Instance product platform description. Instances that include(Amazon VPC)
in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. (Linux/UNIX
|Linux/UNIX (Amazon VPC)
|SUSE Linux
|SUSE Linux (Amazon VPC)
|Red Hat Enterprise Linux
|Red Hat Enterprise Linux (Amazon VPC)
|Windows
|Windows (Amazon VPC)
|Windows with SQL Server Standard
|Windows with SQL Server Standard (Amazon VPC)
|Windows with SQL Server Web
|Windows with SQL Server Web (Amazon VPC)
|Windows with SQL Server Enterprise
|Windows with SQL Server Enterprise (Amazon VPC)
) -
reserved-instances-offering-id
- The Reserved Instances offering ID. -
scope
- The scope of the Reserved Instance (Availability Zone
orRegion
). -
usage-price
- The usage price of the Reserved Instance, per hour (for example, 0.84).
- IncludeMarketplace
-
- Type: boolean
Include Reserved Instance Marketplace offerings in the response.
- InstanceTenancy
-
- Type: string
The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of
dedicated
is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances).Default:
default
- InstanceType
-
- Type: string
The instance type that the reservation will cover (for example,
m1.small
). For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide. - MaxDuration
-
- Type: long (int|float)
The maximum duration (in seconds) to filter when searching for offerings.
Default: 94608000 (3 years)
- MaxInstanceCount
-
- Type: int
The maximum number of instances to filter when searching for offerings.
Default: 20
- MaxResults
-
- Type: int
The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned
NextToken
value. The maximum is 100.Default: 100
- MinDuration
-
- Type: long (int|float)
The minimum duration (in seconds) to filter when searching for offerings.
Default: 2592000 (1 month)
- NextToken
-
- Type: string
The token to retrieve the next page of results.
- OfferingClass
-
- Type: string
The offering class of the Reserved Instance. Can be
standard
orconvertible
. - OfferingType
-
- Type: string
The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the
Medium Utilization
Reserved Instance offering type. - ProductDescription
-
- Type: string
The Reserved Instance product platform description. Instances that include
(Amazon VPC)
in the description are for use with Amazon VPC. - ReservedInstancesOfferingIds
-
- Type: Array of strings
One or more Reserved Instances offering IDs.
Result Syntax
[ 'NextToken' => '<string>', 'ReservedInstancesOfferings' => [ [ 'AvailabilityZone' => '<string>', 'CurrencyCode' => 'USD', 'Duration' => <integer>, 'FixedPrice' => <float>, 'InstanceTenancy' => 'default|dedicated|host', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'Marketplace' => true || false, 'OfferingClass' => 'standard|convertible', 'OfferingType' => 'Heavy Utilization|Medium Utilization|Light Utilization|No Upfront|Partial Upfront|All Upfront', 'PricingDetails' => [ [ 'Count' => <integer>, 'Price' => <float>, ], // ... ], 'ProductDescription' => 'Linux/UNIX|Linux/UNIX (Amazon VPC)|Windows|Windows (Amazon VPC)', 'RecurringCharges' => [ [ 'Amount' => <float>, 'Frequency' => 'Hourly', ], // ... ], 'ReservedInstancesOfferingId' => '<string>', 'Scope' => 'Availability Zone|Region', 'UsagePrice' => <float>, ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return. - ReservedInstancesOfferings
-
- Type: Array of ReservedInstancesOffering structures
A list of Reserved Instances offerings.
Errors
There are no errors described for this operation.
DescribeRouteTables
$result = $client->describeRouteTables
([/* ... */]); $promise = $client->describeRouteTablesAsync
([/* ... */]);
Describes one or more of your route tables.
Each subnet in your VPC must be associated with a route table. If a subnet is not explicitly associated with any route table, it is implicitly associated with the main route table. This command does not return the subnet ID for implicit associations.
For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->describeRouteTables([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'RouteTableIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
association.route-table-association-id
- The ID of an association ID for the route table. -
association.route-table-id
- The ID of the route table involved in the association. -
association.subnet-id
- The ID of the subnet involved in the association. -
association.main
- Indicates whether the route table is the main route table for the VPC (true
|false
). -
route-table-id
- The ID of the route table. -
route.destination-cidr-block
- The CIDR range specified in a route in the table. -
route.destination-prefix-list-id
- The ID (prefix) of the AWS service specified in a route in the table. -
route.gateway-id
- The ID of a gateway specified in a route in the table. -
route.instance-id
- The ID of an instance specified in a route in the table. -
route.nat-gateway-id
- The ID of a NAT gateway. -
route.origin
- Describes how the route was created.CreateRouteTable
indicates that the route was automatically created when the route table was created;CreateRoute
indicates that the route was manually added to the route table;EnableVgwRoutePropagation
indicates that the route was propagated by route propagation. -
route.state
- The state of a route in the route table (active
|blackhole
). The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, the specified NAT instance has been terminated, and so on). -
route.vpc-peering-connection-id
- The ID of a VPC peering connection specified in a route in the table. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
vpc-id
- The ID of the VPC for the route table.
- RouteTableIds
-
- Type: Array of strings
One or more route table IDs.
Default: Describes all your route tables.
Result Syntax
[ 'RouteTables' => [ [ 'Associations' => [ [ 'Main' => true || false, 'RouteTableAssociationId' => '<string>', 'RouteTableId' => '<string>', 'SubnetId' => '<string>', ], // ... ], 'PropagatingVgws' => [ [ 'GatewayId' => '<string>', ], // ... ], 'RouteTableId' => '<string>', 'Routes' => [ [ 'DestinationCidrBlock' => '<string>', 'DestinationPrefixListId' => '<string>', 'GatewayId' => '<string>', 'InstanceId' => '<string>', 'InstanceOwnerId' => '<string>', 'NatGatewayId' => '<string>', 'NetworkInterfaceId' => '<string>', 'Origin' => 'CreateRouteTable|CreateRoute|EnableVgwRoutePropagation', 'State' => 'active|blackhole', 'VpcPeeringConnectionId' => '<string>', ], // ... ], 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], // ... ], ]
Result Details
Members
- RouteTables
-
- Type: Array of RouteTable structures
Information about one or more route tables.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a route table
This example describes the specified route table.
$result = $client->describeRouteTables([ 'RouteTableIds' => [ 'rtb-1f382e7d', ], ]);
Result syntax:
[ 'RouteTables' => [ [ 'Associations' => [ [ 'Main' => 1, 'RouteTableAssociationId' => 'rtbassoc-d8ccddba', 'RouteTableId' => 'rtb-1f382e7d', ], ], 'PropagatingVgws' => [ ], 'RouteTableId' => 'rtb-1f382e7d', 'Routes' => [ [ 'DestinationCidrBlock' => '10.0.0.0/16', 'GatewayId' => 'local', 'State' => 'active', ], ], 'Tags' => [ ], 'VpcId' => 'vpc-a01106c2', ], ], ]
DescribeScheduledInstanceAvailability
$result = $client->describeScheduledInstanceAvailability
([/* ... */]); $promise = $client->describeScheduledInstanceAvailabilityAsync
([/* ... */]);
Finds available schedules that meet the specified criteria.
You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.
After you find a schedule that meets your needs, call PurchaseScheduledInstances to purchase Scheduled Instances with that schedule.
Parameter Syntax
$result = $client->describeScheduledInstanceAvailability([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'FirstSlotStartTimeRange' => [ // REQUIRED 'EarliestTime' => <integer || string || DateTime>, // REQUIRED 'LatestTime' => <integer || string || DateTime>, // REQUIRED ], 'MaxResults' => <integer>, 'MaxSlotDurationInHours' => <integer>, 'MinSlotDurationInHours' => <integer>, 'NextToken' => '<string>', 'Recurrence' => [ // REQUIRED 'Frequency' => '<string>', 'Interval' => <integer>, 'OccurrenceDays' => [<integer>, ...], 'OccurrenceRelativeToEnd' => true || false, 'OccurrenceUnit' => '<string>', ], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
availability-zone
- The Availability Zone (for example,us-west-2a
). -
instance-type
- The instance type (for example,c4.large
). -
network-platform
- The network platform (EC2-Classic
orEC2-VPC
). -
platform
- The platform (Linux/UNIX
orWindows
).
- FirstSlotStartTimeRange
-
- Required: Yes
- Type: SlotDateTimeRangeRequest structure
The time period for the first schedule to start.
- MaxResults
-
- Type: int
The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 300. To retrieve the remaining results, make another call with the returned
NextToken
value. - MaxSlotDurationInHours
-
- Type: int
The maximum available duration, in hours. This value must be greater than
MinSlotDurationInHours
and less than 1,720. - MinSlotDurationInHours
-
- Type: int
The minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.
- NextToken
-
- Type: string
The token for the next set of results.
- Recurrence
-
- Required: Yes
- Type: ScheduledInstanceRecurrenceRequest structure
The schedule recurrence.
Result Syntax
[ 'NextToken' => '<string>', 'ScheduledInstanceAvailabilitySet' => [ [ 'AvailabilityZone' => '<string>', 'AvailableInstanceCount' => <integer>, 'FirstSlotStartTime' => <DateTime>, 'HourlyPrice' => '<string>', 'InstanceType' => '<string>', 'MaxTermDurationInDays' => <integer>, 'MinTermDurationInDays' => <integer>, 'NetworkPlatform' => '<string>', 'Platform' => '<string>', 'PurchaseToken' => '<string>', 'Recurrence' => [ 'Frequency' => '<string>', 'Interval' => <integer>, 'OccurrenceDaySet' => [<integer>, ...], 'OccurrenceRelativeToEnd' => true || false, 'OccurrenceUnit' => '<string>', ], 'SlotDurationInHours' => <integer>, 'TotalScheduledInstanceHours' => <integer>, ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token required to retrieve the next set of results. This value is
null
when there are no more results to return. - ScheduledInstanceAvailabilitySet
-
- Type: Array of ScheduledInstanceAvailability structures
Information about the available Scheduled Instances.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe an available schedule
This example describes a schedule that occurs every week on Sunday, starting on the specified date. Note that the output contains a single schedule as an example.
$result = $client->describeScheduledInstanceAvailability([ 'FirstSlotStartTimeRange' => [ 'EarliestTime' =>, 'LatestTime' => , ], 'Recurrence' => [ 'Frequency' => 'Weekly', 'Interval' => 1, 'OccurrenceDays' => [ 1, ], ], ]);
Result syntax:
[ 'ScheduledInstanceAvailabilitySet' => [ [ 'AvailabilityZone' => 'us-west-2b', 'AvailableInstanceCount' => 20, 'FirstSlotStartTime' =>, 'HourlyPrice' => '0.095', 'InstanceType' => 'c4.large', 'MaxTermDurationInDays' => 366, 'MinTermDurationInDays' => 366, 'NetworkPlatform' => 'EC2-VPC', 'Platform' => 'Linux/UNIX', 'PurchaseToken' => 'eyJ2IjoiMSIsInMiOjEsImMiOi...', 'Recurrence' => [ 'Frequency' => 'Weekly', 'Interval' => 1, 'OccurrenceDaySet' => [ 1, ], 'OccurrenceRelativeToEnd' => , ], 'SlotDurationInHours' => 23, 'TotalScheduledInstanceHours' => 1219, ], ], ]
DescribeScheduledInstances
$result = $client->describeScheduledInstances
([/* ... */]); $promise = $client->describeScheduledInstancesAsync
([/* ... */]);
Describes one or more of your Scheduled Instances.
Parameter Syntax
$result = $client->describeScheduledInstances([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'MaxResults' => <integer>, 'NextToken' => '<string>', 'ScheduledInstanceIds' => ['<string>', ...], 'SlotStartTimeRange' => [ 'EarliestTime' => <integer || string || DateTime>, 'LatestTime' => <integer || string || DateTime>, ], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
availability-zone
- The Availability Zone (for example,us-west-2a
). -
instance-type
- The instance type (for example,c4.large
). -
network-platform
- The network platform (EC2-Classic
orEC2-VPC
). -
platform
- The platform (Linux/UNIX
orWindows
).
- MaxResults
-
- Type: int
The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 100. To retrieve the remaining results, make another call with the returned
NextToken
value. - NextToken
-
- Type: string
The token for the next set of results.
- ScheduledInstanceIds
-
- Type: Array of strings
One or more Scheduled Instance IDs.
- SlotStartTimeRange
-
- Type: SlotStartTimeRangeRequest structure
The time period for the first schedule to start.
Result Syntax
[ 'NextToken' => '<string>', 'ScheduledInstanceSet' => [ [ 'AvailabilityZone' => '<string>', 'CreateDate' => <DateTime>, 'HourlyPrice' => '<string>', 'InstanceCount' => <integer>, 'InstanceType' => '<string>', 'NetworkPlatform' => '<string>', 'NextSlotStartTime' => <DateTime>, 'Platform' => '<string>', 'PreviousSlotEndTime' => <DateTime>, 'Recurrence' => [ 'Frequency' => '<string>', 'Interval' => <integer>, 'OccurrenceDaySet' => [<integer>, ...], 'OccurrenceRelativeToEnd' => true || false, 'OccurrenceUnit' => '<string>', ], 'ScheduledInstanceId' => '<string>', 'SlotDurationInHours' => <integer>, 'TermEndDate' => <DateTime>, 'TermStartDate' => <DateTime>, 'TotalScheduledInstanceHours' => <integer>, ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token required to retrieve the next set of results. This value is
null
when there are no more results to return. - ScheduledInstanceSet
-
- Type: Array of ScheduledInstance structures
Information about the Scheduled Instances.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe your Scheduled Instances
This example describes the specified Scheduled Instance.
$result = $client->describeScheduledInstances([ 'ScheduledInstanceIds' => [ 'sci-1234-1234-1234-1234-123456789012', ], ]);
Result syntax:
[ 'ScheduledInstanceSet' => [ [ 'AvailabilityZone' => 'us-west-2b', 'CreateDate' =>, 'HourlyPrice' => '0.095', 'InstanceCount' => 1, 'InstanceType' => 'c4.large', 'NetworkPlatform' => 'EC2-VPC', 'NextSlotStartTime' => , 'Platform' => 'Linux/UNIX', 'Recurrence' => [ 'Frequency' => 'Weekly', 'Interval' => 1, 'OccurrenceDaySet' => [ 1, ], 'OccurrenceRelativeToEnd' => , 'OccurrenceUnit' => '', ], 'ScheduledInstanceId' => 'sci-1234-1234-1234-1234-123456789012', 'SlotDurationInHours' => 32, 'TermEndDate' => , 'TermStartDate' => , 'TotalScheduledInstanceHours' => 1696, ], ], ]
DescribeSecurityGroupReferences
$result = $client->describeSecurityGroupReferences
([/* ... */]); $promise = $client->describeSecurityGroupReferencesAsync
([/* ... */]);
[EC2-VPC only] Describes the VPCs on the other side of a VPC peering connection that are referencing the security groups you've specified in this request.
Parameter Syntax
$result = $client->describeSecurityGroupReferences([ 'DryRun' => true || false, 'GroupId' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
- GroupId
-
- Required: Yes
- Type: Array of strings
One or more security group IDs in your account.
Result Syntax
[ 'SecurityGroupReferenceSet' => [ [ 'GroupId' => '<string>', 'ReferencingVpcId' => '<string>', 'VpcPeeringConnectionId' => '<string>', ], // ... ], ]
Result Details
Members
- SecurityGroupReferenceSet
-
- Type: Array of SecurityGroupReference structures
Information about the VPCs with the referencing security groups.
Errors
There are no errors described for this operation.
DescribeSecurityGroups
$result = $client->describeSecurityGroups
([/* ... */]); $promise = $client->describeSecurityGroupsAsync
([/* ... */]);
Describes one or more of your security groups.
A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->describeSecurityGroups([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'GroupIds' => ['<string>', ...], 'GroupNames' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.
-
description
- The description of the security group. -
egress.ip-permission.prefix-list-id
- The ID (prefix) of the AWS service to which the security group allows access. -
group-id
- The ID of the security group. -
group-name
- The name of the security group. -
ip-permission.cidr
- A CIDR range that has been granted permission. -
ip-permission.from-port
- The start of port range for the TCP and UDP protocols, or an ICMP type number. -
ip-permission.group-id
- The ID of a security group that has been granted permission. -
ip-permission.group-name
- The name of a security group that has been granted permission. -
ip-permission.protocol
- The IP protocol for the permission (tcp
|udp
|icmp
or a protocol number). -
ip-permission.to-port
- The end of port range for the TCP and UDP protocols, or an ICMP code. -
ip-permission.user-id
- The ID of an AWS account that has been granted permission. -
owner-id
- The AWS account ID of the owner of the security group. -
tag-key
- The key of a tag assigned to the security group. -
tag-value
- The value of a tag assigned to the security group. -
vpc-id
- The ID of the VPC specified when the security group was created.
- GroupIds
-
- Type: Array of strings
One or more security group IDs. Required for security groups in a nondefault VPC.
Default: Describes all your security groups.
- GroupNames
-
- Type: Array of strings
[EC2-Classic and default VPC only] One or more security group names. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, use the
group-name
filter to describe security groups by name.Default: Describes all your security groups.
Result Syntax
[ 'SecurityGroups' => [ [ 'Description' => '<string>', 'GroupId' => '<string>', 'GroupName' => '<string>', 'IpPermissions' => [ [ 'FromPort' => <integer>, 'IpProtocol' => '<string>', 'IpRanges' => [ [ 'CidrIp' => '<string>', ], // ... ], 'PrefixListIds' => [ [ 'PrefixListId' => '<string>', ], // ... ], 'ToPort' => <integer>, 'UserIdGroupPairs' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', 'PeeringStatus' => '<string>', 'UserId' => '<string>', 'VpcId' => '<string>', 'VpcPeeringConnectionId' => '<string>', ], // ... ], ], // ... ], 'IpPermissionsEgress' => [ [ 'FromPort' => <integer>, 'IpProtocol' => '<string>', 'IpRanges' => [ [ 'CidrIp' => '<string>', ], // ... ], 'PrefixListIds' => [ [ 'PrefixListId' => '<string>', ], // ... ], 'ToPort' => <integer>, 'UserIdGroupPairs' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', 'PeeringStatus' => '<string>', 'UserId' => '<string>', 'VpcId' => '<string>', 'VpcPeeringConnectionId' => '<string>', ], // ... ], ], // ... ], 'OwnerId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], // ... ], ]
Result Details
Members
- SecurityGroups
-
- Type: Array of SecurityGroup structures
Information about one or more security groups.
Errors
There are no errors described for this operation.
DescribeSnapshotAttribute
$result = $client->describeSnapshotAttribute
([/* ... */]); $promise = $client->describeSnapshotAttributeAsync
([/* ... */]);
Describes the specified attribute of the specified snapshot. You can specify only one attribute at a time.
For more information about EBS snapshots, see Amazon EBS Snapshots in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeSnapshotAttribute([ 'Attribute' => 'productCodes|createVolumePermission', // REQUIRED 'DryRun' => true || false, 'SnapshotId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Attribute
-
- Required: Yes
- Type: string
The snapshot attribute you would like to view.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - SnapshotId
-
- Required: Yes
- Type: string
The ID of the EBS snapshot.
Result Syntax
[ 'CreateVolumePermissions' => [ [ 'Group' => 'all', 'UserId' => '<string>', ], // ... ], 'ProductCodes' => [ [ 'ProductCodeId' => '<string>', 'ProductCodeType' => 'devpay|marketplace', ], // ... ], 'SnapshotId' => '<string>', ]
Result Details
Members
- CreateVolumePermissions
-
- Type: Array of CreateVolumePermission structures
A list of permissions for creating volumes from the snapshot.
- ProductCodes
-
- Type: Array of ProductCode structures
A list of product codes.
- SnapshotId
-
- Type: string
The ID of the EBS snapshot.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe snapshot attributes
This example describes the ``createVolumePermission`` attribute on a snapshot with the snapshot ID of ``snap-066877671789bd71b``.
$result = $client->describeSnapshotAttribute([ 'Attribute' => 'createVolumePermission', 'SnapshotId' => 'snap-066877671789bd71b', ]);
Result syntax:
[ 'CreateVolumePermissions' => [ ], 'SnapshotId' => 'snap-066877671789bd71b', ]
DescribeSnapshots
$result = $client->describeSnapshots
([/* ... */]); $promise = $client->describeSnapshotsAsync
([/* ... */]);
Describes one or more of the EBS snapshots available to you. Available snapshots include public snapshots available for any AWS account to launch, private snapshots that you own, and private snapshots owned by another AWS account but for which you've been given explicit create volume permissions.
The create volume permissions fall into the following categories:
-
public: The owner of the snapshot granted create volume permissions for the snapshot to the
all
group. All AWS accounts have create volume permissions for these snapshots. -
explicit: The owner of the snapshot granted create volume permissions to a specific AWS account.
-
implicit: An AWS account has implicit create volume permissions for all snapshots it owns.
The list of snapshots returned can be modified by specifying snapshot IDs, snapshot owners, or AWS accounts with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which you have create volume permissions.
If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error is returned. If you specify a snapshot ID for which you do not have access, it is not included in the returned results.
If you specify one or more snapshot owners using the OwnerIds
option, only snapshots from the specified owners and for which you have access are returned. The results can include the AWS account IDs of the specified owners, amazon
for snapshots owned by Amazon, or self
for snapshots that you own.
If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. You can specify AWS account IDs (if you own the snapshots), self
for snapshots for which you own or have explicit permissions, or all
for public snapshots.
If you are describing a long list of snapshots, you can paginate the output to make the list more manageable. The MaxResults
parameter sets the maximum number of results returned in a single page. If the list of results exceeds your MaxResults
value, then that number of results is returned along with a NextToken
value that can be passed to a subsequent DescribeSnapshots
request to retrieve the remaining results.
For more information about EBS snapshots, see Amazon EBS Snapshots in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeSnapshots([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'MaxResults' => <integer>, 'NextToken' => '<string>', 'OwnerIds' => ['<string>', ...], 'RestorableByUserIds' => ['<string>', ...], 'SnapshotIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
description
- A description of the snapshot. -
owner-alias
- Value from an Amazon-maintained list (amazon
|aws-marketplace
|microsoft
) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM consolew. -
owner-id
- The ID of the AWS account that owns the snapshot. -
progress
- The progress of the snapshot, as a percentage (for example, 80%). -
snapshot-id
- The snapshot ID. -
start-time
- The time stamp when the snapshot was initiated. -
status
- The status of the snapshot (pending
|completed
|error
). -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
volume-id
- The ID of the volume the snapshot is for. -
volume-size
- The size of the volume, in GiB.
- MaxResults
-
- Type: int
The maximum number of snapshot results returned by
DescribeSnapshots
in paginated output. When this parameter is used,DescribeSnapshots
only returnsMaxResults
results in a single page along with aNextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeSnapshots
request with the returnedNextToken
value. This value can be between 5 and 1000; ifMaxResults
is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, thenDescribeSnapshots
returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request. - NextToken
-
- Type: string
The
NextToken
value returned from a previous paginatedDescribeSnapshots
request whereMaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned theNextToken
value. This value isnull
when there are no more results to return. - OwnerIds
-
- Type: Array of strings
Returns the snapshots owned by the specified owner. Multiple owners can be specified.
- RestorableByUserIds
-
- Type: Array of strings
One or more AWS accounts IDs that can create volumes from the snapshot.
- SnapshotIds
-
- Type: Array of strings
One or more snapshot IDs.
Default: Describes snapshots for which you have launch permissions.
Result Syntax
[ 'NextToken' => '<string>', 'Snapshots' => [ [ 'DataEncryptionKeyId' => '<string>', 'Description' => '<string>', 'Encrypted' => true || false, 'KmsKeyId' => '<string>', 'OwnerAlias' => '<string>', 'OwnerId' => '<string>', 'Progress' => '<string>', 'SnapshotId' => '<string>', 'StartTime' => <DateTime>, 'State' => 'pending|completed|error', 'StateMessage' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VolumeId' => '<string>', 'VolumeSize' => <integer>, ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The
NextToken
value to include in a futureDescribeSnapshots
request. When the results of aDescribeSnapshots
request exceedMaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return. - Snapshots
-
- Type: Array of Snapshot structures
Information about the snapshots.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a snapshot
This example describes a snapshot with the snapshot ID of ``snap-1234567890abcdef0``.
$result = $client->describeSnapshots([ 'SnapshotIds' => [ 'snap-1234567890abcdef0', ], ]);
Result syntax:
[ 'NextToken' => '', 'Snapshots' => [ [ 'Description' => 'This is my snapshot.', 'OwnerId' => '012345678910', 'Progress' => '100%', 'SnapshotId' => 'snap-1234567890abcdef0', 'StartTime' =>, 'State' => 'completed', 'VolumeId' => 'vol-049df61146c4d7901', 'VolumeSize' => 8, ], ], ]
Example 2: To describe snapshots using filters
This example describes all snapshots owned by the ID 012345678910 that are in the ``pending`` status.
$result = $client->describeSnapshots([ 'Filters' => [ [ 'Name' => 'status', 'Values' => [ 'pending', ], ], ], 'OwnerIds' => [ '012345678910', ], ]);
Result syntax:
[ 'NextToken' => '', 'Snapshots' => [ [ 'Description' => 'This is my copied snapshot.', 'OwnerId' => '012345678910', 'Progress' => '87%', 'SnapshotId' => 'snap-066877671789bd71b', 'StartTime' =>, 'State' => 'pending', 'VolumeId' => 'vol-1234567890abcdef0', 'VolumeSize' => 8, ], ], ]
DescribeSpotDatafeedSubscription
$result = $client->describeSpotDatafeedSubscription
([/* ... */]); $promise = $client->describeSpotDatafeedSubscriptionAsync
([/* ... */]);
Describes the data feed for Spot instances. For more information, see Spot Instance Data Feed in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeSpotDatafeedSubscription([ 'DryRun' => true || false, ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[ 'SpotDatafeedSubscription' => [ 'Bucket' => '<string>', 'Fault' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'OwnerId' => '<string>', 'Prefix' => '<string>', 'State' => 'Active|Inactive', ], ]
Result Details
Members
- SpotDatafeedSubscription
-
- Type: SpotDatafeedSubscription structure
The Spot instance data feed subscription.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe the datafeed for your AWS account
This example describes the Spot Instance datafeed subscription for your AWS account.
$result = $client->describeSpotDatafeedSubscription([ ]);
Result syntax:
[ 'SpotDatafeedSubscription' => [ 'Bucket' => 'my-s3-bucket', 'OwnerId' => '123456789012', 'Prefix' => 'spotdata', 'State' => 'Active', ], ]
DescribeSpotFleetInstances
$result = $client->describeSpotFleetInstances
([/* ... */]); $promise = $client->describeSpotFleetInstancesAsync
([/* ... */]);
Describes the running instances for the specified Spot fleet.
Parameter Syntax
$result = $client->describeSpotFleetInstances([ 'DryRun' => true || false, 'MaxResults' => <integer>, 'NextToken' => '<string>', 'SpotFleetRequestId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - MaxResults
-
- Type: int
The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned
NextToken
value. - NextToken
-
- Type: string
The token for the next set of results.
- SpotFleetRequestId
-
- Required: Yes
- Type: string
The ID of the Spot fleet request.
Result Syntax
[ 'ActiveInstances' => [ [ 'InstanceId' => '<string>', 'InstanceType' => '<string>', 'SpotInstanceRequestId' => '<string>', ], // ... ], 'NextToken' => '<string>', 'SpotFleetRequestId' => '<string>', ]
Result Details
Members
- ActiveInstances
-
- Required: Yes
- Type: Array of ActiveInstance structures
The running instances. Note that this list is refreshed periodically and might be out of date.
- NextToken
-
- Type: string
The token required to retrieve the next set of results. This value is
null
when there are no more results to return. - SpotFleetRequestId
-
- Required: Yes
- Type: string
The ID of the Spot fleet request.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe the Spot Instances associated with a Spot fleet
This example lists the Spot Instances associated with the specified Spot fleet.
$result = $client->describeSpotFleetInstances([ 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ]);
Result syntax:
[ 'ActiveInstances' => [ [ 'InstanceId' => 'i-1234567890abcdef0', 'InstanceType' => 'm3.medium', 'SpotInstanceRequestId' => 'sir-08b93456', ], ], 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ]
DescribeSpotFleetRequestHistory
$result = $client->describeSpotFleetRequestHistory
([/* ... */]); $promise = $client->describeSpotFleetRequestHistoryAsync
([/* ... */]);
Describes the events for the specified Spot fleet request during the specified time.
Spot fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event.
Parameter Syntax
$result = $client->describeSpotFleetRequestHistory([ 'DryRun' => true || false, 'EventType' => 'instanceChange|fleetRequestChange|error', 'MaxResults' => <integer>, 'NextToken' => '<string>', 'SpotFleetRequestId' => '<string>', // REQUIRED 'StartTime' => <integer || string || DateTime>, // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - EventType
-
- Type: string
The type of events to describe. By default, all events are described.
- MaxResults
-
- Type: int
The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned
NextToken
value. - NextToken
-
- Type: string
The token for the next set of results.
- SpotFleetRequestId
-
- Required: Yes
- Type: string
The ID of the Spot fleet request.
- StartTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
Result Syntax
[ 'HistoryRecords' => [ [ 'EventInformation' => [ 'EventDescription' => '<string>', 'EventSubType' => '<string>', 'InstanceId' => '<string>', ], 'EventType' => 'instanceChange|fleetRequestChange|error', 'Timestamp' => <DateTime>, ], // ... ], 'LastEvaluatedTime' => <DateTime>, 'NextToken' => '<string>', 'SpotFleetRequestId' => '<string>', 'StartTime' => <DateTime>, ]
Result Details
Members
- HistoryRecords
-
- Required: Yes
- Type: Array of HistoryRecord structures
Information about the events in the history of the Spot fleet request.
- LastEvaluatedTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). All records up to this time were retrieved.
If
nextToken
indicates that there are more results, this value is not present. - NextToken
-
- Type: string
The token required to retrieve the next set of results. This value is
null
when there are no more results to return. - SpotFleetRequestId
-
- Required: Yes
- Type: string
The ID of the Spot fleet request.
- StartTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
Errors
There are no errors described for this operation.
Examples
Example 1: To describe Spot fleet history
This example returns the history for the specified Spot fleet starting at the specified time.
$result = $client->describeSpotFleetRequestHistory([ 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', 'StartTime' =>, ]);
Result syntax:
[ 'HistoryRecords' => [ [ 'EventInformation' => [ 'EventSubType' => 'submitted', ], 'EventType' => 'fleetRequestChange', 'Timestamp' =>, ], [ 'EventInformation' => [ 'EventSubType' => 'active', ], 'EventType' => 'fleetRequestChange', 'Timestamp' => , ], [ 'EventInformation' => [ 'EventSubType' => 'launched', 'InstanceId' => 'i-1234567890abcdef0', ], 'EventType' => 'instanceChange', 'Timestamp' => , ], [ 'EventInformation' => [ 'EventSubType' => 'launched', 'InstanceId' => 'i-1234567890abcdef1', ], 'EventType' => 'instanceChange', 'Timestamp' => , ], ], 'NextToken' => 'CpHNsscimcV5oH7bSbub03CI2Qms5+ypNpNm+53MNlR0YcXAkp0xFlfKf91yVxSExmbtma3awYxMFzNA663ZskT0AHtJ6TCb2Z8bQC2EnZgyELbymtWPfpZ1ZbauVg+P+TfGlWxWWB/Vr5dk5d4LfdgA/DRAHUrYgxzrEXAMPLE=', 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', 'StartTime' => , ]
DescribeSpotFleetRequests
$result = $client->describeSpotFleetRequests
([/* ... */]); $promise = $client->describeSpotFleetRequestsAsync
([/* ... */]);
Describes your Spot fleet requests.
Spot fleet requests are deleted 48 hours after they are canceled and their instances are terminated.
Parameter Syntax
$result = $client->describeSpotFleetRequests([ 'DryRun' => true || false, 'MaxResults' => <integer>, 'NextToken' => '<string>', 'SpotFleetRequestIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - MaxResults
-
- Type: int
The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned
NextToken
value. - NextToken
-
- Type: string
The token for the next set of results.
- SpotFleetRequestIds
-
- Type: Array of strings
The IDs of the Spot fleet requests.
Result Syntax
[ 'NextToken' => '<string>', 'SpotFleetRequestConfigs' => [ [ 'ActivityStatus' => 'error|pending_fulfillment|pending_termination|fulfilled', 'CreateTime' => <DateTime>, 'SpotFleetRequestConfig' => [ 'AllocationStrategy' => 'lowestPrice|diversified', 'ClientToken' => '<string>', 'ExcessCapacityTerminationPolicy' => 'noTermination|default', 'FulfilledCapacity' => <float>, 'IamFleetRole' => '<string>', 'LaunchSpecifications' => [ [ 'AddressingType' => '<string>', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'EbsOptimized' => true || false, 'IamInstanceProfile' => [ 'Arn' => '<string>', 'Name' => '<string>', ], 'ImageId' => '<string>', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'KernelId' => '<string>', 'KeyName' => '<string>', 'Monitoring' => [ 'Enabled' => true || false, ], 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => true || false, 'DeleteOnTermination' => true || false, 'Description' => '<string>', 'DeviceIndex' => <integer>, 'Groups' => ['<string>', ...], 'NetworkInterfaceId' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Primary' => true || false, 'PrivateIpAddress' => '<string>', ], // ... ], 'SecondaryPrivateIpAddressCount' => <integer>, 'SubnetId' => '<string>', ], // ... ], 'Placement' => [ 'AvailabilityZone' => '<string>', 'GroupName' => '<string>', ], 'RamdiskId' => '<string>', 'SecurityGroups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'SpotPrice' => '<string>', 'SubnetId' => '<string>', 'UserData' => '<string>', 'WeightedCapacity' => <float>, ], // ... ], 'SpotPrice' => '<string>', 'TargetCapacity' => <integer>, 'TerminateInstancesWithExpiration' => true || false, 'Type' => 'request|maintain', 'ValidFrom' => <DateTime>, 'ValidUntil' => <DateTime>, ], 'SpotFleetRequestId' => '<string>', 'SpotFleetRequestState' => 'submitted|active|cancelled|failed|cancelled_running|cancelled_terminating|modifying', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token required to retrieve the next set of results. This value is
null
when there are no more results to return. - SpotFleetRequestConfigs
-
- Required: Yes
- Type: Array of SpotFleetRequestConfig structures
Information about the configuration of your Spot fleet.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a Spot fleet request
This example describes the specified Spot fleet request.
$result = $client->describeSpotFleetRequests([ 'SpotFleetRequestIds' => [ 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ], ]);
Result syntax:
[ 'SpotFleetRequestConfigs' => [ [ 'SpotFleetRequestConfig' => [ 'IamFleetRole' => 'arn:aws:iam::123456789012:role/my-spot-fleet-role', 'LaunchSpecifications' => [ [ 'EbsOptimized' => , 'ImageId' => 'ami-1a2b3c4d', 'InstanceType' => 'cc2.8xlarge', 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => 1, 'DeleteOnTermination' => , 'DeviceIndex' => 0, 'SecondaryPrivateIpAddressCount' => 0, 'SubnetId' => 'subnet-a61dafcf', ], ], ], [ 'EbsOptimized' => , 'ImageId' => 'ami-1a2b3c4d', 'InstanceType' => 'r3.8xlarge', 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => 1, 'DeleteOnTermination' => , 'DeviceIndex' => 0, 'SecondaryPrivateIpAddressCount' => 0, 'SubnetId' => 'subnet-a61dafcf', ], ], ], ], 'SpotPrice' => '0.05', 'TargetCapacity' => 20, ], 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', 'SpotFleetRequestState' => 'active', ], ], ]
DescribeSpotInstanceRequests
$result = $client->describeSpotInstanceRequests
([/* ... */]); $promise = $client->describeSpotInstanceRequestsAsync
([/* ... */]);
Describes the Spot instance requests that belong to your account. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot instance capacity and current Spot instance requests. For more information, see Spot Instance Requests in the Amazon Elastic Compute Cloud User Guide.
You can use DescribeSpotInstanceRequests
to find a running Spot instance by examining the response. If the status of the Spot instance is fulfilled
, the instance ID appears in the response and contains the identifier of the instance. Alternatively, you can use DescribeInstances with a filter to look for instances where the instance lifecycle is spot
.
Spot instance requests are deleted 4 hours after they are canceled and their instances are terminated.
Parameter Syntax
$result = $client->describeSpotInstanceRequests([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'SpotInstanceRequestIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
availability-zone-group
- The Availability Zone group. -
create-time
- The time stamp when the Spot instance request was created. -
fault-code
- The fault code related to the request. -
fault-message
- The fault message related to the request. -
instance-id
- The ID of the instance that fulfilled the request. -
launch-group
- The Spot instance launch group. -
launch.block-device-mapping.delete-on-termination
- Indicates whether the Amazon EBS volume is deleted on instance termination. -
launch.block-device-mapping.device-name
- The device name for the Amazon EBS volume (for example,/dev/sdh
). -
launch.block-device-mapping.snapshot-id
- The ID of the snapshot used for the Amazon EBS volume. -
launch.block-device-mapping.volume-size
- The size of the Amazon EBS volume, in GiB. -
launch.block-device-mapping.volume-type
- The type of the Amazon EBS volume:gp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic. -
launch.group-id
- The security group for the instance. -
launch.image-id
- The ID of the AMI. -
launch.instance-type
- The type of instance (for example,m3.medium
). -
launch.kernel-id
- The kernel ID. -
launch.key-name
- The name of the key pair the instance launched with. -
launch.monitoring-enabled
- Whether monitoring is enabled for the Spot instance. -
launch.ramdisk-id
- The RAM disk ID. -
network-interface.network-interface-id
- The ID of the network interface. -
network-interface.device-index
- The index of the device for the network interface attachment on the instance. -
network-interface.subnet-id
- The ID of the subnet for the instance. -
network-interface.description
- A description of the network interface. -
network-interface.private-ip-address
- The primary private IP address of the network interface. -
network-interface.delete-on-termination
- Indicates whether the network interface is deleted when the instance is terminated. -
network-interface.group-id
- The ID of the security group associated with the network interface. -
network-interface.group-name
- The name of the security group associated with the network interface. -
network-interface.addresses.primary
- Indicates whether the IP address is the primary private IP address. -
product-description
- The product description associated with the instance (Linux/UNIX
|Windows
). -
spot-instance-request-id
- The Spot instance request ID. -
spot-price
- The maximum hourly price for any Spot instance launched to fulfill the request. -
state
- The state of the Spot instance request (open
|active
|closed
|cancelled
|failed
). Spot bid status information can help you track your Amazon EC2 Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide. -
status-code
- The short code describing the most recent evaluation of your Spot instance request. -
status-message
- The message explaining the status of the Spot instance request. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
type
- The type of Spot instance request (one-time
|persistent
). -
launched-availability-zone
- The Availability Zone in which the bid is launched. -
valid-from
- The start date of the request. -
valid-until
- The end date of the request.
- SpotInstanceRequestIds
-
- Type: Array of strings
One or more Spot instance request IDs.
Result Syntax
[ 'SpotInstanceRequests' => [ [ 'ActualBlockHourlyPrice' => '<string>', 'AvailabilityZoneGroup' => '<string>', 'BlockDurationMinutes' => <integer>, 'CreateTime' => <DateTime>, 'Fault' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'InstanceId' => '<string>', 'LaunchGroup' => '<string>', 'LaunchSpecification' => [ 'AddressingType' => '<string>', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'EbsOptimized' => true || false, 'IamInstanceProfile' => [ 'Arn' => '<string>', 'Name' => '<string>', ], 'ImageId' => '<string>', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'KernelId' => '<string>', 'KeyName' => '<string>', 'Monitoring' => [ 'Enabled' => true || false, ], 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => true || false, 'DeleteOnTermination' => true || false, 'Description' => '<string>', 'DeviceIndex' => <integer>, 'Groups' => ['<string>', ...], 'NetworkInterfaceId' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Primary' => true || false, 'PrivateIpAddress' => '<string>', ], // ... ], 'SecondaryPrivateIpAddressCount' => <integer>, 'SubnetId' => '<string>', ], // ... ], 'Placement' => [ 'AvailabilityZone' => '<string>', 'GroupName' => '<string>', ], 'RamdiskId' => '<string>', 'SecurityGroups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'SubnetId' => '<string>', 'UserData' => '<string>', ], 'LaunchedAvailabilityZone' => '<string>', 'ProductDescription' => 'Linux/UNIX|Linux/UNIX (Amazon VPC)|Windows|Windows (Amazon VPC)', 'SpotInstanceRequestId' => '<string>', 'SpotPrice' => '<string>', 'State' => 'open|active|closed|cancelled|failed', 'Status' => [ 'Code' => '<string>', 'Message' => '<string>', 'UpdateTime' => <DateTime>, ], 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'Type' => 'one-time|persistent', 'ValidFrom' => <DateTime>, 'ValidUntil' => <DateTime>, ], // ... ], ]
Result Details
Members
- SpotInstanceRequests
-
- Type: Array of SpotInstanceRequest structures
One or more Spot instance requests.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a Spot Instance request
This example describes the specified Spot Instance request.
$result = $client->describeSpotInstanceRequests([ 'SpotInstanceRequestIds' => [ 'sir-08b93456', ], ]);
Result syntax:
[ 'SpotInstanceRequests' => [ [ 'CreateTime' =>, 'InstanceId' => 'i-1234567890abcdef0', 'LaunchSpecification' => [ 'BlockDeviceMappings' => [ [ 'DeviceName' => '/dev/sda1', 'Ebs' => [ 'DeleteOnTermination' => 1, 'VolumeSize' => 8, 'VolumeType' => 'standard', ], ], ], 'EbsOptimized' => , 'ImageId' => 'ami-7aba833f', 'InstanceType' => 'm1.small', 'KeyName' => 'my-key-pair', 'SecurityGroups' => [ [ 'GroupId' => 'sg-e38f24a7', 'GroupName' => 'my-security-group', ], ], ], 'LaunchedAvailabilityZone' => 'us-west-1b', 'ProductDescription' => 'Linux/UNIX', 'SpotInstanceRequestId' => 'sir-08b93456', 'SpotPrice' => '0.010000', 'State' => 'active', 'Status' => [ 'Code' => 'fulfilled', 'Message' => 'Your Spot request is fulfilled.', 'UpdateTime' => , ], 'Type' => 'one-time', ], ], ]
DescribeSpotPriceHistory
$result = $client->describeSpotPriceHistory
([/* ... */]); $promise = $client->describeSpotPriceHistoryAsync
([/* ... */]);
Describes the Spot price history. The prices returned are listed in chronological order, from the oldest to the most recent, for up to the past 90 days. For more information, see Spot Instance Pricing History in the Amazon Elastic Compute Cloud User Guide.
When you specify a start and end time, this operation returns the prices of the instance types within the time range that you specified and the time when the price changed. The price is valid within the time period that you specified; the response merely indicates the last time that the price changed.
Parameter Syntax
$result = $client->describeSpotPriceHistory([ 'AvailabilityZone' => '<string>', 'DryRun' => true || false, 'EndTime' => <integer || string || DateTime>, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'InstanceTypes' => ['<string>', ...], 'MaxResults' => <integer>, 'NextToken' => '<string>', 'ProductDescriptions' => ['<string>', ...], 'StartTime' => <integer || string || DateTime>, ]);
Parameter Details
Members
- AvailabilityZone
-
- Type: string
Filters the results by the specified Availability Zone.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - EndTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- Filters
-
- Type: Array of Filter structures
One or more filters.
-
availability-zone
- The Availability Zone for which prices should be returned. -
instance-type
- The type of instance (for example,m3.medium
). -
product-description
- The product description for the Spot price (Linux/UNIX
|SUSE Linux
|Windows
|Linux/UNIX (Amazon VPC)
|SUSE Linux (Amazon VPC)
|Windows (Amazon VPC)
). -
spot-price
- The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported). -
timestamp
- The timestamp of the Spot price history, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). Greater than or less than comparison is not supported.
- InstanceTypes
-
- Type: Array of strings
Filters the results by the specified instance types.
- MaxResults
-
- Type: int
The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned
NextToken
value. - NextToken
-
- Type: string
The token for the next set of results.
- ProductDescriptions
-
- Type: Array of strings
Filters the results by the specified basic product descriptions.
- StartTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
Result Syntax
[ 'NextToken' => '<string>', 'SpotPriceHistory' => [ [ 'AvailabilityZone' => '<string>', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'ProductDescription' => 'Linux/UNIX|Linux/UNIX (Amazon VPC)|Windows|Windows (Amazon VPC)', 'SpotPrice' => '<string>', 'Timestamp' => <DateTime>, ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token required to retrieve the next set of results. This value is
null
when there are no more results to return. - SpotPriceHistory
-
- Type: Array of SpotPrice structures
The historical Spot prices.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe Spot price history for Linux/UNIX (Amazon VPC)
This example returns the Spot Price history for m1.xlarge, Linux/UNIX (Amazon VPC) instances for a particular day in January.
$result = $client->describeSpotPriceHistory([ 'EndTime' =>, 'InstanceTypes' => [ 'm1.xlarge', ], 'ProductDescriptions' => [ 'Linux/UNIX (Amazon VPC)', ], 'StartTime' => , ]);
Result syntax:
[ 'SpotPriceHistory' => [ [ 'AvailabilityZone' => 'us-west-1a', 'InstanceType' => 'm1.xlarge', 'ProductDescription' => 'Linux/UNIX (Amazon VPC)', 'SpotPrice' => '0.080000', 'Timestamp' =>, ], [ 'AvailabilityZone' => 'us-west-1c', 'InstanceType' => 'm1.xlarge', 'ProductDescription' => 'Linux/UNIX (Amazon VPC)', 'SpotPrice' => '0.080000', 'Timestamp' => , ], ], ]
DescribeStaleSecurityGroups
$result = $client->describeStaleSecurityGroups
([/* ... */]); $promise = $client->describeStaleSecurityGroupsAsync
([/* ... */]);
[EC2-VPC only] Describes the stale security group rules for security groups in a specified VPC. Rules are stale when they reference a deleted security group in a peer VPC, or a security group in a peer VPC for which the VPC peering connection has been deleted.
Parameter Syntax
$result = $client->describeStaleSecurityGroups([ 'DryRun' => true || false, 'MaxResults' => <integer>, 'NextToken' => '<string>', 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
- MaxResults
-
- Type: int
The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.
- NextToken
-
- Type: string
The token for the next set of items to return. (You received this token from a prior call.)
- VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[ 'NextToken' => '<string>', 'StaleSecurityGroupSet' => [ [ 'Description' => '<string>', 'GroupId' => '<string>', 'GroupName' => '<string>', 'StaleIpPermissions' => [ [ 'FromPort' => <integer>, 'IpProtocol' => '<string>', 'IpRanges' => ['<string>', ...], 'PrefixListIds' => ['<string>', ...], 'ToPort' => <integer>, 'UserIdGroupPairs' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', 'PeeringStatus' => '<string>', 'UserId' => '<string>', 'VpcId' => '<string>', 'VpcPeeringConnectionId' => '<string>', ], // ... ], ], // ... ], 'StaleIpPermissionsEgress' => [ [ 'FromPort' => <integer>, 'IpProtocol' => '<string>', 'IpRanges' => ['<string>', ...], 'PrefixListIds' => ['<string>', ...], 'ToPort' => <integer>, 'UserIdGroupPairs' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', 'PeeringStatus' => '<string>', 'UserId' => '<string>', 'VpcId' => '<string>', 'VpcPeeringConnectionId' => '<string>', ], // ... ], ], // ... ], 'VpcId' => '<string>', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.
- StaleSecurityGroupSet
-
- Type: Array of StaleSecurityGroup structures
Information about the stale security groups.
Errors
There are no errors described for this operation.
DescribeSubnets
$result = $client->describeSubnets
([/* ... */]); $promise = $client->describeSubnetsAsync
([/* ... */]);
Describes one or more of your subnets.
For more information about subnets, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->describeSubnets([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'SubnetIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
availabilityZone
- The Availability Zone for the subnet. You can also useavailability-zone
as the filter name. -
available-ip-address-count
- The number of IP addresses in the subnet that are available. -
cidrBlock
- The CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also usecidr
orcidr-block
as the filter names. -
defaultForAz
- Indicates whether this is the default subnet for the Availability Zone. You can also usedefault-for-az
as the filter name. -
state
- The state of the subnet (pending
|available
). -
subnet-id
- The ID of the subnet. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
vpc-id
- The ID of the VPC for the subnet.
- SubnetIds
-
- Type: Array of strings
One or more subnet IDs.
Default: Describes all your subnets.
Result Syntax
[ 'Subnets' => [ [ 'AvailabilityZone' => '<string>', 'AvailableIpAddressCount' => <integer>, 'CidrBlock' => '<string>', 'DefaultForAz' => true || false, 'MapPublicIpOnLaunch' => true || false, 'State' => 'pending|available', 'SubnetId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], // ... ], ]
Result Details
Members
- Subnets
-
- Type: Array of Subnet structures
Information about one or more subnets.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe the subnets for a VPC
This example describes the subnets for the specified VPC.
$result = $client->describeSubnets([ 'Filters' => [ [ 'Name' => 'vpc-id', 'Values' => [ 'vpc-a01106c2', ], ], ], ]);
Result syntax:
[ 'Subnets' => [ [ 'AvailabilityZone' => 'us-east-1c', 'AvailableIpAddressCount' => 251, 'CidrBlock' => '10.0.1.0/24', 'DefaultForAz' => , 'MapPublicIpOnLaunch' => , 'State' => 'available', 'SubnetId' => 'subnet-9d4a7b6c', 'VpcId' => 'vpc-a01106c2', ], ], ]
DescribeTags
$result = $client->describeTags
([/* ... */]); $promise = $client->describeTagsAsync
([/* ... */]);
Describes one or more of the tags for your EC2 resources.
For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeTags([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
key
- The tag key. -
resource-id
- The resource ID. -
resource-type
- The resource type (customer-gateway
|dhcp-options
|image
|instance
|internet-gateway
|network-acl
|network-interface
|reserved-instances
|route-table
|security-group
|snapshot
|spot-instances-request
|subnet
|volume
|vpc
|vpn-connection
|vpn-gateway
). -
value
- The tag value.
- MaxResults
-
- Type: int
The maximum number of results to return in a single call. This value can be between 5 and 1000. To retrieve the remaining results, make another call with the returned
NextToken
value. - NextToken
-
- Type: string
The token to retrieve the next page of results.
Result Syntax
[ 'NextToken' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'ResourceId' => '<string>', 'ResourceType' => 'customer-gateway|dhcp-options|image|instance|internet-gateway|network-acl|network-interface|reserved-instances|route-table|snapshot|spot-instances-request|subnet|security-group|volume|vpc|vpn-connection|vpn-gateway', 'Value' => '<string>', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return.. - Tags
-
- Type: Array of TagDescription structures
A list of tags.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe the tags for a single resource
This example describes the tags for the specified instance.
$result = $client->describeTags([ 'Filters' => [ [ 'Name' => 'resource-id', 'Values' => [ 'i-1234567890abcdef8', ], ], ], ]);
Result syntax:
[ 'Tags' => [ [ 'Key' => 'Stack', 'ResourceId' => 'i-1234567890abcdef8', 'ResourceType' => 'instance', 'Value' => 'test', ], [ 'Key' => 'Name', 'ResourceId' => 'i-1234567890abcdef8', 'ResourceType' => 'instance', 'Value' => 'Beta Server', ], ], ]
DescribeVolumeAttribute
$result = $client->describeVolumeAttribute
([/* ... */]); $promise = $client->describeVolumeAttributeAsync
([/* ... */]);
Describes the specified attribute of the specified volume. You can specify only one attribute at a time.
For more information about EBS volumes, see Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeVolumeAttribute([ 'Attribute' => 'autoEnableIO|productCodes', 'DryRun' => true || false, 'VolumeId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Attribute
-
- Type: string
The instance attribute.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VolumeId
-
- Required: Yes
- Type: string
The ID of the volume.
Result Syntax
[ 'AutoEnableIO' => [ 'Value' => true || false, ], 'ProductCodes' => [ [ 'ProductCodeId' => '<string>', 'ProductCodeType' => 'devpay|marketplace', ], // ... ], 'VolumeId' => '<string>', ]
Result Details
Members
- AutoEnableIO
-
- Type: AttributeBooleanValue structure
The state of
autoEnableIO
attribute. - ProductCodes
-
- Type: Array of ProductCode structures
A list of product codes.
- VolumeId
-
- Type: string
The ID of the volume.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a volume attribute
This example describes the ``autoEnableIo`` attribute of the volume with the ID ``vol-049df61146c4d7901``.
$result = $client->describeVolumeAttribute([ 'Attribute' => 'autoEnableIO', 'VolumeId' => 'vol-049df61146c4d7901', ]);
Result syntax:
[ 'AutoEnableIO' => [ 'Value' => , ], 'VolumeId' => 'vol-049df61146c4d7901', ]
DescribeVolumeStatus
$result = $client->describeVolumeStatus
([/* ... */]); $promise = $client->describeVolumeStatusAsync
([/* ... */]);
Describes the status of the specified volumes. Volume status provides the result of the checks performed on your volumes to determine events that can impair the performance of your volumes. The performance of a volume can be affected if an issue occurs on the volume's underlying host. If the volume's underlying host experiences a power outage or system issue, after the system is restored, there could be data inconsistencies on the volume. Volume events notify you if this occurs. Volume actions notify you if any action needs to be taken in response to the event.
The DescribeVolumeStatus
operation provides the following information about the specified volumes:
Status: Reflects the current status of the volume. The possible values are ok
, impaired
, warning
, or insufficient-data
. If all checks pass, the overall status of the volume is ok
. If the check fails, the overall status is impaired
. If the status is insufficient-data
, then the checks may still be taking place on your volume at the time. We recommend that you retry the request. For more information on volume status, see Monitoring the Status of Your Volumes.
Events: Reflect the cause of a volume status and may require you to take action. For example, if your volume returns an impaired
status, then the volume event might be potential-data-inconsistency
. This means that your volume has been affected by an issue with the underlying host, has all I/O operations disabled, and may have inconsistent data.
Actions: Reflect the actions you may have to take in response to an event. For example, if the status of the volume is impaired
and the volume event shows potential-data-inconsistency
, then the action shows enable-volume-io
. This means that you may want to enable the I/O operations for the volume by calling the EnableVolumeIO action and then check the volume for data consistency.
Volume status is based on the volume status checks, and does not reflect the volume state. Therefore, volume status does not indicate volumes in the error
state (for example, when a volume is incapable of accepting I/O.)
Parameter Syntax
$result = $client->describeVolumeStatus([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'MaxResults' => <integer>, 'NextToken' => '<string>', 'VolumeIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
action.code
- The action code for the event (for example,enable-volume-io
). -
action.description
- A description of the action. -
action.event-id
- The event ID associated with the action. -
availability-zone
- The Availability Zone of the instance. -
event.description
- A description of the event. -
event.event-id
- The event ID. -
event.event-type
- The event type (forio-enabled
:passed
|failed
; forio-performance
:io-performance:degraded
|io-performance:severely-degraded
|io-performance:stalled
). -
event.not-after
- The latest end time for the event. -
event.not-before
- The earliest start time for the event. -
volume-status.details-name
- The cause forvolume-status.status
(io-enabled
|io-performance
). -
volume-status.details-status
- The status ofvolume-status.details-name
(forio-enabled
:passed
|failed
; forio-performance
:normal
|degraded
|severely-degraded
|stalled
). -
volume-status.status
- The status of the volume (ok
|impaired
|warning
|insufficient-data
).
- MaxResults
-
- Type: int
The maximum number of volume results returned by
DescribeVolumeStatus
in paginated output. When this parameter is used, the request only returnsMaxResults
results in a single page along with aNextToken
response element. The remaining results of the initial request can be seen by sending another request with the returnedNextToken
value. This value can be between 5 and 1000; ifMaxResults
is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, thenDescribeVolumeStatus
returns all results. You cannot specify this parameter and the volume IDs parameter in the same request. - NextToken
-
- Type: string
The
NextToken
value to include in a futureDescribeVolumeStatus
request. When the results of the request exceedMaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return. - VolumeIds
-
- Type: Array of strings
One or more volume IDs.
Default: Describes all your volumes.
Result Syntax
[ 'NextToken' => '<string>', 'VolumeStatuses' => [ [ 'Actions' => [ [ 'Code' => '<string>', 'Description' => '<string>', 'EventId' => '<string>', 'EventType' => '<string>', ], // ... ], 'AvailabilityZone' => '<string>', 'Events' => [ [ 'Description' => '<string>', 'EventId' => '<string>', 'EventType' => '<string>', 'NotAfter' => <DateTime>, 'NotBefore' => <DateTime>, ], // ... ], 'VolumeId' => '<string>', 'VolumeStatus' => [ 'Details' => [ [ 'Name' => 'io-enabled|io-performance', 'Status' => '<string>', ], // ... ], 'Status' => 'ok|impaired|insufficient-data', ], ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use to retrieve the next page of results. This value is
null
when there are no more results to return. - VolumeStatuses
-
- Type: Array of VolumeStatusItem structures
A list of volumes.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe the status of a single volume
This example describes the status for the volume ``vol-1234567890abcdef0``.
$result = $client->describeVolumeStatus([ 'VolumeIds' => [ 'vol-1234567890abcdef0', ], ]);
Result syntax:
[ 'VolumeStatuses' => [ [ 'Actions' => [ ], 'AvailabilityZone' => 'us-east-1a', 'Events' => [ ], 'VolumeId' => 'vol-1234567890abcdef0', 'VolumeStatus' => [ 'Details' => [ [ 'Name' => 'io-enabled', 'Status' => 'passed', ], [ 'Name' => 'io-performance', 'Status' => 'not-applicable', ], ], 'Status' => 'ok', ], ], ], ]
Example 2: To describe the status of impaired volumes
This example describes the status for all volumes that are impaired. In this example output, there are no impaired volumes.
$result = $client->describeVolumeStatus([ 'Filters' => [ [ 'Name' => 'volume-status.status', 'Values' => [ 'impaired', ], ], ], ]);
Result syntax:
[ 'VolumeStatuses' => [ ], ]
DescribeVolumes
$result = $client->describeVolumes
([/* ... */]); $promise = $client->describeVolumesAsync
([/* ... */]);
Describes the specified EBS volumes.
If you are describing a long list of volumes, you can paginate the output to make the list more manageable. The MaxResults
parameter sets the maximum number of results returned in a single page. If the list of results exceeds your MaxResults
value, then that number of results is returned along with a NextToken
value that can be passed to a subsequent DescribeVolumes
request to retrieve the remaining results.
For more information about EBS volumes, see Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeVolumes([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'MaxResults' => <integer>, 'NextToken' => '<string>', 'VolumeIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
attachment.attach-time
- The time stamp when the attachment initiated. -
attachment.delete-on-termination
- Whether the volume is deleted on instance termination. -
attachment.device
- The device name that is exposed to the instance (for example,/dev/sda1
). -
attachment.instance-id
- The ID of the instance the volume is attached to. -
attachment.status
- The attachment state (attaching
|attached
|detaching
|detached
). -
availability-zone
- The Availability Zone in which the volume was created. -
create-time
- The time stamp when the volume was created. -
encrypted
- The encryption status of the volume. -
size
- The size of the volume, in GiB. -
snapshot-id
- The snapshot from which the volume was created. -
status
- The status of the volume (creating
|available
|in-use
|deleting
|deleted
|error
). -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
volume-id
- The volume ID. -
volume-type
- The Amazon EBS volume type. This can begp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.
- MaxResults
-
- Type: int
The maximum number of volume results returned by
DescribeVolumes
in paginated output. When this parameter is used,DescribeVolumes
only returnsMaxResults
results in a single page along with aNextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeVolumes
request with the returnedNextToken
value. This value can be between 5 and 1000; ifMaxResults
is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, thenDescribeVolumes
returns all results. You cannot specify this parameter and the volume IDs parameter in the same request. - NextToken
-
- Type: string
The
NextToken
value returned from a previous paginatedDescribeVolumes
request whereMaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned theNextToken
value. This value isnull
when there are no more results to return. - VolumeIds
-
- Type: Array of strings
One or more volume IDs.
Result Syntax
[ 'NextToken' => '<string>', 'Volumes' => [ [ 'Attachments' => [ [ 'AttachTime' => <DateTime>, 'DeleteOnTermination' => true || false, 'Device' => '<string>', 'InstanceId' => '<string>', 'State' => 'attaching|attached|detaching|detached', 'VolumeId' => '<string>', ], // ... ], 'AvailabilityZone' => '<string>', 'CreateTime' => <DateTime>, 'Encrypted' => true || false, 'Iops' => <integer>, 'KmsKeyId' => '<string>', 'Size' => <integer>, 'SnapshotId' => '<string>', 'State' => 'creating|available|in-use|deleting|deleted|error', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VolumeId' => '<string>', 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The
NextToken
value to include in a futureDescribeVolumes
request. When the results of aDescribeVolumes
request exceedMaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return. - Volumes
-
- Type: Array of Volume structures
Information about the volumes.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe all volumes
This example describes all of your volumes in the default region.
$result = $client->describeVolumes([ ]);
Result syntax:
[ 'NextToken' => '', 'Volumes' => [ [ 'Attachments' => [ [ 'AttachTime' =>, 'DeleteOnTermination' => 1, 'Device' => '/dev/sda1', 'InstanceId' => 'i-1234567890abcdef0', 'State' => 'attached', 'VolumeId' => 'vol-049df61146c4d7901', ], ], 'AvailabilityZone' => 'us-east-1a', 'CreateTime' => , 'Size' => 8, 'SnapshotId' => 'snap-1234567890abcdef0', 'State' => 'in-use', 'VolumeId' => 'vol-049df61146c4d7901', 'VolumeType' => 'standard', ], ], ]
Example 2: To describe volumes that are attached to a specific instance
This example describes all volumes that are both attached to the instance with the ID i-1234567890abcdef0 and set to delete when the instance terminates.
$result = $client->describeVolumes([ 'Filters' => [ [ 'Name' => 'attachment.instance-id', 'Values' => [ 'i-1234567890abcdef0', ], ], [ 'Name' => 'attachment.delete-on-termination', 'Values' => [ 'true', ], ], ], ]);
Result syntax:
[ 'Volumes' => [ [ 'Attachments' => [ [ 'AttachTime' =>, 'DeleteOnTermination' => 1, 'Device' => '/dev/sda1', 'InstanceId' => 'i-1234567890abcdef0', 'State' => 'attached', 'VolumeId' => 'vol-049df61146c4d7901', ], ], 'AvailabilityZone' => 'us-east-1a', 'CreateTime' => , 'Size' => 8, 'SnapshotId' => 'snap-1234567890abcdef0', 'State' => 'in-use', 'VolumeId' => 'vol-049df61146c4d7901', 'VolumeType' => 'standard', ], ], ]
DescribeVpcAttribute
$result = $client->describeVpcAttribute
([/* ... */]); $promise = $client->describeVpcAttributeAsync
([/* ... */]);
Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.
Parameter Syntax
$result = $client->describeVpcAttribute([ 'Attribute' => 'enableDnsSupport|enableDnsHostnames', // REQUIRED 'DryRun' => true || false, 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Attribute
-
- Required: Yes
- Type: string
The VPC attribute.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[ 'EnableDnsHostnames' => [ 'Value' => true || false, ], 'EnableDnsSupport' => [ 'Value' => true || false, ], 'VpcId' => '<string>', ]
Result Details
Members
- EnableDnsHostnames
-
- Type: AttributeBooleanValue structure
Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is
true
, instances in the VPC get DNS hostnames; otherwise, they do not. - EnableDnsSupport
-
- Type: AttributeBooleanValue structure
Indicates whether DNS resolution is enabled for the VPC. If this attribute is
true
, the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not. - VpcId
-
- Type: string
The ID of the VPC.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe the enableDnsSupport attribute
This example describes the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.
$result = $client->describeVpcAttribute([ 'Attribute' => 'enableDnsSupport', 'VpcId' => 'vpc-a01106c2', ]);
Result syntax:
[ 'EnableDnsSupport' => [ 'Value' => 1, ], 'VpcId' => 'vpc-a01106c2', ]
Example 2: To describe the enableDnsHostnames attribute
This example describes the enableDnsHostnames attribute. This attribute indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not.
$result = $client->describeVpcAttribute([ 'Attribute' => 'enableDnsHostnames', 'VpcId' => 'vpc-a01106c2', ]);
Result syntax:
[ 'EnableDnsHostnames' => [ 'Value' => 1, ], 'VpcId' => 'vpc-a01106c2', ]
DescribeVpcClassicLink
$result = $client->describeVpcClassicLink
([/* ... */]); $promise = $client->describeVpcClassicLinkAsync
([/* ... */]);
Describes the ClassicLink status of one or more VPCs.
Parameter Syntax
$result = $client->describeVpcClassicLink([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'VpcIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
is-classic-link-enabled
- Whether the VPC is enabled for ClassicLink (true
|false
). -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter.
- VpcIds
-
- Type: Array of strings
One or more VPCs for which you want to describe the ClassicLink status.
Result Syntax
[ 'Vpcs' => [ [ 'ClassicLinkEnabled' => true || false, 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], // ... ], ]
Result Details
Members
- Vpcs
-
- Type: Array of VpcClassicLink structures
The ClassicLink status of one or more VPCs.
Errors
There are no errors described for this operation.
DescribeVpcClassicLinkDnsSupport
$result = $client->describeVpcClassicLinkDnsSupport
([/* ... */]); $promise = $client->describeVpcClassicLinkDnsSupportAsync
([/* ... */]);
Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information about ClassicLink, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->describeVpcClassicLinkDnsSupport([ 'MaxResults' => <integer>, 'NextToken' => '<string>', 'VpcIds' => ['<string>', ...], ]);
Parameter Details
Members
- MaxResults
-
- Type: int
The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.
- NextToken
-
- Type: string
The token for the next set of items to return. (You received this token from a prior call.)
- VpcIds
-
- Type: Array of strings
One or more VPC IDs.
Result Syntax
[ 'NextToken' => '<string>', 'Vpcs' => [ [ 'ClassicLinkDnsSupported' => true || false, 'VpcId' => '<string>', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use when requesting the next set of items.
- Vpcs
-
- Type: Array of ClassicLinkDnsSupport structures
Information about the ClassicLink DNS support status of the VPCs.
Errors
There are no errors described for this operation.
DescribeVpcEndpointServices
$result = $client->describeVpcEndpointServices
([/* ... */]); $promise = $client->describeVpcEndpointServicesAsync
([/* ... */]);
Describes all supported AWS services that can be specified when creating a VPC endpoint.
Parameter Syntax
$result = $client->describeVpcEndpointServices([ 'DryRun' => true || false, 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - MaxResults
-
- Type: int
The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.
Constraint: If the value is greater than 1000, we return only 1000 items.
- NextToken
-
- Type: string
The token for the next set of items to return. (You received this token from a prior call.)
Result Syntax
[ 'NextToken' => '<string>', 'ServiceNames' => ['<string>', ...], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.
- ServiceNames
-
- Type: Array of strings
A list of supported AWS services.
Errors
There are no errors described for this operation.
DescribeVpcEndpoints
$result = $client->describeVpcEndpoints
([/* ... */]); $promise = $client->describeVpcEndpointsAsync
([/* ... */]);
Describes one or more of your VPC endpoints.
Parameter Syntax
$result = $client->describeVpcEndpoints([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'MaxResults' => <integer>, 'NextToken' => '<string>', 'VpcEndpointIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
service-name
: The name of the AWS service. -
vpc-id
: The ID of the VPC in which the endpoint resides. -
vpc-endpoint-id
: The ID of the endpoint. -
vpc-endpoint-state
: The state of the endpoint. (pending
|available
|deleting
|deleted
)
- MaxResults
-
- Type: int
The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.
Constraint: If the value is greater than 1000, we return only 1000 items.
- NextToken
-
- Type: string
The token for the next set of items to return. (You received this token from a prior call.)
- VpcEndpointIds
-
- Type: Array of strings
One or more endpoint IDs.
Result Syntax
[ 'NextToken' => '<string>', 'VpcEndpoints' => [ [ 'CreationTimestamp' => <DateTime>, 'PolicyDocument' => '<string>', 'RouteTableIds' => ['<string>', ...], 'ServiceName' => '<string>', 'State' => 'Pending|Available|Deleting|Deleted', 'VpcEndpointId' => '<string>', 'VpcId' => '<string>', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.
- VpcEndpoints
-
- Type: Array of VpcEndpoint structures
Information about the endpoints.
Errors
There are no errors described for this operation.
DescribeVpcPeeringConnections
$result = $client->describeVpcPeeringConnections
([/* ... */]); $promise = $client->describeVpcPeeringConnectionsAsync
([/* ... */]);
Describes one or more of your VPC peering connections.
Parameter Syntax
$result = $client->describeVpcPeeringConnections([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'VpcPeeringConnectionIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
accepter-vpc-info.cidr-block
- The CIDR block of the peer VPC. -
accepter-vpc-info.owner-id
- The AWS account ID of the owner of the peer VPC. -
accepter-vpc-info.vpc-id
- The ID of the peer VPC. -
expiration-time
- The expiration date and time for the VPC peering connection. -
requester-vpc-info.cidr-block
- The CIDR block of the requester's VPC. -
requester-vpc-info.owner-id
- The AWS account ID of the owner of the requester VPC. -
requester-vpc-info.vpc-id
- The ID of the requester VPC. -
status-code
- The status of the VPC peering connection (pending-acceptance
|failed
|expired
|provisioning
|active
|deleted
|rejected
). -
status-message
- A message that provides more information about the status of the VPC peering connection, if applicable. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
vpc-peering-connection-id
- The ID of the VPC peering connection.
- VpcPeeringConnectionIds
-
- Type: Array of strings
One or more VPC peering connection IDs.
Default: Describes all your VPC peering connections.
Result Syntax
[ 'VpcPeeringConnections' => [ [ 'AccepterVpcInfo' => [ 'CidrBlock' => '<string>', 'OwnerId' => '<string>', 'PeeringOptions' => [ 'AllowDnsResolutionFromRemoteVpc' => true || false, 'AllowEgressFromLocalClassicLinkToRemoteVpc' => true || false, 'AllowEgressFromLocalVpcToRemoteClassicLink' => true || false, ], 'VpcId' => '<string>', ], 'ExpirationTime' => <DateTime>, 'RequesterVpcInfo' => [ 'CidrBlock' => '<string>', 'OwnerId' => '<string>', 'PeeringOptions' => [ 'AllowDnsResolutionFromRemoteVpc' => true || false, 'AllowEgressFromLocalClassicLinkToRemoteVpc' => true || false, 'AllowEgressFromLocalVpcToRemoteClassicLink' => true || false, ], 'VpcId' => '<string>', ], 'Status' => [ 'Code' => 'initiating-request|pending-acceptance|active|deleted|rejected|failed|expired|provisioning|deleting', 'Message' => '<string>', ], 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcPeeringConnectionId' => '<string>', ], // ... ], ]
Result Details
Members
- VpcPeeringConnections
-
- Type: Array of VpcPeeringConnection structures
Information about the VPC peering connections.
Errors
There are no errors described for this operation.
DescribeVpcs
$result = $client->describeVpcs
([/* ... */]); $promise = $client->describeVpcsAsync
([/* ... */]);
Describes one or more of your VPCs.
Parameter Syntax
$result = $client->describeVpcs([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'VpcIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
cidr
- The CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example,/28
). -
dhcp-options-id
- The ID of a set of DHCP options. -
isDefault
- Indicates whether the VPC is the default VPC. -
state
- The state of the VPC (pending
|available
). -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
vpc-id
- The ID of the VPC.
- VpcIds
-
- Type: Array of strings
One or more VPC IDs.
Default: Describes all your VPCs.
Result Syntax
[ 'Vpcs' => [ [ 'CidrBlock' => '<string>', 'DhcpOptionsId' => '<string>', 'InstanceTenancy' => 'default|dedicated|host', 'IsDefault' => true || false, 'State' => 'pending|available', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VpcId' => '<string>', ], // ... ], ]
Result Details
Members
- Vpcs
-
- Type: Array of Vpc structures
Information about one or more VPCs.
Errors
There are no errors described for this operation.
Examples
Example 1: To describe a VPC
This example describes the specified VPC.
$result = $client->describeVpcs([ 'VpcIds' => [ 'vpc-a01106c2', ], ]);
Result syntax:
[ 'Vpcs' => [ [ 'CidrBlock' => '10.0.0.0/16', 'DhcpOptionsId' => 'dopt-7a8b9c2d', 'InstanceTenancy' => 'default', 'IsDefault' => , 'State' => 'available', 'Tags' => [ [ 'Key' => 'Name', 'Value' => 'MyVPC', ], ], 'VpcId' => 'vpc-a01106c2', ], ], ]
DescribeVpnConnections
$result = $client->describeVpnConnections
([/* ... */]); $promise = $client->describeVpnConnectionsAsync
([/* ... */]);
Describes one or more of your VPN connections.
For more information about VPN connections, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->describeVpnConnections([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'VpnConnectionIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
customer-gateway-configuration
- The configuration information for the customer gateway. -
customer-gateway-id
- The ID of a customer gateway associated with the VPN connection. -
state
- The state of the VPN connection (pending
|available
|deleting
|deleted
). -
option.static-routes-only
- Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP). -
route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet used in a customer data center. -
bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device. -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
type
- The type of VPN connection. Currently the only supported type isipsec.1
. -
vpn-connection-id
- The ID of the VPN connection. -
vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
- VpnConnectionIds
-
- Type: Array of strings
One or more VPN connection IDs.
Default: Describes your VPN connections.
Result Syntax
[ 'VpnConnections' => [ [ 'CustomerGatewayConfiguration' => '<string>', 'CustomerGatewayId' => '<string>', 'Options' => [ 'StaticRoutesOnly' => true || false, ], 'Routes' => [ [ 'DestinationCidrBlock' => '<string>', 'Source' => 'Static', 'State' => 'pending|available|deleting|deleted', ], // ... ], 'State' => 'pending|available|deleting|deleted', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'Type' => 'ipsec.1', 'VgwTelemetry' => [ [ 'AcceptedRouteCount' => <integer>, 'LastStatusChange' => <DateTime>, 'OutsideIpAddress' => '<string>', 'Status' => 'UP|DOWN', 'StatusMessage' => '<string>', ], // ... ], 'VpnConnectionId' => '<string>', 'VpnGatewayId' => '<string>', ], // ... ], ]
Result Details
Members
- VpnConnections
-
- Type: Array of VpnConnection structures
Information about one or more VPN connections.
Errors
There are no errors described for this operation.
DescribeVpnGateways
$result = $client->describeVpnGateways
([/* ... */]); $promise = $client->describeVpnGatewaysAsync
([/* ... */]);
Describes one or more of your virtual private gateways.
For more information about virtual private gateways, see Adding an IPsec Hardware VPN to Your VPC in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->describeVpnGateways([ 'DryRun' => true || false, 'Filters' => [ [ 'Name' => '<string>', 'Values' => ['<string>', ...], ], // ... ], 'VpnGatewayIds' => ['<string>', ...], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Filters
-
- Type: Array of Filter structures
One or more filters.
-
attachment.state
- The current state of the attachment between the gateway and the VPC (attaching
|attached
|detaching
|detached
). -
attachment.vpc-id
- The ID of an attached VPC. -
availability-zone
- The Availability Zone for the virtual private gateway (if applicable). -
state
- The state of the virtual private gateway (pending
|available
|deleting
|deleted
). -
tag
:key=value - The key/value combination of a tag assigned to the resource. -
tag-key
- The key of a tag assigned to the resource. This filter is independent of thetag-value
filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see thetag
:key=value filter. -
tag-value
- The value of a tag assigned to the resource. This filter is independent of thetag-key
filter. -
type
- The type of virtual private gateway. Currently the only supported type isipsec.1
. -
vpn-gateway-id
- The ID of the virtual private gateway.
- VpnGatewayIds
-
- Type: Array of strings
One or more virtual private gateway IDs.
Default: Describes all your virtual private gateways.
Result Syntax
[ 'VpnGateways' => [ [ 'AvailabilityZone' => '<string>', 'State' => 'pending|available|deleting|deleted', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'Type' => 'ipsec.1', 'VpcAttachments' => [ [ 'State' => 'attaching|attached|detaching|detached', 'VpcId' => '<string>', ], // ... ], 'VpnGatewayId' => '<string>', ], // ... ], ]
Result Details
Members
- VpnGateways
-
- Type: Array of VpnGateway structures
Information about one or more virtual private gateways.
Errors
There are no errors described for this operation.
DetachClassicLinkVpc
$result = $client->detachClassicLinkVpc
([/* ... */]); $promise = $client->detachClassicLinkVpcAsync
([/* ... */]);
Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.
Parameter Syntax
$result = $client->detachClassicLinkVpc([ 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the instance to unlink from the VPC.
- VpcId
-
- Required: Yes
- Type: string
The ID of the VPC to which the instance is linked.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Returns
true
if the request succeeds; otherwise, it returns an error.
Errors
There are no errors described for this operation.
DetachInternetGateway
$result = $client->detachInternetGateway
([/* ... */]); $promise = $client->detachInternetGatewayAsync
([/* ... */]);
Detaches an Internet gateway from a VPC, disabling connectivity between the Internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses.
Parameter Syntax
$result = $client->detachInternetGateway([ 'DryRun' => true || false, 'InternetGatewayId' => '<string>', // REQUIRED 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InternetGatewayId
-
- Required: Yes
- Type: string
The ID of the Internet gateway.
- VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To detach an Internet gateway from a VPC
This example detaches the specified Internet gateway from the specified VPC.
$result = $client->detachInternetGateway([ 'InternetGatewayId' => 'igw-c0a643a9', 'VpcId' => 'vpc-a01106c2', ]);
DetachNetworkInterface
$result = $client->detachNetworkInterface
([/* ... */]); $promise = $client->detachNetworkInterfaceAsync
([/* ... */]);
Detaches a network interface from an instance.
Parameter Syntax
$result = $client->detachNetworkInterface([ 'AttachmentId' => '<string>', // REQUIRED 'DryRun' => true || false, 'Force' => true || false, ]);
Parameter Details
Members
- AttachmentId
-
- Required: Yes
- Type: string
The ID of the attachment.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Force
-
- Type: boolean
Specifies whether to force a detachment.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To detach a network interface from an instance
This example detaches the specified network interface from its attached instance.
$result = $client->detachNetworkInterface([ 'AttachmentId' => 'eni-attach-66c4350a', ]);
DetachVolume
$result = $client->detachVolume
([/* ... */]); $promise = $client->detachVolumeAsync
([/* ... */]);
Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the busy
state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.
When a volume with an AWS Marketplace product code is detached from an instance, the product code is no longer associated with the instance.
For more information, see Detaching an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->detachVolume([ 'Device' => '<string>', 'DryRun' => true || false, 'Force' => true || false, 'InstanceId' => '<string>', 'VolumeId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Device
-
- Type: string
The device name.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Force
-
- Type: boolean
Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
- InstanceId
-
- Type: string
The ID of the instance.
- VolumeId
-
- Required: Yes
- Type: string
The ID of the volume.
Result Syntax
[ 'AttachTime' => <DateTime>, 'DeleteOnTermination' => true || false, 'Device' => '<string>', 'InstanceId' => '<string>', 'State' => 'attaching|attached|detaching|detached', 'VolumeId' => '<string>', ]
Result Details
Members
- AttachTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time stamp when the attachment initiated.
- DeleteOnTermination
-
- Type: boolean
Indicates whether the EBS volume is deleted on instance termination.
- Device
-
- Type: string
The device name.
- InstanceId
-
- Type: string
The ID of the instance.
- State
-
- Type: string
The attachment state of the volume.
- VolumeId
-
- Type: string
The ID of the volume.
Errors
There are no errors described for this operation.
Examples
Example 1: To detach a volume from an instance
This example detaches the volume (``vol-049df61146c4d7901``) from the instance it is attached to.
$result = $client->detachVolume([ 'VolumeId' => 'vol-1234567890abcdef0', ]);
Result syntax:
[ 'AttachTime' =>, 'Device' => '/dev/sdb', 'InstanceId' => 'i-1234567890abcdef0', 'State' => 'detaching', 'VolumeId' => 'vol-049df61146c4d7901', ]
DetachVpnGateway
$result = $client->detachVpnGateway
([/* ... */]); $promise = $client->detachVpnGatewayAsync
([/* ... */]);
Detaches a virtual private gateway from a VPC. You do this if you're planning to turn off the VPC and not use it anymore. You can confirm a virtual private gateway has been completely detached from a VPC by describing the virtual private gateway (any attachments to the virtual private gateway are also described).
You must wait for the attachment's state to switch to detached
before you can delete the VPC or attach a different VPC to the virtual private gateway.
Parameter Syntax
$result = $client->detachVpnGateway([ 'DryRun' => true || false, 'VpcId' => '<string>', // REQUIRED 'VpnGatewayId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
- VpnGatewayId
-
- Required: Yes
- Type: string
The ID of the virtual private gateway.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
DisableVgwRoutePropagation
$result = $client->disableVgwRoutePropagation
([/* ... */]); $promise = $client->disableVgwRoutePropagationAsync
([/* ... */]);
Disables a virtual private gateway (VGW) from propagating routes to a specified route table of a VPC.
Parameter Syntax
$result = $client->disableVgwRoutePropagation([ 'GatewayId' => '<string>', // REQUIRED 'RouteTableId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- GatewayId
-
- Required: Yes
- Type: string
The ID of the virtual private gateway.
- RouteTableId
-
- Required: Yes
- Type: string
The ID of the route table.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To disable route propagation
This example disables the specified virtual private gateway from propagating static routes to the specified route table.
$result = $client->disableVgwRoutePropagation([ 'GatewayId' => 'vgw-9a4cacf3', 'RouteTableId' => 'rtb-22574640', ]);
DisableVpcClassicLink
$result = $client->disableVpcClassicLink
([/* ... */]); $promise = $client->disableVpcClassicLinkAsync
([/* ... */]);
Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it.
Parameter Syntax
$result = $client->disableVpcClassicLink([ 'DryRun' => true || false, 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Returns
true
if the request succeeds; otherwise, it returns an error.
Errors
There are no errors described for this operation.
DisableVpcClassicLinkDnsSupport
$result = $client->disableVpcClassicLinkDnsSupport
([/* ... */]); $promise = $client->disableVpcClassicLinkDnsSupportAsync
([/* ... */]);
Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked. For more information about ClassicLink, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->disableVpcClassicLinkDnsSupport([ 'VpcId' => '<string>', ]);
Parameter Details
Members
- VpcId
-
- Type: string
The ID of the VPC.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Returns
true
if the request succeeds; otherwise, it returns an error.
Errors
There are no errors described for this operation.
DisassociateAddress
$result = $client->disassociateAddress
([/* ... */]); $promise = $client->disassociateAddressAsync
([/* ... */]);
Disassociates an Elastic IP address from the instance or network interface it's associated with.
An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.
This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.
Parameter Syntax
$result = $client->disassociateAddress([ 'AssociationId' => '<string>', 'DryRun' => true || false, 'PublicIp' => '<string>', ]);
Parameter Details
Members
- AssociationId
-
- Type: string
[EC2-VPC] The association ID. Required for EC2-VPC.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - PublicIp
-
- Type: string
[EC2-Classic] The Elastic IP address. Required for EC2-Classic.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To disassociate an Elastic IP address in EC2-VPC
This example disassociates an Elastic IP address from an instance in a VPC.
$result = $client->disassociateAddress([ 'AssociationId' => 'eipassoc-2bebb745', ]);
Example 2: To disassociate an Elastic IP addresses in EC2-Classic
This example disassociates an Elastic IP address from an instance in EC2-Classic.
$result = $client->disassociateAddress([ 'PublicIp' => '198.51.100.0', ]);
DisassociateRouteTable
$result = $client->disassociateRouteTable
([/* ... */]); $promise = $client->disassociateRouteTableAsync
([/* ... */]);
Disassociates a subnet from a route table.
After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->disassociateRouteTable([ 'AssociationId' => '<string>', // REQUIRED 'DryRun' => true || false, ]);
Parameter Details
Members
- AssociationId
-
- Required: Yes
- Type: string
The association ID representing the current association between the route table and subnet.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To disassociate a route table
This example disassociates the specified route table from its associated subnet.
$result = $client->disassociateRouteTable([ 'AssociationId' => 'rtbassoc-781d0d1a', ]);
EnableVgwRoutePropagation
$result = $client->enableVgwRoutePropagation
([/* ... */]); $promise = $client->enableVgwRoutePropagationAsync
([/* ... */]);
Enables a virtual private gateway (VGW) to propagate routes to the specified route table of a VPC.
Parameter Syntax
$result = $client->enableVgwRoutePropagation([ 'GatewayId' => '<string>', // REQUIRED 'RouteTableId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- GatewayId
-
- Required: Yes
- Type: string
The ID of the virtual private gateway.
- RouteTableId
-
- Required: Yes
- Type: string
The ID of the route table.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To enable route propagation
This example enables the specified virtual private gateway to propagate static routes to the specified route table.
$result = $client->enableVgwRoutePropagation([ 'GatewayId' => 'vgw-9a4cacf3', 'RouteTableId' => 'rtb-22574640', ]);
EnableVolumeIO
$result = $client->enableVolumeIO
([/* ... */]); $promise = $client->enableVolumeIOAsync
([/* ... */]);
Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.
Parameter Syntax
$result = $client->enableVolumeIO([ 'DryRun' => true || false, 'VolumeId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VolumeId
-
- Required: Yes
- Type: string
The ID of the volume.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To enable I/O for a volume
This example enables I/O on volume ``vol-1234567890abcdef0``.
$result = $client->enableVolumeIO([ 'VolumeId' => 'vol-1234567890abcdef0', ]);
EnableVpcClassicLink
$result = $client->enableVpcClassicLink
([/* ... */]); $promise = $client->enableVpcClassicLinkAsync
([/* ... */]);
Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC's route tables have existing routes for address ranges within the 10.0.0.0/8
IP address range, excluding local routes for VPCs in the 10.0.0.0/16
and 10.1.0.0/16
IP address ranges. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->enableVpcClassicLink([ 'DryRun' => true || false, 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Returns
true
if the request succeeds; otherwise, it returns an error.
Errors
There are no errors described for this operation.
EnableVpcClassicLinkDnsSupport
$result = $client->enableVpcClassicLinkDnsSupport
([/* ... */]); $promise = $client->enableVpcClassicLinkDnsSupportAsync
([/* ... */]);
Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information about ClassicLink, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->enableVpcClassicLinkDnsSupport([ 'VpcId' => '<string>', ]);
Parameter Details
Members
- VpcId
-
- Type: string
The ID of the VPC.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Returns
true
if the request succeeds; otherwise, it returns an error.
Errors
There are no errors described for this operation.
GetConsoleOutput
$result = $client->getConsoleOutput
([/* ... */]); $promise = $client->getConsoleOutputAsync
([/* ... */]);
Gets the console output for the specified instance.
Instances do not have a physical monitor through which you can view their console output. They also lack physical controls that allow you to power up, reboot, or shut them down. To allow these actions, we provide them through the Amazon EC2 API and command line interface.
Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which is available for at least one hour after the most recent post.
For Linux instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. This output is buffered because the instance produces it and then posts it to a store where the instance's owner can retrieve it.
For Windows instances, the instance console output includes output from the EC2Config service.
Parameter Syntax
$result = $client->getConsoleOutput([ 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the instance.
Result Syntax
[ 'InstanceId' => '<string>', 'Output' => '<string>', 'Timestamp' => <DateTime>, ]
Result Details
Members
- InstanceId
-
- Type: string
The ID of the instance.
- Output
-
- Type: string
The console output, Base64-encoded. If using a command line tool, the tool decodes the output for you.
- Timestamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time the output was last updated.
Errors
There are no errors described for this operation.
GetConsoleScreenshot
$result = $client->getConsoleScreenshot
([/* ... */]); $promise = $client->getConsoleScreenshotAsync
([/* ... */]);
Retrieve a JPG-format screenshot of a running instance to help with troubleshooting.
The returned content is Base64-encoded.
Parameter Syntax
$result = $client->getConsoleScreenshot([ 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED 'WakeUp' => true || false, ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the instance.
- WakeUp
-
- Type: boolean
When set to
true
, acts as keystroke input and wakes up an instance that's in standby or "sleep" mode.
Result Syntax
[ 'ImageData' => '<string>', 'InstanceId' => '<string>', ]
Result Details
Members
- ImageData
-
- Type: string
The data that comprises the image.
- InstanceId
-
- Type: string
The ID of the instance.
Errors
There are no errors described for this operation.
GetHostReservationPurchasePreview
$result = $client->getHostReservationPurchasePreview
([/* ... */]); $promise = $client->getHostReservationPurchasePreviewAsync
([/* ... */]);
Preview a reservation purchase with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation.
This is a preview of the PurchaseHostReservation action and does not result in the offering being purchased.
Parameter Syntax
$result = $client->getHostReservationPurchasePreview([ 'HostIdSet' => ['<string>', ...], // REQUIRED 'OfferingId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- HostIdSet
-
- Required: Yes
- Type: Array of strings
The ID/s of the Dedicated Host/s that the reservation will be associated with.
- OfferingId
-
- Required: Yes
- Type: string
The offering ID of the reservation.
Result Syntax
[ 'CurrencyCode' => 'USD', 'Purchase' => [ [ 'CurrencyCode' => 'USD', 'Duration' => <integer>, 'HostIdSet' => ['<string>', ...], 'HostReservationId' => '<string>', 'HourlyPrice' => '<string>', 'InstanceFamily' => '<string>', 'PaymentOption' => 'AllUpfront|PartialUpfront|NoUpfront', 'UpfrontPrice' => '<string>', ], // ... ], 'TotalHourlyPrice' => '<string>', 'TotalUpfrontPrice' => '<string>', ]
Result Details
Members
- CurrencyCode
-
- Type: string
The currency in which the
totalUpfrontPrice
andtotalHourlyPrice
amounts are specified. At this time, the only supported currency isUSD
. - Purchase
-
- Type: Array of Purchase structures
The purchase information of the Dedicated Host Reservation and the Dedicated Hosts associated with it.
- TotalHourlyPrice
-
- Type: string
The potential total hourly price of the reservation per hour.
- TotalUpfrontPrice
-
- Type: string
The potential total upfront price. This is billed immediately.
Errors
There are no errors described for this operation.
GetPasswordData
$result = $client->getPasswordData
([/* ... */]); $promise = $client->getPasswordDataAsync
([/* ... */]);
Retrieves the encrypted administrator password for an instance running Windows.
The Windows password is generated at boot if the EC2Config
service plugin, Ec2SetPassword
, is enabled. This usually only happens the first time an AMI is launched, and then Ec2SetPassword
is automatically disabled. The password is not generated for rebundled AMIs unless Ec2SetPassword
is enabled before bundling.
The password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair file.
Password generation and encryption takes a few moments. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.
Parameter Syntax
$result = $client->getPasswordData([ 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the Windows instance.
Result Syntax
[ 'InstanceId' => '<string>', 'PasswordData' => '<string>', 'Timestamp' => <DateTime>, ]
Result Details
Members
- InstanceId
-
- Type: string
The ID of the Windows instance.
- PasswordData
-
- Type: string
The password of the instance.
- Timestamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time the data was last updated.
Errors
There are no errors described for this operation.
GetReservedInstancesExchangeQuote
$result = $client->getReservedInstancesExchangeQuote
([/* ... */]); $promise = $client->getReservedInstancesExchangeQuoteAsync
([/* ... */]);
Returns details about the values and term of your specified Convertible Reserved Instances. When an offering ID is specified it returns information about whether the exchange is valid and can be performed.
Parameter Syntax
$result = $client->getReservedInstancesExchangeQuote([ 'DryRun' => true || false, 'ReservedInstanceIds' => ['<string>', ...], // REQUIRED 'TargetConfigurations' => [ [ 'InstanceCount' => <integer>, 'OfferingId' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - ReservedInstanceIds
-
- Required: Yes
- Type: Array of strings
The ID/s of the Convertible Reserved Instances you want to exchange.
- TargetConfigurations
-
- Type: Array of TargetConfigurationRequest structures
The configuration requirements of the Convertible Reserved Instances you want in exchange for your current Convertible Reserved Instances.
Result Syntax
[ 'CurrencyCode' => '<string>', 'IsValidExchange' => true || false, 'OutputReservedInstancesWillExpireAt' => <DateTime>, 'PaymentDue' => '<string>', 'ReservedInstanceValueRollup' => [ 'HourlyPrice' => '<string>', 'RemainingTotalValue' => '<string>', 'RemainingUpfrontValue' => '<string>', ], 'ReservedInstanceValueSet' => [ [ 'ReservationValue' => [ 'HourlyPrice' => '<string>', 'RemainingTotalValue' => '<string>', 'RemainingUpfrontValue' => '<string>', ], 'ReservedInstanceId' => '<string>', ], // ... ], 'TargetConfigurationValueRollup' => [ 'HourlyPrice' => '<string>', 'RemainingTotalValue' => '<string>', 'RemainingUpfrontValue' => '<string>', ], 'TargetConfigurationValueSet' => [ [ 'ReservationValue' => [ 'HourlyPrice' => '<string>', 'RemainingTotalValue' => '<string>', 'RemainingUpfrontValue' => '<string>', ], 'TargetConfiguration' => [ 'InstanceCount' => <integer>, 'OfferingId' => '<string>', ], ], // ... ], 'ValidationFailureReason' => '<string>', ]
Result Details
Members
- CurrencyCode
-
- Type: string
The currency of the transaction.
- IsValidExchange
-
- Type: boolean
If
true
, the exchange is valid. Iffalse
, the exchange cannot be performed. - OutputReservedInstancesWillExpireAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The new end date of the reservation term.
- PaymentDue
-
- Type: string
The total true upfront charge for the exchange.
- ReservedInstanceValueRollup
-
- Type: ReservationValue structure
The cost associated with the Reserved Instance.
- ReservedInstanceValueSet
-
- Type: Array of ReservedInstanceReservationValue structures
The configuration of your Convertible Reserved Instances.
- TargetConfigurationValueRollup
-
- Type: ReservationValue structure
The cost associated with the Reserved Instance.
- TargetConfigurationValueSet
-
- Type: Array of TargetReservationValue structures
The values of the target Convertible Reserved Instances.
- ValidationFailureReason
-
- Type: string
Describes the reason why the exchange can not be completed.
Errors
There are no errors described for this operation.
ImportImage
$result = $client->importImage
([/* ... */]); $promise = $client->importImageAsync
([/* ... */]);
Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI). For more information, see Importing a VM as an Image Using VM Import/Export in the VM Import/Export User Guide.
Parameter Syntax
$result = $client->importImage([ 'Architecture' => '<string>', 'ClientData' => [ 'Comment' => '<string>', 'UploadEnd' => <integer || string || DateTime>, 'UploadSize' => <float>, 'UploadStart' => <integer || string || DateTime>, ], 'ClientToken' => '<string>', 'Description' => '<string>', 'DiskContainers' => [ [ 'Description' => '<string>', 'DeviceName' => '<string>', 'Format' => '<string>', 'SnapshotId' => '<string>', 'Url' => '<string>', 'UserBucket' => [ 'S3Bucket' => '<string>', 'S3Key' => '<string>', ], ], // ... ], 'DryRun' => true || false, 'Hypervisor' => '<string>', 'LicenseType' => '<string>', 'Platform' => '<string>', 'RoleName' => '<string>', ]);
Parameter Details
Members
- Architecture
-
- Type: string
The architecture of the virtual machine.
Valid values:
i386
|x86_64
- ClientData
-
- Type: ClientData structure
The client-specific data.
- ClientToken
-
- Type: string
The token to enable idempotency for VM import requests.
- Description
-
- Type: string
A description string for the import image task.
- DiskContainers
-
- Type: Array of ImageDiskContainer structures
Information about the disk containers.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Hypervisor
-
- Type: string
The target hypervisor platform.
Valid values:
xen
- LicenseType
-
- Type: string
The license type to be used for the Amazon Machine Image (AMI) after importing.
Note: You may only use BYOL if you have existing licenses with rights to use these licenses in a third party cloud like AWS. For more information, see Prerequisites in the VM Import/Export User Guide.
Valid values:
AWS
|BYOL
- Platform
-
- Type: string
The operating system of the virtual machine.
Valid values:
Windows
|Linux
- RoleName
-
- Type: string
The name of the role to use when not using the default role, 'vmimport'.
Result Syntax
[ 'Architecture' => '<string>', 'Description' => '<string>', 'Hypervisor' => '<string>', 'ImageId' => '<string>', 'ImportTaskId' => '<string>', 'LicenseType' => '<string>', 'Platform' => '<string>', 'Progress' => '<string>', 'SnapshotDetails' => [ [ 'Description' => '<string>', 'DeviceName' => '<string>', 'DiskImageSize' => <float>, 'Format' => '<string>', 'Progress' => '<string>', 'SnapshotId' => '<string>', 'Status' => '<string>', 'StatusMessage' => '<string>', 'Url' => '<string>', 'UserBucket' => [ 'S3Bucket' => '<string>', 'S3Key' => '<string>', ], ], // ... ], 'Status' => '<string>', 'StatusMessage' => '<string>', ]
Result Details
Members
- Architecture
-
- Type: string
The architecture of the virtual machine.
- Description
-
- Type: string
A description of the import task.
- Hypervisor
-
- Type: string
The target hypervisor of the import task.
- ImageId
-
- Type: string
The ID of the Amazon Machine Image (AMI) created by the import task.
- ImportTaskId
-
- Type: string
The task ID of the import image task.
- LicenseType
-
- Type: string
The license type of the virtual machine.
- Platform
-
- Type: string
The operating system of the virtual machine.
- Progress
-
- Type: string
The progress of the task.
- SnapshotDetails
-
- Type: Array of SnapshotDetail structures
Information about the snapshots.
- Status
-
- Type: string
A brief status of the task.
- StatusMessage
-
- Type: string
A detailed status message of the import task.
Errors
There are no errors described for this operation.
ImportInstance
$result = $client->importInstance
([/* ... */]); $promise = $client->importInstanceAsync
([/* ... */]);
Creates an import instance task using metadata from the specified disk image. ImportInstance
only supports single-volume VMs. To import multi-volume VMs, use ImportImage. For more information, see Importing a Virtual Machine Using the Amazon EC2 CLI.
For information about the import manifest referenced by this API action, see VM Import Manifest.
Parameter Syntax
$result = $client->importInstance([ 'Description' => '<string>', 'DiskImages' => [ [ 'Description' => '<string>', 'Image' => [ 'Bytes' => <integer>, // REQUIRED 'Format' => 'VMDK|RAW|VHD', // REQUIRED 'ImportManifestUrl' => '<string>', // REQUIRED ], 'Volume' => [ 'Size' => <integer>, // REQUIRED ], ], // ... ], 'DryRun' => true || false, 'LaunchSpecification' => [ 'AdditionalInfo' => '<string>', 'Architecture' => 'i386|x86_64', 'GroupIds' => ['<string>', ...], 'GroupNames' => ['<string>', ...], 'InstanceInitiatedShutdownBehavior' => 'stop|terminate', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'Monitoring' => true || false, 'Placement' => [ 'Affinity' => '<string>', 'AvailabilityZone' => '<string>', 'GroupName' => '<string>', 'HostId' => '<string>', 'Tenancy' => 'default|dedicated|host', ], 'PrivateIpAddress' => '<string>', 'SubnetId' => '<string>', 'UserData' => [ 'Data' => '<string>', ], ], 'Platform' => 'Windows', // REQUIRED ]);
Parameter Details
Members
- Description
-
- Type: string
A description for the instance being imported.
- DiskImages
-
- Type: Array of DiskImage structures
The disk image.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - LaunchSpecification
-
- Type: ImportInstanceLaunchSpecification structure
The launch specification.
- Platform
-
- Required: Yes
- Type: string
The instance operating system.
Result Syntax
[ 'ConversionTask' => [ 'ConversionTaskId' => '<string>', 'ExpirationTime' => '<string>', 'ImportInstance' => [ 'Description' => '<string>', 'InstanceId' => '<string>', 'Platform' => 'Windows', 'Volumes' => [ [ 'AvailabilityZone' => '<string>', 'BytesConverted' => <integer>, 'Description' => '<string>', 'Image' => [ 'Checksum' => '<string>', 'Format' => 'VMDK|RAW|VHD', 'ImportManifestUrl' => '<string>', 'Size' => <integer>, ], 'Status' => '<string>', 'StatusMessage' => '<string>', 'Volume' => [ 'Id' => '<string>', 'Size' => <integer>, ], ], // ... ], ], 'ImportVolume' => [ 'AvailabilityZone' => '<string>', 'BytesConverted' => <integer>, 'Description' => '<string>', 'Image' => [ 'Checksum' => '<string>', 'Format' => 'VMDK|RAW|VHD', 'ImportManifestUrl' => '<string>', 'Size' => <integer>, ], 'Volume' => [ 'Id' => '<string>', 'Size' => <integer>, ], ], 'State' => 'active|cancelling|cancelled|completed', 'StatusMessage' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ], ]
Result Details
Members
- ConversionTask
-
- Type: ConversionTask structure
Information about the conversion task.
Errors
There are no errors described for this operation.
ImportKeyPair
$result = $client->importKeyPair
([/* ... */]); $promise = $client->importKeyPairAsync
([/* ... */]);
Imports the public key from an RSA key pair that you created with a third-party tool. Compare this with CreateKeyPair, in which AWS creates the key pair and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, you create the key pair and give AWS just the public key. The private key is never transferred between you and AWS.
For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->importKeyPair([ 'DryRun' => true || false, 'KeyName' => '<string>', // REQUIRED 'PublicKeyMaterial' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - KeyName
-
- Required: Yes
- Type: string
A unique name for the key pair.
- PublicKeyMaterial
-
- Required: Yes
- Type: blob (string|resource|Psr\Http\Message\StreamInterface)
The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.
Result Syntax
[ 'KeyFingerprint' => '<string>', 'KeyName' => '<string>', ]
Result Details
Members
- KeyFingerprint
-
- Type: string
The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- KeyName
-
- Type: string
The key pair name you provided.
Errors
There are no errors described for this operation.
ImportSnapshot
$result = $client->importSnapshot
([/* ... */]); $promise = $client->importSnapshotAsync
([/* ... */]);
Imports a disk into an EBS snapshot.
Parameter Syntax
$result = $client->importSnapshot([ 'ClientData' => [ 'Comment' => '<string>', 'UploadEnd' => <integer || string || DateTime>, 'UploadSize' => <float>, 'UploadStart' => <integer || string || DateTime>, ], 'ClientToken' => '<string>', 'Description' => '<string>', 'DiskContainer' => [ 'Description' => '<string>', 'Format' => '<string>', 'Url' => '<string>', 'UserBucket' => [ 'S3Bucket' => '<string>', 'S3Key' => '<string>', ], ], 'DryRun' => true || false, 'RoleName' => '<string>', ]);
Parameter Details
Members
- ClientData
-
- Type: ClientData structure
The client-specific data.
- ClientToken
-
- Type: string
Token to enable idempotency for VM import requests.
- Description
-
- Type: string
The description string for the import snapshot task.
- DiskContainer
-
- Type: SnapshotDiskContainer structure
Information about the disk container.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - RoleName
-
- Type: string
The name of the role to use when not using the default role, 'vmimport'.
Result Syntax
[ 'Description' => '<string>', 'ImportTaskId' => '<string>', 'SnapshotTaskDetail' => [ 'Description' => '<string>', 'DiskImageSize' => <float>, 'Format' => '<string>', 'Progress' => '<string>', 'SnapshotId' => '<string>', 'Status' => '<string>', 'StatusMessage' => '<string>', 'Url' => '<string>', 'UserBucket' => [ 'S3Bucket' => '<string>', 'S3Key' => '<string>', ], ], ]
Result Details
Members
- Description
-
- Type: string
A description of the import snapshot task.
- ImportTaskId
-
- Type: string
The ID of the import snapshot task.
- SnapshotTaskDetail
-
- Type: SnapshotTaskDetail structure
Information about the import snapshot task.
Errors
There are no errors described for this operation.
ImportVolume
$result = $client->importVolume
([/* ... */]); $promise = $client->importVolumeAsync
([/* ... */]);
Creates an import volume task using metadata from the specified disk image.For more information, see Importing Disks to Amazon EBS.
For information about the import manifest referenced by this API action, see VM Import Manifest.
Parameter Syntax
$result = $client->importVolume([ 'AvailabilityZone' => '<string>', // REQUIRED 'Description' => '<string>', 'DryRun' => true || false, 'Image' => [ // REQUIRED 'Bytes' => <integer>, // REQUIRED 'Format' => 'VMDK|RAW|VHD', // REQUIRED 'ImportManifestUrl' => '<string>', // REQUIRED ], 'Volume' => [ // REQUIRED 'Size' => <integer>, // REQUIRED ], ]);
Parameter Details
Members
- AvailabilityZone
-
- Required: Yes
- Type: string
The Availability Zone for the resulting EBS volume.
- Description
-
- Type: string
A description of the volume.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Image
-
- Required: Yes
- Type: DiskImageDetail structure
The disk image.
- Volume
-
- Required: Yes
- Type: VolumeDetail structure
The volume size.
Result Syntax
[ 'ConversionTask' => [ 'ConversionTaskId' => '<string>', 'ExpirationTime' => '<string>', 'ImportInstance' => [ 'Description' => '<string>', 'InstanceId' => '<string>', 'Platform' => 'Windows', 'Volumes' => [ [ 'AvailabilityZone' => '<string>', 'BytesConverted' => <integer>, 'Description' => '<string>', 'Image' => [ 'Checksum' => '<string>', 'Format' => 'VMDK|RAW|VHD', 'ImportManifestUrl' => '<string>', 'Size' => <integer>, ], 'Status' => '<string>', 'StatusMessage' => '<string>', 'Volume' => [ 'Id' => '<string>', 'Size' => <integer>, ], ], // ... ], ], 'ImportVolume' => [ 'AvailabilityZone' => '<string>', 'BytesConverted' => <integer>, 'Description' => '<string>', 'Image' => [ 'Checksum' => '<string>', 'Format' => 'VMDK|RAW|VHD', 'ImportManifestUrl' => '<string>', 'Size' => <integer>, ], 'Volume' => [ 'Id' => '<string>', 'Size' => <integer>, ], ], 'State' => 'active|cancelling|cancelled|completed', 'StatusMessage' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ], ]
Result Details
Members
- ConversionTask
-
- Type: ConversionTask structure
Information about the conversion task.
Errors
There are no errors described for this operation.
ModifyHosts
$result = $client->modifyHosts
([/* ... */]); $promise = $client->modifyHostsAsync
([/* ... */]);
Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled, AWS will place instances that you launch with a tenancy of host
, but without targeting a specific host ID, onto any available Dedicated Host in your account which has auto-placement enabled. When auto-placement is disabled, you need to provide a host ID if you want the instance to launch onto a specific host. If no host ID is provided, the instance will be launched onto a suitable host which has auto-placement enabled.
Parameter Syntax
$result = $client->modifyHosts([ 'AutoPlacement' => 'on|off', // REQUIRED 'HostIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- AutoPlacement
-
- Required: Yes
- Type: string
Specify whether to enable or disable auto-placement.
- HostIds
-
- Required: Yes
- Type: Array of strings
The host IDs of the Dedicated Hosts you want to modify.
Result Syntax
[ 'Successful' => ['<string>', ...], 'Unsuccessful' => [ [ 'Error' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'ResourceId' => '<string>', ], // ... ], ]
Result Details
Members
- Successful
-
- Type: Array of strings
The IDs of the Dedicated Hosts that were successfully modified.
- Unsuccessful
-
- Type: Array of UnsuccessfulItem structures
The IDs of the Dedicated Hosts that could not be modified. Check whether the setting you requested can be used.
Errors
There are no errors described for this operation.
ModifyIdFormat
$result = $client->modifyIdFormat
([/* ... */]); $promise = $client->modifyIdFormatAsync
([/* ... */]);
Modifies the ID format for the specified resource on a per-region basis. You can specify that resources should receive longer IDs (17-character IDs) when they are created. The following resource types support longer IDs: instance
| reservation
| snapshot
| volume
.
This setting applies to the IAM user who makes the request; it does not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user. If you're using this action as the root user, then these settings apply to the entire account, unless an IAM user explicitly overrides these settings for themselves. For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide.
Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant Describe
command for the resource type.
Parameter Syntax
$result = $client->modifyIdFormat([ 'Resource' => '<string>', // REQUIRED 'UseLongIds' => true || false, // REQUIRED ]);
Parameter Details
Members
- Resource
-
- Required: Yes
- Type: string
The type of resource:
instance
|reservation
|snapshot
|volume
- UseLongIds
-
- Required: Yes
- Type: boolean
Indicate whether the resource should use longer IDs (17-character IDs).
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
ModifyIdentityIdFormat
$result = $client->modifyIdentityIdFormat
([/* ... */]); $promise = $client->modifyIdentityIdFormatAsync
([/* ... */]);
Modifies the ID format of a resource for a specified IAM user, IAM role, or the root user for an account; or all IAM users, IAM roles, and the root user for an account. You can specify that resources should receive longer IDs (17-character IDs) when they are created.
The following resource types support longer IDs: instance
| reservation
| snapshot
| volume
. For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide.
This setting applies to the principal specified in the request; it does not apply to the principal that makes the request.
Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant Describe
command for the resource type.
Parameter Syntax
$result = $client->modifyIdentityIdFormat([ 'PrincipalArn' => '<string>', // REQUIRED 'Resource' => '<string>', // REQUIRED 'UseLongIds' => true || false, // REQUIRED ]);
Parameter Details
Members
- PrincipalArn
-
- Required: Yes
- Type: string
The ARN of the principal, which can be an IAM user, IAM role, or the root user. Specify
all
to modify the ID format for all IAM users, IAM roles, and the root user of the account. - Resource
-
- Required: Yes
- Type: string
The type of resource:
instance
|reservation
|snapshot
|volume
- UseLongIds
-
- Required: Yes
- Type: boolean
Indicates whether the resource should use longer IDs (17-character IDs)
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
ModifyImageAttribute
$result = $client->modifyImageAttribute
([/* ... */]); $promise = $client->modifyImageAttributeAsync
([/* ... */]);
Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.
AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product code cannot be made public.
The SriovNetSupport enhanced networking attribute cannot be changed using this command. Instead, enable SriovNetSupport on an instance and create an AMI from the instance. This will result in an image with SriovNetSupport enabled.
Parameter Syntax
$result = $client->modifyImageAttribute([ 'Attribute' => '<string>', 'Description' => [ 'Value' => '<string>', ], 'DryRun' => true || false, 'ImageId' => '<string>', // REQUIRED 'LaunchPermission' => [ 'Add' => [ [ 'Group' => 'all', 'UserId' => '<string>', ], // ... ], 'Remove' => [ [ 'Group' => 'all', 'UserId' => '<string>', ], // ... ], ], 'OperationType' => 'add|remove', 'ProductCodes' => ['<string>', ...], 'UserGroups' => ['<string>', ...], 'UserIds' => ['<string>', ...], 'Value' => '<string>', ]);
Parameter Details
Members
- Attribute
-
- Type: string
The name of the attribute to modify.
- Description
-
- Type: AttributeValue structure
A description for the AMI.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - ImageId
-
- Required: Yes
- Type: string
The ID of the AMI.
- LaunchPermission
-
- Type: LaunchPermissionModifications structure
A launch permission modification.
- OperationType
-
- Type: string
The operation type.
- ProductCodes
-
- Type: Array of strings
One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the
productCodes
attribute. - UserGroups
-
- Type: Array of strings
One or more user groups. This is only valid when modifying the
launchPermission
attribute. - UserIds
-
- Type: Array of strings
One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute. - Value
-
- Type: string
The value of the attribute being modified. This is only valid when modifying the
description
attribute.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
ModifyInstanceAttribute
$result = $client->modifyInstanceAttribute
([/* ... */]); $promise = $client->modifyInstanceAttributeAsync
([/* ... */]);
Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.
To modify some attributes, the instance must be stopped. For more information, see Modifying Attributes of a Stopped Instance in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->modifyInstanceAttribute([ 'Attribute' => 'instanceType|kernel|ramdisk|userData|disableApiTermination|instanceInitiatedShutdownBehavior|rootDeviceName|blockDeviceMapping|productCodes|sourceDestCheck|groupSet|ebsOptimized|sriovNetSupport|enaSupport', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'VolumeId' => '<string>', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'DisableApiTermination' => [ 'Value' => true || false, ], 'DryRun' => true || false, 'EbsOptimized' => [ 'Value' => true || false, ], 'EnaSupport' => [ 'Value' => true || false, ], 'Groups' => ['<string>', ...], 'InstanceId' => '<string>', // REQUIRED 'InstanceInitiatedShutdownBehavior' => [ 'Value' => '<string>', ], 'InstanceType' => [ 'Value' => '<string>', ], 'Kernel' => [ 'Value' => '<string>', ], 'Ramdisk' => [ 'Value' => '<string>', ], 'SourceDestCheck' => [ 'Value' => true || false, ], 'SriovNetSupport' => [ 'Value' => '<string>', ], 'UserData' => [ 'Value' => <string || resource || Psr\Http\Message\StreamInterface>, ], 'Value' => '<string>', ]);
Parameter Details
Members
- Attribute
-
- Type: string
The name of the attribute.
- BlockDeviceMappings
-
- Type: Array of InstanceBlockDeviceMappingSpecification structures
Modifies the
DeleteOnTermination
attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified forDeleteOnTermination
, the default istrue
and the volume is deleted when the instance is terminated.To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.
- DisableApiTermination
-
- Type: AttributeBooleanValue structure
If the value is
true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances. - DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - EbsOptimized
-
- Type: AttributeBooleanValue structure
Specifies whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
- EnaSupport
-
- Type: AttributeBooleanValue structure
Set to
true
to enable enhanced networking with ENA for the instance.This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.
- Groups
-
- Type: Array of strings
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.
- InstanceId
-
- Required: Yes
- Type: string
The ID of the instance.
- InstanceInitiatedShutdownBehavior
-
- Type: AttributeValue structure
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
- InstanceType
-
- Type: AttributeValue structure
Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is
InvalidInstanceAttributeValue
. - Kernel
-
- Type: AttributeValue structure
Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
- Ramdisk
-
- Type: AttributeValue structure
Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
- SourceDestCheck
-
- Type: AttributeBooleanValue structure
Specifies whether source/destination checking is enabled. A value of
true
means that checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT. - SriovNetSupport
-
- Type: AttributeValue structure
Set to
simple
to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.
This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.
- UserData
-
- Type: BlobAttributeValue structure
Changes the instance's user data to the specified value. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
- Value
-
- Type: string
A new value for the attribute. Use only with the
kernel
,ramdisk
,userData
,disableApiTermination
, orinstanceInitiatedShutdownBehavior
attribute.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
ModifyInstancePlacement
$result = $client->modifyInstancePlacement
([/* ... */]); $promise = $client->modifyInstancePlacementAsync
([/* ... */]);
Set the instance affinity value for a specific stopped instance and modify the instance tenancy setting.
Instance affinity is disabled by default. When instance affinity is host
and it is not associated with a specific Dedicated Host, the next time it is launched it will automatically be associated with the host it lands on. This relationship will persist if the instance is stopped/started, or rebooted.
You can modify the host ID associated with a stopped instance. If a stopped instance has a new host ID association, the instance will target that host when restarted.
You can modify the tenancy of a stopped instance with a tenancy of host
or dedicated
.
Affinity, hostID, and tenancy are not required parameters, but at least one of them must be specified in the request. Affinity and tenancy can be modified in the same request, but tenancy can only be modified on instances that are stopped.
Parameter Syntax
$result = $client->modifyInstancePlacement([ 'Affinity' => 'default|host', 'HostId' => '<string>', 'InstanceId' => '<string>', // REQUIRED 'Tenancy' => 'dedicated|host', ]);
Parameter Details
Members
- Affinity
-
- Type: string
The new affinity setting for the instance.
- HostId
-
- Type: string
The ID of the Dedicated Host that the instance will have affinity with.
- InstanceId
-
- Required: Yes
- Type: string
The ID of the instance that you are modifying.
- Tenancy
-
- Type: string
The tenancy of the instance that you are modifying.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Is
true
if the request succeeds, and an error otherwise.
Errors
There are no errors described for this operation.
ModifyNetworkInterfaceAttribute
$result = $client->modifyNetworkInterfaceAttribute
([/* ... */]); $promise = $client->modifyNetworkInterfaceAttributeAsync
([/* ... */]);
Modifies the specified network interface attribute. You can specify only one attribute at a time.
Parameter Syntax
$result = $client->modifyNetworkInterfaceAttribute([ 'Attachment' => [ 'AttachmentId' => '<string>', 'DeleteOnTermination' => true || false, ], 'Description' => [ 'Value' => '<string>', ], 'DryRun' => true || false, 'Groups' => ['<string>', ...], 'NetworkInterfaceId' => '<string>', // REQUIRED 'SourceDestCheck' => [ 'Value' => true || false, ], ]);
Parameter Details
Members
- Attachment
-
- Type: NetworkInterfaceAttachmentChanges structure
Information about the interface attachment. If modifying the 'delete on termination' attribute, you must specify the ID of the interface attachment.
- Description
-
- Type: AttributeValue structure
A description for the network interface.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Groups
-
- Type: Array of strings
Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.
- NetworkInterfaceId
-
- Required: Yes
- Type: string
The ID of the network interface.
- SourceDestCheck
-
- Type: AttributeBooleanValue structure
Indicates whether source/destination checking is enabled. A value of
true
means checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To modify the attachment attribute of a network interface
This example modifies the attachment attribute of the specified network interface.
$result = $client->modifyNetworkInterfaceAttribute([ 'Attachment' => [ 'AttachmentId' => 'eni-attach-43348162', 'DeleteOnTermination' => , ], 'NetworkInterfaceId' => 'eni-686ea200', ]);
Example 2: To modify the description attribute of a network interface
This example modifies the description attribute of the specified network interface.
$result = $client->modifyNetworkInterfaceAttribute([ 'Description' => [ 'Value' => 'My description', ], 'NetworkInterfaceId' => 'eni-686ea200', ]);
Example 3: To modify the groupSet attribute of a network interface
This example command modifies the groupSet attribute of the specified network interface.
$result = $client->modifyNetworkInterfaceAttribute([ 'Groups' => [ 'sg-903004f8', 'sg-1a2b3c4d', ], 'NetworkInterfaceId' => 'eni-686ea200', ]);
Example 4: To modify the sourceDestCheck attribute of a network interface
This example command modifies the sourceDestCheck attribute of the specified network interface.
$result = $client->modifyNetworkInterfaceAttribute([ 'NetworkInterfaceId' => 'eni-686ea200', 'SourceDestCheck' => [ 'Value' => , ], ]);
ModifyReservedInstances
$result = $client->modifyReservedInstances
([/* ... */]); $promise = $client->modifyReservedInstancesAsync
([/* ... */]);
Modifies the Availability Zone, instance count, instance type, or network platform (EC2-Classic or EC2-VPC) of your Standard Reserved Instances. The Reserved Instances to be modified must be identical, except for Availability Zone, network platform, and instance type.
For more information, see Modifying Reserved Instances in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->modifyReservedInstances([ 'ClientToken' => '<string>', 'ReservedInstancesIds' => ['<string>', ...], // REQUIRED 'TargetConfigurations' => [ // REQUIRED [ 'AvailabilityZone' => '<string>', 'InstanceCount' => <integer>, 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'Platform' => '<string>', 'Scope' => 'Availability Zone|Region', ], // ... ], ]);
Parameter Details
Members
- ClientToken
-
- Type: string
A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency.
- ReservedInstancesIds
-
- Required: Yes
- Type: Array of strings
The IDs of the Reserved Instances to modify.
- TargetConfigurations
-
- Required: Yes
- Type: Array of ReservedInstancesConfiguration structures
The configuration settings for the Reserved Instances to modify.
Result Syntax
[ 'ReservedInstancesModificationId' => '<string>', ]
Result Details
Members
- ReservedInstancesModificationId
-
- Type: string
The ID for the modification.
Errors
There are no errors described for this operation.
ModifySnapshotAttribute
$result = $client->modifySnapshotAttribute
([/* ... */]); $promise = $client->modifySnapshotAttributeAsync
([/* ... */]);
Adds or removes permission settings for the specified snapshot. You may add or remove specified AWS account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single API call. If you need to both add and remove account IDs for a snapshot, you must use multiple API calls.
Encrypted snapshots and snapshots with AWS Marketplace product codes cannot be made public. Snapshots encrypted with your default CMK cannot be shared with other accounts.
For more information on modifying snapshot permissions, see Sharing Snapshots in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->modifySnapshotAttribute([ 'Attribute' => 'productCodes|createVolumePermission', 'CreateVolumePermission' => [ 'Add' => [ [ 'Group' => 'all', 'UserId' => '<string>', ], // ... ], 'Remove' => [ [ 'Group' => 'all', 'UserId' => '<string>', ], // ... ], ], 'DryRun' => true || false, 'GroupNames' => ['<string>', ...], 'OperationType' => 'add|remove', 'SnapshotId' => '<string>', // REQUIRED 'UserIds' => ['<string>', ...], ]);
Parameter Details
Members
- Attribute
-
- Type: string
The snapshot attribute to modify.
Only volume creation permissions may be modified at the customer level.
- CreateVolumePermission
-
- Type: CreateVolumePermissionModifications structure
A JSON representation of the snapshot attribute modification.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - GroupNames
-
- Type: Array of strings
The group to modify for the snapshot.
- OperationType
-
- Type: string
The type of operation to perform to the attribute.
- SnapshotId
-
- Required: Yes
- Type: string
The ID of the snapshot.
- UserIds
-
- Type: Array of strings
The account ID to modify for the snapshot.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To modify a snapshot attribute
This example modifies snapshot ``snap-1234567890abcdef0`` to remove the create volume permission for a user with the account ID ``123456789012``. If the command succeeds, no output is returned.
$result = $client->modifySnapshotAttribute([ 'Attribute' => 'createVolumePermission', 'OperationType' => 'remove', 'SnapshotId' => 'snap-1234567890abcdef0', 'UserIds' => [ '123456789012', ], ]);
Result syntax:
[ ]
Example 2: To make a snapshot public
This example makes the snapshot ``snap-1234567890abcdef0`` public.
$result = $client->modifySnapshotAttribute([ 'Attribute' => 'createVolumePermission', 'GroupNames' => [ 'all', ], 'OperationType' => 'add', 'SnapshotId' => 'snap-1234567890abcdef0', ]);
Result syntax:
[ ]
ModifySpotFleetRequest
$result = $client->modifySpotFleetRequest
([/* ... */]); $promise = $client->modifySpotFleetRequestAsync
([/* ... */]);
Modifies the specified Spot fleet request.
While the Spot fleet request is being modified, it is in the modifying
state.
To scale up your Spot fleet, increase its target capacity. The Spot fleet launches the additional Spot instances according to the allocation strategy for the Spot fleet request. If the allocation strategy is lowestPrice
, the Spot fleet launches instances using the Spot pool with the lowest price. If the allocation strategy is diversified
, the Spot fleet distributes the instances across the Spot pools.
To scale down your Spot fleet, decrease its target capacity. First, the Spot fleet cancels any open bids that exceed the new target capacity. You can request that the Spot fleet terminate Spot instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is lowestPrice
, the Spot fleet terminates the instances with the highest price per unit. If the allocation strategy is diversified
, the Spot fleet terminates instances across the Spot pools. Alternatively, you can request that the Spot fleet keep the fleet at its current size, but not replace any Spot instances that are interrupted or that you terminate manually.
Parameter Syntax
$result = $client->modifySpotFleetRequest([ 'ExcessCapacityTerminationPolicy' => 'noTermination|default', 'SpotFleetRequestId' => '<string>', // REQUIRED 'TargetCapacity' => <integer>, ]);
Parameter Details
Members
- ExcessCapacityTerminationPolicy
-
- Type: string
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
- SpotFleetRequestId
-
- Required: Yes
- Type: string
The ID of the Spot fleet request.
- TargetCapacity
-
- Type: int
The size of the fleet.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Is
true
if the request succeeds, and an error otherwise.
Errors
There are no errors described for this operation.
Examples
Example 1: To increase the target capacity of a Spot fleet request
This example increases the target capacity of the specified Spot fleet request.
$result = $client->modifySpotFleetRequest([ 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', 'TargetCapacity' => 20, ]);
Result syntax:
[ 'Return' => 1, ]
Example 2: To decrease the target capacity of a Spot fleet request
This example decreases the target capacity of the specified Spot fleet request without terminating any Spot Instances as a result.
$result = $client->modifySpotFleetRequest([ 'ExcessCapacityTerminationPolicy' => 'NoTermination ', 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', 'TargetCapacity' => 10, ]);
Result syntax:
[ 'Return' => 1, ]
ModifySubnetAttribute
$result = $client->modifySubnetAttribute
([/* ... */]); $promise = $client->modifySubnetAttributeAsync
([/* ... */]);
Modifies a subnet attribute.
Parameter Syntax
$result = $client->modifySubnetAttribute([ 'MapPublicIpOnLaunch' => [ 'Value' => true || false, ], 'SubnetId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- MapPublicIpOnLaunch
-
- Type: AttributeBooleanValue structure
Specify
true
to indicate that instances launched into the specified subnet should be assigned public IP address. - SubnetId
-
- Required: Yes
- Type: string
The ID of the subnet.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To change a subnet's public IP addressing behavior
This example modifies the specified subnet so that all instances launched into this subnet are assigned a public IP address.
$result = $client->modifySubnetAttribute([ 'MapPublicIpOnLaunch' => [ 'Value' => 1, ], 'SubnetId' => 'subnet-1a2b3c4d', ]);
ModifyVolumeAttribute
$result = $client->modifyVolumeAttribute
([/* ... */]); $promise = $client->modifyVolumeAttributeAsync
([/* ... */]);
Modifies a volume attribute.
By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume.
You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.
Parameter Syntax
$result = $client->modifyVolumeAttribute([ 'AutoEnableIO' => [ 'Value' => true || false, ], 'DryRun' => true || false, 'VolumeId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AutoEnableIO
-
- Type: AttributeBooleanValue structure
Indicates whether the volume should be auto-enabled for I/O operations.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VolumeId
-
- Required: Yes
- Type: string
The ID of the volume.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To modify a volume attribute
This example sets the ``autoEnableIo`` attribute of the volume with the ID ``vol-1234567890abcdef0`` to ``true``. If the command succeeds, no output is returned.
$result = $client->modifyVolumeAttribute([ 'AutoEnableIO' => [ 'Value' => 1, ], 'DryRun' => 1, 'VolumeId' => 'vol-1234567890abcdef0', ]);
Result syntax:
[ ]
ModifyVpcAttribute
$result = $client->modifyVpcAttribute
([/* ... */]); $promise = $client->modifyVpcAttributeAsync
([/* ... */]);
Modifies the specified attribute of the specified VPC.
Parameter Syntax
$result = $client->modifyVpcAttribute([ 'EnableDnsHostnames' => [ 'Value' => true || false, ], 'EnableDnsSupport' => [ 'Value' => true || false, ], 'VpcId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- EnableDnsHostnames
-
- Type: AttributeBooleanValue structure
Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.
You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.
- EnableDnsSupport
-
- Type: AttributeBooleanValue structure
Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" will succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.
You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.
- VpcId
-
- Required: Yes
- Type: string
The ID of the VPC.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To modify the enableDnsSupport attribute
This example modifies the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for instances in the VPC to their corresponding IP addresses; otherwise, it does not.
$result = $client->modifyVpcAttribute([ 'EnableDnsSupport' => [ 'Value' => , ], 'VpcId' => 'vpc-a01106c2', ]);
Example 2: To modify the enableDnsHostnames attribute
This example modifies the enableDnsHostnames attribute. This attribute indicates whether instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not.
$result = $client->modifyVpcAttribute([ 'EnableDnsHostnames' => [ 'Value' => , ], 'VpcId' => 'vpc-a01106c2', ]);
ModifyVpcEndpoint
$result = $client->modifyVpcEndpoint
([/* ... */]); $promise = $client->modifyVpcEndpointAsync
([/* ... */]);
Modifies attributes of a specified VPC endpoint. You can modify the policy associated with the endpoint, and you can add and remove route tables associated with the endpoint.
Parameter Syntax
$result = $client->modifyVpcEndpoint([ 'AddRouteTableIds' => ['<string>', ...], 'DryRun' => true || false, 'PolicyDocument' => '<string>', 'RemoveRouteTableIds' => ['<string>', ...], 'ResetPolicy' => true || false, 'VpcEndpointId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AddRouteTableIds
-
- Type: Array of strings
One or more route tables IDs to associate with the endpoint.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - PolicyDocument
-
- Type: string
A policy document to attach to the endpoint. The policy must be in valid JSON format.
- RemoveRouteTableIds
-
- Type: Array of strings
One or more route table IDs to disassociate from the endpoint.
- ResetPolicy
-
- Type: boolean
Specify
true
to reset the policy document to the default policy. The default policy allows access to the service. - VpcEndpointId
-
- Required: Yes
- Type: string
The ID of the endpoint.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Returns
true
if the request succeeds; otherwise, it returns an error.
Errors
There are no errors described for this operation.
ModifyVpcPeeringConnectionOptions
$result = $client->modifyVpcPeeringConnectionOptions
([/* ... */]); $promise = $client->modifyVpcPeeringConnectionOptionsAsync
([/* ... */]);
Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following:
-
Enable/disable communication over the peering connection between an EC2-Classic instance that's linked to your VPC (using ClassicLink) and instances in the peer VPC.
-
Enable/disable communication over the peering connection between instances in your VPC and an EC2-Classic instance that's linked to the peer VPC.
-
Enable/disable a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.
If the peered VPCs are in different accounts, each owner must initiate a separate request to modify the peering connection options, depending on whether their VPC was the requester or accepter for the VPC peering connection. If the peered VPCs are in the same account, you can modify the requester and accepter options in the same request. To confirm which VPC is the accepter and requester for a VPC peering connection, use the DescribeVpcPeeringConnections command.
Parameter Syntax
$result = $client->modifyVpcPeeringConnectionOptions([ 'AccepterPeeringConnectionOptions' => [ 'AllowDnsResolutionFromRemoteVpc' => true || false, 'AllowEgressFromLocalClassicLinkToRemoteVpc' => true || false, 'AllowEgressFromLocalVpcToRemoteClassicLink' => true || false, ], 'DryRun' => true || false, 'RequesterPeeringConnectionOptions' => [ 'AllowDnsResolutionFromRemoteVpc' => true || false, 'AllowEgressFromLocalClassicLinkToRemoteVpc' => true || false, 'AllowEgressFromLocalVpcToRemoteClassicLink' => true || false, ], 'VpcPeeringConnectionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AccepterPeeringConnectionOptions
-
- Type: PeeringConnectionOptionsRequest structure
The VPC peering connection options for the accepter VPC.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - RequesterPeeringConnectionOptions
-
- Type: PeeringConnectionOptionsRequest structure
The VPC peering connection options for the requester VPC.
- VpcPeeringConnectionId
-
- Required: Yes
- Type: string
The ID of the VPC peering connection.
Result Syntax
[ 'AccepterPeeringConnectionOptions' => [ 'AllowDnsResolutionFromRemoteVpc' => true || false, 'AllowEgressFromLocalClassicLinkToRemoteVpc' => true || false, 'AllowEgressFromLocalVpcToRemoteClassicLink' => true || false, ], 'RequesterPeeringConnectionOptions' => [ 'AllowDnsResolutionFromRemoteVpc' => true || false, 'AllowEgressFromLocalClassicLinkToRemoteVpc' => true || false, 'AllowEgressFromLocalVpcToRemoteClassicLink' => true || false, ], ]
Result Details
Members
- AccepterPeeringConnectionOptions
-
- Type: PeeringConnectionOptions structure
Information about the VPC peering connection options for the accepter VPC.
- RequesterPeeringConnectionOptions
-
- Type: PeeringConnectionOptions structure
Information about the VPC peering connection options for the requester VPC.
Errors
There are no errors described for this operation.
MonitorInstances
$result = $client->monitorInstances
([/* ... */]); $promise = $client->monitorInstancesAsync
([/* ... */]);
Enables monitoring for a running instance. For more information about monitoring instances, see Monitoring Your Instances and Volumes in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->monitorInstances([ 'DryRun' => true || false, 'InstanceIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceIds
-
- Required: Yes
- Type: Array of strings
One or more instance IDs.
Result Syntax
[ 'InstanceMonitorings' => [ [ 'InstanceId' => '<string>', 'Monitoring' => [ 'State' => 'disabled|disabling|enabled|pending', ], ], // ... ], ]
Result Details
Members
- InstanceMonitorings
-
- Type: Array of InstanceMonitoring structures
Monitoring information for one or more instances.
Errors
There are no errors described for this operation.
MoveAddressToVpc
$result = $client->moveAddressToVpc
([/* ... */]); $promise = $client->moveAddressToVpcAsync
([/* ... */]);
Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform. The Elastic IP address must be allocated to your account for more than 24 hours, and it must not be associated with an instance. After the Elastic IP address is moved, it is no longer available for use in the EC2-Classic platform, unless you move it back using the RestoreAddressToClassic request. You cannot move an Elastic IP address that was originally allocated for use in the EC2-VPC platform to the EC2-Classic platform.
Parameter Syntax
$result = $client->moveAddressToVpc([ 'DryRun' => true || false, 'PublicIp' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - PublicIp
-
- Required: Yes
- Type: string
The Elastic IP address.
Result Syntax
[ 'AllocationId' => '<string>', 'Status' => 'MoveInProgress|InVpc|InClassic', ]
Result Details
Members
- AllocationId
-
- Type: string
The allocation ID for the Elastic IP address.
- Status
-
- Type: string
The status of the move of the IP address.
Errors
There are no errors described for this operation.
Examples
Example 1: To move an address to EC2-VPC
This example moves the specified Elastic IP address to the EC2-VPC platform.
$result = $client->moveAddressToVpc([ 'PublicIp' => '54.123.4.56', ]);
Result syntax:
[ 'Status' => 'MoveInProgress', ]
PurchaseHostReservation
$result = $client->purchaseHostReservation
([/* ... */]); $promise = $client->purchaseHostReservationAsync
([/* ... */]);
Purchase a reservation with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation. This action results in the specified reservation being purchased and charged to your account.
Parameter Syntax
$result = $client->purchaseHostReservation([ 'ClientToken' => '<string>', 'CurrencyCode' => 'USD', 'HostIdSet' => ['<string>', ...], // REQUIRED 'LimitPrice' => '<string>', 'OfferingId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
- CurrencyCode
-
- Type: string
The currency in which the
totalUpfrontPrice
,LimitPrice
, andtotalHourlyPrice
amounts are specified. At this time, the only supported currency isUSD
. - HostIdSet
-
- Required: Yes
- Type: Array of strings
The ID/s of the Dedicated Host/s that the reservation will be associated with.
- LimitPrice
-
- Type: string
The specified limit is checked against the total upfront cost of the reservation (calculated as the offering's upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request will fail. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is
USD
. For example, to indicate a limit price of USD 100, specify 100.00. - OfferingId
-
- Required: Yes
- Type: string
The ID of the offering.
Result Syntax
[ 'ClientToken' => '<string>', 'CurrencyCode' => 'USD', 'Purchase' => [ [ 'CurrencyCode' => 'USD', 'Duration' => <integer>, 'HostIdSet' => ['<string>', ...], 'HostReservationId' => '<string>', 'HourlyPrice' => '<string>', 'InstanceFamily' => '<string>', 'PaymentOption' => 'AllUpfront|PartialUpfront|NoUpfront', 'UpfrontPrice' => '<string>', ], // ... ], 'TotalHourlyPrice' => '<string>', 'TotalUpfrontPrice' => '<string>', ]
Result Details
Members
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide
- CurrencyCode
-
- Type: string
The currency in which the
totalUpfrontPrice
andtotalHourlyPrice
amounts are specified. At this time, the only supported currency isUSD
. - Purchase
-
- Type: Array of Purchase structures
Describes the details of the purchase.
- TotalHourlyPrice
-
- Type: string
The total hourly price of the reservation calculated per hour.
- TotalUpfrontPrice
-
- Type: string
The total amount that will be charged to your account when you purchase the reservation.
Errors
There are no errors described for this operation.
PurchaseReservedInstancesOffering
$result = $client->purchaseReservedInstancesOffering
([/* ... */]); $promise = $client->purchaseReservedInstancesOfferingAsync
([/* ... */]);
Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.
Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances.
For more information, see Reserved Instances and Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->purchaseReservedInstancesOffering([ 'DryRun' => true || false, 'InstanceCount' => <integer>, // REQUIRED 'LimitPrice' => [ 'Amount' => <float>, 'CurrencyCode' => 'USD', ], 'ReservedInstancesOfferingId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceCount
-
- Required: Yes
- Type: int
The number of Reserved Instances to purchase.
- LimitPrice
-
- Type: ReservedInstanceLimitPrice structure
Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.
- ReservedInstancesOfferingId
-
- Required: Yes
- Type: string
The ID of the Reserved Instance offering to purchase.
Result Syntax
[ 'ReservedInstancesId' => '<string>', ]
Result Details
Members
- ReservedInstancesId
-
- Type: string
The IDs of the purchased Reserved Instances.
Errors
There are no errors described for this operation.
PurchaseScheduledInstances
$result = $client->purchaseScheduledInstances
([/* ... */]); $promise = $client->purchaseScheduledInstancesAsync
([/* ... */]);
Purchases one or more Scheduled Instances with the specified schedule.
Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you can purchase a Scheduled Instance, you must call DescribeScheduledInstanceAvailability to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call RunScheduledInstances during each scheduled time period.
After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.
Parameter Syntax
$result = $client->purchaseScheduledInstances([ 'ClientToken' => '<string>', 'DryRun' => true || false, 'PurchaseRequests' => [ // REQUIRED [ 'InstanceCount' => <integer>, // REQUIRED 'PurchaseToken' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- ClientToken
-
- Type: string
Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - PurchaseRequests
-
- Required: Yes
- Type: Array of PurchaseRequest structures
One or more purchase requests.
Result Syntax
[ 'ScheduledInstanceSet' => [ [ 'AvailabilityZone' => '<string>', 'CreateDate' => <DateTime>, 'HourlyPrice' => '<string>', 'InstanceCount' => <integer>, 'InstanceType' => '<string>', 'NetworkPlatform' => '<string>', 'NextSlotStartTime' => <DateTime>, 'Platform' => '<string>', 'PreviousSlotEndTime' => <DateTime>, 'Recurrence' => [ 'Frequency' => '<string>', 'Interval' => <integer>, 'OccurrenceDaySet' => [<integer>, ...], 'OccurrenceRelativeToEnd' => true || false, 'OccurrenceUnit' => '<string>', ], 'ScheduledInstanceId' => '<string>', 'SlotDurationInHours' => <integer>, 'TermEndDate' => <DateTime>, 'TermStartDate' => <DateTime>, 'TotalScheduledInstanceHours' => <integer>, ], // ... ], ]
Result Details
Members
- ScheduledInstanceSet
-
- Type: Array of ScheduledInstance structures
Information about the Scheduled Instances.
Errors
There are no errors described for this operation.
Examples
Example 1: To purchase a Scheduled Instance
This example purchases a Scheduled Instance.
$result = $client->purchaseScheduledInstances([ 'PurchaseRequests' => [ [ 'InstanceCount' => 1, 'PurchaseToken' => 'eyJ2IjoiMSIsInMiOjEsImMiOi...', ], ], ]);
Result syntax:
[ 'ScheduledInstanceSet' => [ [ 'AvailabilityZone' => 'us-west-2b', 'CreateDate' =>, 'HourlyPrice' => '0.095', 'InstanceCount' => 1, 'InstanceType' => 'c4.large', 'NetworkPlatform' => 'EC2-VPC', 'NextSlotStartTime' => , 'Platform' => 'Linux/UNIX', 'Recurrence' => [ 'Frequency' => 'Weekly', 'Interval' => 1, 'OccurrenceDaySet' => [ 1, ], 'OccurrenceRelativeToEnd' => , 'OccurrenceUnit' => '', ], 'ScheduledInstanceId' => 'sci-1234-1234-1234-1234-123456789012', 'SlotDurationInHours' => 32, 'TermEndDate' => , 'TermStartDate' => , 'TotalScheduledInstanceHours' => 1696, ], ], ]
RebootInstances
$result = $client->rebootInstances
([/* ... */]); $promise = $client->rebootInstancesAsync
([/* ... */]);
Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.
If an instance does not cleanly shut down within four minutes, Amazon EC2 performs a hard reboot.
For more information about troubleshooting, see Getting Console Output and Rebooting Instances in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->rebootInstances([ 'DryRun' => true || false, 'InstanceIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceIds
-
- Required: Yes
- Type: Array of strings
One or more instance IDs.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
RegisterImage
$result = $client->registerImage
([/* ... */]); $promise = $client->registerImageAsync
([/* ... */]);
Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see Creating Your Own AMIs in the Amazon Elastic Compute Cloud User Guide.
For Amazon EBS-backed instances, CreateImage creates and registers the AMI in a single request, so you don't have to register the AMI yourself.
You can also use RegisterImage
to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. For more information, see Launching an Instance from a Snapshot in the Amazon Elastic Compute Cloud User Guide.
Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the EC2 billingProduct
code associated with an AMI to verify subscription status for package updates. Creating an AMI from an EBS snapshot does not maintain this billing code, and subsequent instances launched from such an AMI will not be able to connect to package update infrastructure.
Similarly, although you can create a Windows AMI from a snapshot, you can't successfully launch an instance from the AMI.
To create Windows AMIs or to create AMIs for Linux operating systems that must retain AMI billing codes to work properly, see CreateImage.
If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.
You can't register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.
Parameter Syntax
$result = $client->registerImage([ 'Architecture' => 'i386|x86_64', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'Description' => '<string>', 'DryRun' => true || false, 'EnaSupport' => true || false, 'ImageLocation' => '<string>', 'KernelId' => '<string>', 'Name' => '<string>', // REQUIRED 'RamdiskId' => '<string>', 'RootDeviceName' => '<string>', 'SriovNetSupport' => '<string>', 'VirtualizationType' => '<string>', ]);
Parameter Details
Members
- Architecture
-
- Type: string
The architecture of the AMI.
Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture specified in the manifest file. - BlockDeviceMappings
-
- Type: Array of BlockDeviceMapping structures
One or more block device mapping entries.
- Description
-
- Type: string
A description for your AMI.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - EnaSupport
-
- Type: boolean
Set to
true
to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
- ImageLocation
-
- Type: string
The full path to your AMI manifest in Amazon S3 storage.
- KernelId
-
- Type: string
The ID of the kernel.
- Name
-
- Required: Yes
- Type: string
A name for your AMI.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
- RamdiskId
-
- Type: string
The ID of the RAM disk.
- RootDeviceName
-
- Type: string
The name of the root device (for example,
/dev/sda1
, or/dev/xvda
). - SriovNetSupport
-
- Type: string
Set to
simple
to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.There is no way to disable
sriovNetSupport
at this time.This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
- VirtualizationType
-
- Type: string
The type of virtualization.
Default:
paravirtual
Result Syntax
[ 'ImageId' => '<string>', ]
Result Details
Members
- ImageId
-
- Type: string
The ID of the newly registered AMI.
Errors
There are no errors described for this operation.
RejectVpcPeeringConnection
$result = $client->rejectVpcPeeringConnection
([/* ... */]); $promise = $client->rejectVpcPeeringConnectionAsync
([/* ... */]);
Rejects a VPC peering connection request. The VPC peering connection must be in the pending-acceptance
state. Use the DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use DeleteVpcPeeringConnection.
Parameter Syntax
$result = $client->rejectVpcPeeringConnection([ 'DryRun' => true || false, 'VpcPeeringConnectionId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - VpcPeeringConnectionId
-
- Required: Yes
- Type: string
The ID of the VPC peering connection.
Result Syntax
[ 'Return' => true || false, ]
Result Details
Members
- Return
-
- Type: boolean
Returns
true
if the request succeeds; otherwise, it returns an error.
Errors
There are no errors described for this operation.
ReleaseAddress
$result = $client->releaseAddress
([/* ... */]); $promise = $client->releaseAddressAsync
([/* ... */]);
Releases the specified Elastic IP address.
After releasing an Elastic IP address, it is released to the IP address pool and might be unavailable to you. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an AuthFailure
error if the address is already allocated to another AWS account.
[EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use DisassociateAddress.
[Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic IP address before you try to release it. Otherwise, Amazon EC2 returns an error (InvalidIPAddress.InUse
).
Parameter Syntax
$result = $client->releaseAddress([ 'AllocationId' => '<string>', 'DryRun' => true || false, 'PublicIp' => '<string>', ]);
Parameter Details
Members
- AllocationId
-
- Type: string
[EC2-VPC] The allocation ID. Required for EC2-VPC.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - PublicIp
-
- Type: string
[EC2-Classic] The Elastic IP address. Required for EC2-Classic.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To release an Elastic IP address for EC2-VPC
This example releases an Elastic IP address for use with instances in a VPC.
$result = $client->releaseAddress([ 'AllocationId' => 'eipalloc-64d5890a', ]);
Example 2: To release an Elastic IP addresses for EC2-Classic
This example releases an Elastic IP address for use with instances in EC2-Classic.
$result = $client->releaseAddress([ 'PublicIp' => '198.51.100.0', ]);
ReleaseHosts
$result = $client->releaseHosts
([/* ... */]); $promise = $client->releaseHostsAsync
([/* ... */]);
When you no longer want to use an On-Demand Dedicated Host it can be released. On-Demand billing is stopped and the host goes into released
state. The host ID of Dedicated Hosts that have been released can no longer be specified in another request, e.g., ModifyHosts. You must stop or terminate all instances on a host before it can be released.
When Dedicated Hosts are released, it make take some time for them to stop counting toward your limit and you may receive capacity errors when trying to allocate new Dedicated hosts. Try waiting a few minutes, and then try again.
Released hosts will still appear in a DescribeHosts response.
Parameter Syntax
$result = $client->releaseHosts([ 'HostIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- HostIds
-
- Required: Yes
- Type: Array of strings
The IDs of the Dedicated Hosts you want to release.
Result Syntax
[ 'Successful' => ['<string>', ...], 'Unsuccessful' => [ [ 'Error' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'ResourceId' => '<string>', ], // ... ], ]
Result Details
Members
- Successful
-
- Type: Array of strings
The IDs of the Dedicated Hosts that were successfully released.
- Unsuccessful
-
- Type: Array of UnsuccessfulItem structures
The IDs of the Dedicated Hosts that could not be released, including an error message.
Errors
There are no errors described for this operation.
ReplaceNetworkAclAssociation
$result = $client->replaceNetworkAclAssociation
([/* ... */]); $promise = $client->replaceNetworkAclAssociationAsync
([/* ... */]);
Changes which network ACL a subnet is associated with. By default when you create a subnet, it's automatically associated with the default network ACL. For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->replaceNetworkAclAssociation([ 'AssociationId' => '<string>', // REQUIRED 'DryRun' => true || false, 'NetworkAclId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AssociationId
-
- Required: Yes
- Type: string
The ID of the current association between the original network ACL and the subnet.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - NetworkAclId
-
- Required: Yes
- Type: string
The ID of the new network ACL to associate with the subnet.
Result Syntax
[ 'NewAssociationId' => '<string>', ]
Result Details
Members
- NewAssociationId
-
- Type: string
The ID of the new association.
Errors
There are no errors described for this operation.
Examples
Example 1: To replace the network ACL associated with a subnet
This example associates the specified network ACL with the subnet for the specified network ACL association.
$result = $client->replaceNetworkAclAssociation([ 'AssociationId' => 'aclassoc-e5b95c8c', 'NetworkAclId' => 'acl-5fb85d36', ]);
Result syntax:
[ 'NewAssociationId' => 'aclassoc-3999875b', ]
ReplaceNetworkAclEntry
$result = $client->replaceNetworkAclEntry
([/* ... */]); $promise = $client->replaceNetworkAclEntryAsync
([/* ... */]);
Replaces an entry (rule) in a network ACL. For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->replaceNetworkAclEntry([ 'CidrBlock' => '<string>', // REQUIRED 'DryRun' => true || false, 'Egress' => true || false, // REQUIRED 'IcmpTypeCode' => [ 'Code' => <integer>, 'Type' => <integer>, ], 'NetworkAclId' => '<string>', // REQUIRED 'PortRange' => [ 'From' => <integer>, 'To' => <integer>, ], 'Protocol' => '<string>', // REQUIRED 'RuleAction' => 'allow|deny', // REQUIRED 'RuleNumber' => <integer>, // REQUIRED ]);
Parameter Details
Members
- CidrBlock
-
- Required: Yes
- Type: string
The network range to allow or deny, in CIDR notation.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Egress
-
- Required: Yes
- Type: boolean
Indicates whether to replace the egress rule.
Default: If no value is specified, we replace the ingress rule.
- IcmpTypeCode
-
- Type: IcmpTypeCode structure
ICMP protocol: The ICMP type and code. Required if specifying 1 (ICMP) for the protocol.
- NetworkAclId
-
- Required: Yes
- Type: string
The ID of the ACL.
- PortRange
-
- Type: PortRange structure
TCP or UDP protocols: The range of ports the rule applies to. Required if specifying 6 (TCP) or 17 (UDP) for the protocol.
- Protocol
-
- Required: Yes
- Type: string
The IP protocol. You can specify
all
or-1
to mean all protocols. - RuleAction
-
- Required: Yes
- Type: string
Indicates whether to allow or deny the traffic that matches the rule.
- RuleNumber
-
- Required: Yes
- Type: int
The rule number of the entry to replace.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To replace a network ACL entry
This example replaces an entry for the specified network ACL. The new rule 100 allows ingress traffic from 203.0.113.12/24 on UDP port 53 (DNS) into any associated subnet.
$result = $client->replaceNetworkAclEntry([ 'CidrBlock' => '203.0.113.12/24', 'Egress' => , 'NetworkAclId' => 'acl-5fb85d36', 'PortRange' => [ 'From' => 53, 'To' => 53, ], 'Protocol' => 'udp', 'RuleAction' => 'allow', 'RuleNumber' => 100, ]);
ReplaceRoute
$result = $client->replaceRoute
([/* ... */]); $promise = $client->replaceRouteAsync
([/* ... */]);
Replaces an existing route within a route table in a VPC. You must provide only one of the following: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, or network interface.
For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->replaceRoute([ 'DestinationCidrBlock' => '<string>', // REQUIRED 'DryRun' => true || false, 'GatewayId' => '<string>', 'InstanceId' => '<string>', 'NatGatewayId' => '<string>', 'NetworkInterfaceId' => '<string>', 'RouteTableId' => '<string>', // REQUIRED 'VpcPeeringConnectionId' => '<string>', ]);
Parameter Details
Members
- DestinationCidrBlock
-
- Required: Yes
- Type: string
The CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the table.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - GatewayId
-
- Type: string
The ID of an Internet gateway or virtual private gateway.
- InstanceId
-
- Type: string
The ID of a NAT instance in your VPC.
- NatGatewayId
-
- Type: string
The ID of a NAT gateway.
- NetworkInterfaceId
-
- Type: string
The ID of a network interface.
- RouteTableId
-
- Required: Yes
- Type: string
The ID of the route table.
- VpcPeeringConnectionId
-
- Type: string
The ID of a VPC peering connection.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To replace a route
This example replaces the specified route in the specified table table. The new route matches the specified CIDR and sends the traffic to the specified virtual private gateway.
$result = $client->replaceRoute([ 'DestinationCidrBlock' => '10.0.0.0/16', 'GatewayId' => 'vgw-9a4cacf3', 'RouteTableId' => 'rtb-22574640', ]);
ReplaceRouteTableAssociation
$result = $client->replaceRouteTableAssociation
([/* ... */]); $promise = $client->replaceRouteTableAssociationAsync
([/* ... */]);
Changes the route table associated with a given subnet in a VPC. After the operation completes, the subnet uses the routes in the new route table it's associated with. For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.
You can also use ReplaceRouteTableAssociation to change which table is the main route table in the VPC. You just specify the main route table's association ID and the route table to be the new main route table.
Parameter Syntax
$result = $client->replaceRouteTableAssociation([ 'AssociationId' => '<string>', // REQUIRED 'DryRun' => true || false, 'RouteTableId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AssociationId
-
- Required: Yes
- Type: string
The association ID.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - RouteTableId
-
- Required: Yes
- Type: string
The ID of the new route table to associate with the subnet.
Result Syntax
[ 'NewAssociationId' => '<string>', ]
Result Details
Members
- NewAssociationId
-
- Type: string
The ID of the new association.
Errors
There are no errors described for this operation.
Examples
Example 1: To replace the route table associated with a subnet
This example associates the specified route table with the subnet for the specified route table association.
$result = $client->replaceRouteTableAssociation([ 'AssociationId' => 'rtbassoc-781d0d1a', 'RouteTableId' => 'rtb-22574640', ]);
Result syntax:
[ 'NewAssociationId' => 'rtbassoc-3a1f0f58', ]
ReportInstanceStatus
$result = $client->reportInstanceStatus
([/* ... */]); $promise = $client->reportInstanceStatusAsync
([/* ... */]);
Submits feedback about the status of an instance. The instance must be in the running
state. If your experience with the instance differs from the instance status returned by DescribeInstanceStatus, use ReportInstanceStatus to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.
Use of this action does not change the value returned by DescribeInstanceStatus.
Parameter Syntax
$result = $client->reportInstanceStatus([ 'Description' => '<string>', 'DryRun' => true || false, 'EndTime' => <integer || string || DateTime>, 'Instances' => ['<string>', ...], // REQUIRED 'ReasonCodes' => ['<string>', ...], // REQUIRED 'StartTime' => <integer || string || DateTime>, 'Status' => 'ok|impaired', // REQUIRED ]);
Parameter Details
Members
- Description
-
- Type: string
Descriptive text about the health state of your instance.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - EndTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time at which the reported instance health state ended.
- Instances
-
- Required: Yes
- Type: Array of strings
One or more instances.
- ReasonCodes
-
- Required: Yes
- Type: Array of strings
One or more reason codes that describes the health state of your instance.
-
instance-stuck-in-state
: My instance is stuck in a state. -
unresponsive
: My instance is unresponsive. -
not-accepting-credentials
: My instance is not accepting my credentials. -
password-not-available
: A password is not available for my instance. -
performance-network
: My instance is experiencing performance problems which I believe are network related. -
performance-instance-store
: My instance is experiencing performance problems which I believe are related to the instance stores. -
performance-ebs-volume
: My instance is experiencing performance problems which I believe are related to an EBS volume. -
performance-other
: My instance is experiencing performance problems. -
other
: [explain using the description parameter]
- StartTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time at which the reported instance health state began.
- Status
-
- Required: Yes
- Type: string
The status of all instances listed.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
RequestSpotFleet
$result = $client->requestSpotFleet
([/* ... */]); $promise = $client->requestSpotFleetAsync
([/* ... */]);
Creates a Spot fleet request.
You can submit a single request that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.
By default, the Spot fleet requests Spot instances in the Spot pool where the price per unit is the lowest. Each launch specification can include its own instance weighting that reflects the value of the instance type to your application workload.
Alternatively, you can specify that the Spot fleet distribute the target capacity across the Spot pools included in its launch specifications. By ensuring that the Spot instances in your Spot fleet are in different Spot pools, you can improve the availability of your fleet.
For more information, see Spot Fleet Requests in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->requestSpotFleet([ 'DryRun' => true || false, 'SpotFleetRequestConfig' => [ // REQUIRED 'AllocationStrategy' => 'lowestPrice|diversified', 'ClientToken' => '<string>', 'ExcessCapacityTerminationPolicy' => 'noTermination|default', 'FulfilledCapacity' => <float>, 'IamFleetRole' => '<string>', // REQUIRED 'LaunchSpecifications' => [ // REQUIRED [ 'AddressingType' => '<string>', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'EbsOptimized' => true || false, 'IamInstanceProfile' => [ 'Arn' => '<string>', 'Name' => '<string>', ], 'ImageId' => '<string>', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'KernelId' => '<string>', 'KeyName' => '<string>', 'Monitoring' => [ 'Enabled' => true || false, ], 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => true || false, 'DeleteOnTermination' => true || false, 'Description' => '<string>', 'DeviceIndex' => <integer>, 'Groups' => ['<string>', ...], 'NetworkInterfaceId' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Primary' => true || false, 'PrivateIpAddress' => '<string>', // REQUIRED ], // ... ], 'SecondaryPrivateIpAddressCount' => <integer>, 'SubnetId' => '<string>', ], // ... ], 'Placement' => [ 'AvailabilityZone' => '<string>', 'GroupName' => '<string>', ], 'RamdiskId' => '<string>', 'SecurityGroups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'SpotPrice' => '<string>', 'SubnetId' => '<string>', 'UserData' => '<string>', 'WeightedCapacity' => <float>, ], // ... ], 'SpotPrice' => '<string>', // REQUIRED 'TargetCapacity' => <integer>, // REQUIRED 'TerminateInstancesWithExpiration' => true || false, 'Type' => 'request|maintain', 'ValidFrom' => <integer || string || DateTime>, 'ValidUntil' => <integer || string || DateTime>, ], ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - SpotFleetRequestConfig
-
- Required: Yes
- Type: SpotFleetRequestConfigData structure
The configuration for the Spot fleet request.
Result Syntax
[ 'SpotFleetRequestId' => '<string>', ]
Result Details
Members
- SpotFleetRequestId
-
- Required: Yes
- Type: string
The ID of the Spot fleet request.
Errors
There are no errors described for this operation.
Examples
Example 1: To request a Spot fleet in the subnet with the lowest price
This example creates a Spot fleet request with two launch specifications that differ only by subnet. The Spot fleet launches the instances in the specified subnet with the lowest price. If the instances are launched in a default VPC, they receive a public IP address by default. If the instances are launched in a nondefault VPC, they do not receive a public IP address by default. Note that you can't specify different subnets from the same Availability Zone in a Spot fleet request.
$result = $client->requestSpotFleet([ 'SpotFleetRequestConfig' => [ 'IamFleetRole' => 'arn:aws:iam::123456789012:role/my-spot-fleet-role', 'LaunchSpecifications' => [ [ 'IamInstanceProfile' => [ 'Arn' => 'arn:aws:iam::123456789012:instance-profile/my-iam-role', ], 'ImageId' => 'ami-1a2b3c4d', 'InstanceType' => 'm3.medium', 'KeyName' => 'my-key-pair', 'SecurityGroups' => [ [ 'GroupId' => 'sg-1a2b3c4d', ], ], 'SubnetId' => 'subnet-1a2b3c4d, subnet-3c4d5e6f', ], ], 'SpotPrice' => '0.04', 'TargetCapacity' => 2, ], ]);
Result syntax:
[ 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ]
Example 2: To request a Spot fleet in the Availability Zone with the lowest price
This example creates a Spot fleet request with two launch specifications that differ only by Availability Zone. The Spot fleet launches the instances in the specified Availability Zone with the lowest price. If your account supports EC2-VPC only, Amazon EC2 launches the Spot instances in the default subnet of the Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the Availability Zone.
$result = $client->requestSpotFleet([ 'SpotFleetRequestConfig' => [ 'IamFleetRole' => 'arn:aws:iam::123456789012:role/my-spot-fleet-role', 'LaunchSpecifications' => [ [ 'IamInstanceProfile' => [ 'Arn' => 'arn:aws:iam::123456789012:instance-profile/my-iam-role', ], 'ImageId' => 'ami-1a2b3c4d', 'InstanceType' => 'm3.medium', 'KeyName' => 'my-key-pair', 'Placement' => [ 'AvailabilityZone' => 'us-west-2a, us-west-2b', ], 'SecurityGroups' => [ [ 'GroupId' => 'sg-1a2b3c4d', ], ], ], ], 'SpotPrice' => '0.04', 'TargetCapacity' => 2, ], ]);
Result syntax:
[ 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ]
Example 3: To launch Spot instances in a subnet and assign them public IP addresses
This example assigns public addresses to instances launched in a nondefault VPC. Note that when you specify a network interface, you must include the subnet ID and security group ID using the network interface.
$result = $client->requestSpotFleet([ 'SpotFleetRequestConfig' => [ 'IamFleetRole' => 'arn:aws:iam::123456789012:role/my-spot-fleet-role', 'LaunchSpecifications' => [ [ 'IamInstanceProfile' => [ 'Arn' => 'arn:aws:iam::880185128111:instance-profile/my-iam-role', ], 'ImageId' => 'ami-1a2b3c4d', 'InstanceType' => 'm3.medium', 'KeyName' => 'my-key-pair', 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => 1, 'DeviceIndex' => 0, 'Groups' => [ 'sg-1a2b3c4d', ], 'SubnetId' => 'subnet-1a2b3c4d', ], ], ], ], 'SpotPrice' => '0.04', 'TargetCapacity' => 2, ], ]);
Result syntax:
[ 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ]
Example 4: To request a Spot fleet using the diversified allocation strategy
This example creates a Spot fleet request that launches 30 instances using the diversified allocation strategy. The launch specifications differ by instance type. The Spot fleet distributes the instances across the launch specifications such that there are 10 instances of each type.
$result = $client->requestSpotFleet([ 'SpotFleetRequestConfig' => [ 'AllocationStrategy' => 'diversified', 'IamFleetRole' => 'arn:aws:iam::123456789012:role/my-spot-fleet-role', 'LaunchSpecifications' => [ [ 'ImageId' => 'ami-1a2b3c4d', 'InstanceType' => 'c4.2xlarge', 'SubnetId' => 'subnet-1a2b3c4d', ], [ 'ImageId' => 'ami-1a2b3c4d', 'InstanceType' => 'm3.2xlarge', 'SubnetId' => 'subnet-1a2b3c4d', ], [ 'ImageId' => 'ami-1a2b3c4d', 'InstanceType' => 'r3.2xlarge', 'SubnetId' => 'subnet-1a2b3c4d', ], ], 'SpotPrice' => '0.70', 'TargetCapacity' => 30, ], ]);
Result syntax:
[ 'SpotFleetRequestId' => 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE', ]
RequestSpotInstances
$result = $client->requestSpotInstances
([/* ... */]); $promise = $client->requestSpotInstancesAsync
([/* ... */]);
Creates a Spot instance request. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot Instance capacity and current Spot instance requests. For more information, see Spot Instance Requests in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->requestSpotInstances([ 'AvailabilityZoneGroup' => '<string>', 'BlockDurationMinutes' => <integer>, 'ClientToken' => '<string>', 'DryRun' => true || false, 'InstanceCount' => <integer>, 'LaunchGroup' => '<string>', 'LaunchSpecification' => [ 'AddressingType' => '<string>', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'EbsOptimized' => true || false, 'IamInstanceProfile' => [ 'Arn' => '<string>', 'Name' => '<string>', ], 'ImageId' => '<string>', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'KernelId' => '<string>', 'KeyName' => '<string>', 'Monitoring' => [ 'Enabled' => true || false, // REQUIRED ], 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => true || false, 'DeleteOnTermination' => true || false, 'Description' => '<string>', 'DeviceIndex' => <integer>, 'Groups' => ['<string>', ...], 'NetworkInterfaceId' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Primary' => true || false, 'PrivateIpAddress' => '<string>', // REQUIRED ], // ... ], 'SecondaryPrivateIpAddressCount' => <integer>, 'SubnetId' => '<string>', ], // ... ], 'Placement' => [ 'AvailabilityZone' => '<string>', 'GroupName' => '<string>', ], 'RamdiskId' => '<string>', 'SecurityGroupIds' => ['<string>', ...], 'SecurityGroups' => ['<string>', ...], 'SubnetId' => '<string>', 'UserData' => '<string>', ], 'SpotPrice' => '<string>', // REQUIRED 'Type' => 'one-time|persistent', 'ValidFrom' => <integer || string || DateTime>, 'ValidUntil' => <integer || string || DateTime>, ]);
Parameter Details
Members
- AvailabilityZoneGroup
-
- Type: string
The user-specified name for a logical grouping of bids.
When you specify an Availability Zone group in a Spot Instance request, all Spot instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to bids for Spot Instances of the same instance type. Any additional Spot instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.
If there is no active instance running in the Availability Zone group that you specify for a new Spot instance request (all instances are terminated, the bid is expired, or the bid falls below current market), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.
Default: Instances are launched in any available Availability Zone.
- BlockDurationMinutes
-
- Type: int
The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
- ClientToken
-
- Type: string
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceCount
-
- Type: int
The maximum number of Spot instances to launch.
Default: 1
- LaunchGroup
-
- Type: string
The instance launch group. Launch groups are Spot instances that launch together and terminate together.
Default: Instances are launched and terminated individually
- LaunchSpecification
-
- Type: RequestSpotLaunchSpecification structure
Describes the launch specification for an instance.
- SpotPrice
-
- Required: Yes
- Type: string
The maximum hourly price (bid) for any Spot instance launched to fulfill the request.
- Type
-
- Type: string
The Spot instance request type.
Default:
one-time
- ValidFrom
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
Default: The request is effective indefinitely.
- ValidUntil
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.
Default: The request is effective indefinitely.
Result Syntax
[ 'SpotInstanceRequests' => [ [ 'ActualBlockHourlyPrice' => '<string>', 'AvailabilityZoneGroup' => '<string>', 'BlockDurationMinutes' => <integer>, 'CreateTime' => <DateTime>, 'Fault' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'InstanceId' => '<string>', 'LaunchGroup' => '<string>', 'LaunchSpecification' => [ 'AddressingType' => '<string>', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'EbsOptimized' => true || false, 'IamInstanceProfile' => [ 'Arn' => '<string>', 'Name' => '<string>', ], 'ImageId' => '<string>', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'KernelId' => '<string>', 'KeyName' => '<string>', 'Monitoring' => [ 'Enabled' => true || false, ], 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => true || false, 'DeleteOnTermination' => true || false, 'Description' => '<string>', 'DeviceIndex' => <integer>, 'Groups' => ['<string>', ...], 'NetworkInterfaceId' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Primary' => true || false, 'PrivateIpAddress' => '<string>', ], // ... ], 'SecondaryPrivateIpAddressCount' => <integer>, 'SubnetId' => '<string>', ], // ... ], 'Placement' => [ 'AvailabilityZone' => '<string>', 'GroupName' => '<string>', ], 'RamdiskId' => '<string>', 'SecurityGroups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'SubnetId' => '<string>', 'UserData' => '<string>', ], 'LaunchedAvailabilityZone' => '<string>', 'ProductDescription' => 'Linux/UNIX|Linux/UNIX (Amazon VPC)|Windows|Windows (Amazon VPC)', 'SpotInstanceRequestId' => '<string>', 'SpotPrice' => '<string>', 'State' => 'open|active|closed|cancelled|failed', 'Status' => [ 'Code' => '<string>', 'Message' => '<string>', 'UpdateTime' => <DateTime>, ], 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'Type' => 'one-time|persistent', 'ValidFrom' => <DateTime>, 'ValidUntil' => <DateTime>, ], // ... ], ]
Result Details
Members
- SpotInstanceRequests
-
- Type: Array of SpotInstanceRequest structures
One or more Spot instance requests.
Errors
There are no errors described for this operation.
Examples
Example 1: To create a one-time Spot Instance request
This example creates a one-time Spot Instance request for five instances in the specified Availability Zone. If your account supports EC2-VPC only, Amazon EC2 launches the instances in the default subnet of the specified Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the specified Availability Zone.
$result = $client->requestSpotInstances([ 'InstanceCount' => 5, 'LaunchSpecification' => [ 'IamInstanceProfile' => [ 'Arn' => 'arn:aws:iam::123456789012:instance-profile/my-iam-role', ], 'ImageId' => 'ami-1a2b3c4d', 'InstanceType' => 'm3.medium', 'KeyName' => 'my-key-pair', 'Placement' => [ 'AvailabilityZone' => 'us-west-2a', ], 'SecurityGroupIds' => [ 'sg-1a2b3c4d', ], ], 'SpotPrice' => '0.03', 'Type' => 'one-time', ]);
Example 2: To create a one-time Spot Instance request
This example command creates a one-time Spot Instance request for five instances in the specified subnet. Amazon EC2 launches the instances in the specified subnet. If the VPC is a nondefault VPC, the instances do not receive a public IP address by default.
$result = $client->requestSpotInstances([ 'InstanceCount' => 5, 'LaunchSpecification' => [ 'IamInstanceProfile' => [ 'Arn' => 'arn:aws:iam::123456789012:instance-profile/my-iam-role', ], 'ImageId' => 'ami-1a2b3c4d', 'InstanceType' => 'm3.medium', 'SecurityGroupIds' => [ 'sg-1a2b3c4d', ], 'SubnetId' => 'subnet-1a2b3c4d', ], 'SpotPrice' => '0.050', 'Type' => 'one-time', ]);
ResetImageAttribute
$result = $client->resetImageAttribute
([/* ... */]); $promise = $client->resetImageAttributeAsync
([/* ... */]);
Resets an attribute of an AMI to its default value.
The productCodes attribute can't be reset.
Parameter Syntax
$result = $client->resetImageAttribute([ 'Attribute' => 'launchPermission', // REQUIRED 'DryRun' => true || false, 'ImageId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Attribute
-
- Required: Yes
- Type: string
The attribute to reset (currently you can only reset the launch permission attribute).
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - ImageId
-
- Required: Yes
- Type: string
The ID of the AMI.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
ResetInstanceAttribute
$result = $client->resetInstanceAttribute
([/* ... */]); $promise = $client->resetInstanceAttributeAsync
([/* ... */]);
Resets an attribute of an instance to its default value. To reset the kernel
or ramdisk
, the instance must be in a stopped state. To reset the sourceDestCheck
, the instance can be either running or stopped.
The sourceDestCheck
attribute controls whether source/destination checking is enabled. The default value is true
, which means checking is enabled. This value must be false
for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
Parameter Syntax
$result = $client->resetInstanceAttribute([ 'Attribute' => 'instanceType|kernel|ramdisk|userData|disableApiTermination|instanceInitiatedShutdownBehavior|rootDeviceName|blockDeviceMapping|productCodes|sourceDestCheck|groupSet|ebsOptimized|sriovNetSupport|enaSupport', // REQUIRED 'DryRun' => true || false, 'InstanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Attribute
-
- Required: Yes
- Type: string
The attribute to reset.
You can only reset the following attributes:
kernel
|ramdisk
|sourceDestCheck
. To change an instance attribute, use ModifyInstanceAttribute. - DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceId
-
- Required: Yes
- Type: string
The ID of the instance.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
ResetNetworkInterfaceAttribute
$result = $client->resetNetworkInterfaceAttribute
([/* ... */]); $promise = $client->resetNetworkInterfaceAttributeAsync
([/* ... */]);
Resets a network interface attribute. You can specify only one attribute at a time.
Parameter Syntax
$result = $client->resetNetworkInterfaceAttribute([ 'DryRun' => true || false, 'NetworkInterfaceId' => '<string>', // REQUIRED 'SourceDestCheck' => '<string>', ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - NetworkInterfaceId
-
- Required: Yes
- Type: string
The ID of the network interface.
- SourceDestCheck
-
- Type: string
The source/destination checking attribute. Resets the value to
true
.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
ResetSnapshotAttribute
$result = $client->resetSnapshotAttribute
([/* ... */]); $promise = $client->resetSnapshotAttributeAsync
([/* ... */]);
Resets permission settings for the specified snapshot.
For more information on modifying snapshot permissions, see Sharing Snapshots in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->resetSnapshotAttribute([ 'Attribute' => 'productCodes|createVolumePermission', // REQUIRED 'DryRun' => true || false, 'SnapshotId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Attribute
-
- Required: Yes
- Type: string
The attribute to reset. Currently, only the attribute for permission to create volumes can be reset.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - SnapshotId
-
- Required: Yes
- Type: string
The ID of the snapshot.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To reset a snapshot attribute
This example resets the create volume permissions for snapshot ``snap-1234567890abcdef0``. If the command succeeds, no output is returned.
$result = $client->resetSnapshotAttribute([ 'Attribute' => 'createVolumePermission', 'SnapshotId' => 'snap-1234567890abcdef0', ]);
Result syntax:
[ ]
RestoreAddressToClassic
$result = $client->restoreAddressToClassic
([/* ... */]); $promise = $client->restoreAddressToClassicAsync
([/* ... */]);
Restores an Elastic IP address that was previously moved to the EC2-VPC platform back to the EC2-Classic platform. You cannot move an Elastic IP address that was originally allocated for use in EC2-VPC. The Elastic IP address must not be associated with an instance or network interface.
Parameter Syntax
$result = $client->restoreAddressToClassic([ 'DryRun' => true || false, 'PublicIp' => '<string>', // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - PublicIp
-
- Required: Yes
- Type: string
The Elastic IP address.
Result Syntax
[ 'PublicIp' => '<string>', 'Status' => 'MoveInProgress|InVpc|InClassic', ]
Result Details
Members
- PublicIp
-
- Type: string
The Elastic IP address.
- Status
-
- Type: string
The move status for the IP address.
Errors
There are no errors described for this operation.
Examples
Example 1: To restore an address to EC2-Classic
This example restores the specified Elastic IP address to the EC2-Classic platform.
$result = $client->restoreAddressToClassic([ 'PublicIp' => '198.51.100.0', ]);
Result syntax:
[ 'PublicIp' => '198.51.100.0', 'Status' => 'MoveInProgress', ]
RevokeSecurityGroupEgress
$result = $client->revokeSecurityGroupEgress
([/* ... */]); $promise = $client->revokeSecurityGroupEgressAsync
([/* ... */]);
[EC2-VPC only] Removes one or more egress rules from a security group for EC2-VPC. This action doesn't apply to security groups for use in EC2-Classic. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be revoked.
Each rule consists of the protocol and the CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.
Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.
Parameter Syntax
$result = $client->revokeSecurityGroupEgress([ 'CidrIp' => '<string>', 'DryRun' => true || false, 'FromPort' => <integer>, 'GroupId' => '<string>', // REQUIRED 'IpPermissions' => [ [ 'FromPort' => <integer>, 'IpProtocol' => '<string>', 'IpRanges' => [ [ 'CidrIp' => '<string>', ], // ... ], 'PrefixListIds' => [ [ 'PrefixListId' => '<string>', ], // ... ], 'ToPort' => <integer>, 'UserIdGroupPairs' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', 'PeeringStatus' => '<string>', 'UserId' => '<string>', 'VpcId' => '<string>', 'VpcPeeringConnectionId' => '<string>', ], // ... ], ], // ... ], 'IpProtocol' => '<string>', 'SourceSecurityGroupName' => '<string>', 'SourceSecurityGroupOwnerId' => '<string>', 'ToPort' => <integer>, ]);
Parameter Details
Members
- CidrIp
-
- Type: string
The CIDR IP address range. We recommend that you specify the CIDR range in a set of IP permissions instead.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - FromPort
-
- Type: int
The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.
- GroupId
-
- Required: Yes
- Type: string
The ID of the security group.
- IpPermissions
-
- Type: Array of IpPermission structures
A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.
- IpProtocol
-
- Type: string
The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.
- SourceSecurityGroupName
-
- Type: string
The name of a destination security group. To revoke outbound access to a destination security group, we recommend that you use a set of IP permissions instead.
- SourceSecurityGroupOwnerId
-
- Type: string
The AWS account number for a destination security group. To revoke outbound access to a destination security group, we recommend that you use a set of IP permissions instead.
- ToPort
-
- Type: int
The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
RevokeSecurityGroupIngress
$result = $client->revokeSecurityGroupIngress
([/* ... */]); $promise = $client->revokeSecurityGroupIngressAsync
([/* ... */]);
Removes one or more ingress rules from a security group. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be removed.
Each rule consists of the protocol and the CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.
Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.
Parameter Syntax
$result = $client->revokeSecurityGroupIngress([ 'CidrIp' => '<string>', 'DryRun' => true || false, 'FromPort' => <integer>, 'GroupId' => '<string>', 'GroupName' => '<string>', 'IpPermissions' => [ [ 'FromPort' => <integer>, 'IpProtocol' => '<string>', 'IpRanges' => [ [ 'CidrIp' => '<string>', ], // ... ], 'PrefixListIds' => [ [ 'PrefixListId' => '<string>', ], // ... ], 'ToPort' => <integer>, 'UserIdGroupPairs' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', 'PeeringStatus' => '<string>', 'UserId' => '<string>', 'VpcId' => '<string>', 'VpcPeeringConnectionId' => '<string>', ], // ... ], ], // ... ], 'IpProtocol' => '<string>', 'SourceSecurityGroupName' => '<string>', 'SourceSecurityGroupOwnerId' => '<string>', 'ToPort' => <integer>, ]);
Parameter Details
Members
- CidrIp
-
- Type: string
The CIDR IP address range. You can't specify this parameter when specifying a source security group.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - FromPort
-
- Type: int
The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use
-1
to specify all ICMP types. - GroupId
-
- Type: string
The ID of the security group. Required for a security group in a nondefault VPC.
- GroupName
-
- Type: string
[EC2-Classic, default VPC] The name of the security group.
- IpPermissions
-
- Type: Array of IpPermission structures
A set of IP permissions. You can't specify a source security group and a CIDR IP address range.
- IpProtocol
-
- Type: string
The IP protocol name (
tcp
,udp
,icmp
) or number (see Protocol Numbers). Use-1
to specify all. - SourceSecurityGroupName
-
- Type: string
[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.
- SourceSecurityGroupOwnerId
-
- Type: string
[EC2-Classic] The AWS account ID of the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.
- ToPort
-
- Type: int
The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use
-1
to specify all ICMP codes for the ICMP type.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
RunInstances
$result = $client->runInstances
([/* ... */]); $promise = $client->runInstancesAsync
([/* ... */]);
Launches the specified number of instances using an AMI for which you have permissions.
When you launch an instance, it enters the pending
state. After the instance is ready for you, it enters the running
state. To check the state of your instance, call DescribeInstances.
To ensure faster instance launches, break up large requests into smaller batches. For example, create five separate launch requests for 100 instances each instead of one launch request for 500 instances.
To tag your instance, ensure that it is running
as CreateTags requires a resource ID. For more information about tagging, see Tagging Your Amazon EC2 Resources.
If you don't specify a security group when launching an instance, Amazon EC2 uses the default security group. For more information, see Security Groups in the Amazon Elastic Compute Cloud User Guide.
[EC2-VPC only accounts] If you don't specify a subnet in the request, we choose a default subnet from your default VPC for you.
[EC2-Classic accounts] If you're launching into EC2-Classic and you don't specify an Availability Zone, we choose one for you.
Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.
You can provide optional user data when launching an instance. For more information, see Instance Metadata in the Amazon Elastic Compute Cloud User Guide.
If any of the AMIs have a product code attached for which the user has not subscribed, RunInstances
fails.
Some instance types can only be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID in the request, RunInstances
fails. For more information, see Instance Types Available Only in a VPC.
For more information about troubleshooting, see What To Do If An Instance Immediately Terminates, and Troubleshooting Connecting to Your Instance in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->runInstances([ 'AdditionalInfo' => '<string>', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => 'standard|io1|gp2|sc1|st1', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'ClientToken' => '<string>', 'DisableApiTermination' => true || false, 'DryRun' => true || false, 'EbsOptimized' => true || false, 'IamInstanceProfile' => [ 'Arn' => '<string>', 'Name' => '<string>', ], 'ImageId' => '<string>', // REQUIRED 'InstanceInitiatedShutdownBehavior' => 'stop|terminate', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'KernelId' => '<string>', 'KeyName' => '<string>', 'MaxCount' => <integer>, // REQUIRED 'MinCount' => <integer>, // REQUIRED 'Monitoring' => [ 'Enabled' => true || false, // REQUIRED ], 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => true || false, 'DeleteOnTermination' => true || false, 'Description' => '<string>', 'DeviceIndex' => <integer>, 'Groups' => ['<string>', ...], 'NetworkInterfaceId' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Primary' => true || false, 'PrivateIpAddress' => '<string>', // REQUIRED ], // ... ], 'SecondaryPrivateIpAddressCount' => <integer>, 'SubnetId' => '<string>', ], // ... ], 'Placement' => [ 'Affinity' => '<string>', 'AvailabilityZone' => '<string>', 'GroupName' => '<string>', 'HostId' => '<string>', 'Tenancy' => 'default|dedicated|host', ], 'PrivateIpAddress' => '<string>', 'RamdiskId' => '<string>', 'SecurityGroupIds' => ['<string>', ...], 'SecurityGroups' => ['<string>', ...], 'SubnetId' => '<string>', 'UserData' => '<string>', ]);
Parameter Details
Members
- AdditionalInfo
-
- Type: string
Reserved.
- BlockDeviceMappings
-
- Type: Array of BlockDeviceMapping structures
The block device mapping.
Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
Constraints: Maximum 64 ASCII characters
- DisableApiTermination
-
- Type: boolean
If you set this parameter to
true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. If you set this parameter totrue
and then later want to be able to terminate the instance, you must first change the value of thedisableApiTermination
attribute tofalse
using ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.Default:
false
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - EbsOptimized
-
- Type: boolean
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default:
false
- IamInstanceProfile
-
- Type: IamInstanceProfileSpecification structure
The IAM instance profile.
- ImageId
-
- Required: Yes
- Type: string
The ID of the AMI, which you can get by calling DescribeImages.
- InstanceInitiatedShutdownBehavior
-
- Type: string
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default:
stop
- InstanceType
-
- Type: string
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default:
m1.small
- KernelId
-
- Type: string
The ID of the kernel.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
- KeyName
-
- Type: string
The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
- MaxCount
-
- Required: Yes
- Type: int
The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above
MinCount
.Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
- MinCount
-
- Required: Yes
- Type: int
The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
- Monitoring
-
- Type: RunInstancesMonitoringEnabled structure
The monitoring for the instance.
- NetworkInterfaces
-
- Type: Array of InstanceNetworkInterfaceSpecification structures
One or more network interfaces.
- Placement
-
- Type: Placement structure
The placement for the instance.
- PrivateIpAddress
-
- Type: string
[EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet.
Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if
PrivateIpAddresses.n.Primary
is set totrue
andPrivateIpAddresses.n.PrivateIpAddress
is set to an IP address.You cannot specify this option if you're launching more than one instance in the request.
Default: We select an IP address from the IP address range of the subnet.
- RamdiskId
-
- Type: string
The ID of the RAM disk.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
- SecurityGroupIds
-
- Type: Array of strings
One or more security group IDs. You can create a security group using CreateSecurityGroup.
Default: Amazon EC2 uses the default security group.
- SecurityGroups
-
- Type: Array of strings
[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
- SubnetId
-
- Type: string
[EC2-VPC] The ID of the subnet to launch the instance into.
- UserData
-
- Type: string
The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
Result Syntax
[ 'Groups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'Instances' => [ [ 'AmiLaunchIndex' => <integer>, 'Architecture' => 'i386|x86_64', 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'AttachTime' => <DateTime>, 'DeleteOnTermination' => true || false, 'Status' => 'attaching|attached|detaching|detached', 'VolumeId' => '<string>', ], ], // ... ], 'ClientToken' => '<string>', 'EbsOptimized' => true || false, 'EnaSupport' => true || false, 'Hypervisor' => 'ovm|xen', 'IamInstanceProfile' => [ 'Arn' => '<string>', 'Id' => '<string>', ], 'ImageId' => '<string>', 'InstanceId' => '<string>', 'InstanceLifecycle' => 'spot|scheduled', 'InstanceType' => 't1.micro|t2.nano|t2.micro|t2.small|t2.medium|t2.large|m1.small|m1.medium|m1.large|m1.xlarge|m3.medium|m3.large|m3.xlarge|m3.2xlarge|m4.large|m4.xlarge|m4.2xlarge|m4.4xlarge|m4.10xlarge|m4.16xlarge|m2.xlarge|m2.2xlarge|m2.4xlarge|cr1.8xlarge|r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlarge|x1.16xlarge|x1.32xlarge|i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge|hi1.4xlarge|hs1.8xlarge|c1.medium|c1.xlarge|c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|c3.8xlarge|c4.large|c4.xlarge|c4.2xlarge|c4.4xlarge|c4.8xlarge|cc1.4xlarge|cc2.8xlarge|g2.2xlarge|g2.8xlarge|cg1.4xlarge|p2.xlarge|p2.8xlarge|p2.16xlarge|d2.xlarge|d2.2xlarge|d2.4xlarge|d2.8xlarge', 'KernelId' => '<string>', 'KeyName' => '<string>', 'LaunchTime' => <DateTime>, 'Monitoring' => [ 'State' => 'disabled|disabling|enabled|pending', ], 'NetworkInterfaces' => [ [ 'Association' => [ 'IpOwnerId' => '<string>', 'PublicDnsName' => '<string>', 'PublicIp' => '<string>', ], 'Attachment' => [ 'AttachTime' => <DateTime>, 'AttachmentId' => '<string>', 'DeleteOnTermination' => true || false, 'DeviceIndex' => <integer>, 'Status' => 'attaching|attached|detaching|detached', ], 'Description' => '<string>', 'Groups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'MacAddress' => '<string>', 'NetworkInterfaceId' => '<string>', 'OwnerId' => '<string>', 'PrivateDnsName' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddresses' => [ [ 'Association' => [ 'IpOwnerId' => '<string>', 'PublicDnsName' => '<string>', 'PublicIp' => '<string>', ], 'Primary' => true || false, 'PrivateDnsName' => '<string>', 'PrivateIpAddress' => '<string>', ], // ... ], 'SourceDestCheck' => true || false, 'Status' => 'available|attaching|in-use|detaching', 'SubnetId' => '<string>', 'VpcId' => '<string>', ], // ... ], 'Placement' => [ 'Affinity' => '<string>', 'AvailabilityZone' => '<string>', 'GroupName' => '<string>', 'HostId' => '<string>', 'Tenancy' => 'default|dedicated|host', ], 'Platform' => 'Windows', 'PrivateDnsName' => '<string>', 'PrivateIpAddress' => '<string>', 'ProductCodes' => [ [ 'ProductCodeId' => '<string>', 'ProductCodeType' => 'devpay|marketplace', ], // ... ], 'PublicDnsName' => '<string>', 'PublicIpAddress' => '<string>', 'RamdiskId' => '<string>', 'RootDeviceName' => '<string>', 'RootDeviceType' => 'ebs|instance-store', 'SecurityGroups' => [ [ 'GroupId' => '<string>', 'GroupName' => '<string>', ], // ... ], 'SourceDestCheck' => true || false, 'SpotInstanceRequestId' => '<string>', 'SriovNetSupport' => '<string>', 'State' => [ 'Code' => <integer>, 'Name' => 'pending|running|shutting-down|terminated|stopping|stopped', ], 'StateReason' => [ 'Code' => '<string>', 'Message' => '<string>', ], 'StateTransitionReason' => '<string>', 'SubnetId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'VirtualizationType' => 'hvm|paravirtual', 'VpcId' => '<string>', ], // ... ], 'OwnerId' => '<string>', 'RequesterId' => '<string>', 'ReservationId' => '<string>', ]
Result Details
Members
- Groups
-
- Type: Array of GroupIdentifier structures
[EC2-Classic only] One or more security groups.
- Instances
-
- Type: Array of Instance structures
One or more instances.
- OwnerId
-
- Type: string
The ID of the AWS account that owns the reservation.
- RequesterId
-
- Type: string
The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).
- ReservationId
-
- Type: string
The ID of the reservation.
Errors
There are no errors described for this operation.
RunScheduledInstances
$result = $client->runScheduledInstances
([/* ... */]); $promise = $client->runScheduledInstancesAsync
([/* ... */]);
Launches the specified Scheduled Instances.
Before you can launch a Scheduled Instance, you must purchase it and obtain an identifier using PurchaseScheduledInstances.
You must launch a Scheduled Instance during its scheduled time period. You can't stop or reboot a Scheduled Instance, but you can terminate it as needed. If you terminate a Scheduled Instance before the current scheduled time period ends, you can launch it again after a few minutes. For more information, see Scheduled Instances in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->runScheduledInstances([ 'ClientToken' => '<string>', 'DryRun' => true || false, 'InstanceCount' => <integer>, 'LaunchSpecification' => [ // REQUIRED 'BlockDeviceMappings' => [ [ 'DeviceName' => '<string>', 'Ebs' => [ 'DeleteOnTermination' => true || false, 'Encrypted' => true || false, 'Iops' => <integer>, 'SnapshotId' => '<string>', 'VolumeSize' => <integer>, 'VolumeType' => '<string>', ], 'NoDevice' => '<string>', 'VirtualName' => '<string>', ], // ... ], 'EbsOptimized' => true || false, 'IamInstanceProfile' => [ 'Arn' => '<string>', 'Name' => '<string>', ], 'ImageId' => '<string>', // REQUIRED 'InstanceType' => '<string>', 'KernelId' => '<string>', 'KeyName' => '<string>', 'Monitoring' => [ 'Enabled' => true || false, ], 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => true || false, 'DeleteOnTermination' => true || false, 'Description' => '<string>', 'DeviceIndex' => <integer>, 'Groups' => ['<string>', ...], 'NetworkInterfaceId' => '<string>', 'PrivateIpAddress' => '<string>', 'PrivateIpAddressConfigs' => [ [ 'Primary' => true || false, 'PrivateIpAddress' => '<string>', ], // ... ], 'SecondaryPrivateIpAddressCount' => <integer>, 'SubnetId' => '<string>', ], // ... ], 'Placement' => [ 'AvailabilityZone' => '<string>', 'GroupName' => '<string>', ], 'RamdiskId' => '<string>', 'SecurityGroupIds' => ['<string>', ...], 'SubnetId' => '<string>', 'UserData' => '<string>', ], 'ScheduledInstanceId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ClientToken
-
- Type: string
Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceCount
-
- Type: int
The number of instances.
Default: 1
- LaunchSpecification
-
- Required: Yes
- Type: ScheduledInstancesLaunchSpecification structure
The launch specification. You must match the instance type, Availability Zone, network, and platform of the schedule that you purchased.
- ScheduledInstanceId
-
- Required: Yes
- Type: string
The Scheduled Instance ID.
Result Syntax
[ 'InstanceIdSet' => ['<string>', ...], ]
Result Details
Members
- InstanceIdSet
-
- Type: Array of strings
The IDs of the newly launched instances.
Errors
There are no errors described for this operation.
Examples
Example 1: To launch a Scheduled Instance in a VPC
This example launches the specified Scheduled Instance in a VPC.
$result = $client->runScheduledInstances([ 'InstanceCount' => 1, 'LaunchSpecification' => [ 'IamInstanceProfile' => [ 'Name' => 'my-iam-role', ], 'ImageId' => 'ami-12345678', 'InstanceType' => 'c4.large', 'KeyName' => 'my-key-pair', 'NetworkInterfaces' => [ [ 'AssociatePublicIpAddress' => 1, 'DeviceIndex' => 0, 'Groups' => [ 'sg-12345678', ], 'SubnetId' => 'subnet-12345678', ], ], ], 'ScheduledInstanceId' => 'sci-1234-1234-1234-1234-123456789012', ]);
Result syntax:
[ 'InstanceIdSet' => [ 'i-1234567890abcdef0', ], ]
Example 2: To launch a Scheduled Instance in EC2-Classic
This example launches the specified Scheduled Instance in EC2-Classic.
$result = $client->runScheduledInstances([ 'InstanceCount' => 1, 'LaunchSpecification' => [ 'IamInstanceProfile' => [ 'Name' => 'my-iam-role', ], 'ImageId' => 'ami-12345678', 'InstanceType' => 'c4.large', 'KeyName' => 'my-key-pair', 'Placement' => [ 'AvailabilityZone' => 'us-west-2b', ], 'SecurityGroupIds' => [ 'sg-12345678', ], ], 'ScheduledInstanceId' => 'sci-1234-1234-1234-1234-123456789012', ]);
Result syntax:
[ 'InstanceIdSet' => [ 'i-1234567890abcdef0', ], ]
StartInstances
$result = $client->startInstances
([/* ... */]); $promise = $client->startInstancesAsync
([/* ... */]);
Starts an Amazon EBS-backed AMI that you've previously stopped.
Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.
Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.
Performing this operation on an instance that uses an instance store as its root device returns an error.
For more information, see Stopping Instances in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->startInstances([ 'AdditionalInfo' => '<string>', 'DryRun' => true || false, 'InstanceIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- AdditionalInfo
-
- Type: string
Reserved.
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceIds
-
- Required: Yes
- Type: Array of strings
One or more instance IDs.
Result Syntax
[ 'StartingInstances' => [ [ 'CurrentState' => [ 'Code' => <integer>, 'Name' => 'pending|running|shutting-down|terminated|stopping|stopped', ], 'InstanceId' => '<string>', 'PreviousState' => [ 'Code' => <integer>, 'Name' => 'pending|running|shutting-down|terminated|stopping|stopped', ], ], // ... ], ]
Result Details
Members
- StartingInstances
-
- Type: Array of InstanceStateChange structures
Information about one or more started instances.
Errors
There are no errors described for this operation.
StopInstances
$result = $client->stopInstances
([/* ... */]); $promise = $client->stopInstancesAsync
([/* ... */]);
Stops an Amazon EBS-backed instance.
We don't charge hourly usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.
You can't start or stop Spot instances, and you can't stop instance store-backed instances.
When you stop an instance, we shut it down. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.
Stopping an instance is different to rebooting or terminating it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, and terminating instances, see Instance Lifecycle in the Amazon Elastic Compute Cloud User Guide.
When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see Troubleshooting Stopping Your Instance in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->stopInstances([ 'DryRun' => true || false, 'Force' => true || false, 'InstanceIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - Force
-
- Type: boolean
Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.
Default:
false
- InstanceIds
-
- Required: Yes
- Type: Array of strings
One or more instance IDs.
Result Syntax
[ 'StoppingInstances' => [ [ 'CurrentState' => [ 'Code' => <integer>, 'Name' => 'pending|running|shutting-down|terminated|stopping|stopped', ], 'InstanceId' => '<string>', 'PreviousState' => [ 'Code' => <integer>, 'Name' => 'pending|running|shutting-down|terminated|stopping|stopped', ], ], // ... ], ]
Result Details
Members
- StoppingInstances
-
- Type: Array of InstanceStateChange structures
Information about one or more stopped instances.
Errors
There are no errors described for this operation.
TerminateInstances
$result = $client->terminateInstances
([/* ... */]); $promise = $client->terminateInstancesAsync
([/* ... */]);
Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.
If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.
Terminated instances remain visible after termination (for approximately one hour).
By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.
You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination
block device mapping parameter set to true
are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance Lifecycle in the Amazon Elastic Compute Cloud User Guide.
For more information about troubleshooting, see Troubleshooting Terminating Your Instance in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->terminateInstances([ 'DryRun' => true || false, 'InstanceIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceIds
-
- Required: Yes
- Type: Array of strings
One or more instance IDs.
Constraints: Up to 1000 instance IDs. We recommend breaking up this request into smaller batches.
Result Syntax
[ 'TerminatingInstances' => [ [ 'CurrentState' => [ 'Code' => <integer>, 'Name' => 'pending|running|shutting-down|terminated|stopping|stopped', ], 'InstanceId' => '<string>', 'PreviousState' => [ 'Code' => <integer>, 'Name' => 'pending|running|shutting-down|terminated|stopping|stopped', ], ], // ... ], ]
Result Details
Members
- TerminatingInstances
-
- Type: Array of InstanceStateChange structures
Information about one or more terminated instances.
Errors
There are no errors described for this operation.
UnassignPrivateIpAddresses
$result = $client->unassignPrivateIpAddresses
([/* ... */]); $promise = $client->unassignPrivateIpAddressesAsync
([/* ... */]);
Unassigns one or more secondary private IP addresses from a network interface.
Parameter Syntax
$result = $client->unassignPrivateIpAddresses([ 'NetworkInterfaceId' => '<string>', // REQUIRED 'PrivateIpAddresses' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- NetworkInterfaceId
-
- Required: Yes
- Type: string
The ID of the network interface.
- PrivateIpAddresses
-
- Required: Yes
- Type: Array of strings
The secondary private IP addresses to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.
Result Syntax
[]
Result Details
Errors
There are no errors described for this operation.
Examples
Example 1: To unassign a secondary private IP address from a network interface
This example unassigns the specified private IP address from the specified network interface.
$result = $client->unassignPrivateIpAddresses([ 'NetworkInterfaceId' => 'eni-e5aa89a3', 'PrivateIpAddresses' => [ '10.0.0.82', ], ]);
UnmonitorInstances
$result = $client->unmonitorInstances
([/* ... */]); $promise = $client->unmonitorInstancesAsync
([/* ... */]);
Disables monitoring for a running instance. For more information about monitoring instances, see Monitoring Your Instances and Volumes in the Amazon Elastic Compute Cloud User Guide.
Parameter Syntax
$result = $client->unmonitorInstances([ 'DryRun' => true || false, 'InstanceIds' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
- DryRun
-
- Type: boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
. - InstanceIds
-
- Required: Yes
- Type: Array of strings
One or more instance IDs.
Result Syntax
[ 'InstanceMonitorings' => [ [ 'InstanceId' => '<string>', 'Monitoring' => [ 'State' => 'disabled|disabling|enabled|pending', ], ], // ... ], ]
Result Details
Members
- InstanceMonitorings
-
- Type: Array of InstanceMonitoring structures
Monitoring information for one or more instances.
Errors
There are no errors described for this operation.
Shapes
AccountAttribute
Description
Describes an account attribute.
Members
- AttributeName
-
- Type: string
The name of the account attribute.
- AttributeValues
-
- Type: Array of AccountAttributeValue structures
One or more values for the account attribute.
AccountAttributeValue
Description
Describes a value of an account attribute.
Members
- AttributeValue
-
- Type: string
The value of the attribute.
ActiveInstance
Description
Describes a running instance in a Spot fleet.
Members
- InstanceId
-
- Type: string
The ID of the instance.
- InstanceType
-
- Type: string
The instance type.
- SpotInstanceRequestId
-
- Type: string
The ID of the Spot instance request.
Address
Description
Describes an Elastic IP address.
Members
- AllocationId
-
- Type: string
The ID representing the allocation of the address for use with EC2-VPC.
- AssociationId
-
- Type: string
The ID representing the association of the address with an instance in a VPC.
- Domain
-
- Type: string
Indicates whether this Elastic IP address is for use with instances in EC2-Classic (
standard
) or instances in a VPC (vpc
). - InstanceId
-
- Type: string
The ID of the instance that the address is associated with (if any).
- NetworkInterfaceId
-
- Type: string
The ID of the network interface.
- NetworkInterfaceOwnerId
-
- Type: string
The ID of the AWS account that owns the network interface.
- PrivateIpAddress
-
- Type: string
The private IP address associated with the Elastic IP address.
- PublicIp
-
- Type: string
The Elastic IP address.
AttributeBooleanValue
Description
Describes a value for a resource attribute that is a Boolean value.
Members
- Value
-
- Type: boolean
The attribute value. The valid values are
true
orfalse
.
AttributeValue
Description
Describes a value for a resource attribute that is a String.
Members
- Value
-
- Type: string
The attribute value. Note that the value is case-sensitive.
AvailabilityZone
Description
Describes an Availability Zone.
Members
- Messages
-
- Type: Array of AvailabilityZoneMessage structures
Any messages about the Availability Zone.
- RegionName
-
- Type: string
The name of the region.
- State
-
- Type: string
The state of the Availability Zone.
- ZoneName
-
- Type: string
The name of the Availability Zone.
AvailabilityZoneMessage
Description
Describes a message about an Availability Zone.
Members
- Message
-
- Type: string
The message about the Availability Zone.
AvailableCapacity
Description
The capacity information for instances launched onto the Dedicated Host.
Members
- AvailableInstanceCapacity
-
- Type: Array of InstanceCapacity structures
The total number of instances that the Dedicated Host supports.
- AvailableVCpus
-
- Type: int
The number of vCPUs available on the Dedicated Host.
BlobAttributeValue
Members
- Value
-
- Type: blob (string|resource|Psr\Http\Message\StreamInterface)
BlockDeviceMapping
Description
Describes a block device mapping.
Members
- DeviceName
-
- Type: string
The device name exposed to the instance (for example,
/dev/sdh
orxvdh
). - Ebs
-
- Type: EbsBlockDevice structure
Parameters used to automatically set up EBS volumes when the instance is launched.
- NoDevice
-
- Type: string
Suppresses the specified device included in the block device mapping of the AMI.
- VirtualName
-
- Type: string
The virtual device name (
ephemeral
N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings forephemeral0
andephemeral1
.The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
BundleTask
Description
Describes a bundle task.
Members
- BundleId
-
- Type: string
The ID of the bundle task.
- BundleTaskError
-
- Type: BundleTaskError structure
If the task fails, a description of the error.
- InstanceId
-
- Type: string
The ID of the instance associated with this bundle task.
- Progress
-
- Type: string
The level of task completion, as a percent (for example, 20%).
- StartTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time this task started.
- State
-
- Type: string
The state of the task.
- Storage
-
- Type: Storage structure
The Amazon S3 storage locations.
- UpdateTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time of the most recent update for the task.
BundleTaskError
Description
Describes an error for BundleInstance.
Members
- Code
-
- Type: string
The error code.
- Message
-
- Type: string
The error message.
CancelSpotFleetRequestsError
Description
Describes a Spot fleet error.
Members
- Code
-
- Required: Yes
- Type: string
The error code.
- Message
-
- Required: Yes
- Type: string
The description for the error code.
CancelSpotFleetRequestsErrorItem
Description
Describes a Spot fleet request that was not successfully canceled.
Members
- Error
-
- Required: Yes
- Type: CancelSpotFleetRequestsError structure
The error.
- SpotFleetRequestId
-
- Required: Yes
- Type: string
The ID of the Spot fleet request.
CancelSpotFleetRequestsSuccessItem
Description
Describes a Spot fleet request that was successfully canceled.
Members
- CurrentSpotFleetRequestState
-
- Required: Yes
- Type: string
The current state of the Spot fleet request.
- PreviousSpotFleetRequestState
-
- Required: Yes
- Type: string
The previous state of the Spot fleet request.
- SpotFleetRequestId
-
- Required: Yes
- Type: string
The ID of the Spot fleet request.
CancelledSpotInstanceRequest
Description
Describes a request to cancel a Spot instance.
Members
- SpotInstanceRequestId
-
- Type: string
The ID of the Spot instance request.
- State
-
- Type: string
The state of the Spot instance request.
ClassicLinkDnsSupport
Description
Describes the ClassicLink DNS support status of a VPC.
Members
- ClassicLinkDnsSupported
-
- Type: boolean
Indicates whether ClassicLink DNS support is enabled for the VPC.
- VpcId
-
- Type: string
The ID of the VPC.
ClassicLinkInstance
Description
Describes a linked EC2-Classic instance.
Members
- Groups
-
- Type: Array of GroupIdentifier structures
A list of security groups.
- InstanceId
-
- Type: string
The ID of the instance.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the instance.
- VpcId
-
- Type: string
The ID of the VPC.
ClientData
Description
Describes the client-specific data.
Members
- Comment
-
- Type: string
A user-defined comment about the disk upload.
- UploadEnd
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time that the disk upload ends.
- UploadSize
-
- Type: double
The size of the uploaded disk image, in GiB.
- UploadStart
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time that the disk upload starts.
ConversionTask
Description
Describes a conversion task.
Members
- ConversionTaskId
-
- Required: Yes
- Type: string
The ID of the conversion task.
- ExpirationTime
-
- Type: string
The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.
- ImportInstance
-
- Type: ImportInstanceTaskDetails structure
If the task is for importing an instance, this contains information about the import instance task.
- ImportVolume
-
- Type: ImportVolumeTaskDetails structure
If the task is for importing a volume, this contains information about the import volume task.
- State
-
- Required: Yes
- Type: string
The state of the conversion task.
- StatusMessage
-
- Type: string
The status message related to the conversion task.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the task.
CreateVolumePermission
Description
Describes the user or group to be added or removed from the permissions for a volume.
Members
- Group
-
- Type: string
The specific group that is to be added or removed from a volume's list of create volume permissions.
- UserId
-
- Type: string
The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.
CreateVolumePermissionModifications
Description
Describes modifications to the permissions for a volume.
Members
- Add
-
- Type: Array of CreateVolumePermission structures
Adds a specific AWS account ID or group to a volume's list of create volume permissions.
- Remove
-
- Type: Array of CreateVolumePermission structures
Removes a specific AWS account ID or group from a volume's list of create volume permissions.
CustomerGateway
Description
Describes a customer gateway.
Members
- BgpAsn
-
- Type: string
The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).
- CustomerGatewayId
-
- Type: string
The ID of the customer gateway.
- IpAddress
-
- Type: string
The Internet-routable IP address of the customer gateway's outside interface.
- State
-
- Type: string
The current state of the customer gateway (
pending | available | deleting | deleted
). - Tags
-
- Type: Array of Tag structures
Any tags assigned to the customer gateway.
- Type
-
- Type: string
The type of VPN connection the customer gateway supports (
ipsec.1
).
DhcpConfiguration
Description
Describes a DHCP configuration option.
Members
- Key
-
- Type: string
The name of a DHCP option.
- Values
-
- Type: Array of AttributeValue structures
One or more values for the DHCP option.
DhcpOptions
Description
Describes a set of DHCP options.
Members
- DhcpConfigurations
-
- Type: Array of DhcpConfiguration structures
One or more DHCP options in the set.
- DhcpOptionsId
-
- Type: string
The ID of the set of DHCP options.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the DHCP options set.
DiskImage
Description
Describes a disk image.
Members
- Description
-
- Type: string
A description of the disk image.
- Image
-
- Type: DiskImageDetail structure
Information about the disk image.
- Volume
-
- Type: VolumeDetail structure
Information about the volume.
DiskImageDescription
Description
Describes a disk image.
Members
- Checksum
-
- Type: string
The checksum computed for the disk image.
- Format
-
- Required: Yes
- Type: string
The disk image format.
- ImportManifestUrl
-
- Required: Yes
- Type: string
A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.
For information about the import manifest referenced by this API action, see VM Import Manifest.
- Size
-
- Required: Yes
- Type: long (int|float)
The size of the disk image, in GiB.
DiskImageDetail
Description
Describes a disk image.
Members
- Bytes
-
- Required: Yes
- Type: long (int|float)
The size of the disk image, in GiB.
- Format
-
- Required: Yes
- Type: string
The disk image format.
- ImportManifestUrl
-
- Required: Yes
- Type: string
A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.
For information about the import manifest referenced by this API action, see VM Import Manifest.
DiskImageVolumeDescription
Description
Describes a disk image volume.
Members
- Id
-
- Required: Yes
- Type: string
The volume identifier.
- Size
-
- Type: long (int|float)
The size of the volume, in GiB.
EbsBlockDevice
Description
Describes a block device for an EBS volume.
Members
- DeleteOnTermination
-
- Type: boolean
Indicates whether the EBS volume is deleted on instance termination.
- Encrypted
-
- Type: boolean
Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.
- Iops
-
- Type: int
The number of I/O operations per second (IOPS) that the volume supports. For
io1
, this represents the number of IOPS that are provisioned for the volume. Forgp2
, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.Constraint: Range is 100-20000 IOPS for
io1
volumes and 100-10000 IOPS forgp2
volumes.Condition: This parameter is required for requests to create
io1
volumes; it is not used in requests to creategp2
,st1
,sc1
, orstandard
volumes. - SnapshotId
-
- Type: string
The ID of the snapshot.
- VolumeSize
-
- Type: int
The size of the volume, in GiB.
Constraints: 1-16384 for General Purpose SSD (
gp2
), 4-16384 for Provisioned IOPS SSD (io1
), 500-16384 for Throughput Optimized HDD (st1
), 500-16384 for Cold HDD (sc1
), and 1-1024 for Magnetic (standard
) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
- VolumeType
-
- Type: string
The volume type:
gp2
,io1
,st1
,sc1
, orstandard
.Default:
standard
EbsInstanceBlockDevice
Description
Describes a parameter used to set up an EBS volume in a block device mapping.
Members
- AttachTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time stamp when the attachment initiated.
- DeleteOnTermination
-
- Type: boolean
Indicates whether the volume is deleted on instance termination.
- Status
-
- Type: string
The attachment state.
- VolumeId
-
- Type: string
The ID of the EBS volume.
EbsInstanceBlockDeviceSpecification
Description
Describes information used to set up an EBS volume specified in a block device mapping.
Members
- DeleteOnTermination
-
- Type: boolean
Indicates whether the volume is deleted on instance termination.
- VolumeId
-
- Type: string
The ID of the EBS volume.
EventInformation
Description
Describes a Spot fleet event.
Members
- EventDescription
-
- Type: string
The description of the event.
- EventSubType
-
- Type: string
The event.
The following are the
error
events.-
iamFleetRoleInvalid
- The Spot fleet did not have the required permissions either to launch or terminate an instance. -
launchSpecTemporarilyBlacklisted
- The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event. -
spotFleetRequestConfigurationInvalid
- The configuration is not valid. For more information, see the description of the event. -
spotInstanceCountLimitExceeded
- You've reached the limit on the number of Spot instances that you can launch.
The following are the
fleetRequestChange
events.-
active
- The Spot fleet has been validated and Amazon EC2 is attempting to maintain the target number of running Spot instances. -
cancelled
- The Spot fleet is canceled and has no running Spot instances. The Spot fleet will be deleted two days after its instances were terminated. -
cancelled_running
- The Spot fleet is canceled and will not launch additional Spot instances, but its existing Spot instances continue to run until they are interrupted or terminated. -
cancelled_terminating
- The Spot fleet is canceled and its Spot instances are terminating. -
expired
- The Spot fleet request has expired. A subsequent event indicates that the instances were terminated, if the request was created withTerminateInstancesWithExpiration
set. -
modify_in_progress
- A request to modify the Spot fleet request was accepted and is in progress. -
modify_successful
- The Spot fleet request was modified. -
price_update
- The bid price for a launch configuration was adjusted because it was too high. This change is permanent. -
submitted
- The Spot fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of Spot instances.
The following are the
instanceChange
events.-
launched
- A bid was fulfilled and a new instance was launched. -
terminated
- An instance was terminated by the user.
- InstanceId
-
- Type: string
The ID of the instance. This information is available only for
instanceChange
events.
ExportTask
Description
Describes an instance export task.
Members
- Description
-
- Type: string
A description of the resource being exported.
- ExportTaskId
-
- Type: string
The ID of the export task.
- ExportToS3Task
-
- Type: ExportToS3Task structure
Information about the export task.
- InstanceExportDetails
-
- Type: InstanceExportDetails structure
Information about the instance to export.
- State
-
- Type: string
The state of the export task.
- StatusMessage
-
- Type: string
The status message related to the export task.
ExportToS3Task
Description
Describes the format and location for an instance export task.
Members
- ContainerFormat
-
- Type: string
The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.
- DiskImageFormat
-
- Type: string
The format for the exported image.
- S3Bucket
-
- Type: string
The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account
vm-import-export@amazon.com
. - S3Key
-
- Type: string
The encryption key for your S3 bucket.
ExportToS3TaskSpecification
Description
Describes an instance export task.
Members
- ContainerFormat
-
- Type: string
The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.
- DiskImageFormat
-
- Type: string
The format for the exported image.
- S3Bucket
-
- Type: string
The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account
vm-import-export@amazon.com
. - S3Prefix
-
- Type: string
The image is written to a single object in the S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.
Filter
Description
A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Members
- Name
-
- Type: string
The name of the filter. Filter names are case-sensitive.
- Values
-
- Type: Array of strings
One or more filter values. Filter values are case-sensitive.
FlowLog
Description
Describes a flow log.
Members
- CreationTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the flow log was created.
- DeliverLogsErrorMessage
-
- Type: string
Information about the error that occurred.
Rate limited
indicates that CloudWatch logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of CloudWatch Logs log groups that you can create.Access error
indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs.Unknown error
indicates an internal error. - DeliverLogsPermissionArn
-
- Type: string
The ARN of the IAM role that posts logs to CloudWatch Logs.
- DeliverLogsStatus
-
- Type: string
The status of the logs delivery (
SUCCESS
|FAILED
). - FlowLogId
-
- Type: string
The flow log ID.
- FlowLogStatus
-
- Type: string
The status of the flow log (
ACTIVE
). - LogGroupName
-
- Type: string
The name of the flow log group.
- ResourceId
-
- Type: string
The ID of the resource on which the flow log was created.
- TrafficType
-
- Type: string
The type of traffic captured for the flow log.
GroupIdentifier
Description
Describes a security group.
Members
- GroupId
-
- Type: string
The ID of the security group.
- GroupName
-
- Type: string
The name of the security group.
HistoryRecord
Description
Describes an event in the history of the Spot fleet request.
Members
- EventInformation
-
- Required: Yes
- Type: EventInformation structure
Information about the event.
- EventType
-
- Required: Yes
- Type: string
The event type.
-
error
- Indicates an error with the Spot fleet request. -
fleetRequestChange
- Indicates a change in the status or configuration of the Spot fleet request. -
instanceChange
- Indicates that an instance was launched or terminated.
- Timestamp
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
Host
Description
Describes the properties of the Dedicated Host.
Members
- AutoPlacement
-
- Type: string
Whether auto-placement is on or off.
- AvailabilityZone
-
- Type: string
The Availability Zone of the Dedicated Host.
- AvailableCapacity
-
- Type: AvailableCapacity structure
The number of new instances that can be launched onto the Dedicated Host.
- ClientToken
-
- Type: string
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
- HostId
-
- Type: string
The ID of the Dedicated Host.
- HostProperties
-
- Type: HostProperties structure
The hardware specifications of the Dedicated Host.
- HostReservationId
-
- Type: string
The reservation ID of the Dedicated Host. This returns a
null
response if the Dedicated Host doesn't have an associated reservation. - Instances
-
- Type: Array of HostInstance structures
The IDs and instance type that are currently running on the Dedicated Host.
- State
-
- Type: string
The Dedicated Host's state.
HostInstance
Description
Describes an instance running on a Dedicated Host.
Members
- InstanceId
-
- Type: string
the IDs of instances that are running on the Dedicated Host.
- InstanceType
-
- Type: string
The instance type size (for example,
m3.medium
) of the running instance.
HostOffering
Description
Details about the Dedicated Host Reservation offering.
Members
- CurrencyCode
-
- Type: string
The currency of the offering.
- Duration
-
- Type: int
The duration of the offering (in seconds).
- HourlyPrice
-
- Type: string
The hourly price of the offering.
- InstanceFamily
-
- Type: string
The instance family of the offering.
- OfferingId
-
- Type: string
The ID of the offering.
- PaymentOption
-
- Type: string
The available payment option.
- UpfrontPrice
-
- Type: string
The upfront price of the offering. Does not apply to No Upfront offerings.
HostProperties
Description
Describes properties of a Dedicated Host.
Members
- Cores
-
- Type: int
The number of cores on the Dedicated Host.
- InstanceType
-
- Type: string
The instance type size that the Dedicated Host supports (for example,
m3.medium
). - Sockets
-
- Type: int
The number of sockets on the Dedicated Host.
- TotalVCpus
-
- Type: int
The number of vCPUs on the Dedicated Host.
HostReservation
Description
Details about the Dedicated Host Reservation and associated Dedicated Hosts.
Members
- Count
-
- Type: int
The number of Dedicated Hosts the reservation is associated with.
- CurrencyCode
-
- Type: string
The currency in which the
upfrontPrice
andhourlyPrice
amounts are specified. At this time, the only supported currency isUSD
. - Duration
-
- Type: int
The length of the reservation's term, specified in seconds. Can be
31536000 (1 year)
|94608000 (3 years)
. - End
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time that the reservation ends.
- HostIdSet
-
- Type: Array of strings
The IDs of the Dedicated Hosts associated with the reservation.
- HostReservationId
-
- Type: string
The ID of the reservation that specifies the associated Dedicated Hosts.
- HourlyPrice
-
- Type: string
The hourly price of the reservation.
- InstanceFamily
-
- Type: string
The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.
- OfferingId
-
- Type: string
The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.
- PaymentOption
-
- Type: string
The payment option selected for this reservation.
- Start
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time that the reservation started.
- State
-
- Type: string
The state of the reservation.
- UpfrontPrice
-
- Type: string
The upfront price of the reservation.
IamInstanceProfile
Description
Describes an IAM instance profile.
Members
- Arn
-
- Type: string
The Amazon Resource Name (ARN) of the instance profile.
- Id
-
- Type: string
The ID of the instance profile.
IamInstanceProfileSpecification
Description
Describes an IAM instance profile.
Members
- Arn
-
- Type: string
The Amazon Resource Name (ARN) of the instance profile.
- Name
-
- Type: string
The name of the instance profile.
IcmpTypeCode
Description
Describes the ICMP type and code.
Members
- Code
-
- Type: int
The ICMP type. A value of -1 means all types.
- Type
-
- Type: int
The ICMP code. A value of -1 means all codes for the specified ICMP type.
IdFormat
Description
Describes the ID format for a resource.
Members
- Deadline
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.
- Resource
-
- Type: string
The type of resource.
- UseLongIds
-
- Type: boolean
Indicates whether longer IDs (17-character IDs) are enabled for the resource.
Image
Description
Describes an image.
Members
- Architecture
-
- Type: string
The architecture of the image.
- BlockDeviceMappings
-
- Type: Array of BlockDeviceMapping structures
Any block device mapping entries.
- CreationDate
-
- Type: string
The date and time the image was created.
- Description
-
- Type: string
The description of the AMI that was provided during image creation.
- EnaSupport
-
- Type: boolean
Specifies whether enhanced networking with ENA is enabled.
- Hypervisor
-
- Type: string
The hypervisor type of the image.
- ImageId
-
- Type: string
The ID of the AMI.
- ImageLocation
-
- Type: string
The location of the AMI.
- ImageOwnerAlias
-
- Type: string
The AWS account alias (for example,
amazon
,self
) or the AWS account ID of the AMI owner. - ImageType
-
- Type: string
The type of image.
- KernelId
-
- Type: string
The kernel associated with the image, if any. Only applicable for machine images.
- Name
-
- Type: string
The name of the AMI that was provided during image creation.
- OwnerId
-
- Type: string
The AWS account ID of the image owner.
- Platform
-
- Type: string
The value is
Windows
for Windows AMIs; otherwise blank. - ProductCodes
-
- Type: Array of ProductCode structures
Any product codes associated with the AMI.
- Public
-
- Type: boolean
Indicates whether the image has public launch permissions. The value is
true
if this image has public launch permissions orfalse
if it has only implicit and explicit launch permissions. - RamdiskId
-
- Type: string
The RAM disk associated with the image, if any. Only applicable for machine images.
- RootDeviceName
-
- Type: string
The device name of the root device (for example,
/dev/sda1
or/dev/xvda
). - RootDeviceType
-
- Type: string
The type of root device used by the AMI. The AMI can use an EBS volume or an instance store volume.
- SriovNetSupport
-
- Type: string
Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
- State
-
- Type: string
The current state of the AMI. If the state is
available
, the image is successfully registered and can be used to launch an instance. - StateReason
-
- Type: StateReason structure
The reason for the state change.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the image.
- VirtualizationType
-
- Type: string
The type of virtualization of the AMI.
ImageDiskContainer
Description
Describes the disk container object for an import image task.
Members
- Description
-
- Type: string
The description of the disk image.
- DeviceName
-
- Type: string
The block device mapping for the disk.
- Format
-
- Type: string
The format of the disk image being imported.
Valid values:
RAW
|VHD
|VMDK
|OVA
- SnapshotId
-
- Type: string
The ID of the EBS snapshot to be used for importing the snapshot.
- Url
-
- Type: string
The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)
- UserBucket
-
- Type: UserBucket structure
The S3 bucket for the disk image.
ImportImageTask
Description
Describes an import image task.
Members
- Architecture
-
- Type: string
The architecture of the virtual machine.
Valid values:
i386
|x86_64
- Description
-
- Type: string
A description of the import task.
- Hypervisor
-
- Type: string
The target hypervisor for the import task.
Valid values:
xen
- ImageId
-
- Type: string
The ID of the Amazon Machine Image (AMI) of the imported virtual machine.
- ImportTaskId
-
- Type: string
The ID of the import image task.
- LicenseType
-
- Type: string
The license type of the virtual machine.
- Platform
-
- Type: string
The description string for the import image task.
- Progress
-
- Type: string
The percentage of progress of the import image task.
- SnapshotDetails
-
- Type: Array of SnapshotDetail structures
Information about the snapshots.
- Status
-
- Type: string
A brief status for the import image task.
- StatusMessage
-
- Type: string
A descriptive status message for the import image task.
ImportInstanceLaunchSpecification
Description
Describes the launch specification for VM import.
Members
- AdditionalInfo
-
- Type: string
Reserved.
- Architecture
-
- Type: string
The architecture of the instance.
- GroupIds
-
- Type: Array of strings
One or more security group IDs.
- GroupNames
-
- Type: Array of strings
One or more security group names.
- InstanceInitiatedShutdownBehavior
-
- Type: string
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
- InstanceType
-
- Type: string
The instance type. For more information about the instance types that you can import, see Instance Types in the VM Import/Export User Guide.
- Monitoring
-
- Type: boolean
Indicates whether monitoring is enabled.
- Placement
-
- Type: Placement structure
The placement information for the instance.
- PrivateIpAddress
-
- Type: string
[EC2-VPC] An available IP address from the IP address range of the subnet.
- SubnetId
-
- Type: string
[EC2-VPC] The ID of the subnet in which to launch the instance.
- UserData
-
- Type: UserData structure
The user data to make available to the instance. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
ImportInstanceTaskDetails
Description
Describes an import instance task.
Members
- Description
-
- Type: string
A description of the task.
- InstanceId
-
- Type: string
The ID of the instance.
- Platform
-
- Type: string
The instance operating system.
- Volumes
-
- Required: Yes
- Type: Array of ImportInstanceVolumeDetailItem structures
One or more volumes.
ImportInstanceVolumeDetailItem
Description
Describes an import volume task.
Members
- AvailabilityZone
-
- Required: Yes
- Type: string
The Availability Zone where the resulting instance will reside.
- BytesConverted
-
- Required: Yes
- Type: long (int|float)
The number of bytes converted so far.
- Description
-
- Type: string
A description of the task.
- Image
-
- Required: Yes
- Type: DiskImageDescription structure
The image.
- Status
-
- Required: Yes
- Type: string
The status of the import of this particular disk image.
- StatusMessage
-
- Type: string
The status information or errors related to the disk image.
- Volume
-
- Required: Yes
- Type: DiskImageVolumeDescription structure
The volume.
ImportSnapshotTask
Description
Describes an import snapshot task.
Members
- Description
-
- Type: string
A description of the import snapshot task.
- ImportTaskId
-
- Type: string
The ID of the import snapshot task.
- SnapshotTaskDetail
-
- Type: SnapshotTaskDetail structure
Describes an import snapshot task.
ImportVolumeTaskDetails
Description
Describes an import volume task.
Members
- AvailabilityZone
-
- Required: Yes
- Type: string
The Availability Zone where the resulting volume will reside.
- BytesConverted
-
- Required: Yes
- Type: long (int|float)
The number of bytes converted so far.
- Description
-
- Type: string
The description you provided when starting the import volume task.
- Image
-
- Required: Yes
- Type: DiskImageDescription structure
The image.
- Volume
-
- Required: Yes
- Type: DiskImageVolumeDescription structure
The volume.
Instance
Description
Describes an instance.
Members
- AmiLaunchIndex
-
- Type: int
The AMI launch index, which can be used to find this instance in the launch group.
- Architecture
-
- Type: string
The architecture of the image.
- BlockDeviceMappings
-
- Type: Array of InstanceBlockDeviceMapping structures
Any block device mapping entries for the instance.
- ClientToken
-
- Type: string
The idempotency token you provided when you launched the instance, if applicable.
- EbsOptimized
-
- Type: boolean
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
- EnaSupport
-
- Type: boolean
Specifies whether enhanced networking with ENA is enabled.
- Hypervisor
-
- Type: string
The hypervisor type of the instance.
- IamInstanceProfile
-
- Type: IamInstanceProfile structure
The IAM instance profile associated with the instance, if applicable.
- ImageId
-
- Type: string
The ID of the AMI used to launch the instance.
- InstanceId
-
- Type: string
The ID of the instance.
- InstanceLifecycle
-
- Type: string
Indicates whether this is a Spot instance or a Scheduled Instance.
- InstanceType
-
- Type: string
The instance type.
- KernelId
-
- Type: string
The kernel associated with this instance, if applicable.
- KeyName
-
- Type: string
The name of the key pair, if this instance was launched with an associated key pair.
- LaunchTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time the instance was launched.
- Monitoring
-
- Type: Monitoring structure
The monitoring information for the instance.
- NetworkInterfaces
-
- Type: Array of InstanceNetworkInterface structures
[EC2-VPC] One or more network interfaces for the instance.
- Placement
-
- Type: Placement structure
The location where the instance launched, if applicable.
- Platform
-
- Type: string
The value is
Windows
for Windows instances; otherwise blank. - PrivateDnsName
-
- Type: string
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the
running
state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC. - PrivateIpAddress
-
- Type: string
The private IP address assigned to the instance.
- ProductCodes
-
- Type: Array of ProductCode structures
The product codes attached to this instance, if applicable.
- PublicDnsName
-
- Type: string
The public DNS name assigned to the instance. This name is not available until the instance enters the
running
state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC. - PublicIpAddress
-
- Type: string
The public IP address assigned to the instance, if applicable.
- RamdiskId
-
- Type: string
The RAM disk associated with this instance, if applicable.
- RootDeviceName
-
- Type: string
The root device name (for example,
/dev/sda1
or/dev/xvda
). - RootDeviceType
-
- Type: string
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
- SecurityGroups
-
- Type: Array of GroupIdentifier structures
One or more security groups for the instance.
- SourceDestCheck
-
- Type: boolean
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of
true
means checking is enabled, andfalse
means checking is disabled. The value must befalse
for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide. - SpotInstanceRequestId
-
- Type: string
If the request is a Spot instance request, the ID of the request.
- SriovNetSupport
-
- Type: string
Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
- State
-
- Type: InstanceState structure
The current state of the instance.
- StateReason
-
- Type: StateReason structure
The reason for the most recent state transition.
- StateTransitionReason
-
- Type: string
The reason for the most recent state transition. This might be an empty string.
- SubnetId
-
- Type: string
[EC2-VPC] The ID of the subnet in which the instance is running.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the instance.
- VirtualizationType
-
- Type: string
The virtualization type of the instance.
- VpcId
-
- Type: string
[EC2-VPC] The ID of the VPC in which the instance is running.
InstanceBlockDeviceMapping
Description
Describes a block device mapping.
Members
- DeviceName
-
- Type: string
The device name exposed to the instance (for example,
/dev/sdh
orxvdh
). - Ebs
-
- Type: EbsInstanceBlockDevice structure
Parameters used to automatically set up EBS volumes when the instance is launched.
InstanceBlockDeviceMappingSpecification
Description
Describes a block device mapping entry.
Members
- DeviceName
-
- Type: string
The device name exposed to the instance (for example,
/dev/sdh
orxvdh
). - Ebs
-
- Type: EbsInstanceBlockDeviceSpecification structure
Parameters used to automatically set up EBS volumes when the instance is launched.
- NoDevice
-
- Type: string
suppress the specified device included in the block device mapping.
- VirtualName
-
- Type: string
The virtual device name.
InstanceCapacity
Description
Information about the instance type that the Dedicated Host supports.
Members
- AvailableCapacity
-
- Type: int
The number of instances that can still be launched onto the Dedicated Host.
- InstanceType
-
- Type: string
The instance type size supported by the Dedicated Host.
- TotalCapacity
-
- Type: int
The total number of instances that can be launched onto the Dedicated Host.
InstanceCount
Description
Describes a Reserved Instance listing state.
Members
- InstanceCount
-
- Type: int
The number of listed Reserved Instances in the state specified by the
state
. - State
-
- Type: string
The states of the listed Reserved Instances.
InstanceExportDetails
Description
Describes an instance to export.
Members
- InstanceId
-
- Type: string
The ID of the resource being exported.
- TargetEnvironment
-
- Type: string
The target virtualization environment.
InstanceMonitoring
Description
Describes the monitoring information of the instance.
Members
- InstanceId
-
- Type: string
The ID of the instance.
- Monitoring
-
- Type: Monitoring structure
The monitoring information.
InstanceNetworkInterface
Description
Describes a network interface.
Members
- Association
-
- Type: InstanceNetworkInterfaceAssociation structure
The association information for an Elastic IP associated with the network interface.
- Attachment
-
- Type: InstanceNetworkInterfaceAttachment structure
The network interface attachment.
- Description
-
- Type: string
The description.
- Groups
-
- Type: Array of GroupIdentifier structures
One or more security groups.
- MacAddress
-
- Type: string
The MAC address.
- NetworkInterfaceId
-
- Type: string
The ID of the network interface.
- OwnerId
-
- Type: string
The ID of the AWS account that created the network interface.
- PrivateDnsName
-
- Type: string
The private DNS name.
- PrivateIpAddress
-
- Type: string
The IP address of the network interface within the subnet.
- PrivateIpAddresses
-
- Type: Array of InstancePrivateIpAddress structures
The private IP addresses associated with the network interface.
- SourceDestCheck
-
- Type: boolean
Indicates whether to validate network traffic to or from this network interface.
- Status
-
- Type: string
The status of the network interface.
- SubnetId
-
- Type: string
The ID of the subnet.
- VpcId
-
- Type: string
The ID of the VPC.
InstanceNetworkInterfaceAssociation
Description
Describes association information for an Elastic IP address.
Members
- IpOwnerId
-
- Type: string
The ID of the owner of the Elastic IP address.
- PublicDnsName
-
- Type: string
The public DNS name.
- PublicIp
-
- Type: string
The public IP address or Elastic IP address bound to the network interface.
InstanceNetworkInterfaceAttachment
Description
Describes a network interface attachment.
Members
- AttachTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time stamp when the attachment initiated.
- AttachmentId
-
- Type: string
The ID of the network interface attachment.
- DeleteOnTermination
-
- Type: boolean
Indicates whether the network interface is deleted when the instance is terminated.
- DeviceIndex
-
- Type: int
The index of the device on the instance for the network interface attachment.
- Status
-
- Type: string
The attachment state.
InstanceNetworkInterfaceSpecification
Description
Describes a network interface.
Members
- AssociatePublicIpAddress
-
- Type: boolean
Indicates whether to assign a public IP address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is
true
. - DeleteOnTermination
-
- Type: boolean
If set to
true
, the interface is deleted when the instance is terminated. You can specifytrue
only if creating a new network interface when launching an instance. - Description
-
- Type: string
The description of the network interface. Applies only if creating a network interface when launching an instance.
- DeviceIndex
-
- Type: int
The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
- Groups
-
- Type: Array of strings
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
- NetworkInterfaceId
-
- Type: string
The ID of the network interface.
- PrivateIpAddress
-
- Type: string
The private IP address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.
- PrivateIpAddresses
-
- Type: Array of PrivateIpAddressSpecification structures
One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.
- SecondaryPrivateIpAddressCount
-
- Type: int
The number of secondary private IP addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.
- SubnetId
-
- Type: string
The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
InstancePrivateIpAddress
Description
Describes a private IP address.
Members
- Association
-
- Type: InstanceNetworkInterfaceAssociation structure
The association information for an Elastic IP address for the network interface.
- Primary
-
- Type: boolean
Indicates whether this IP address is the primary private IP address of the network interface.
- PrivateDnsName
-
- Type: string
The private DNS name.
- PrivateIpAddress
-
- Type: string
The private IP address of the network interface.
InstanceState
Description
Describes the current state of the instance.
Members
- Code
-
- Type: int
The low byte represents the state. The high byte is an opaque internal value and should be ignored.
-
0
:pending
-
16
:running
-
32
:shutting-down
-
48
:terminated
-
64
:stopping
-
80
:stopped
- Name
-
- Type: string
The current state of the instance.
InstanceStateChange
Description
Describes an instance state change.
Members
- CurrentState
-
- Type: InstanceState structure
The current state of the instance.
- InstanceId
-
- Type: string
The ID of the instance.
- PreviousState
-
- Type: InstanceState structure
The previous state of the instance.
InstanceStatus
Description
Describes the status of an instance.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone of the instance.
- Events
-
- Type: Array of InstanceStatusEvent structures
Any scheduled events associated with the instance.
- InstanceId
-
- Type: string
The ID of the instance.
- InstanceState
-
- Type: InstanceState structure
The intended state of the instance. DescribeInstanceStatus requires that an instance be in the
running
state. - InstanceStatus
-
- Type: InstanceStatusSummary structure
Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.
- SystemStatus
-
- Type: InstanceStatusSummary structure
Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.
InstanceStatusDetails
Description
Describes the instance status.
Members
- ImpairedSince
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.
- Name
-
- Type: string
The type of instance status.
- Status
-
- Type: string
The status.
InstanceStatusEvent
Description
Describes a scheduled event for an instance.
Members
- Code
-
- Type: string
The event code.
- Description
-
- Type: string
A description of the event.
After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].
- NotAfter
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The latest scheduled end time for the event.
- NotBefore
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The earliest scheduled start time for the event.
InstanceStatusSummary
Description
Describes the status of an instance.
Members
- Details
-
- Type: Array of InstanceStatusDetails structures
The system instance health or application instance health.
- Status
-
- Type: string
The status.
InternetGateway
Description
Describes an Internet gateway.
Members
- Attachments
-
- Type: Array of InternetGatewayAttachment structures
Any VPCs attached to the Internet gateway.
- InternetGatewayId
-
- Type: string
The ID of the Internet gateway.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the Internet gateway.
InternetGatewayAttachment
Description
Describes the attachment of a VPC to an Internet gateway.
Members
- State
-
- Type: string
The current state of the attachment.
- VpcId
-
- Type: string
The ID of the VPC.
IpPermission
Description
Describes a security group rule.
Members
- FromPort
-
- Type: int
The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of
-1
indicates all ICMP types. - IpProtocol
-
- Type: string
The IP protocol name (for
tcp
,udp
, andicmp
) or number (see Protocol Numbers).[EC2-VPC only] When you authorize or revoke security group rules, you can use
-1
to specify all. - IpRanges
-
- Type: Array of IpRange structures
One or more IP ranges.
- PrefixListIds
-
- Type: Array of PrefixListId structures
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
- ToPort
-
- Type: int
The end of port range for the TCP and UDP protocols, or an ICMP code. A value of
-1
indicates all ICMP codes for the specified ICMP type. - UserIdGroupPairs
-
- Type: Array of UserIdGroupPair structures
One or more security group and AWS account ID pairs.
IpRange
Description
Describes an IP range.
Members
- CidrIp
-
- Type: string
The CIDR range. You can either specify a CIDR range or a source security group, not both.
KeyPairInfo
Description
Describes a key pair.
Members
- KeyFingerprint
-
- Type: string
If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.
- KeyName
-
- Type: string
The name of the key pair.
LaunchPermission
Description
Describes a launch permission.
Members
- Group
-
- Type: string
The name of the group.
- UserId
-
- Type: string
The AWS account ID.
LaunchPermissionModifications
Description
Describes a launch permission modification.
Members
- Add
-
- Type: Array of LaunchPermission structures
The AWS account ID to add to the list of launch permissions for the AMI.
- Remove
-
- Type: Array of LaunchPermission structures
The AWS account ID to remove from the list of launch permissions for the AMI.
LaunchSpecification
Description
Describes the launch specification for an instance.
Members
- AddressingType
-
- Type: string
Deprecated.
- BlockDeviceMappings
-
- Type: Array of BlockDeviceMapping structures
One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
- EbsOptimized
-
- Type: boolean
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Default:
false
- IamInstanceProfile
-
- Type: IamInstanceProfileSpecification structure
The IAM instance profile.
- ImageId
-
- Type: string
The ID of the AMI.
- InstanceType
-
- Type: string
The instance type.
- KernelId
-
- Type: string
The ID of the kernel.
- KeyName
-
- Type: string
The name of the key pair.
- Monitoring
-
- Type: RunInstancesMonitoringEnabled structure
Describes the monitoring for the instance.
- NetworkInterfaces
-
- Type: Array of InstanceNetworkInterfaceSpecification structures
One or more network interfaces.
- Placement
-
- Type: SpotPlacement structure
The placement information for the instance.
- RamdiskId
-
- Type: string
The ID of the RAM disk.
- SecurityGroups
-
- Type: Array of GroupIdentifier structures
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
- SubnetId
-
- Type: string
The ID of the subnet in which to launch the instance.
- UserData
-
- Type: string
The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
Monitoring
Description
Describes the monitoring for the instance.
Members
- State
-
- Type: string
Indicates whether monitoring is enabled for the instance.
MovingAddressStatus
Description
Describes the status of a moving Elastic IP address.
Members
- MoveStatus
-
- Type: string
The status of the Elastic IP address that's being moved to the EC2-VPC platform, or restored to the EC2-Classic platform.
- PublicIp
-
- Type: string
The Elastic IP address.
NatGateway
Description
Describes a NAT gateway.
Members
- CreateTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the NAT gateway was created.
- DeleteTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the NAT gateway was deleted, if applicable.
- FailureCode
-
- Type: string
If the NAT gateway could not be created, specifies the error code for the failure. (
InsufficientFreeAddressesInSubnet
|Gateway.NotAttached
|InvalidAllocationID.NotFound
|Resource.AlreadyAssociated
|InternalError
|InvalidSubnetID.NotFound
) - FailureMessage
-
- Type: string
If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.
-
For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"
-
For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"
-
For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"
-
For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"
-
For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."
-
For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."
- NatGatewayAddresses
-
- Type: Array of NatGatewayAddress structures
Information about the IP addresses and network interface associated with the NAT gateway.
- NatGatewayId
-
- Type: string
The ID of the NAT gateway.
- ProvisionedBandwidth
-
- Type: ProvisionedBandwidth structure
Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.
- State
-
- Type: string
The state of the NAT gateway.
-
pending
: The NAT gateway is being created and is not ready to process traffic. -
failed
: The NAT gateway could not be created. Check thefailureCode
andfailureMessage
fields for the reason. -
available
: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway. -
deleting
: The NAT gateway is in the process of being terminated and may still be processing traffic. -
deleted
: The NAT gateway has been terminated and is no longer processing traffic.
- SubnetId
-
- Type: string
The ID of the subnet in which the NAT gateway is located.
- VpcId
-
- Type: string
The ID of the VPC in which the NAT gateway is located.
NatGatewayAddress
Description
Describes the IP addresses and network interface associated with a NAT gateway.
Members
- AllocationId
-
- Type: string
The allocation ID of the Elastic IP address that's associated with the NAT gateway.
- NetworkInterfaceId
-
- Type: string
The ID of the network interface associated with the NAT gateway.
- PrivateIp
-
- Type: string
The private IP address associated with the Elastic IP address.
- PublicIp
-
- Type: string
The Elastic IP address associated with the NAT gateway.
NetworkAcl
Description
Describes a network ACL.
Members
- Associations
-
- Type: Array of NetworkAclAssociation structures
Any associations between the network ACL and one or more subnets
- Entries
-
- Type: Array of NetworkAclEntry structures
One or more entries (rules) in the network ACL.
- IsDefault
-
- Type: boolean
Indicates whether this is the default network ACL for the VPC.
- NetworkAclId
-
- Type: string
The ID of the network ACL.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the network ACL.
- VpcId
-
- Type: string
The ID of the VPC for the network ACL.
NetworkAclAssociation
Description
Describes an association between a network ACL and a subnet.
Members
- NetworkAclAssociationId
-
- Type: string
The ID of the association between a network ACL and a subnet.
- NetworkAclId
-
- Type: string
The ID of the network ACL.
- SubnetId
-
- Type: string
The ID of the subnet.
NetworkAclEntry
Description
Describes an entry in a network ACL.
Members
- CidrBlock
-
- Type: string
The network range to allow or deny, in CIDR notation.
- Egress
-
- Type: boolean
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
- IcmpTypeCode
-
- Type: IcmpTypeCode structure
ICMP protocol: The ICMP type and code.
- PortRange
-
- Type: PortRange structure
TCP or UDP protocols: The range of ports the rule applies to.
- Protocol
-
- Type: string
The protocol. A value of
-1
means all protocols. - RuleAction
-
- Type: string
Indicates whether to allow or deny the traffic that matches the rule.
- RuleNumber
-
- Type: int
The rule number for the entry. ACL entries are processed in ascending order by rule number.
NetworkInterface
Description
Describes a network interface.
Members
- Association
-
- Type: NetworkInterfaceAssociation structure
The association information for an Elastic IP associated with the network interface.
- Attachment
-
- Type: NetworkInterfaceAttachment structure
The network interface attachment.
- AvailabilityZone
-
- Type: string
The Availability Zone.
- Description
-
- Type: string
A description.
- Groups
-
- Type: Array of GroupIdentifier structures
Any security groups for the network interface.
- InterfaceType
-
- Type: string
The type of interface.
- MacAddress
-
- Type: string
The MAC address.
- NetworkInterfaceId
-
- Type: string
The ID of the network interface.
- OwnerId
-
- Type: string
The AWS account ID of the owner of the network interface.
- PrivateDnsName
-
- Type: string
The private DNS name.
- PrivateIpAddress
-
- Type: string
The IP address of the network interface within the subnet.
- PrivateIpAddresses
-
- Type: Array of NetworkInterfacePrivateIpAddress structures
The private IP addresses associated with the network interface.
- RequesterId
-
- Type: string
The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).
- RequesterManaged
-
- Type: boolean
Indicates whether the network interface is being managed by AWS.
- SourceDestCheck
-
- Type: boolean
Indicates whether traffic to or from the instance is validated.
- Status
-
- Type: string
The status of the network interface.
- SubnetId
-
- Type: string
The ID of the subnet.
- TagSet
-
- Type: Array of Tag structures
Any tags assigned to the network interface.
- VpcId
-
- Type: string
The ID of the VPC.
NetworkInterfaceAssociation
Description
Describes association information for an Elastic IP address.
Members
- AllocationId
-
- Type: string
The allocation ID.
- AssociationId
-
- Type: string
The association ID.
- IpOwnerId
-
- Type: string
The ID of the Elastic IP address owner.
- PublicDnsName
-
- Type: string
The public DNS name.
- PublicIp
-
- Type: string
The address of the Elastic IP address bound to the network interface.
NetworkInterfaceAttachment
Description
Describes a network interface attachment.
Members
- AttachTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The timestamp indicating when the attachment initiated.
- AttachmentId
-
- Type: string
The ID of the network interface attachment.
- DeleteOnTermination
-
- Type: boolean
Indicates whether the network interface is deleted when the instance is terminated.
- DeviceIndex
-
- Type: int
The device index of the network interface attachment on the instance.
- InstanceId
-
- Type: string
The ID of the instance.
- InstanceOwnerId
-
- Type: string
The AWS account ID of the owner of the instance.
- Status
-
- Type: string
The attachment state.
NetworkInterfaceAttachmentChanges
Description
Describes an attachment change.
Members
- AttachmentId
-
- Type: string
The ID of the network interface attachment.
- DeleteOnTermination
-
- Type: boolean
Indicates whether the network interface is deleted when the instance is terminated.
NetworkInterfacePrivateIpAddress
Description
Describes the private IP address of a network interface.
Members
- Association
-
- Type: NetworkInterfaceAssociation structure
The association information for an Elastic IP address associated with the network interface.
- Primary
-
- Type: boolean
Indicates whether this IP address is the primary private IP address of the network interface.
- PrivateDnsName
-
- Type: string
The private DNS name.
- PrivateIpAddress
-
- Type: string
The private IP address.
NewDhcpConfiguration
Members
- Key
-
- Type: string
- Values
-
- Type: Array of strings
PeeringConnectionOptions
Description
Describes the VPC peering connection options.
Members
- AllowDnsResolutionFromRemoteVpc
-
- Type: boolean
If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.
- AllowEgressFromLocalClassicLinkToRemoteVpc
-
- Type: boolean
If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC via ClassicLink to instances in a peer VPC.
- AllowEgressFromLocalVpcToRemoteClassicLink
-
- Type: boolean
If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC via ClassicLink.
PeeringConnectionOptionsRequest
Description
The VPC peering connection options.
Members
- AllowDnsResolutionFromRemoteVpc
-
- Type: boolean
If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.
- AllowEgressFromLocalClassicLinkToRemoteVpc
-
- Type: boolean
If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC via ClassicLink to instances in a peer VPC.
- AllowEgressFromLocalVpcToRemoteClassicLink
-
- Type: boolean
If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC via ClassicLink.
Placement
Description
Describes the placement for the instance.
Members
- Affinity
-
- Type: string
The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.
- AvailabilityZone
-
- Type: string
The Availability Zone of the instance.
- GroupName
-
- Type: string
The name of the placement group the instance is in (for cluster compute instances).
- HostId
-
- Type: string
The ID of the Dedicted host on which the instance resides. This parameter is not support for the ImportInstance command.
- Tenancy
-
- Type: string
The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of
dedicated
runs on single-tenant hardware. Thehost
tenancy is not supported for the ImportInstance command.
PlacementGroup
Description
Describes a placement group.
Members
- GroupName
-
- Type: string
The name of the placement group.
- State
-
- Type: string
The state of the placement group.
- Strategy
-
- Type: string
The placement strategy.
PortRange
Description
Describes a range of ports.
Members
- From
-
- Type: int
The first port in the range.
- To
-
- Type: int
The last port in the range.
PrefixList
Description
Describes prefixes for AWS services.
Members
- Cidrs
-
- Type: Array of strings
The IP address range of the AWS service.
- PrefixListId
-
- Type: string
The ID of the prefix.
- PrefixListName
-
- Type: string
The name of the prefix.
PrefixListId
Description
The ID of the prefix.
Members
- PrefixListId
-
- Type: string
The ID of the prefix.
PriceSchedule
Description
Describes the price for a Reserved Instance.
Members
- Active
-
- Type: boolean
The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.
A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.
- CurrencyCode
-
- Type: string
The currency for transacting the Reserved Instance resale. At this time, the only supported currency is
USD
. - Price
-
- Type: double
The fixed price for the term.
- Term
-
- Type: long (int|float)
The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.
PriceScheduleSpecification
Description
Describes the price for a Reserved Instance.
Members
- CurrencyCode
-
- Type: string
The currency for transacting the Reserved Instance resale. At this time, the only supported currency is
USD
. - Price
-
- Type: double
The fixed price for the term.
- Term
-
- Type: long (int|float)
The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.
PricingDetail
Description
Describes a Reserved Instance offering.
Members
- Count
-
- Type: int
The number of reservations available for the price.
- Price
-
- Type: double
The price per instance.
PrivateIpAddressSpecification
Description
Describes a secondary private IP address for a network interface.
Members
- Primary
-
- Type: boolean
Indicates whether the private IP address is the primary private IP address. Only one IP address can be designated as primary.
- PrivateIpAddress
-
- Required: Yes
- Type: string
The private IP addresses.
ProductCode
Description
Describes a product code.
Members
- ProductCodeId
-
- Type: string
The product code.
- ProductCodeType
-
- Type: string
The type of product code.
PropagatingVgw
Description
Describes a virtual private gateway propagating route.
Members
- GatewayId
-
- Type: string
The ID of the virtual private gateway (VGW).
ProvisionedBandwidth
Description
Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.
Members
- ProvisionTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.
- Provisioned
-
- Type: string
Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.
- RequestTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.
- Requested
-
- Type: string
Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.
- Status
-
- Type: string
Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.
Purchase
Description
Describes the result of the purchase.
Members
- CurrencyCode
-
- Type: string
The currency in which the
UpfrontPrice
andHourlyPrice
amounts are specified. At this time, the only supported currency isUSD
. - Duration
-
- Type: int
The duration of the reservation's term in seconds.
- HostIdSet
-
- Type: Array of strings
The IDs of the Dedicated Hosts associated with the reservation.
- HostReservationId
-
- Type: string
The ID of the reservation.
- HourlyPrice
-
- Type: string
The hourly price of the reservation per hour.
- InstanceFamily
-
- Type: string
The instance family on the Dedicated Host that the reservation can be associated with.
- PaymentOption
-
- Type: string
The payment option for the reservation.
- UpfrontPrice
-
- Type: string
The upfront price of the reservation.
PurchaseRequest
Description
Describes a request to purchase Scheduled Instances.
Members
- InstanceCount
-
- Required: Yes
- Type: int
The number of instances.
- PurchaseToken
-
- Required: Yes
- Type: string
The purchase token.
RecurringCharge
Description
Describes a recurring charge.
Members
- Amount
-
- Type: double
The amount of the recurring charge.
- Frequency
-
- Type: string
The frequency of the recurring charge.
Region
Description
Describes a region.
Members
- Endpoint
-
- Type: string
The region service endpoint.
- RegionName
-
- Type: string
The name of the region.
RequestSpotLaunchSpecification
Description
Describes the launch specification for an instance.
Members
- AddressingType
-
- Type: string
Deprecated.
- BlockDeviceMappings
-
- Type: Array of BlockDeviceMapping structures
One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
- EbsOptimized
-
- Type: boolean
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Default:
false
- IamInstanceProfile
-
- Type: IamInstanceProfileSpecification structure
The IAM instance profile.
- ImageId
-
- Type: string
The ID of the AMI.
- InstanceType
-
- Type: string
The instance type.
- KernelId
-
- Type: string
The ID of the kernel.
- KeyName
-
- Type: string
The name of the key pair.
- Monitoring
-
- Type: RunInstancesMonitoringEnabled structure
Describes the monitoring for the instance.
- NetworkInterfaces
-
- Type: Array of InstanceNetworkInterfaceSpecification structures
One or more network interfaces.
- Placement
-
- Type: SpotPlacement structure
The placement information for the instance.
- RamdiskId
-
- Type: string
The ID of the RAM disk.
- SecurityGroupIds
-
- Type: Array of strings
- SecurityGroups
-
- Type: Array of strings
- SubnetId
-
- Type: string
The ID of the subnet in which to launch the instance.
- UserData
-
- Type: string
The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
ReservationValue
Description
The cost associated with the Reserved Instance.
Members
- HourlyPrice
-
- Type: string
The hourly rate of the reservation.
- RemainingTotalValue
-
- Type: string
The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).
- RemainingUpfrontValue
-
- Type: string
The remaining upfront cost of the reservation.
ReservedInstanceLimitPrice
Description
Describes the limit price of a Reserved Instance offering.
Members
- Amount
-
- Type: double
Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).
- CurrencyCode
-
- Type: string
The currency in which the
limitPrice
amount is specified. At this time, the only supported currency isUSD
.
ReservedInstanceReservationValue
Description
The total value of the Convertible Reserved Instance.
Members
- ReservationValue
-
- Type: ReservationValue structure
The total value of the Convertible Reserved Instance that you are exchanging.
- ReservedInstanceId
-
- Type: string
The ID of the Convertible Reserved Instance that you are exchanging.
ReservedInstances
Description
Describes a Reserved Instance.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone in which the Reserved Instance can be used.
- CurrencyCode
-
- Type: string
The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is
USD
. - Duration
-
- Type: long (int|float)
The duration of the Reserved Instance, in seconds.
- End
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the Reserved Instance expires.
- FixedPrice
-
- Type: float
The purchase price of the Reserved Instance.
- InstanceCount
-
- Type: int
The number of reservations purchased.
- InstanceTenancy
-
- Type: string
The tenancy of the instance.
- InstanceType
-
- Type: string
The instance type on which the Reserved Instance can be used.
- OfferingClass
-
- Type: string
The offering class of the Reserved Instance.
- OfferingType
-
- Type: string
The Reserved Instance offering type.
- ProductDescription
-
- Type: string
The Reserved Instance product platform description.
- RecurringCharges
-
- Type: Array of RecurringCharge structures
The recurring charge tag assigned to the resource.
- ReservedInstancesId
-
- Type: string
The ID of the Reserved Instance.
- Scope
-
- Type: string
The scope of the Reserved Instance.
- Start
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the Reserved Instance started.
- State
-
- Type: string
The state of the Reserved Instance purchase.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the resource.
- UsagePrice
-
- Type: float
The usage price of the Reserved Instance, per hour.
ReservedInstancesConfiguration
Description
Describes the configuration settings for the modified Reserved Instances.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone for the modified Reserved Instances.
- InstanceCount
-
- Type: int
The number of modified Reserved Instances.
- InstanceType
-
- Type: string
The instance type for the modified Reserved Instances.
- Platform
-
- Type: string
The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.
- Scope
-
- Type: string
Whether the Reserved Instance is
standard
orconvertible
.
ReservedInstancesId
Description
Describes the ID of a Reserved Instance.
Members
- ReservedInstancesId
-
- Type: string
The ID of the Reserved Instance.
ReservedInstancesListing
Description
Describes a Reserved Instance listing.
Members
- ClientToken
-
- Type: string
A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.
- CreateDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time the listing was created.
- InstanceCounts
-
- Type: Array of InstanceCount structures
The number of instances in this state.
- PriceSchedules
-
- Type: Array of PriceSchedule structures
The price of the Reserved Instance listing.
- ReservedInstancesId
-
- Type: string
The ID of the Reserved Instance.
- ReservedInstancesListingId
-
- Type: string
The ID of the Reserved Instance listing.
- Status
-
- Type: string
The status of the Reserved Instance listing.
- StatusMessage
-
- Type: string
The reason for the current status of the Reserved Instance listing. The response can be blank.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the resource.
- UpdateDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The last modified timestamp of the listing.
ReservedInstancesModification
Description
Describes a Reserved Instance modification.
Members
- ClientToken
-
- Type: string
A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.
- CreateDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the modification request was created.
- EffectiveDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time for the modification to become effective.
- ModificationResults
-
- Type: Array of ReservedInstancesModificationResult structures
Contains target configurations along with their corresponding new Reserved Instance IDs.
- ReservedInstancesIds
-
- Type: Array of ReservedInstancesId structures
The IDs of one or more Reserved Instances.
- ReservedInstancesModificationId
-
- Type: string
A unique ID for the Reserved Instance modification.
- Status
-
- Type: string
The status of the Reserved Instances modification request.
- StatusMessage
-
- Type: string
The reason for the status.
- UpdateDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the modification request was last updated.
ReservedInstancesModificationResult
Description
Describes the modification request/s.
Members
- ReservedInstancesId
-
- Type: string
The ID for the Reserved Instances that were created as part of the modification request. This field is only available when the modification is fulfilled.
- TargetConfiguration
-
- Type: ReservedInstancesConfiguration structure
The target Reserved Instances configurations supplied as part of the modification request.
ReservedInstancesOffering
Description
Describes a Reserved Instance offering.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone in which the Reserved Instance can be used.
- CurrencyCode
-
- Type: string
The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is
USD
. - Duration
-
- Type: long (int|float)
The duration of the Reserved Instance, in seconds.
- FixedPrice
-
- Type: float
The purchase price of the Reserved Instance.
- InstanceTenancy
-
- Type: string
The tenancy of the instance.
- InstanceType
-
- Type: string
The instance type on which the Reserved Instance can be used.
- Marketplace
-
- Type: boolean
Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering, this is
true
. - OfferingClass
-
- Type: string
If
convertible
it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. Ifstandard
, it is not possible to perform an exchange. - OfferingType
-
- Type: string
The Reserved Instance offering type.
- PricingDetails
-
- Type: Array of PricingDetail structures
The pricing details of the Reserved Instance offering.
- ProductDescription
-
- Type: string
The Reserved Instance product platform description.
- RecurringCharges
-
- Type: Array of RecurringCharge structures
The recurring charge tag assigned to the resource.
- ReservedInstancesOfferingId
-
- Type: string
The ID of the Reserved Instance offering. This is the offering ID used in GetReservedInstancesExchangeQuote to confirm that an exchange can be made.
- Scope
-
- Type: string
Whether the Reserved Instance is applied to instances in a region or an Availability Zone.
- UsagePrice
-
- Type: float
The usage price of the Reserved Instance, per hour.
Route
Description
Describes a route in a route table.
Members
- DestinationCidrBlock
-
- Type: string
The CIDR block used for the destination match.
- DestinationPrefixListId
-
- Type: string
The prefix of the AWS service.
- GatewayId
-
- Type: string
The ID of a gateway attached to your VPC.
- InstanceId
-
- Type: string
The ID of a NAT instance in your VPC.
- InstanceOwnerId
-
- Type: string
The AWS account ID of the owner of the instance.
- NatGatewayId
-
- Type: string
The ID of a NAT gateway.
- NetworkInterfaceId
-
- Type: string
The ID of the network interface.
- Origin
-
- Type: string
Describes how the route was created.
-
CreateRouteTable
- The route was automatically created when the route table was created. -
CreateRoute
- The route was manually added to the route table. -
EnableVgwRoutePropagation
- The route was propagated by route propagation.
- State
-
- Type: string
The state of the route. The
blackhole
state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated). - VpcPeeringConnectionId
-
- Type: string
The ID of the VPC peering connection.
RouteTable
Description
Describes a route table.
Members
- Associations
-
- Type: Array of RouteTableAssociation structures
The associations between the route table and one or more subnets.
- PropagatingVgws
-
- Type: Array of PropagatingVgw structures
Any virtual private gateway (VGW) propagating routes.
- RouteTableId
-
- Type: string
The ID of the route table.
- Routes
-
- Type: Array of Route structures
The routes in the route table.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the route table.
- VpcId
-
- Type: string
The ID of the VPC.
RouteTableAssociation
Description
Describes an association between a route table and a subnet.
Members
- Main
-
- Type: boolean
Indicates whether this is the main route table.
- RouteTableAssociationId
-
- Type: string
The ID of the association between a route table and a subnet.
- RouteTableId
-
- Type: string
The ID of the route table.
- SubnetId
-
- Type: string
The ID of the subnet. A subnet ID is not returned for an implicit association.
RunInstancesMonitoringEnabled
Description
Describes the monitoring for the instance.
Members
- Enabled
-
- Required: Yes
- Type: boolean
Indicates whether monitoring is enabled for the instance.
S3Storage
Description
Describes the storage parameters for S3 and S3 buckets for an instance store-backed AMI.
Members
- AWSAccessKeyId
-
- Type: string
The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing AWS Access Keys.
- Bucket
-
- Type: string
The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.
- Prefix
-
- Type: string
The beginning of the file name of the AMI.
- UploadPolicy
-
- Type: blob (string|resource|Psr\Http\Message\StreamInterface)
An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.
- UploadPolicySignature
-
- Type: string
The signature of the JSON document.
ScheduledInstance
Description
Describes a Scheduled Instance.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone.
- CreateDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date when the Scheduled Instance was purchased.
- HourlyPrice
-
- Type: string
The hourly price for a single instance.
- InstanceCount
-
- Type: int
The number of instances.
- InstanceType
-
- Type: string
The instance type.
- NetworkPlatform
-
- Type: string
The network platform (
EC2-Classic
orEC2-VPC
). - NextSlotStartTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time for the next schedule to start.
- Platform
-
- Type: string
The platform (
Linux/UNIX
orWindows
). - PreviousSlotEndTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time that the previous schedule ended or will end.
- Recurrence
-
- Type: ScheduledInstanceRecurrence structure
The schedule recurrence.
- ScheduledInstanceId
-
- Type: string
The Scheduled Instance ID.
- SlotDurationInHours
-
- Type: int
The number of hours in the schedule.
- TermEndDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The end date for the Scheduled Instance.
- TermStartDate
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The start date for the Scheduled Instance.
- TotalScheduledInstanceHours
-
- Type: int
The total number of hours for a single instance for the entire term.
ScheduledInstanceAvailability
Description
Describes a schedule that is available for your Scheduled Instances.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone.
- AvailableInstanceCount
-
- Type: int
The number of available instances.
- FirstSlotStartTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time period for the first schedule to start.
- HourlyPrice
-
- Type: string
The hourly price for a single instance.
- InstanceType
-
- Type: string
The instance type. You can specify one of the C3, C4, M4, or R3 instance types.
- MaxTermDurationInDays
-
- Type: int
The maximum term. The only possible value is 365 days.
- MinTermDurationInDays
-
- Type: int
The minimum term. The only possible value is 365 days.
- NetworkPlatform
-
- Type: string
The network platform (
EC2-Classic
orEC2-VPC
). - Platform
-
- Type: string
The platform (
Linux/UNIX
orWindows
). - PurchaseToken
-
- Type: string
The purchase token. This token expires in two hours.
- Recurrence
-
- Type: ScheduledInstanceRecurrence structure
The schedule recurrence.
- SlotDurationInHours
-
- Type: int
The number of hours in the schedule.
- TotalScheduledInstanceHours
-
- Type: int
The total number of hours for a single instance for the entire term.
ScheduledInstanceRecurrence
Description
Describes the recurring schedule for a Scheduled Instance.
Members
- Frequency
-
- Type: string
The frequency (
Daily
,Weekly
, orMonthly
). - Interval
-
- Type: int
The interval quantity. The interval unit depends on the value of
frequency
. For example, every 2 weeks or every 2 months. - OccurrenceDaySet
-
- Type: Array of ints
The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).
- OccurrenceRelativeToEnd
-
- Type: boolean
Indicates whether the occurrence is relative to the end of the specified week or month.
- OccurrenceUnit
-
- Type: string
The unit for
occurrenceDaySet
(DayOfWeek
orDayOfMonth
).
ScheduledInstanceRecurrenceRequest
Description
Describes the recurring schedule for a Scheduled Instance.
Members
- Frequency
-
- Type: string
The frequency (
Daily
,Weekly
, orMonthly
). - Interval
-
- Type: int
The interval quantity. The interval unit depends on the value of
Frequency
. For example, every 2 weeks or every 2 months. - OccurrenceDays
-
- Type: Array of ints
The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday). You can't specify this value with a daily schedule. If the occurrence is relative to the end of the month, you can specify only a single day.
- OccurrenceRelativeToEnd
-
- Type: boolean
Indicates whether the occurrence is relative to the end of the specified week or month. You can't specify this value with a daily schedule.
- OccurrenceUnit
-
- Type: string
The unit for
OccurrenceDays
(DayOfWeek
orDayOfMonth
). This value is required for a monthly schedule. You can't specifyDayOfWeek
with a weekly schedule. You can't specify this value with a daily schedule.
ScheduledInstancesBlockDeviceMapping
Description
Describes a block device mapping for a Scheduled Instance.
Members
- DeviceName
-
- Type: string
The device name exposed to the instance (for example,
/dev/sdh
orxvdh
). - Ebs
-
- Type: ScheduledInstancesEbs structure
Parameters used to set up EBS volumes automatically when the instance is launched.
- NoDevice
-
- Type: string
Suppresses the specified device included in the block device mapping of the AMI.
- VirtualName
-
- Type: string
The virtual device name (
ephemeral
N). Instance store volumes are numbered starting from 0. An instance type with two available instance store volumes can specify mappings forephemeral0
andephemeral1
.The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
ScheduledInstancesEbs
Description
Describes an EBS volume for a Scheduled Instance.
Members
- DeleteOnTermination
-
- Type: boolean
Indicates whether the volume is deleted on instance termination.
- Encrypted
-
- Type: boolean
Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.
- Iops
-
- Type: int
The number of I/O operations per second (IOPS) that the volume supports. For io1 volumes, this represents the number of IOPS that are provisioned for the volume. For
gp2
volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information aboutgp2
baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.Constraint: Range is 100-20000 IOPS for
io1
volumes and 100-10000 IOPS forgp2
volumes.Condition: This parameter is required for requests to create
io1
volumes; it is not used in requests to creategp2
,st1
,sc1
, orstandard
volumes. - SnapshotId
-
- Type: string
The ID of the snapshot.
- VolumeSize
-
- Type: int
The size of the volume, in GiB.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
- VolumeType
-
- Type: string
The volume type.
gp2
for General Purpose SSD,io1
for Provisioned IOPS SSD, Throughput Optimized HDD forst1
, Cold HDD forsc1
, orstandard
for Magnetic.Default:
standard
ScheduledInstancesIamInstanceProfile
Description
Describes an IAM instance profile for a Scheduled Instance.
Members
- Arn
-
- Type: string
The Amazon Resource Name (ARN).
- Name
-
- Type: string
The name.
ScheduledInstancesLaunchSpecification
Description
Describes the launch specification for a Scheduled Instance.
If you are launching the Scheduled Instance in EC2-VPC, you must specify the ID of the subnet. You can specify the subnet using either SubnetId
or NetworkInterface
.
Members
- BlockDeviceMappings
-
- Type: Array of ScheduledInstancesBlockDeviceMapping structures
One or more block device mapping entries.
- EbsOptimized
-
- Type: boolean
Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default:
false
- IamInstanceProfile
-
- Type: ScheduledInstancesIamInstanceProfile structure
The IAM instance profile.
- ImageId
-
- Required: Yes
- Type: string
The ID of the Amazon Machine Image (AMI).
- InstanceType
-
- Type: string
The instance type.
- KernelId
-
- Type: string
The ID of the kernel.
- KeyName
-
- Type: string
The name of the key pair.
- Monitoring
-
- Type: ScheduledInstancesMonitoring structure
Enable or disable monitoring for the instances.
- NetworkInterfaces
-
- Type: Array of ScheduledInstancesNetworkInterface structures
One or more network interfaces.
- Placement
-
- Type: ScheduledInstancesPlacement structure
The placement information.
- RamdiskId
-
- Type: string
The ID of the RAM disk.
- SecurityGroupIds
-
- Type: Array of strings
The IDs of one or more security groups.
- SubnetId
-
- Type: string
The ID of the subnet in which to launch the instances.
- UserData
-
- Type: string
The base64-encoded MIME user data.
ScheduledInstancesMonitoring
Description
Describes whether monitoring is enabled for a Scheduled Instance.
Members
- Enabled
-
- Type: boolean
Indicates whether monitoring is enabled.
ScheduledInstancesNetworkInterface
Description
Describes a network interface for a Scheduled Instance.
Members
- AssociatePublicIpAddress
-
- Type: boolean
Indicates whether to assign a public IP address to instances launched in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is
true
. - DeleteOnTermination
-
- Type: boolean
Indicates whether to delete the interface when the instance is terminated.
- Description
-
- Type: string
The description.
- DeviceIndex
-
- Type: int
The index of the device for the network interface attachment.
- Groups
-
- Type: Array of strings
The IDs of one or more security groups.
- NetworkInterfaceId
-
- Type: string
The ID of the network interface.
- PrivateIpAddress
-
- Type: string
The IP address of the network interface within the subnet.
- PrivateIpAddressConfigs
-
- Type: Array of ScheduledInstancesPrivateIpAddressConfig structures
The private IP addresses.
- SecondaryPrivateIpAddressCount
-
- Type: int
The number of secondary private IP addresses.
- SubnetId
-
- Type: string
The ID of the subnet.
ScheduledInstancesPlacement
Description
Describes the placement for a Scheduled Instance.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone.
- GroupName
-
- Type: string
The name of the placement group.
ScheduledInstancesPrivateIpAddressConfig
Description
Describes a private IP address for a Scheduled Instance.
Members
- Primary
-
- Type: boolean
Indicates whether this is a primary IP address. Otherwise, this is a secondary IP address.
- PrivateIpAddress
-
- Type: string
The IP address.
SecurityGroup
Description
Describes a security group
Members
- Description
-
- Type: string
A description of the security group.
- GroupId
-
- Type: string
The ID of the security group.
- GroupName
-
- Type: string
The name of the security group.
- IpPermissions
-
- Type: Array of IpPermission structures
One or more inbound rules associated with the security group.
- IpPermissionsEgress
-
- Type: Array of IpPermission structures
[EC2-VPC] One or more outbound rules associated with the security group.
- OwnerId
-
- Type: string
The AWS account ID of the owner of the security group.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the security group.
- VpcId
-
- Type: string
[EC2-VPC] The ID of the VPC for the security group.
SecurityGroupReference
Description
Describes a VPC with a security group that references your security group.
Members
- GroupId
-
- Required: Yes
- Type: string
The ID of your security group.
- ReferencingVpcId
-
- Required: Yes
- Type: string
The ID of the VPC with the referencing security group.
- VpcPeeringConnectionId
-
- Type: string
The ID of the VPC peering connection.
SlotDateTimeRangeRequest
Description
Describes the time period for a Scheduled Instance to start its first schedule. The time period must span less than one day.
Members
- EarliestTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The earliest date and time, in UTC, for the Scheduled Instance to start.
- LatestTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The latest date and time, in UTC, for the Scheduled Instance to start. This value must be later than or equal to the earliest date and at most three months in the future.
SlotStartTimeRangeRequest
Description
Describes the time period for a Scheduled Instance to start its first schedule.
Members
- EarliestTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The earliest date and time, in UTC, for the Scheduled Instance to start.
- LatestTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The latest date and time, in UTC, for the Scheduled Instance to start.
SnapshotDetail
Description
Describes the snapshot created from the imported disk.
Members
- Description
-
- Type: string
A description for the snapshot.
- DeviceName
-
- Type: string
The block device mapping for the snapshot.
- DiskImageSize
-
- Type: double
The size of the disk in the snapshot, in GiB.
- Format
-
- Type: string
The format of the disk image from which the snapshot is created.
- Progress
-
- Type: string
The percentage of progress for the task.
- SnapshotId
-
- Type: string
The snapshot ID of the disk being imported.
- Status
-
- Type: string
A brief status of the snapshot creation.
- StatusMessage
-
- Type: string
A detailed status message for the snapshot creation.
- Url
-
- Type: string
The URL used to access the disk image.
- UserBucket
-
- Type: UserBucketDetails structure
The S3 bucket for the disk image.
SnapshotDiskContainer
Description
The disk container object for the import snapshot request.
Members
- Description
-
- Type: string
The description of the disk image being imported.
- Format
-
- Type: string
The format of the disk image being imported.
Valid values:
RAW
|VHD
|VMDK
|OVA
- Url
-
- Type: string
The URL to the Amazon S3-based disk image being imported. It can either be a https URL (https://..) or an Amazon S3 URL (s3://..).
- UserBucket
-
- Type: UserBucket structure
The S3 bucket for the disk image.
SnapshotTaskDetail
Description
Details about the import snapshot task.
Members
- Description
-
- Type: string
The description of the snapshot.
- DiskImageSize
-
- Type: double
The size of the disk in the snapshot, in GiB.
- Format
-
- Type: string
The format of the disk image from which the snapshot is created.
- Progress
-
- Type: string
The percentage of completion for the import snapshot task.
- SnapshotId
-
- Type: string
The snapshot ID of the disk being imported.
- Status
-
- Type: string
A brief status for the import snapshot task.
- StatusMessage
-
- Type: string
A detailed status message for the import snapshot task.
- Url
-
- Type: string
The URL of the disk image from which the snapshot is created.
- UserBucket
-
- Type: UserBucketDetails structure
The S3 bucket for the disk image.
SpotDatafeedSubscription
Description
Describes the data feed for a Spot instance.
Members
- Bucket
-
- Type: string
The Amazon S3 bucket where the Spot instance data feed is located.
- Fault
-
- Type: SpotInstanceStateFault structure
The fault codes for the Spot instance request, if any.
- OwnerId
-
- Type: string
The AWS account ID of the account.
- Prefix
-
- Type: string
The prefix that is prepended to data feed files.
- State
-
- Type: string
The state of the Spot instance data feed subscription.
SpotFleetLaunchSpecification
Description
Describes the launch specification for one or more Spot instances.
Members
- AddressingType
-
- Type: string
Deprecated.
- BlockDeviceMappings
-
- Type: Array of BlockDeviceMapping structures
One or more block device mapping entries.
- EbsOptimized
-
- Type: boolean
Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Default:
false
- IamInstanceProfile
-
- Type: IamInstanceProfileSpecification structure
The IAM instance profile.
- ImageId
-
- Type: string
The ID of the AMI.
- InstanceType
-
- Type: string
The instance type.
- KernelId
-
- Type: string
The ID of the kernel.
- KeyName
-
- Type: string
The name of the key pair.
- Monitoring
-
- Type: SpotFleetMonitoring structure
Enable or disable monitoring for the instances.
- NetworkInterfaces
-
- Type: Array of InstanceNetworkInterfaceSpecification structures
One or more network interfaces.
- Placement
-
- Type: SpotPlacement structure
The placement information.
- RamdiskId
-
- Type: string
The ID of the RAM disk.
- SecurityGroups
-
- Type: Array of GroupIdentifier structures
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
- SpotPrice
-
- Type: string
The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value of
WeightedCapacity
. - SubnetId
-
- Type: string
The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".
- UserData
-
- Type: string
The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
- WeightedCapacity
-
- Type: double
The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).
If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.
SpotFleetMonitoring
Description
Describes whether monitoring is enabled.
Members
- Enabled
-
- Type: boolean
Enables monitoring for the instance.
Default:
false
SpotFleetRequestConfig
Description
Describes a Spot fleet request.
Members
- ActivityStatus
-
- Type: string
The progress of the Spot fleet request. If there is an error, the status is
error
. After all bids are placed, the status ispending_fulfillment
. If the size of the fleet is equal to or greater than its target capacity, the status isfulfilled
. If the size of the fleet is decreased, the status ispending_termination
while Spot instances are terminating. - CreateTime
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The creation date and time of the request.
- SpotFleetRequestConfig
-
- Required: Yes
- Type: SpotFleetRequestConfigData structure
Information about the configuration of the Spot fleet request.
- SpotFleetRequestId
-
- Required: Yes
- Type: string
The ID of the Spot fleet request.
- SpotFleetRequestState
-
- Required: Yes
- Type: string
The state of the Spot fleet request.
SpotFleetRequestConfigData
Description
Describes the configuration of a Spot fleet request.
Members
- AllocationStrategy
-
- Type: string
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. The default is
lowestPrice
. - ClientToken
-
- Type: string
A unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see Ensuring Idempotency.
- ExcessCapacityTerminationPolicy
-
- Type: string
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
- FulfilledCapacity
-
- Type: double
The number of units fulfilled by this request compared to the set target capacity.
- IamFleetRole
-
- Required: Yes
- Type: string
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set
terminateInstancesWithExpiration
. - LaunchSpecifications
-
- Required: Yes
- Type: Array of SpotFleetLaunchSpecification structures
Information about the launch specifications for the Spot fleet request.
- SpotPrice
-
- Required: Yes
- Type: string
The bid price per unit hour.
- TargetCapacity
-
- Required: Yes
- Type: int
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
- TerminateInstancesWithExpiration
-
- Type: boolean
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
- Type
-
- Type: string
The type of request. Indicates whether the fleet will only
request
the target capacity or also attempt tomaintain
it. When yourequest
a certain target capacity, the fleet will only place the required bids. It will not attempt to replenish Spot instances if capacity is diminished, nor will it submit bids in alternative Spot pools if capacity is not available. When you want tomaintain
a certain target capacity, fleet will place the required bids to meet this target capacity. It will also automatically replenish any interrupted instances. Default:maintain
. - ValidFrom
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
- ValidUntil
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
SpotInstanceRequest
Description
Describes a Spot instance request.
Members
- ActualBlockHourlyPrice
-
- Type: string
If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.
- AvailabilityZoneGroup
-
- Type: string
The Availability Zone group. If you specify the same Availability Zone group for all Spot instance requests, all Spot instances are launched in the same Availability Zone.
- BlockDurationMinutes
-
- Type: int
The duration for the Spot instance, in minutes.
- CreateTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time when the Spot instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- Fault
-
- Type: SpotInstanceStateFault structure
The fault codes for the Spot instance request, if any.
- InstanceId
-
- Type: string
The instance ID, if an instance has been launched to fulfill the Spot instance request.
- LaunchGroup
-
- Type: string
The instance launch group. Launch groups are Spot instances that launch together and terminate together.
- LaunchSpecification
-
- Type: LaunchSpecification structure
Additional information for launching instances.
- LaunchedAvailabilityZone
-
- Type: string
The Availability Zone in which the bid is launched.
- ProductDescription
-
- Type: string
The product description associated with the Spot instance.
- SpotInstanceRequestId
-
- Type: string
The ID of the Spot instance request.
- SpotPrice
-
- Type: string
The maximum hourly price (bid) for the Spot instance launched to fulfill the request.
- State
-
- Type: string
The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.
- Status
-
- Type: SpotInstanceStatus structure
The status code and status message describing the Spot instance request.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the resource.
- Type
-
- Type: string
The Spot instance request type.
- ValidFrom
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.
- ValidUntil
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, it remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.
SpotInstanceStateFault
Description
Describes a Spot instance state change.
Members
- Code
-
- Type: string
The reason code for the Spot instance state change.
- Message
-
- Type: string
The message for the Spot instance state change.
SpotInstanceStatus
Description
Describes the status of a Spot instance request.
Members
- Code
-
- Type: string
The status code. For a list of status codes, see Spot Bid Status Codes in the Amazon Elastic Compute Cloud User Guide.
- Message
-
- Type: string
The description for the status code.
- UpdateTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time of the most recent status update, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
SpotPlacement
Description
Describes Spot instance placement.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone.
[Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".
- GroupName
-
- Type: string
The name of the placement group (for cluster instances).
SpotPrice
Description
Describes the maximum hourly price (bid) for any Spot instance launched to fulfill the request.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone.
- InstanceType
-
- Type: string
The instance type.
- ProductDescription
-
- Type: string
A general description of the AMI.
- SpotPrice
-
- Type: string
The maximum price (bid) that you are willing to pay for a Spot instance.
- Timestamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
StaleIpPermission
Description
Describes a stale rule in a security group.
Members
- FromPort
-
- Type: int
The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of
-1
indicates all ICMP types. - IpProtocol
-
- Type: string
The IP protocol name (for
tcp
,udp
, andicmp
) or number (see Protocol Numbers). - IpRanges
-
- Type: Array of strings
One or more IP ranges. Not applicable for stale security group rules.
- PrefixListIds
-
- Type: Array of strings
One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.
- ToPort
-
- Type: int
The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of
-1
indicates all ICMP types. - UserIdGroupPairs
-
- Type: Array of UserIdGroupPair structures
One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.
StaleSecurityGroup
Description
Describes a stale security group (a security group that contains stale rules).
Members
- Description
-
- Type: string
The description of the security group.
- GroupId
-
- Required: Yes
- Type: string
The ID of the security group.
- GroupName
-
- Type: string
The name of the security group.
- StaleIpPermissions
-
- Type: Array of StaleIpPermission structures
Information about the stale inbound rules in the security group.
- StaleIpPermissionsEgress
-
- Type: Array of StaleIpPermission structures
Information about the stale outbound rules in the security group.
- VpcId
-
- Type: string
The ID of the VPC for the security group.
StateReason
Description
Describes a state change.
Members
- Code
-
- Type: string
The reason code for the state change.
- Message
-
- Type: string
The message for the state change.
-
Server.SpotInstanceTermination
: A Spot instance was terminated due to an increase in the market price. -
Server.InternalError
: An internal error occurred during instance launch, resulting in termination. -
Server.InsufficientInstanceCapacity
: There was insufficient instance capacity to satisfy the launch request. -
Client.InternalError
: A client error caused the instance to terminate on launch. -
Client.InstanceInitiatedShutdown
: The instance was shut down using theshutdown -h
command from the instance. -
Client.UserInitiatedShutdown
: The instance was shut down using the Amazon EC2 API. -
Client.VolumeLimitExceeded
: The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits. -
Client.InvalidSnapshot.NotFound
: The specified snapshot was not found.
Storage
Description
Describes the storage location for an instance store-backed AMI.
Members
- S3
-
- Type: S3Storage structure
An Amazon S3 storage location.
Subnet
Description
Describes a subnet.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone of the subnet.
- AvailableIpAddressCount
-
- Type: int
The number of unused IP addresses in the subnet. Note that the IP addresses for any stopped instances are considered unavailable.
- CidrBlock
-
- Type: string
The CIDR block assigned to the subnet.
- DefaultForAz
-
- Type: boolean
Indicates whether this is the default subnet for the Availability Zone.
- MapPublicIpOnLaunch
-
- Type: boolean
Indicates whether instances launched in this subnet receive a public IP address.
- State
-
- Type: string
The current state of the subnet.
- SubnetId
-
- Type: string
The ID of the subnet.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the subnet.
- VpcId
-
- Type: string
The ID of the VPC the subnet is in.
Tag
Description
Describes a tag.
Members
- Key
-
- Type: string
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with
aws:
- Value
-
- Type: string
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
TagDescription
Description
Describes a tag.
Members
- Key
-
- Type: string
The tag key.
- ResourceId
-
- Type: string
The ID of the resource. For example,
ami-1a2b3c4d
. - ResourceType
-
- Type: string
The resource type.
- Value
-
- Type: string
The tag value.
TargetConfiguration
Description
Information about the Convertible Reserved Instance offering.
Members
- InstanceCount
-
- Type: int
The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request
- OfferingId
-
- Type: string
The ID of the Convertible Reserved Instance offering.
TargetConfigurationRequest
Description
Details about the target configuration.
Members
- InstanceCount
-
- Type: int
The number of instances the Covertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request
- OfferingId
-
- Required: Yes
- Type: string
The Convertible Reserved Instance offering ID. If this isn't included in the request, the response lists your current Convertible Reserved Instance/s and their value/s.
TargetReservationValue
Description
The total value of the new Convertible Reserved Instances.
Members
- ReservationValue
-
- Type: ReservationValue structure
The total value of the Convertible Reserved Instances that make up the exchange. This is the sum of the list value, remaining upfront price, and additional upfront cost of the exchange.
- TargetConfiguration
-
- Type: TargetConfiguration structure
The configuration of the Convertible Reserved Instances that make up the exchange.
UnsuccessfulItem
Description
Information about items that were not successfully processed in a batch call.
Members
- Error
-
- Required: Yes
- Type: UnsuccessfulItemError structure
Information about the error.
- ResourceId
-
- Type: string
The ID of the resource.
UnsuccessfulItemError
Description
Information about the error that occurred. For more information about errors, see Error Codes.
Members
- Code
-
- Required: Yes
- Type: string
The error code.
- Message
-
- Required: Yes
- Type: string
The error message accompanying the error code.
UserBucket
Description
Describes the S3 bucket for the disk image.
Members
- S3Bucket
-
- Type: string
The name of the S3 bucket where the disk image is located.
- S3Key
-
- Type: string
The file name of the disk image.
UserBucketDetails
Description
Describes the S3 bucket for the disk image.
Members
- S3Bucket
-
- Type: string
The S3 bucket from which the disk image was created.
- S3Key
-
- Type: string
The file name of the disk image.
UserData
Description
Describes the user data for an instance.
Members
- Data
-
- Type: string
The user data. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
UserIdGroupPair
Description
Describes a security group and AWS account ID pair.
Members
- GroupId
-
- Type: string
The ID of the security group.
- GroupName
-
- Type: string
The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.
- PeeringStatus
-
- Type: string
The status of a VPC peering connection, if applicable.
- UserId
-
- Type: string
The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.
[EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.
- VpcId
-
- Type: string
The ID of the VPC for the referenced security group, if applicable.
- VpcPeeringConnectionId
-
- Type: string
The ID of the VPC peering connection, if applicable.
VgwTelemetry
Description
Describes telemetry for a VPN tunnel.
Members
- AcceptedRouteCount
-
- Type: int
The number of accepted routes.
- LastStatusChange
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time of the last change in status.
- OutsideIpAddress
-
- Type: string
The Internet-routable IP address of the virtual private gateway's outside interface.
- Status
-
- Type: string
The status of the VPN tunnel.
- StatusMessage
-
- Type: string
If an error occurs, a description of the error.
VolumeDetail
Description
Describes an EBS volume.
Members
- Size
-
- Required: Yes
- Type: long (int|float)
The size of the volume, in GiB.
VolumeStatusAction
Description
Describes a volume status operation code.
Members
- Code
-
- Type: string
The code identifying the operation, for example,
enable-volume-io
. - Description
-
- Type: string
A description of the operation.
- EventId
-
- Type: string
The ID of the event associated with this operation.
- EventType
-
- Type: string
The event type associated with this operation.
VolumeStatusDetails
Description
Describes a volume status.
Members
- Name
-
- Type: string
The name of the volume status.
- Status
-
- Type: string
The intended status of the volume status.
VolumeStatusEvent
Description
Describes a volume status event.
Members
- Description
-
- Type: string
A description of the event.
- EventId
-
- Type: string
The ID of this event.
- EventType
-
- Type: string
The type of this event.
- NotAfter
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The latest end time of the event.
- NotBefore
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The earliest start time of the event.
VolumeStatusInfo
Description
Describes the status of a volume.
Members
- Details
-
- Type: Array of VolumeStatusDetails structures
The details of the volume status.
- Status
-
- Type: string
The status of the volume.
VolumeStatusItem
Description
Describes the volume status.
Members
- Actions
-
- Type: Array of VolumeStatusAction structures
The details of the operation.
- AvailabilityZone
-
- Type: string
The Availability Zone of the volume.
- Events
-
- Type: Array of VolumeStatusEvent structures
A list of events associated with the volume.
- VolumeId
-
- Type: string
The volume ID.
- VolumeStatus
-
- Type: VolumeStatusInfo structure
The volume status.
Vpc
Description
Describes a VPC.
Members
- CidrBlock
-
- Type: string
The CIDR block for the VPC.
- DhcpOptionsId
-
- Type: string
The ID of the set of DHCP options you've associated with the VPC (or
default
if the default options are associated with the VPC). - InstanceTenancy
-
- Type: string
The allowed tenancy of instances launched into the VPC.
- IsDefault
-
- Type: boolean
Indicates whether the VPC is the default VPC.
- State
-
- Type: string
The current state of the VPC.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the VPC.
- VpcId
-
- Type: string
The ID of the VPC.
VpcAttachment
Description
Describes an attachment between a virtual private gateway and a VPC.
Members
- State
-
- Type: string
The current state of the attachment.
- VpcId
-
- Type: string
The ID of the VPC.
VpcClassicLink
Description
Describes whether a VPC is enabled for ClassicLink.
Members
- ClassicLinkEnabled
-
- Type: boolean
Indicates whether the VPC is enabled for ClassicLink.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the VPC.
- VpcId
-
- Type: string
The ID of the VPC.
VpcEndpoint
Description
Describes a VPC endpoint.
Members
- CreationTimestamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time the VPC endpoint was created.
- PolicyDocument
-
- Type: string
The policy document associated with the endpoint.
- RouteTableIds
-
- Type: Array of strings
One or more route tables associated with the endpoint.
- ServiceName
-
- Type: string
The name of the AWS service to which the endpoint is associated.
- State
-
- Type: string
The state of the VPC endpoint.
- VpcEndpointId
-
- Type: string
The ID of the VPC endpoint.
- VpcId
-
- Type: string
The ID of the VPC to which the endpoint is associated.
VpcPeeringConnection
Description
Describes a VPC peering connection.
Members
- AccepterVpcInfo
-
- Type: VpcPeeringConnectionVpcInfo structure
Information about the accepter VPC. CIDR block information is not returned when creating a VPC peering connection, or when describing a VPC peering connection that's in the
initiating-request
orpending-acceptance
state. - ExpirationTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time that an unaccepted VPC peering connection will expire.
- RequesterVpcInfo
-
- Type: VpcPeeringConnectionVpcInfo structure
Information about the requester VPC.
- Status
-
- Type: VpcPeeringConnectionStateReason structure
The status of the VPC peering connection.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the resource.
- VpcPeeringConnectionId
-
- Type: string
The ID of the VPC peering connection.
VpcPeeringConnectionOptionsDescription
Description
Describes the VPC peering connection options.
Members
- AllowDnsResolutionFromRemoteVpc
-
- Type: boolean
Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.
- AllowEgressFromLocalClassicLinkToRemoteVpc
-
- Type: boolean
Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.
- AllowEgressFromLocalVpcToRemoteClassicLink
-
- Type: boolean
Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.
VpcPeeringConnectionStateReason
Description
Describes the status of a VPC peering connection.
Members
- Code
-
- Type: string
The status of the VPC peering connection.
- Message
-
- Type: string
A message that provides more information about the status, if applicable.
VpcPeeringConnectionVpcInfo
Description
Describes a VPC in a VPC peering connection.
Members
- CidrBlock
-
- Type: string
The CIDR block for the VPC.
- OwnerId
-
- Type: string
The AWS account ID of the VPC owner.
- PeeringOptions
-
- Type: VpcPeeringConnectionOptionsDescription structure
Information about the VPC peering connection options for the accepter or requester VPC.
- VpcId
-
- Type: string
The ID of the VPC.
VpnConnection
Description
Describes a VPN connection.
Members
- CustomerGatewayConfiguration
-
- Type: string
The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the CreateVpnConnection response; however, it's present in the DescribeVpnConnections response only if the VPN connection is in the
pending
oravailable
state. - CustomerGatewayId
-
- Type: string
The ID of the customer gateway at your end of the VPN connection.
- Options
-
- Type: VpnConnectionOptions structure
The VPN connection options.
- Routes
-
- Type: Array of VpnStaticRoute structures
The static routes associated with the VPN connection.
- State
-
- Type: string
The current state of the VPN connection.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the VPN connection.
- Type
-
- Type: string
The type of VPN connection.
- VgwTelemetry
-
- Type: Array of VgwTelemetry structures
Information about the VPN tunnel.
- VpnConnectionId
-
- Type: string
The ID of the VPN connection.
- VpnGatewayId
-
- Type: string
The ID of the virtual private gateway at the AWS side of the VPN connection.
VpnConnectionOptions
Description
Describes VPN connection options.
Members
- StaticRoutesOnly
-
- Type: boolean
Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
VpnConnectionOptionsSpecification
Description
Describes VPN connection options.
Members
- StaticRoutesOnly
-
- Type: boolean
Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
VpnGateway
Description
Describes a virtual private gateway.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.
- State
-
- Type: string
The current state of the virtual private gateway.
- Tags
-
- Type: Array of Tag structures
Any tags assigned to the virtual private gateway.
- Type
-
- Type: string
The type of VPN connection the virtual private gateway supports.
- VpcAttachments
-
- Type: Array of VpcAttachment structures
Any VPCs attached to the virtual private gateway.
- VpnGatewayId
-
- Type: string
The ID of the virtual private gateway.
VpnStaticRoute
Description
Describes a static route for a VPN connection.
Members
- DestinationCidrBlock
-
- Type: string
The CIDR block associated with the local subnet of the customer data center.
- Source
-
- Type: string
Indicates how the routes were provided.
- State
-
- Type: string
The current state of the static route.