@aws-sdk/client-ec2 3.287.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
@@ -44,6 +44,39 @@ export interface AllocateAddressCommandOutput extends AllocateAddressResult, __M
44
44
  * @see {@link AllocateAddressCommandOutput} for command's `response` shape.
45
45
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
46
46
  *
47
+ * @example To allocate an Elastic IP address for EC2-VPC
48
+ * ```javascript
49
+ * // This example allocates an Elastic IP address to use with an instance in a VPC.
50
+ * const input = {
51
+ * "Domain": "vpc"
52
+ * };
53
+ * const command = new AllocateAddressCommand(input);
54
+ * const response = await client.send(command);
55
+ * /* response ==
56
+ * {
57
+ * "AllocationId": "eipalloc-64d5890a",
58
+ * "Domain": "vpc",
59
+ * "PublicIp": "203.0.113.0"
60
+ * }
61
+ * *\/
62
+ * // example id: ec2-allocate-address-1
63
+ * ```
64
+ *
65
+ * @example To allocate an Elastic IP address for EC2-Classic
66
+ * ```javascript
67
+ * // This example allocates an Elastic IP address to use with an instance in EC2-Classic.
68
+ * const input = undefined;
69
+ * const command = new AllocateAddressCommand(input);
70
+ * const response = await client.send(command);
71
+ * /* response ==
72
+ * {
73
+ * "Domain": "standard",
74
+ * "PublicIp": "198.51.100.0"
75
+ * }
76
+ * *\/
77
+ * // example id: ec2-allocate-address-2
78
+ * ```
79
+ *
47
80
  */
