@aws-sdk/client-ec2 3.288.0 → 3.289.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist-types/commands/AllocateAddressCommand.d.ts +33 -0
  2. package/dist-types/commands/AssignPrivateIpAddressesCommand.d.ts +26 -0
  3. package/dist-types/commands/AssociateAddressCommand.d.ts +46 -0
  4. package/dist-types/commands/AssociateDhcpOptionsCommand.d.ts +24 -0
  5. package/dist-types/commands/AssociateIamInstanceProfileCommand.d.ts +27 -0
  6. package/dist-types/commands/AssociateRouteTableCommand.d.ts +17 -0
  7. package/dist-types/commands/AttachInternetGatewayCommand.d.ts +12 -0
  8. package/dist-types/commands/AttachNetworkInterfaceCommand.d.ts +18 -0
  9. package/dist-types/commands/AttachVolumeCommand.d.ts +22 -0
  10. package/dist-types/commands/AuthorizeSecurityGroupEgressCommand.d.ts +46 -0
  11. package/dist-types/commands/AuthorizeSecurityGroupIngressCommand.d.ts +72 -0
  12. package/dist-types/commands/CancelSpotFleetRequestsCommand.d.ts +50 -0
  13. package/dist-types/commands/CancelSpotInstanceRequestsCommand.d.ts +23 -0
  14. package/dist-types/commands/ConfirmProductInstanceCommand.d.ts +17 -0
  15. package/dist-types/commands/CopyImageCommand.d.ts +19 -0
  16. package/dist-types/commands/CopySnapshotCommand.d.ts +19 -0
  17. package/dist-types/commands/CreateCustomerGatewayCommand.d.ts +24 -0
  18. package/dist-types/commands/CreateDhcpOptionsCommand.d.ts +39 -0
  19. package/dist-types/commands/CreateImageCommand.d.ts +31 -0
  20. package/dist-types/commands/CreateInternetGatewayCommand.d.ts +18 -0
  21. package/dist-types/commands/CreateKeyPairCommand.d.ts +11 -0
  22. package/dist-types/commands/CreateLaunchTemplateCommand.d.ts +47 -0
  23. package/dist-types/commands/CreateLaunchTemplateVersionCommand.d.ts +45 -0
  24. package/dist-types/commands/CreateNatGatewayCommand.d.ts +28 -0
  25. package/dist-types/commands/CreateNetworkAclCommand.d.ts +38 -0
  26. package/dist-types/commands/CreateNetworkAclEntryCommand.d.ts +20 -0
  27. package/dist-types/commands/CreateNetworkInterfaceCommand.d.ts +46 -0
  28. package/dist-types/commands/CreatePlacementGroupCommand.d.ts +12 -0
  29. package/dist-types/commands/CreateRouteCommand.d.ts +13 -0
  30. package/dist-types/commands/CreateRouteTableCommand.d.ts +29 -0
  31. package/dist-types/commands/CreateSecurityGroupCommand.d.ts +18 -0
  32. package/dist-types/commands/CreateSnapshotCommand.d.ts +24 -0
  33. package/dist-types/commands/CreateSpotDatafeedSubscriptionCommand.d.ts +22 -0
  34. package/dist-types/commands/CreateSubnetCommand.d.ts +24 -0
  35. package/dist-types/commands/CreateTagsCommand.d.ts +19 -0
  36. package/dist-types/commands/CreateVolumeCommand.d.ts +54 -0
  37. package/dist-types/commands/CreateVpcCommand.d.ts +22 -0
  38. package/dist-types/commands/DeleteCustomerGatewayCommand.d.ts +11 -0
  39. package/dist-types/commands/DeleteDhcpOptionsCommand.d.ts +11 -0
  40. package/dist-types/commands/DeleteInternetGatewayCommand.d.ts +11 -0
  41. package/dist-types/commands/DeleteKeyPairCommand.d.ts +11 -0
  42. package/dist-types/commands/DeleteLaunchTemplateCommand.d.ts +23 -0
  43. package/dist-types/commands/DeleteLaunchTemplateVersionsCommand.d.ts +26 -0
  44. package/dist-types/commands/DeleteNatGatewayCommand.d.ts +16 -0
  45. package/dist-types/commands/DeleteNetworkAclCommand.d.ts +11 -0
  46. package/dist-types/commands/DeleteNetworkAclEntryCommand.d.ts +13 -0
  47. package/dist-types/commands/DeleteNetworkInterfaceCommand.d.ts +11 -0
  48. package/dist-types/commands/DeletePlacementGroupCommand.d.ts +12 -0
  49. package/dist-types/commands/DeleteRouteCommand.d.ts +12 -0
  50. package/dist-types/commands/DeleteRouteTableCommand.d.ts +11 -0
  51. package/dist-types/commands/DeleteSecurityGroupCommand.d.ts +11 -0
  52. package/dist-types/commands/DeleteSnapshotCommand.d.ts +11 -0
  53. package/dist-types/commands/DeleteSpotDatafeedSubscriptionCommand.d.ts +9 -0
  54. package/dist-types/commands/DeleteSubnetCommand.d.ts +11 -0
  55. package/dist-types/commands/DeleteTagsCommand.d.ts +19 -0
  56. package/dist-types/commands/DeleteVolumeCommand.d.ts +11 -0
  57. package/dist-types/commands/DeleteVpcCommand.d.ts +11 -0
  58. package/dist-types/commands/DescribeAccountAttributesCommand.d.ts +96 -0
  59. package/dist-types/commands/DescribeAddressesCommand.d.ts +93 -0
  60. package/dist-types/commands/DescribeAvailabilityZonesCommand.d.ts +39 -0
  61. package/dist-types/commands/DescribeCustomerGatewaysCommand.d.ts +26 -0
  62. package/dist-types/commands/DescribeDhcpOptionsCommand.d.ts +35 -0
  63. package/dist-types/commands/DescribeIamInstanceProfileAssociationsCommand.d.ts +28 -0
  64. package/dist-types/commands/DescribeImageAttributeCommand.d.ts +22 -0
  65. package/dist-types/commands/DescribeImagesCommand.d.ts +46 -0
  66. package/dist-types/commands/DescribeInstanceAttributeCommand.d.ts +80 -0
  67. package/dist-types/commands/DescribeInstanceStatusCommand.d.ts +45 -0
  68. package/dist-types/commands/DescribeInstancesCommand.d.ts +49 -0
  69. package/dist-types/commands/DescribeInternetGatewaysCommand.d.ts +34 -0
  70. package/dist-types/commands/DescribeKeyPairsCommand.d.ts +23 -0
  71. package/dist-types/commands/DescribeLaunchTemplateVersionsCommand.d.ts +64 -0
  72. package/dist-types/commands/DescribeLaunchTemplatesCommand.d.ts +27 -0
  73. package/dist-types/commands/DescribeMovingAddressesCommand.d.ts +19 -0
  74. package/dist-types/commands/DescribeNatGatewaysCommand.d.ts +39 -0
  75. package/dist-types/commands/DescribeNetworkAclsCommand.d.ts +48 -0
  76. package/dist-types/commands/DescribeNetworkInterfaceAttributeCommand.d.ts +89 -0
  77. package/dist-types/commands/DescribeNetworkInterfacesCommand.d.ts +68 -0
  78. package/dist-types/commands/DescribeRegionsCommand.d.ts +59 -0
  79. package/dist-types/commands/DescribeRouteTablesCommand.d.ts +39 -0
  80. package/dist-types/commands/DescribeScheduledInstanceAvailabilityCommand.d.ts +49 -0
  81. package/dist-types/commands/DescribeScheduledInstancesCommand.d.ts +43 -0
  82. package/dist-types/commands/DescribeSecurityGroupReferencesCommand.d.ts +24 -0
  83. package/dist-types/commands/DescribeSecurityGroupsCommand.d.ts +31 -0
  84. package/dist-types/commands/DescribeSnapshotAttributeCommand.d.ts +18 -0
  85. package/dist-types/commands/DescribeSnapshotsCommand.d.ts +68 -0
  86. package/dist-types/commands/DescribeSpotDatafeedSubscriptionCommand.d.ts +19 -0
  87. package/dist-types/commands/DescribeSpotFleetInstancesCommand.d.ts +23 -0
  88. package/dist-types/commands/DescribeSpotFleetRequestHistoryCommand.d.ts +51 -0
  89. package/dist-types/commands/DescribeSpotFleetRequestsCommand.d.ts +58 -0
  90. package/dist-types/commands/DescribeSpotInstanceRequestsCommand.d.ts +56 -0
  91. package/dist-types/commands/DescribeSpotPriceHistoryCommand.d.ts +38 -0
  92. package/dist-types/commands/DescribeSubnetsCommand.d.ts +34 -0
  93. package/dist-types/commands/DescribeTagsCommand.d.ts +36 -0
  94. package/dist-types/commands/DescribeVolumeAttributeCommand.d.ts +20 -0
  95. package/dist-types/commands/DescribeVolumeStatusCommand.d.ts +61 -0
  96. package/dist-types/commands/DescribeVolumesCommand.d.ts +84 -0
  97. package/dist-types/commands/DescribeVpcAttributeCommand.d.ts +40 -0
  98. package/dist-types/commands/DescribeVpcsCommand.d.ts +33 -0
  99. package/dist-types/commands/DetachInternetGatewayCommand.d.ts +12 -0
  100. package/dist-types/commands/DetachNetworkInterfaceCommand.d.ts +11 -0
  101. package/dist-types/commands/DetachVolumeCommand.d.ts +20 -0
  102. package/dist-types/commands/DisableVgwRoutePropagationCommand.d.ts +12 -0
  103. package/dist-types/commands/DisassociateAddressCommand.d.ts +22 -0
  104. package/dist-types/commands/DisassociateIamInstanceProfileCommand.d.ts +24 -0
  105. package/dist-types/commands/DisassociateRouteTableCommand.d.ts +11 -0
  106. package/dist-types/commands/EnableVgwRoutePropagationCommand.d.ts +12 -0
  107. package/dist-types/commands/EnableVolumeIOCommand.d.ts +11 -0
  108. package/dist-types/commands/GetConsoleOutputCommand.d.ts +18 -0
  109. package/dist-types/commands/GetLaunchTemplateDataCommand.d.ts +63 -0
  110. package/dist-types/commands/ModifyImageAttributeCommand.d.ts +36 -0
  111. package/dist-types/commands/ModifyInstanceAttributeCommand.d.ts +28 -0
  112. package/dist-types/commands/ModifyLaunchTemplateCommand.d.ts +24 -0
  113. package/dist-types/commands/ModifyNetworkInterfaceAttributeCommand.d.ts +58 -0
  114. package/dist-types/commands/ModifySnapshotAttributeCommand.d.ts +32 -0
  115. package/dist-types/commands/ModifySpotFleetRequestCommand.d.ts +35 -0
  116. package/dist-types/commands/ModifySubnetAttributeCommand.d.ts +14 -0
  117. package/dist-types/commands/ModifyVolumeAttributeCommand.d.ts +15 -0
  118. package/dist-types/commands/ModifyVpcAttributeCommand.d.ts +28 -0
  119. package/dist-types/commands/MoveAddressToVpcCommand.d.ts +16 -0
  120. package/dist-types/commands/PurchaseScheduledInstancesCommand.d.ts +46 -0
  121. package/dist-types/commands/RebootInstancesCommand.d.ts +13 -0
  122. package/dist-types/commands/ReleaseAddressCommand.d.ts +22 -0
  123. package/dist-types/commands/ReplaceNetworkAclAssociationCommand.d.ts +17 -0
  124. package/dist-types/commands/ReplaceNetworkAclEntryCommand.d.ts +20 -0
  125. package/dist-types/commands/ReplaceRouteCommand.d.ts +13 -0
  126. package/dist-types/commands/ReplaceRouteTableAssociationCommand.d.ts +17 -0
  127. package/dist-types/commands/RequestSpotFleetCommand.d.ts +152 -0
  128. package/dist-types/commands/RequestSpotInstancesCommand.d.ts +51 -0
  129. package/dist-types/commands/ResetImageAttributeCommand.d.ts +12 -0
  130. package/dist-types/commands/ResetInstanceAttributeCommand.d.ts +12 -0
  131. package/dist-types/commands/ResetSnapshotAttributeCommand.d.ts +12 -0
  132. package/dist-types/commands/RestoreAddressToClassicCommand.d.ts +17 -0
  133. package/dist-types/commands/RunInstancesCommand.d.ts +38 -0
  134. package/dist-types/commands/RunScheduledInstancesCommand.d.ts +70 -0
  135. package/dist-types/commands/StartInstancesCommand.d.ts +30 -0
  136. package/dist-types/commands/StopInstancesCommand.d.ts +30 -0
  137. package/dist-types/commands/TerminateInstancesCommand.d.ts +30 -0
  138. package/dist-types/commands/UnassignPrivateIpAddressesCommand.d.ts +14 -0
  139. package/dist-types/commands/UpdateSecurityGroupRuleDescriptionsEgressCommand.d.ts +24 -0
  140. package/dist-types/commands/UpdateSecurityGroupRuleDescriptionsIngressCommand.d.ts +24 -0
  141. package/package.json +31 -31