48
81
  export declare class AllocateAddressCommand extends $Command<AllocateAddressCommandInput, AllocateAddressCommandOutput, EC2ClientResolvedConfig> {
49
82
  readonly input: AllocateAddressCommandInput;
@@ -44,6 +44,32 @@ export interface AssignPrivateIpAddressesCommandOutput extends AssignPrivateIpAd
44
44
  * @see {@link AssignPrivateIpAddressesCommandOutput} for command's `response` shape.
45
45
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
46
46
  *
47
+ * @example To assign a specific secondary private IP address to an interface
48
+ * ```javascript
49
+ * // This example assigns the specified secondary private IP address to the specified network interface.
50
+ * const input = {
51
+ * "NetworkInterfaceId": "eni-e5aa89a3",
52
+ * "PrivateIpAddresses": [
53
+ * "10.0.0.82"
54
+ * ]
55
+ * };
56
+ * const command = new AssignPrivateIpAddressesCommand(input);
57
+ * await client.send(command);
58
+ * // example id: ec2-assign-private-ip-addresses-1
59
+ * ```
60
+ *
61
+ * @example To assign secondary private IP addresses that Amazon EC2 selects to an interface
62
+ * ```javascript
63
+ * // 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.
64
+ * const input = {
65
+ * "NetworkInterfaceId": "eni-e5aa89a3",
66
+ * "SecondaryPrivateIpAddressCount": 2
67
+ * };
68
+ * const command = new AssignPrivateIpAddressesCommand(input);
69
+ * await client.send(command);
70
+ * // example id: ec2-assign-private-ip-addresses-2
71
+ * ```
72
+ *
47
73
  */
48
74
  export declare class AssignPrivateIpAddressesCommand extends $Command<AssignPrivateIpAddressesCommandInput, AssignPrivateIpAddressesCommandOutput, EC2ClientResolvedConfig> {
49
75
  readonly input: AssignPrivateIpAddressesCommandInput;
@@ -56,6 +56,52 @@ export interface AssociateAddressCommandOutput extends AssociateAddressResult, _
56
56
  * @see {@link AssociateAddressCommandOutput} for command's `response` shape.
57
57
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
58
58
  *
59
+ * @example To associate an Elastic IP address in EC2-VPC
60
+ * ```javascript
61
+ * // This example associates the specified Elastic IP address with the specified instance in a VPC.
62
+ * const input = {
63
+ * "AllocationId": "eipalloc-64d5890a",
64
+ * "InstanceId": "i-0b263919b6498b123"
65
+ * };
66
+ * const command = new AssociateAddressCommand(input);
67
+ * const response = await client.send(command);
68
+ * /* response ==
69
+ * {
70
+ * "AssociationId": "eipassoc-2bebb745"
71
+ * }
72
+ * *\/
73
+ * // example id: ec2-associate-address-1
74
+ * ```
75
+ *
76
+ * @example To associate an Elastic IP address with a network interface
77
+ * ```javascript
78
+ * // This example associates the specified Elastic IP address with the specified network interface.
79
+ * const input = {
80
+ * "AllocationId": "eipalloc-64d5890a",
81
+ * "NetworkInterfaceId": "eni-1a2b3c4d"
82
+ * };
83
+ * const command = new AssociateAddressCommand(input);
84
+ * const response = await client.send(command);
85
+ * /* response ==
86
+ * {
87
+ * "AssociationId": "eipassoc-2bebb745"
88
+ * }
89
+ * *\/
90
+ * // example id: ec2-associate-address-2
91
+ * ```
92
+ *
93
+ * @example To associate an Elastic IP address in EC2-Classic
94
+ * ```javascript
95
+ * // This example associates an Elastic IP address with an instance in EC2-Classic.
96
+ * const input = {
97
+ * "InstanceId": "i-07ffe74c7330ebf53",
98
+ * "PublicIp": "198.51.100.0"
99
+ * };
100
+ * const command = new AssociateAddressCommand(input);
101
+ * await client.send(command);
102
+ * // example id: ec2-associate-address-3
103
+ * ```
104
+ *
59
105
  */
60
106
  export declare class AssociateAddressCommand extends $Command<AssociateAddressCommandInput, AssociateAddressCommandOutput, EC2ClientResolvedConfig> {
61
107
  readonly input: AssociateAddressCommandInput;
@@ -32,6 +32,30 @@ export interface AssociateDhcpOptionsCommandOutput extends __MetadataBearer {
32
32
  * @see {@link AssociateDhcpOptionsCommandOutput} for command's `response` shape.
33
33
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
34
34
  *
35
+ * @example To associate a DHCP options set with a VPC
36
+ * ```javascript
37
+ * // This example associates the specified DHCP options set with the specified VPC.
38
+ * const input = {
39
+ * "DhcpOptionsId": "dopt-d9070ebb",
40
+ * "VpcId": "vpc-a01106c2"
41
+ * };
42
+ * const command = new AssociateDhcpOptionsCommand(input);
43
+ * await client.send(command);
44
+ * // example id: ec2-associate-dhcp-options-1
45
+ * ```
46
+ *
47
+ * @example To associate the default DHCP options set with a VPC
48
+ * ```javascript
49
+ * // This example associates the default DHCP options set with the specified VPC.
50
+ * const input = {
51
+ * "DhcpOptionsId": "default",
52
+ * "VpcId": "vpc-a01106c2"
53
+ * };
54
+ * const command = new AssociateDhcpOptionsCommand(input);
55
+ * await client.send(command);
56
+ * // example id: ec2-associate-dhcp-options-2
57
+ * ```
58
+ *
35
59
  */
36
60
  export declare class AssociateDhcpOptionsCommand extends $Command<AssociateDhcpOptionsCommandInput, AssociateDhcpOptionsCommandOutput, EC2ClientResolvedConfig> {
37
61
  readonly input: AssociateDhcpOptionsCommandInput;
@@ -30,6 +30,33 @@ export interface AssociateIamInstanceProfileCommandOutput extends AssociateIamIn
30
30
  * @see {@link AssociateIamInstanceProfileCommandOutput} for command's `response` shape.
31
31
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
32
32
  *
33
+ * @example To associate an IAM instance profile with an instance
34
+ * ```javascript
35
+ * // This example associates an IAM instance profile named admin-role with the specified instance.
36
+ * const input = {
37
+ * "IamInstanceProfile": {
38
+ * "Name": "admin-role"
39
+ * },
40
+ * "InstanceId": "i-123456789abcde123"
41
+ * };
42
+ * const command = new AssociateIamInstanceProfileCommand(input);
43
+ * const response = await client.send(command);
44
+ * /* response ==
45
+ * {
46
+ * "IamInstanceProfileAssociation": {
47
+ * "AssociationId": "iip-assoc-0e7736511a163c209",
48
+ * "IamInstanceProfile": {
49
+ * "Arn": "arn:aws:iam::123456789012:instance-profile/admin-role",
50
+ * "Id": "AIPAJBLK7RKJKWDXVHIEC"
51
+ * },
52
+ * "InstanceId": "i-123456789abcde123",
53
+ * "State": "associating"
54
+ * }
55
+ * }
56
+ * *\/
57
+ * // example id: to-associate-an-iam-instance-profile-with-an-instance-1528928429850
58
+ * ```
59
+ *
33
60
  */
34
61
  export declare class AssociateIamInstanceProfileCommand extends $Command<AssociateIamInstanceProfileCommandInput, AssociateIamInstanceProfileCommandOutput, EC2ClientResolvedConfig> {
35
62
  readonly input: AssociateIamInstanceProfileCommandInput;
@@ -35,6 +35,23 @@ export interface AssociateRouteTableCommandOutput extends AssociateRouteTableRes
35
35
  * @see {@link AssociateRouteTableCommandOutput} for command's `response` shape.
36
36
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
37
37
  *
38
+ * @example To associate a route table with a subnet
39
+ * ```javascript
40
+ * // This example associates the specified route table with the specified subnet.
41
+ * const input = {
42
+ * "RouteTableId": "rtb-22574640",
43
+ * "SubnetId": "subnet-9d4a7b6"
44
+ * };
45
+ * const command = new AssociateRouteTableCommand(input);
46
+ * const response = await client.send(command);
47
+ * /* response ==
48
+ * {
49
+ * "AssociationId": "rtbassoc-781d0d1a"
50
+ * }
51
+ * *\/
52
+ * // example id: ec2-associate-route-table-1
53
+ * ```
54
+ *
38
55
  */
39
56
  export declare class AssociateRouteTableCommand extends $Command<AssociateRouteTableCommandInput, AssociateRouteTableCommandOutput, EC2ClientResolvedConfig> {
40
57
  readonly input: AssociateRouteTableCommandInput;
@@ -30,6 +30,18 @@ export interface AttachInternetGatewayCommandOutput extends __MetadataBearer {
30
30
  * @see {@link AttachInternetGatewayCommandOutput} for command's `response` shape.
31
31
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
32
32
  *
33
+ * @example To attach an Internet gateway to a VPC
34
+ * ```javascript
35
+ * // This example attaches the specified Internet gateway to the specified VPC.
36
+ * const input = {
37
+ * "InternetGatewayId": "igw-c0a643a9",
38
+ * "VpcId": "vpc-a01106c2"
39
+ * };
40
+ * const command = new AttachInternetGatewayCommand(input);
41
+ * await client.send(command);
42
+ * // example id: ec2-attach-internet-gateway-1
43
+ * ```
44
+ *
33
45
  */
34
46
  export declare class AttachInternetGatewayCommand extends $Command<AttachInternetGatewayCommandInput, AttachInternetGatewayCommandOutput, EC2ClientResolvedConfig> {
35
47
  readonly input: AttachInternetGatewayCommandInput;
@@ -29,6 +29,24 @@ export interface AttachNetworkInterfaceCommandOutput extends AttachNetworkInterf
29
29
  * @see {@link AttachNetworkInterfaceCommandOutput} for command's `response` shape.
30
30
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
31
31
  *
32
+ * @example To attach a network interface to an instance
33
+ * ```javascript
34
+ * // This example attaches the specified network interface to the specified instance.
35
+ * const input = {
36
+ * "DeviceIndex": 1,
37
+ * "InstanceId": "i-1234567890abcdef0",
38
+ * "NetworkInterfaceId": "eni-e5aa89a3"
39
+ * };
40
+ * const command = new AttachNetworkInterfaceCommand(input);
41
+ * const response = await client.send(command);
42
+ * /* response ==
43
+ * {
44
+ * "AttachmentId": "eni-attach-66c4350a"
45
+ * }
46
+ * *\/
47
+ * // example id: ec2-attach-network-interface-1
48
+ * ```
49
+ *
32
50
  */
33
51
  export declare class AttachNetworkInterfaceCommand extends $Command<AttachNetworkInterfaceCommandInput, AttachNetworkInterfaceCommandOutput, EC2ClientResolvedConfig> {
34
52
  readonly input: AttachNetworkInterfaceCommandInput;
@@ -53,6 +53,28 @@ export interface AttachVolumeCommandOutput extends VolumeAttachment, __MetadataB
53
53
  * @see {@link AttachVolumeCommandOutput} for command's `response` shape.
54
54
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
55
55
  *
56
+ * @example To attach a volume to an instance
57
+ * ```javascript
58
+ * // This example attaches a volume (``vol-1234567890abcdef0``) to an instance (``i-01474ef662b89480``) as ``/dev/sdf``.
59
+ * const input = {
60
+ * "Device": "/dev/sdf",
61
+ * "InstanceId": "i-01474ef662b89480",
62
+ * "VolumeId": "vol-1234567890abcdef0"
63
+ * };
64
+ * const command = new AttachVolumeCommand(input);
65
+ * const response = await client.send(command);
66
+ * /* response ==
67
+ * {
68
+ * "AttachTime": "2016-08-29T18:52:32.724Z",
69
+ * "Device": "/dev/sdf",
70
+ * "InstanceId": "i-01474ef662b89480",
71
+ * "State": "attaching",
72
+ * "VolumeId": "vol-1234567890abcdef0"
73
+ * }
74
+ * *\/
75
+ * // example id: to-attach-a-volume-to-an-instance-1472499213109
76
+ * ```
77
+ *
56
78
  */
57
79
  export declare class AttachVolumeCommand extends $Command<AttachVolumeCommandInput, AttachVolumeCommandOutput, EC2ClientResolvedConfig> {
58
80
  readonly input: AttachVolumeCommandInput;
@@ -39,6 +39,52 @@ export interface AuthorizeSecurityGroupEgressCommandOutput extends AuthorizeSecu
39
39
  * @see {@link AuthorizeSecurityGroupEgressCommandOutput} for command's `response` shape.
40
40
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
41
41
  *
42
+ * @example To add a rule that allows outbound traffic to a specific address range
43
+ * ```javascript
44
+ * // This example adds a rule that grants access to the specified address ranges on TCP port 80.
45
+ * const input = {
46
+ * "GroupId": "sg-1a2b3c4d",
47
+ * "IpPermissions": [
48
+ * {
49
+ * "FromPort": 80,
50
+ * "IpProtocol": "tcp",
51
+ * "IpRanges": [
52
+ * {
53
+ * "CidrIp": "10.0.0.0/16"
54
+ * }
55
+ * ],
56
+ * "ToPort": 80
57
+ * }
58
+ * ]
59
+ * };
60
+ * const command = new AuthorizeSecurityGroupEgressCommand(input);
61
+ * await client.send(command);
62
+ * // example id: to-add-a-rule-that-allows-outbound-traffic-to-a-specific-address-range-1528929309636
63
+ * ```
64
+ *
65
+ * @example To add a rule that allows outbound traffic to a specific security group
66
+ * ```javascript
67
+ * // This example adds a rule that grants access to the specified security group on TCP port 80.
68
+ * const input = {
69
+ * "GroupId": "sg-1a2b3c4d",
70
+ * "IpPermissions": [
71
+ * {
72
+ * "FromPort": 80,
73
+ * "IpProtocol": "tcp",
74
+ * "ToPort": 80,
75
+ * "UserIdGroupPairs": [
76
+ * {
77
+ * "GroupId": "sg-4b51a32f"
78
+ * }
79
+ * ]
80
+ * }
81
+ * ]
82
+ * };
83
+ * const command = new AuthorizeSecurityGroupEgressCommand(input);
84
+ * await client.send(command);
85
+ * // example id: to-add-a-rule-that-allows-outbound-traffic-to-a-specific-security-group-1528929760260
86
+ * ```
87
+ *
42
88
  */
43
89
  export declare class AuthorizeSecurityGroupEgressCommand extends $Command<AuthorizeSecurityGroupEgressCommandInput, AuthorizeSecurityGroupEgressCommandOutput, EC2ClientResolvedConfig> {
44
90
  readonly input: AuthorizeSecurityGroupEgressCommandInput;
@@ -43,6 +43,78 @@ export interface AuthorizeSecurityGroupIngressCommandOutput extends AuthorizeSec
43
43
  * @see {@link AuthorizeSecurityGroupIngressCommandOutput} for command's `response` shape.
44
44
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
45
45
  *
46
+ * @example To add a rule that allows inbound SSH traffic from an IPv4 address range
47
+ * ```javascript
48
+ * // This example enables inbound traffic on TCP port 22 (SSH). The rule includes a description to help you identify it later.
49
+ * const input = {
50
+ * "GroupId": "sg-903004f8",
51
+ * "IpPermissions": [
52
+ * {
53
+ * "FromPort": 22,
54
+ * "IpProtocol": "tcp",
55
+ * "IpRanges": [
56
+ * {
57
+ * "CidrIp": "203.0.113.0/24",
58
+ * "Description": "SSH access from the LA office"
59
+ * }
60
+ * ],
61
+ * "ToPort": 22
62
+ * }
63
+ * ]
64
+ * };
65
+ * const command = new AuthorizeSecurityGroupIngressCommand(input);
66
+ * await client.send(command);
67
+ * // example id: to-add-a-rule-that-allows-inbound-ssh-traffic-1529011610328
68
+ * ```
69
+ *
70
+ * @example To add a rule that allows inbound HTTP traffic from another security group
71
+ * ```javascript
72
+ * // This example enables inbound traffic on TCP port 80 from the specified security group. The group must be in the same VPC or a peer VPC. Incoming traffic is allowed based on the private IP addresses of instances that are associated with the specified security group.
73
+ * const input = {
74
+ * "GroupId": "sg-111aaa22",
75
+ * "IpPermissions": [
76
+ * {
77
+ * "FromPort": 80,
78
+ * "IpProtocol": "tcp",
79
+ * "ToPort": 80,
80
+ * "UserIdGroupPairs": [
81
+ * {
82
+ * "Description": "HTTP access from other instances",
83
+ * "GroupId": "sg-1a2b3c4d"
84
+ * }
85
+ * ]
86
+ * }
87
+ * ]
88
+ * };
89
+ * const command = new AuthorizeSecurityGroupIngressCommand(input);
90
+ * await client.send(command);
91
+ * // example id: to-add-a-rule-that-allows-inbound-http-traffic-from-another-security-group-1529012163168
92
+ * ```
93
+ *
94
+ * @example To add a rule that allows inbound RDP traffic from an IPv6 address range
95
+ * ```javascript
96
+ * // This example adds an inbound rule that allows RDP traffic from the specified IPv6 address range. The rule includes a description to help you identify it later.
97
+ * const input = {
98
+ * "GroupId": "sg-123abc12 ",
99
+ * "IpPermissions": [
100
+ * {
101
+ * "FromPort": 3389,
102
+ * "IpProtocol": "tcp",
103
+ * "Ipv6Ranges": [
104
+ * {
105
+ * "CidrIpv6": "2001:db8:1234:1a00::/64",
106
+ * "Description": "RDP access from the NY office"
107
+ * }
108
+ * ],
109
+ * "ToPort": 3389
110
+ * }
111
+ * ]
112
+ * };
113
+ * const command = new AuthorizeSecurityGroupIngressCommand(input);
114
+ * await client.send(command);
115
+ * // example id: to-add-a-rule-with-a-description-1529012418116
116
+ * ```
117
+ *
46
118
  */
47
119
  export declare class AuthorizeSecurityGroupIngressCommand extends $Command<AuthorizeSecurityGroupIngressCommandInput, AuthorizeSecurityGroupIngressCommandOutput, EC2ClientResolvedConfig> {
48
120
  readonly input: AuthorizeSecurityGroupIngressCommandInput;
@@ -35,6 +35,56 @@ export interface CancelSpotFleetRequestsCommandOutput extends CancelSpotFleetReq
35
35
  * @see {@link CancelSpotFleetRequestsCommandOutput} for command's `response` shape.
36
36
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
37
37
  *
38
+ * @example To cancel a Spot fleet request
39
+ * ```javascript
40
+ * // This example cancels the specified Spot fleet request and terminates its associated Spot Instances.
41
+ * const input = {
42
+ * "SpotFleetRequestIds": [
43
+ * "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
44
+ * ],
45
+ * "TerminateInstances": true
46
+ * };
47
+ * const command = new CancelSpotFleetRequestsCommand(input);
48
+ * const response = await client.send(command);
49
+ * /* response ==
50
+ * {
51
+ * "SuccessfulFleetRequests": [
52
+ * {
53
+ * "CurrentSpotFleetRequestState": "cancelled_running",
54
+ * "PreviousSpotFleetRequestState": "active",
55
+ * "SpotFleetRequestId": "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
56
+ * }
57
+ * ]
58
+ * }
59
+ * *\/
60
+ * // example id: ec2-cancel-spot-fleet-requests-1
61
+ * ```
62
+ *
63
+ * @example To cancel a Spot fleet request without terminating its Spot Instances
64
+ * ```javascript
65
+ * // This example cancels the specified Spot fleet request without terminating its associated Spot Instances.
66
+ * const input = {
67
+ * "SpotFleetRequestIds": [
68
+ * "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
69
+ * ],
70
+ * "TerminateInstances": false
71
+ * };
72
+ * const command = new CancelSpotFleetRequestsCommand(input);
73
+ * const response = await client.send(command);
74
+ * /* response ==
75
+ * {
76
+ * "SuccessfulFleetRequests": [
77
+ * {
78
+ * "CurrentSpotFleetRequestState": "cancelled_terminating",
79
+ * "PreviousSpotFleetRequestState": "active",
80
+ * "SpotFleetRequestId": "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
81
+ * }
82
+ * ]
83
+ * }
84
+ * *\/
85
+ * // example id: ec2-cancel-spot-fleet-requests-2
86
+ * ```
87
+ *
38
88
  */
39
89
  export declare class CancelSpotFleetRequestsCommand extends $Command<CancelSpotFleetRequestsCommandInput, CancelSpotFleetRequestsCommandOutput, EC2ClientResolvedConfig> {
40
90
  readonly input: CancelSpotFleetRequestsCommandInput;
@@ -33,6 +33,29 @@ export interface CancelSpotInstanceRequestsCommandOutput extends CancelSpotInsta
33
33
  * @see {@link CancelSpotInstanceRequestsCommandOutput} for command's `response` shape.
34
34
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
35
35
  *
36
+ * @example To cancel Spot Instance requests
37
+ * ```javascript
38
+ * // This example cancels a Spot Instance request.
39
+ * const input = {
40
+ * "SpotInstanceRequestIds": [
41
+ * "sir-08b93456"
42
+ * ]
43
+ * };
44
+ * const command = new CancelSpotInstanceRequestsCommand(input);
45
+ * const response = await client.send(command);
46
+ * /* response ==
47
+ * {
48
+ * "CancelledSpotInstanceRequests": [
49
+ * {
50
+ * "SpotInstanceRequestId": "sir-08b93456",
51
+ * "State": "cancelled"
52
+ * }
53
+ * ]
54
+ * }
55
+ * *\/
56
+ * // example id: ec2-cancel-spot-instance-requests-1
57
+ * ```
58
+ *
36
59
  */
37
60
  export declare class CancelSpotInstanceRequestsCommand extends $Command<CancelSpotInstanceRequestsCommandInput, CancelSpotInstanceRequestsCommandOutput, EC2ClientResolvedConfig> {
38
61
  readonly input: CancelSpotInstanceRequestsCommandInput;
@@ -31,6 +31,23 @@ export interface ConfirmProductInstanceCommandOutput extends ConfirmProductInsta
31
31
  * @see {@link ConfirmProductInstanceCommandOutput} for command's `response` shape.
32
32
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
33
33
  *
34
+ * @example To confirm the product instance
35
+ * ```javascript
36
+ * // This example determines whether the specified product code is associated with the specified instance.
37
+ * const input = {
38
+ * "InstanceId": "i-1234567890abcdef0",
39
+ * "ProductCode": "774F4FF8"
40
+ * };
41
+ * const command = new ConfirmProductInstanceCommand(input);
42
+ * const response = await client.send(command);
43
+ * /* response ==
44
+ * {
45
+ * "OwnerId": "123456789012"
46
+ * }
47
+ * *\/
48
+ * // example id: to-confirm-the-product-instance-1472712108494
49
+ * ```
50
+ *
34
51
  */
35
52
  export declare class ConfirmProductInstanceCommand extends $Command<ConfirmProductInstanceCommandInput, ConfirmProductInstanceCommandOutput, EC2ClientResolvedConfig> {
36
53
  readonly input: ConfirmProductInstanceCommandInput;
@@ -47,6 +47,25 @@ export interface CopyImageCommandOutput extends CopyImageResult, __MetadataBeare
47
47
  * @see {@link CopyImageCommandOutput} for command's `response` shape.
48
48
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
49
49
  *
50
+ * @example To copy an AMI to another region
51
+ * ```javascript
52
+ * // This example copies the specified AMI from the us-east-1 region to the current region.
53
+ * const input = {
54
+ * "Description": "",
55
+ * "Name": "My server",
56
+ * "SourceImageId": "ami-5731123e",
57
+ * "SourceRegion": "us-east-1"
58
+ * };
59
+ * const command = new CopyImageCommand(input);
60
+ * const response = await client.send(command);
61
+ * /* response ==
62
+ * {
63
+ * "ImageId": "ami-438bea42"
64
+ * }
65
+ * *\/
66
+ * // example id: to-copy-an-ami-to-another-region-1529022820832
67
+ * ```
68
+ *
50
69
  */
51
70
  export declare class CopyImageCommand extends $Command<CopyImageCommandInput, CopyImageCommandOutput, EC2ClientResolvedConfig> {
52
71
  readonly input: CopyImageCommandInput;
@@ -48,6 +48,25 @@ export interface CopySnapshotCommandOutput extends CopySnapshotResult, __Metadat
48
48
  * @see {@link CopySnapshotCommandOutput} for command's `response` shape.
49
49
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
50
50
  *
51
+ * @example To copy a snapshot
52
+ * ```javascript
53
+ * // 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.
54
+ * const input = {
55
+ * "Description": "This is my copied snapshot.",
56
+ * "DestinationRegion": "us-east-1",
57
+ * "SourceRegion": "us-west-2",
58
+ * "SourceSnapshotId": "snap-066877671789bd71b"
59
+ * };
60
+ * const command = new CopySnapshotCommand(input);
61
+ * const response = await client.send(command);
62
+ * /* response ==
63
+ * {
64
+ * "SnapshotId": "snap-066877671789bd71b"
65
+ * }
66
+ * *\/
67
+ * // example id: to-copy-a-snapshot-1472502259774
68
+ * ```
69
+ *
51
70
  */
52
71
  export declare class CopySnapshotCommand extends $Command<CopySnapshotCommandInput, CopySnapshotCommandOutput, EC2ClientResolvedConfig> {
53
72
  readonly input: CopySnapshotCommandInput;
@@ -42,6 +42,30 @@ export interface CreateCustomerGatewayCommandOutput extends CreateCustomerGatewa
42
42
  * @see {@link CreateCustomerGatewayCommandOutput} for command's `response` shape.
43
43
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
44
44
  *
45
+ * @example To create a customer gateway
46
+ * ```javascript
47
+ * // This example creates a customer gateway with the specified IP address for its outside interface.
48
+ * const input = {
49
+ * "BgpAsn": 65534,
50
+ * "PublicIp": "12.1.2.3",
51
+ * "Type": "ipsec.1"
52
+ * };
53
+ * const command = new CreateCustomerGatewayCommand(input);
54
+ * const response = await client.send(command);
55
+ * /* response ==
56
+ * {
57
+ * "CustomerGateway": {
58
+ * "BgpAsn": "65534",
59
+ * "CustomerGatewayId": "cgw-0e11f167",
60
+ * "IpAddress": "12.1.2.3",
61
+ * "State": "available",
62
+ * "Type": "ipsec.1"
63
+ * }
64
+ * }
65
+ * *\/
66
+ * // example id: ec2-create-customer-gateway-1
67
+ * ```
68
+ *
45
69
  */
46
70
  export declare class CreateCustomerGatewayCommand extends $Command<CreateCustomerGatewayCommandInput, CreateCustomerGatewayCommandOutput, EC2ClientResolvedConfig> {
47
71
  readonly input: CreateCustomerGatewayCommandInput;
@@ -80,6 +80,45 @@ export interface CreateDhcpOptionsCommandOutput extends CreateDhcpOptionsResult,
80
80
  * @see {@link CreateDhcpOptionsCommandOutput} for command's `response` shape.
81
81
  * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
82
82
  *
83
+ * @example To create a DHCP options set
84
+ * ```javascript
85
+ * // This example creates a DHCP options set.
86
+ * const input = {
87
+ * "DhcpConfigurations": [
88
+ * {
89
+ * "Key": "domain-name-servers",
90
+ * "Values": [
91
+ * "10.2.5.1",
92
+ * "10.2.5.2"
93
+ * ]
94
+ * }
95
+ * ]
96
+ * };
97
+ * const command = new CreateDhcpOptionsCommand(input);
98
+ * const response = await client.send(command);
99
+ * /* response ==
100
+ * {
101
+ * "DhcpOptions": {
102
+ * "DhcpConfigurations": [
103
+ * {
104
+ * "Key": "domain-name-servers",
105
+ * "Values": [
106
+ * {
107
+ * "Value": "10.2.5.2"
108
+ * },
109
+ * {
110
+ * "Value": "10.2.5.1"
111
+ * }
112
+ * ]
113
+ * }
114
+ * ],
115
+ * "DhcpOptionsId": "dopt-d9070ebb"
116
+ * }
117
+ * }
118
+ * *\/
119
+ * // example id: ec2-create-dhcp-options-1
120
+ * ```
121
+ *
83
122
  */
84
123
  export declare class CreateDhcpOptionsCommand extends $Command<CreateDhcpOptionsCommandInput, CreateDhcpOptionsCommandOutput, EC2ClientResolvedConfig> {
85
124
  readonly input: CreateDhcpOptionsCommandInput;