@@ -46,6 +46,28 @@ export interface ReleaseAddressCommandOutput extends __MetadataBearer {
46
46
  * @see {@link ReleaseAddressCommandOutput} for command's `response` shape.
47
47
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
48
48
  *
49
+ * @example To release an Elastic IP address for EC2-VPC
50
+ * ```javascript
51
+ * // This example releases an Elastic IP address for use with instances in a VPC.
52
+ * const input = {
53
+ * "AllocationId": "eipalloc-64d5890a"
54
+ * };
55
+ * const command = new ReleaseAddressCommand(input);
56
+ * await client.send(command);
57
+ * // example id: ec2-release-address-1
58
+ * ```
59
+ *
60
+ * @example To release an Elastic IP addresses for EC2-Classic
61
+ * ```javascript
62
+ * // This example releases an Elastic IP address for use with instances in EC2-Classic.
63
+ * const input = {
64
+ * "PublicIp": "198.51.100.0"
65
+ * };
66
+ * const command = new ReleaseAddressCommand(input);
67
+ * await client.send(command);
68
+ * // example id: ec2-release-address-2
69
+ * ```
70
+ *
49
71
  */
50
72
  export declare class ReleaseAddressCommand extends $Command<ReleaseAddressCommandInput, ReleaseAddressCommandOutput, EC2ClientResolvedConfig> {
51
73
  readonly input: ReleaseAddressCommandInput;
@@ -33,6 +33,23 @@ export interface ReplaceNetworkAclAssociationCommandOutput extends ReplaceNetwor
33
33
  * @see {@link ReplaceNetworkAclAssociationCommandOutput} for command's `response` shape.
34
34
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
35
35
  *
36
+ * @example To replace the network ACL associated with a subnet
37
+ * ```javascript
38
+ * // This example associates the specified network ACL with the subnet for the specified network ACL association.
39
+ * const input = {
40
+ * "AssociationId": "aclassoc-e5b95c8c",
41
+ * "NetworkAclId": "acl-5fb85d36"
42
+ * };
43
+ * const command = new ReplaceNetworkAclAssociationCommand(input);
44
+ * const response = await client.send(command);
45
+ * /* response ==
46
+ * {
47
+ * "NewAssociationId": "aclassoc-3999875b"
48
+ * }
49
+ * *\/
50
+ * // example id: ec2-replace-network-acl-association-1
51
+ * ```
52
+ *
36
53
  */
37
54
  export declare class ReplaceNetworkAclAssociationCommand extends $Command<ReplaceNetworkAclAssociationCommandInput, ReplaceNetworkAclAssociationCommandOutput, EC2ClientResolvedConfig> {
38
55
  readonly input: ReplaceNetworkAclAssociationCommandInput;
@@ -30,6 +30,26 @@ export interface ReplaceNetworkAclEntryCommandOutput extends __MetadataBearer {
30
30
  * @see {@link ReplaceNetworkAclEntryCommandOutput} for command's `response` shape.
31
31
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
32
32
  *
33
+ * @example To replace a network ACL entry
34
+ * ```javascript
35
+ * // 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.
36
+ * const input = {
37
+ * "CidrBlock": "203.0.113.12/24",
38
+ * "Egress": false,
39
+ * "NetworkAclId": "acl-5fb85d36",
40
+ * "PortRange": {
41
+ * "From": 53,
42
+ * "To": 53
43
+ * },
44
+ * "Protocol": "17",
45
+ * "RuleAction": "allow",
46
+ * "RuleNumber": 100
47
+ * };
48
+ * const command = new ReplaceNetworkAclEntryCommand(input);
49
+ * await client.send(command);
50
+ * // example id: ec2-replace-network-acl-entry-1
51
+ * ```
52
+ *
33
53
  */
34
54
  export declare class ReplaceNetworkAclEntryCommand extends $Command<ReplaceNetworkAclEntryCommandInput, ReplaceNetworkAclEntryCommandOutput, EC2ClientResolvedConfig> {
35
55
  readonly input: ReplaceNetworkAclEntryCommandInput;
@@ -34,6 +34,19 @@ export interface ReplaceRouteCommandOutput extends __MetadataBearer {
34
34
  * @see {@link ReplaceRouteCommandOutput} for command's `response` shape.
35
35
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
36
36
  *
37
+ * @example To replace a route
38
+ * ```javascript
39
+ * // 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.
40
+ * const input = {
41
+ * "DestinationCidrBlock": "10.0.0.0/16",
42
+ * "GatewayId": "vgw-9a4cacf3",
43
+ * "RouteTableId": "rtb-22574640"
44
+ * };
45
+ * const command = new ReplaceRouteCommand(input);
46
+ * await client.send(command);
47
+ * // example id: ec2-replace-route-1
48
+ * ```
49
+ *
37
50
  */
38
51
  export declare class ReplaceRouteCommand extends $Command<ReplaceRouteCommandInput, ReplaceRouteCommandOutput, EC2ClientResolvedConfig> {
39
52
  readonly input: ReplaceRouteCommandInput;
@@ -33,6 +33,23 @@ export interface ReplaceRouteTableAssociationCommandOutput extends ReplaceRouteT
33
33
  * @see {@link ReplaceRouteTableAssociationCommandOutput} for command's `response` shape.
34
34
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
35
35
  *
36
+ * @example To replace the route table associated with a subnet
37
+ * ```javascript
38
+ * // This example associates the specified route table with the subnet for the specified route table association.
39
+ * const input = {
40
+ * "AssociationId": "rtbassoc-781d0d1a",
41
+ * "RouteTableId": "rtb-22574640"
42
+ * };
43
+ * const command = new ReplaceRouteTableAssociationCommand(input);
44
+ * const response = await client.send(command);
45
+ * /* response ==
46
+ * {
47
+ * "NewAssociationId": "rtbassoc-3a1f0f58"
48
+ * }
49
+ * *\/
50
+ * // example id: ec2-replace-route-table-association-1
51
+ * ```
52
+ *
36
53
  */
37
54
  export declare class ReplaceRouteTableAssociationCommand extends $Command<ReplaceRouteTableAssociationCommandInput, ReplaceRouteTableAssociationCommandOutput, EC2ClientResolvedConfig> {
38
55
  readonly input: ReplaceRouteTableAssociationCommandInput;
@@ -55,6 +55,158 @@ export interface RequestSpotFleetCommandOutput extends RequestSpotFleetResponse,
55
55
  * @see {@link RequestSpotFleetCommandOutput} for command's `response` shape.
56
56
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
57
57
  *
58
+ * @example To request a Spot fleet in the subnet with the lowest price
59
+ * ```javascript
60
+ * // 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.
61
+ * const input = {
62
+ * "SpotFleetRequestConfig": {
63
+ * "IamFleetRole": "arn:aws:iam::123456789012:role/my-spot-fleet-role",
64
+ * "LaunchSpecifications": [
65
+ * {
66
+ * "IamInstanceProfile": {
67
+ * "Arn": "arn:aws:iam::123456789012:instance-profile/my-iam-role"
68
+ * },
69
+ * "ImageId": "ami-1a2b3c4d",
70
+ * "InstanceType": "m3.medium",
71
+ * "KeyName": "my-key-pair",
72
+ * "SecurityGroups": [
73
+ * {
74
+ * "GroupId": "sg-1a2b3c4d"
75
+ * }
76
+ * ],
77
+ * "SubnetId": "subnet-1a2b3c4d, subnet-3c4d5e6f"
78
+ * }
79
+ * ],
80
+ * "SpotPrice": "0.04",
81
+ * "TargetCapacity": 2
82
+ * }
83
+ * };
84
+ * const command = new RequestSpotFleetCommand(input);
85
+ * const response = await client.send(command);
86
+ * /* response ==
87
+ * {
88
+ * "SpotFleetRequestId": "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
89
+ * }
90
+ * *\/
91
+ * // example id: ec2-request-spot-fleet-1
92
+ * ```
93
+ *
94
+ * @example To request a Spot fleet in the Availability Zone with the lowest price
95
+ * ```javascript
96
+ * // 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.
97
+ * const input = {
98
+ * "SpotFleetRequestConfig": {
99
+ * "IamFleetRole": "arn:aws:iam::123456789012:role/my-spot-fleet-role",
100
+ * "LaunchSpecifications": [
101
+ * {
102
+ * "IamInstanceProfile": {
103
+ * "Arn": "arn:aws:iam::123456789012:instance-profile/my-iam-role"
104
+ * },
105
+ * "ImageId": "ami-1a2b3c4d",
106
+ * "InstanceType": "m3.medium",
107
+ * "KeyName": "my-key-pair",
108
+ * "Placement": {
109
+ * "AvailabilityZone": "us-west-2a, us-west-2b"
110
+ * },
111
+ * "SecurityGroups": [
112
+ * {
113
+ * "GroupId": "sg-1a2b3c4d"
114
+ * }
115
+ * ]
116
+ * }
117
+ * ],
118
+ * "SpotPrice": "0.04",
119
+ * "TargetCapacity": 2
120
+ * }
121
+ * };
122
+ * const command = new RequestSpotFleetCommand(input);
123
+ * const response = await client.send(command);
124
+ * /* response ==
125
+ * {
126
+ * "SpotFleetRequestId": "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
127
+ * }
128
+ * *\/
129
+ * // example id: ec2-request-spot-fleet-2
130
+ * ```
131
+ *
132
+ * @example To launch Spot instances in a subnet and assign them public IP addresses
133
+ * ```javascript
134
+ * // 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.
135
+ * const input = {
136
+ * "SpotFleetRequestConfig": {
137
+ * "IamFleetRole": "arn:aws:iam::123456789012:role/my-spot-fleet-role",
138
+ * "LaunchSpecifications": [
139
+ * {
140
+ * "IamInstanceProfile": {
141
+ * "Arn": "arn:aws:iam::880185128111:instance-profile/my-iam-role"
142
+ * },
143
+ * "ImageId": "ami-1a2b3c4d",
144
+ * "InstanceType": "m3.medium",
145
+ * "KeyName": "my-key-pair",
146
+ * "NetworkInterfaces": [
147
+ * {
148
+ * "AssociatePublicIpAddress": true,
149
+ * "DeviceIndex": 0,
150
+ * "Groups": [
151
+ * "sg-1a2b3c4d"
152
+ * ],
153
+ * "SubnetId": "subnet-1a2b3c4d"
154
+ * }
155
+ * ]
156
+ * }
157
+ * ],
158
+ * "SpotPrice": "0.04",
159
+ * "TargetCapacity": 2
160
+ * }
161
+ * };
162
+ * const command = new RequestSpotFleetCommand(input);
163
+ * const response = await client.send(command);
164
+ * /* response ==
165
+ * {
166
+ * "SpotFleetRequestId": "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
167
+ * }
168
+ * *\/
169
+ * // example id: ec2-request-spot-fleet-3
170
+ * ```
171
+ *
172
+ * @example To request a Spot fleet using the diversified allocation strategy
173
+ * ```javascript
174
+ * // 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.
175
+ * const input = {
176
+ * "SpotFleetRequestConfig": {
177
+ * "AllocationStrategy": "diversified",
178
+ * "IamFleetRole": "arn:aws:iam::123456789012:role/my-spot-fleet-role",
179
+ * "LaunchSpecifications": [
180
+ * {
181
+ * "ImageId": "ami-1a2b3c4d",
182
+ * "InstanceType": "c4.2xlarge",
183
+ * "SubnetId": "subnet-1a2b3c4d"
184
+ * },
185
+ * {
186
+ * "ImageId": "ami-1a2b3c4d",
187
+ * "InstanceType": "m3.2xlarge",
188
+ * "SubnetId": "subnet-1a2b3c4d"
189
+ * },
190
+ * {
191
+ * "ImageId": "ami-1a2b3c4d",
192
+ * "InstanceType": "r3.2xlarge",
193
+ * "SubnetId": "subnet-1a2b3c4d"
194
+ * }
195
+ * ],
196
+ * "SpotPrice": "0.70",
197
+ * "TargetCapacity": 30
198
+ * }
199
+ * };
200
+ * const command = new RequestSpotFleetCommand(input);
201
+ * const response = await client.send(command);
202
+ * /* response ==
203
+ * {
204
+ * "SpotFleetRequestId": "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
205
+ * }
206
+ * *\/
207
+ * // example id: ec2-request-spot-fleet-4
208
+ * ```
209
+ *
58
210
  */
59
211
  export declare class RequestSpotFleetCommand extends $Command<RequestSpotFleetCommandInput, RequestSpotFleetCommandOutput, EC2ClientResolvedConfig> {
60
212
  readonly input: RequestSpotFleetCommandInput;
@@ -41,6 +41,57 @@ export interface RequestSpotInstancesCommandOutput extends RequestSpotInstancesR
41
41
  * @see {@link RequestSpotInstancesCommandOutput} for command's `response` shape.
42
42
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
43
43
  *
44
+ * @example To create a one-time Spot Instance request
45
+ * ```javascript
46
+ * // 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.
47
+ * const input = {
48
+ * "InstanceCount": 5,
49
+ * "LaunchSpecification": {
50
+ * "IamInstanceProfile": {
51
+ * "Arn": "arn:aws:iam::123456789012:instance-profile/my-iam-role"
52
+ * },
53
+ * "ImageId": "ami-1a2b3c4d",
54
+ * "InstanceType": "m3.medium",
55
+ * "KeyName": "my-key-pair",
56
+ * "Placement": {
57
+ * "AvailabilityZone": "us-west-2a"
58
+ * },
59
+ * "SecurityGroupIds": [
60
+ * "sg-1a2b3c4d"
61
+ * ]
62
+ * },
63
+ * "SpotPrice": "0.03",
64
+ * "Type": "one-time"
65
+ * };
66
+ * const command = new RequestSpotInstancesCommand(input);
67
+ * await client.send(command);
68
+ * // example id: ec2-request-spot-instances-1
69
+ * ```
70
+ *
71
+ * @example To create a one-time Spot Instance request
72
+ * ```javascript
73
+ * // 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.
74
+ * const input = {
75
+ * "InstanceCount": 5,
76
+ * "LaunchSpecification": {
77
+ * "IamInstanceProfile": {
78
+ * "Arn": "arn:aws:iam::123456789012:instance-profile/my-iam-role"
79
+ * },
80
+ * "ImageId": "ami-1a2b3c4d",
81
+ * "InstanceType": "m3.medium",
82
+ * "SecurityGroupIds": [
83
+ * "sg-1a2b3c4d"
84
+ * ],
85
+ * "SubnetId": "subnet-1a2b3c4d"
86
+ * },
87
+ * "SpotPrice": "0.050",
88
+ * "Type": "one-time"
89
+ * };
90
+ * const command = new RequestSpotInstancesCommand(input);
91
+ * await client.send(command);
92
+ * // example id: ec2-request-spot-instances-2
93
+ * ```
94
+ *
44
95
  */
45
96
  export declare class RequestSpotInstancesCommand extends $Command<RequestSpotInstancesCommandInput, RequestSpotInstancesCommandOutput, EC2ClientResolvedConfig> {
46
97
  readonly input: RequestSpotInstancesCommandInput;
@@ -29,6 +29,18 @@ export interface ResetImageAttributeCommandOutput extends __MetadataBearer {
29
29
  * @see {@link ResetImageAttributeCommandOutput} for command's `response` shape.
30
30
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
31
31
  *
32
+ * @example To reset the launchPermission attribute
33
+ * ```javascript
34
+ * // This example resets the launchPermission attribute for the specified AMI. By default, AMIs are private.
35
+ * const input = {
36
+ * "Attribute": "launchPermission",
37
+ * "ImageId": "ami-5731123e"
38
+ * };
39
+ * const command = new ResetImageAttributeCommand(input);
40
+ * await client.send(command);
41
+ * // example id: to-reset-the-launchpermission-attribute-1529359519534
42
+ * ```
43
+ *
32
44
  */
33
45
  export declare class ResetImageAttributeCommand extends $Command<ResetImageAttributeCommandInput, ResetImageAttributeCommandOutput, EC2ClientResolvedConfig> {
34
46
  readonly input: ResetImageAttributeCommandInput;
@@ -37,6 +37,18 @@ export interface ResetInstanceAttributeCommandOutput extends __MetadataBearer {
37
37
  * @see {@link ResetInstanceAttributeCommandOutput} for command's `response` shape.
38
38
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
39
39
  *
40
+ * @example To reset the sourceDestCheck attribute
41
+ * ```javascript
42
+ * // This example resets the sourceDestCheck attribute for the specified instance.
43
+ * const input = {
44
+ * "Attribute": "sourceDestCheck",
45
+ * "InstanceId": "i-1234567890abcdef0"
46
+ * };
47
+ * const command = new ResetInstanceAttributeCommand(input);
48
+ * await client.send(command);
49
+ * // example id: to-reset-the-sourcedestcheck-attribute-1529359630708
50
+ * ```
51
+ *
40
52
  */
41
53
  export declare class ResetInstanceAttributeCommand extends $Command<ResetInstanceAttributeCommandInput, ResetInstanceAttributeCommandOutput, EC2ClientResolvedConfig> {
42
54
  readonly input: ResetInstanceAttributeCommandInput;
@@ -31,6 +31,18 @@ export interface ResetSnapshotAttributeCommandOutput extends __MetadataBearer {
31
31
  * @see {@link ResetSnapshotAttributeCommandOutput} for command's `response` shape.
32
32
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
33
33
  *
34
+ * @example To reset a snapshot attribute
35
+ * ```javascript
36
+ * // This example resets the create volume permissions for snapshot ``snap-1234567890abcdef0``. If the command succeeds, no output is returned.
37
+ * const input = {
38
+ * "Attribute": "createVolumePermission",
39
+ * "SnapshotId": "snap-1234567890abcdef0"
40
+ * };
41
+ * const command = new ResetSnapshotAttributeCommand(input);
42
+ * await client.send(command);
43
+ * // example id: to-reset-a-snapshot-attribute-1472508825735
44
+ * ```
45
+ *
34
46
  */
35
47
  export declare class ResetSnapshotAttributeCommand extends $Command<ResetSnapshotAttributeCommandInput, ResetSnapshotAttributeCommandOutput, EC2ClientResolvedConfig> {
36
48
  readonly input: ResetSnapshotAttributeCommandInput;
@@ -32,6 +32,23 @@ export interface RestoreAddressToClassicCommandOutput extends RestoreAddressToCl
32
32
  * @see {@link RestoreAddressToClassicCommandOutput} for command's `response` shape.
33
33
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
34
34
  *
35
+ * @example To restore an address to EC2-Classic
36
+ * ```javascript
37
+ * // This example restores the specified Elastic IP address to the EC2-Classic platform.
38
+ * const input = {
39
+ * "PublicIp": "198.51.100.0"
40
+ * };
41
+ * const command = new RestoreAddressToClassicCommand(input);
42
+ * const response = await client.send(command);
43
+ * /* response ==
44
+ * {
45
+ * "PublicIp": "198.51.100.0",
46
+ * "Status": "MoveInProgress"
47
+ * }
48
+ * *\/
49
+ * // example id: ec2-restore-address-to-classic-1
50
+ * ```
51
+ *
35
52
  */
36
53
  export declare class RestoreAddressToClassicCommand extends $Command<RestoreAddressToClassicCommandInput, RestoreAddressToClassicCommandOutput, EC2ClientResolvedConfig> {
37
54
  readonly input: RestoreAddressToClassicCommandInput;
@@ -91,6 +91,44 @@ export interface RunInstancesCommandOutput extends Reservation, __MetadataBearer
91
91
  * @see {@link RunInstancesCommandOutput} for command's `response` shape.
92
92
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
93
93
  *
94
+ * @example To launch an instance
95
+ * ```javascript
96
+ * // This example launches an instance using the specified AMI, instance type, security group, subnet, block device mapping, and tags.
97
+ * const input = {
98
+ * "BlockDeviceMappings": [
99
+ * {
100
+ * "DeviceName": "/dev/sdh",
101
+ * "Ebs": {
102
+ * "VolumeSize": 100
103
+ * }
104
+ * }
105
+ * ],
106
+ * "ImageId": "ami-abc12345",
107
+ * "InstanceType": "t2.micro",
108
+ * "KeyName": "my-key-pair",
109
+ * "MaxCount": 1,
110
+ * "MinCount": 1,
111
+ * "SecurityGroupIds": [
112
+ * "sg-1a2b3c4d"
113
+ * ],
114
+ * "SubnetId": "subnet-6e7f829e",
115
+ * "TagSpecifications": [
116
+ * {
117
+ * "ResourceType": "instance",
118
+ * "Tags": [
119
+ * {
120
+ * "Key": "Purpose",
121
+ * "Value": "test"
122
+ * }
123
+ * ]
124
+ * }
125
+ * ]
126
+ * };
127
+ * const command = new RunInstancesCommand(input);
128
+ * await client.send(command);
129
+ * // example id: to-launch-an-instance-1529360150806
130
+ * ```
131
+ *
94
132
  */
95
133
  export declare class RunInstancesCommand extends $Command<RunInstancesCommandInput, RunInstancesCommandOutput, EC2ClientResolvedConfig> {
96
134
  readonly input: RunInstancesCommandInput;
@@ -34,6 +34,76 @@ export interface RunScheduledInstancesCommandOutput extends RunScheduledInstance
34
34
  * @see {@link RunScheduledInstancesCommandOutput} for command's `response` shape.
35
35
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
36
36
  *
37
+ * @example To launch a Scheduled Instance in a VPC
38
+ * ```javascript
39
+ * // This example launches the specified Scheduled Instance in a VPC.
40
+ * const input = {
41
+ * "InstanceCount": 1,
42
+ * "LaunchSpecification": {
43
+ * "IamInstanceProfile": {
44
+ * "Name": "my-iam-role"
45
+ * },
46
+ * "ImageId": "ami-12345678",
47
+ * "InstanceType": "c4.large",
48
+ * "KeyName": "my-key-pair",
49
+ * "NetworkInterfaces": [
50
+ * {
51
+ * "AssociatePublicIpAddress": true,
52
+ * "DeviceIndex": 0,
53
+ * "Groups": [
54
+ * "sg-12345678"
55
+ * ],
56
+ * "SubnetId": "subnet-12345678"
57
+ * }
58
+ * ]
59
+ * },
60
+ * "ScheduledInstanceId": "sci-1234-1234-1234-1234-123456789012"
61
+ * };
62
+ * const command = new RunScheduledInstancesCommand(input);
63
+ * const response = await client.send(command);
64
+ * /* response ==
65
+ * {
66
+ * "InstanceIdSet": [
67
+ * "i-1234567890abcdef0"
68
+ * ]
69
+ * }
70
+ * *\/
71
+ * // example id: ec2-run-scheduled-instances-1
72
+ * ```
73
+ *
74
+ * @example To launch a Scheduled Instance in EC2-Classic
75
+ * ```javascript
76
+ * // This example launches the specified Scheduled Instance in EC2-Classic.
77
+ * const input = {
78
+ * "InstanceCount": 1,
79
+ * "LaunchSpecification": {
80
+ * "IamInstanceProfile": {
81
+ * "Name": "my-iam-role"
82
+ * },
83
+ * "ImageId": "ami-12345678",
84
+ * "InstanceType": "c4.large",
85
+ * "KeyName": "my-key-pair",
86
+ * "Placement": {
87
+ * "AvailabilityZone": "us-west-2b"
88
+ * },
89
+ * "SecurityGroupIds": [
90
+ * "sg-12345678"
91
+ * ]
92
+ * },
93
+ * "ScheduledInstanceId": "sci-1234-1234-1234-1234-123456789012"
94
+ * };
95
+ * const command = new RunScheduledInstancesCommand(input);
96
+ * const response = await client.send(command);
97
+ * /* response ==
98
+ * {
99
+ * "InstanceIdSet": [
100
+ * "i-1234567890abcdef0"
101
+ * ]
102
+ * }
103
+ * *\/
104
+ * // example id: ec2-run-scheduled-instances-2
105
+ * ```
106
+ *
37
107
  */
38
108
  export declare class RunScheduledInstancesCommand extends $Command<RunScheduledInstancesCommandInput, RunScheduledInstancesCommandOutput, EC2ClientResolvedConfig> {
39
109
  readonly input: RunScheduledInstancesCommandInput;
@@ -47,6 +47,36 @@ export interface StartInstancesCommandOutput extends StartInstancesResult, __Met
47
47
  * @see {@link StartInstancesCommandOutput} for command's `response` shape.
48
48
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
49
49
  *
50
+ * @example To start a stopped EC2 instance
51
+ * ```javascript
52
+ * // This example starts the specified EC2 instance.
53
+ * const input = {
54
+ * "InstanceIds": [
55
+ * "i-1234567890abcdef0"
56
+ * ]
57
+ * };
58
+ * const command = new StartInstancesCommand(input);
59
+ * const response = await client.send(command);
60
+ * /* response ==
61
+ * {
62
+ * "StartingInstances": [
63
+ * {
64
+ * "CurrentState": {
65
+ * "Code": 0,
66
+ * "Name": "pending"
67
+ * },
68
+ * "InstanceId": "i-1234567890abcdef0",
69
+ * "PreviousState": {
70
+ * "Code": 80,
71
+ * "Name": "stopped"
72
+ * }
73
+ * }
74
+ * ]
75
+ * }
76
+ * *\/
77
+ * // example id: to-start-a-stopped-ec2-instance-1529358792730
78
+ * ```
79
+ *
50
80
  */
51
81
  export declare class StartInstancesCommand extends $Command<StartInstancesCommandInput, StartInstancesCommandOutput, EC2ClientResolvedConfig> {
52
82
  readonly input: StartInstancesCommandInput;
@@ -59,6 +59,36 @@ export interface StopInstancesCommandOutput extends StopInstancesResult, __Metad
59
59
  * @see {@link StopInstancesCommandOutput} for command's `response` shape.
60
60
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
61
61
  *
62
+ * @example To stop a running EC2 instance
63
+ * ```javascript
64
+ * // This example stops the specified EC2 instance.
65
+ * const input = {
66
+ * "InstanceIds": [
67
+ * "i-1234567890abcdef0"
68
+ * ]
69
+ * };
70
+ * const command = new StopInstancesCommand(input);
71
+ * const response = await client.send(command);
72
+ * /* response ==
73
+ * {
74
+ * "StoppingInstances": [
75
+ * {
76
+ * "CurrentState": {
77
+ * "Code": 64,
78
+ * "Name": "stopping"
79
+ * },
80
+ * "InstanceId": "i-1234567890abcdef0",
81
+ * "PreviousState": {
82
+ * "Code": 16,
83
+ * "Name": "running"
84
+ * }
85
+ * }
86
+ * ]
87
+ * }
88
+ * *\/
89
+ * // example id: to-stop-a-running-ec2-instance-1529358905540
90
+ * ```
91
+ *
62
92
  */
63
93
  export declare class StopInstancesCommand extends $Command<StopInstancesCommandInput, StopInstancesCommandOutput, EC2ClientResolvedConfig> {
64
94
  readonly input: StopInstancesCommandInput;
@@ -89,6 +89,36 @@ export interface TerminateInstancesCommandOutput extends TerminateInstancesResul
89
89
  * @see {@link TerminateInstancesCommandOutput} for command's `response` shape.
90
90
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
91
91
  *
92
+ * @example To terminate an EC2 instance
93
+ * ```javascript
94
+ * // This example terminates the specified EC2 instance.
95
+ * const input = {
96
+ * "InstanceIds": [
97
+ * "i-1234567890abcdef0"
98
+ * ]
99
+ * };
100
+ * const command = new TerminateInstancesCommand(input);
101
+ * const response = await client.send(command);
102
+ * /* response ==
103
+ * {
104
+ * "TerminatingInstances": [
105
+ * {
106
+ * "CurrentState": {
107
+ * "Code": 32,
108
+ * "Name": "shutting-down"
109
+ * },
110
+ * "InstanceId": "i-1234567890abcdef0",
111
+ * "PreviousState": {
112
+ * "Code": 16,
113
+ * "Name": "running"
114
+ * }
115
+ * }
116
+ * ]
117
+ * }
118
+ * *\/
119
+ * // example id: to-terminate-an-ec2-instance-1529359350660
120
+ * ```
121
+ *
92
122
  */
93
123
  export declare class TerminateInstancesCommand extends $Command<TerminateInstancesCommandInput, TerminateInstancesCommandOutput, EC2ClientResolvedConfig> {
94
124
  readonly input: TerminateInstancesCommandInput;