Skip to content

Commit

Permalink
feat(client-ec2): Adds support for targeting Dedicated Host allocatio…
Browse files Browse the repository at this point in the history
…ns by assetIds in AWS Outposts
  • Loading branch information
awstools committed Jun 20, 2023
1 parent 832ca5b commit fa71f14
Show file tree
Hide file tree
Showing 33 changed files with 412 additions and 2,491 deletions.
27 changes: 6 additions & 21 deletions clients/client-ec2/src/commands/AllocateAddressCommand.ts
Expand Up @@ -97,39 +97,24 @@ export interface AllocateAddressCommandOutput extends AllocateAddressResult, __M
* @throws {@link EC2ServiceException}
* <p>Base exception class for all service exceptions from EC2 service.</p>
*
* @example To allocate an Elastic IP address for EC2-VPC
* @example To allocate an Elastic IP address
* ```javascript
* // This example allocates an Elastic IP address to use with an instance in a VPC.
* const input = {
* "Domain": "vpc"
* };
* // This example allocates an Elastic IP address.
* const input = undefined;
* const command = new AllocateAddressCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "AllocationId": "eipalloc-64d5890a",
* "Domain": "vpc",
* "PublicIp": "203.0.113.0"
* "NetworkBorderGroup": "us-east-1",
* "PublicIp": "203.0.113.0",
* "PublicIpv4Pool": "amazon"
* }
* *\/
* // example id: ec2-allocate-address-1
* ```
*
* @example To allocate an Elastic IP address for EC2-Classic
* ```javascript
* // This example allocates an Elastic IP address to use with an instance in EC2-Classic.
* const input = undefined;
* const command = new AllocateAddressCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "Domain": "standard",
* "PublicIp": "198.51.100.0"
* }
* *\/
* // example id: ec2-allocate-address-2
* ```
*
*/
export class AllocateAddressCommand extends $Command<
AllocateAddressCommandInput,
Expand Down
5 changes: 4 additions & 1 deletion clients/client-ec2/src/commands/AllocateHostsCommand.ts
Expand Up @@ -51,7 +51,7 @@ export interface AllocateHostsCommandOutput extends AllocateHostsResult, __Metad
* ClientToken: "STRING_VALUE",
* InstanceType: "STRING_VALUE",
* InstanceFamily: "STRING_VALUE",
* Quantity: Number("int"), // required
* Quantity: Number("int"),
* TagSpecifications: [ // TagSpecificationList
* { // TagSpecification
* ResourceType: "capacity-reservation" || "client-vpn-endpoint" || "customer-gateway" || "carrier-gateway" || "coip-pool" || "dedicated-host" || "dhcp-options" || "egress-only-internet-gateway" || "elastic-ip" || "elastic-gpu" || "export-image-task" || "export-instance-task" || "fleet" || "fpga-image" || "host-reservation" || "image" || "import-image-task" || "import-snapshot-task" || "instance" || "instance-event-window" || "internet-gateway" || "ipam" || "ipam-pool" || "ipam-scope" || "ipv4pool-ec2" || "ipv6pool-ec2" || "key-pair" || "launch-template" || "local-gateway" || "local-gateway-route-table" || "local-gateway-virtual-interface" || "local-gateway-virtual-interface-group" || "local-gateway-route-table-vpc-association" || "local-gateway-route-table-virtual-interface-group-association" || "natgateway" || "network-acl" || "network-interface" || "network-insights-analysis" || "network-insights-path" || "network-insights-access-scope" || "network-insights-access-scope-analysis" || "placement-group" || "prefix-list" || "replace-root-volume-task" || "reserved-instances" || "route-table" || "security-group" || "security-group-rule" || "snapshot" || "spot-fleet-request" || "spot-instances-request" || "subnet" || "subnet-cidr-reservation" || "traffic-mirror-filter" || "traffic-mirror-session" || "traffic-mirror-target" || "transit-gateway" || "transit-gateway-attachment" || "transit-gateway-connect-peer" || "transit-gateway-multicast-domain" || "transit-gateway-policy-table" || "transit-gateway-route-table" || "transit-gateway-route-table-announcement" || "volume" || "vpc" || "vpc-endpoint" || "vpc-endpoint-connection" || "vpc-endpoint-service" || "vpc-endpoint-service-permission" || "vpc-peering-connection" || "vpn-connection" || "vpn-gateway" || "vpc-flow-log" || "capacity-reservation-fleet" || "traffic-mirror-filter-rule" || "vpc-endpoint-connection-device-type" || "verified-access-instance" || "verified-access-group" || "verified-access-endpoint" || "verified-access-policy" || "verified-access-trust-provider" || "vpn-connection-device-type" || "vpc-block-public-access-exclusion" || "ipam-resource-discovery" || "ipam-resource-discovery-association" || "instance-connect-endpoint",
Expand All @@ -66,6 +66,9 @@ export interface AllocateHostsCommandOutput extends AllocateHostsResult, __Metad
* HostRecovery: "on" || "off",
* OutpostArn: "STRING_VALUE",
* HostMaintenance: "on" || "off",
* AssetIds: [ // AssetIdList
* "STRING_VALUE",
* ],
* };
* const command = new AllocateHostsCommand(input);
* const response = await client.send(command);
Expand Down
16 changes: 2 additions & 14 deletions clients/client-ec2/src/commands/AssociateAddressCommand.ts
Expand Up @@ -86,9 +86,9 @@ export interface AssociateAddressCommandOutput extends AssociateAddressResult, _
* @throws {@link EC2ServiceException}
* <p>Base exception class for all service exceptions from EC2 service.</p>
*
* @example To associate an Elastic IP address in EC2-VPC
* @example To associate an Elastic IP address
* ```javascript
* // This example associates the specified Elastic IP address with the specified instance in a VPC.
* // This example associates the specified Elastic IP address with the specified instance.
* const input = {
* "AllocationId": "eipalloc-64d5890a",
* "InstanceId": "i-0b263919b6498b123"
Expand Down Expand Up @@ -120,18 +120,6 @@ export interface AssociateAddressCommandOutput extends AssociateAddressResult, _
* // example id: ec2-associate-address-2
* ```
*
* @example To associate an Elastic IP address in EC2-Classic
* ```javascript
* // This example associates an Elastic IP address with an instance in EC2-Classic.
* const input = {
* "InstanceId": "i-07ffe74c7330ebf53",
* "PublicIp": "198.51.100.0"
* };
* const command = new AssociateAddressCommand(input);
* await client.send(command);
* // example id: ec2-associate-address-3
* ```
*
*/
export class AssociateAddressCommand extends $Command<
AssociateAddressCommandInput,
Expand Down
7 changes: 4 additions & 3 deletions clients/client-ec2/src/commands/CreateFleetCommand.ts
Expand Up @@ -36,9 +36,10 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB

/**
* @public
* <p>Launches an EC2 Fleet.</p>
* <p>You can create a single EC2 Fleet that includes multiple launch specifications that vary by
* instance type, AMI, Availability Zone, or subnet.</p>
* <p>Creates an EC2 Fleet that contains the configuration information for On-Demand Instances and Spot Instances.
* Instances are launched immediately if there is available capacity.</p>
* <p>A single EC2 Fleet can include multiple launch specifications that vary by instance type,
* AMI, Availability Zone, or subnet.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html">EC2 Fleet</a> in the <i>Amazon EC2 User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
11 changes: 8 additions & 3 deletions clients/client-ec2/src/commands/CreateVpnConnectionCommand.ts
Expand Up @@ -14,7 +14,12 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@s
import { SerdeContext as __SerdeContext } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { CreateVpnConnectionRequest, CreateVpnConnectionResult } from "../models/models_2";
import {
CreateVpnConnectionRequest,
CreateVpnConnectionRequestFilterSensitiveLog,
CreateVpnConnectionResult,
CreateVpnConnectionResultFilterSensitiveLog,
} from "../models/models_2";
import { de_CreateVpnConnectionCommand, se_CreateVpnConnectionCommand } from "../protocols/Aws_ec2";

/**
Expand Down Expand Up @@ -317,8 +322,8 @@ export class CreateVpnConnectionCommand extends $Command<
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
inputFilterSensitiveLog: CreateVpnConnectionRequestFilterSensitiveLog,
outputFilterSensitiveLog: CreateVpnConnectionResultFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
Expand Down
63 changes: 0 additions & 63 deletions clients/client-ec2/src/commands/DescribeAddressesCommand.ts
Expand Up @@ -129,69 +129,6 @@ export interface DescribeAddressesCommandOutput extends DescribeAddressesResult,
* // example id: ec2-describe-addresses-1
* ```
*
* @example To describe your Elastic IP addresses for EC2-VPC
* ```javascript
* // This example describes your Elastic IP addresses for use with instances in a VPC.
* const input = {
* "Filters": [
* {
* "Name": "domain",
* "Values": [
* "vpc"
* ]
* }
* ]
* };
* const command = new DescribeAddressesCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "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 id: ec2-describe-addresses-2
* ```
*
* @example To describe your Elastic IP addresses for EC2-Classic
* ```javascript
* // This example describes your Elastic IP addresses for use with instances in EC2-Classic.
* const input = {
* "Filters": [
* {
* "Name": "domain",
* "Values": [
* "standard"
* ]
* }
* ]
* };
* const command = new DescribeAddressesCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "Addresses": [
* {
* "Domain": "standard",
* "InstanceId": "i-1234567890abcdef0",
* "PublicIp": "198.51.100.0"
* }
* ]
* }
* *\/
* // example id: ec2-describe-addresses-3
* ```
*
*/
export class DescribeAddressesCommand extends $Command<
DescribeAddressesCommandInput,
Expand Down
1 change: 1 addition & 0 deletions clients/client-ec2/src/commands/DescribeHostsCommand.ts
Expand Up @@ -111,6 +111,7 @@ export interface DescribeHostsCommandOutput extends DescribeHostsResult, __Metad
* // MemberOfServiceLinkedResourceGroup: true || false,
* // OutpostArn: "STRING_VALUE",
* // HostMaintenance: "on" || "off",
* // AssetId: "STRING_VALUE",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Expand Up @@ -115,7 +115,7 @@ export interface DescribeInternetGatewaysCommandOutput extends DescribeInternetG
* {
* "Attachments": [
* {
* "State": "available",
* "State": "attached",
* "VpcId": "vpc-a01106c2"
* }
* ],
Expand Down
Expand Up @@ -96,7 +96,7 @@ export interface DescribeMovingAddressesCommandOutput extends DescribeMovingAddr
* {
* "MovingAddressStatuses": [
* {
* "MoveStatus": "MovingToVpc",
* "MoveStatus": "movingToVpc",
* "PublicIp": "198.51.100.0"
* }
* ]
Expand Down
Expand Up @@ -125,55 +125,6 @@ export interface DescribeScheduledInstanceAvailabilityCommandOutput
* @throws {@link EC2ServiceException}
* <p>Base exception class for all service exceptions from EC2 service.</p>
*
* @example To describe an available schedule
* ```javascript
* // 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.
* const input = {
* "FirstSlotStartTimeRange": {
* "EarliestTime": "2016-01-31T00:00:00Z",
* "LatestTime": "2016-01-31T04:00:00Z"
* },
* "Recurrence": {
* "Frequency": "Weekly",
* "Interval": 1,
* "OccurrenceDays": [
* 1
* ]
* }
* };
* const command = new DescribeScheduledInstanceAvailabilityCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "ScheduledInstanceAvailabilitySet": [
* {
* "AvailabilityZone": "us-west-2b",
* "AvailableInstanceCount": 20,
* "FirstSlotStartTime": "2016-01-31T00:00:00Z",
* "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": false
* },
* "SlotDurationInHours": 23,
* "TotalScheduledInstanceHours": 1219
* }
* ]
* }
* *\/
* // example id: ec2-describe-scheduled-instance-availability-1
* ```
*
*/
export class DescribeScheduledInstanceAvailabilityCommand extends $Command<
DescribeScheduledInstanceAvailabilityCommandInput,
Expand Down
Expand Up @@ -107,49 +107,6 @@ export interface DescribeScheduledInstancesCommandOutput extends DescribeSchedul
* @throws {@link EC2ServiceException}
* <p>Base exception class for all service exceptions from EC2 service.</p>
*
* @example To describe your Scheduled Instances
* ```javascript
* // This example describes the specified Scheduled Instance.
* const input = {
* "ScheduledInstanceIds": [
* "sci-1234-1234-1234-1234-123456789012"
* ]
* };
* const command = new DescribeScheduledInstancesCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "ScheduledInstanceSet": [
* {
* "AvailabilityZone": "us-west-2b",
* "CreateDate": "2016-01-25T21:43:38.612Z",
* "HourlyPrice": "0.095",
* "InstanceCount": 1,
* "InstanceType": "c4.large",
* "NetworkPlatform": "EC2-VPC",
* "NextSlotStartTime": "2016-01-31T09:00:00Z",
* "Platform": "Linux/UNIX",
* "Recurrence": {
* "Frequency": "Weekly",
* "Interval": 1,
* "OccurrenceDaySet": [
* 1
* ],
* "OccurrenceRelativeToEnd": false,
* "OccurrenceUnit": ""
* },
* "ScheduledInstanceId": "sci-1234-1234-1234-1234-123456789012",
* "SlotDurationInHours": 32,
* "TermEndDate": "2017-01-31T09:00:00Z",
* "TermStartDate": "2016-01-31T09:00:00Z",
* "TotalScheduledInstanceHours": 1696
* }
* ]
* }
* *\/
* // example id: ec2-describe-scheduled-instances-1
* ```
*
*/
export class DescribeScheduledInstancesCommand extends $Command<
DescribeScheduledInstancesCommandInput,
Expand Down
Expand Up @@ -99,14 +99,14 @@ export interface DescribeSpotPriceHistoryCommandOutput extends DescribeSpotPrice
* ```javascript
* // This example returns the Spot Price history for m1.xlarge, Linux/UNIX (Amazon VPC) instances for a particular day in January.
* const input = {
* "EndTime": "2014-01-06T08:09:10",
* "EndTime": "2014-01-06T08:09:10.05Z",
* "InstanceTypes": [
* "m1.xlarge"
* ],
* "ProductDescriptions": [
* "Linux/UNIX (Amazon VPC)"
* ],
* "StartTime": "2014-01-06T07:08:09"
* "StartTime": "2014-01-06T07:08:09.05Z"
* };
* const command = new DescribeSpotPriceHistoryCommand(input);
* const response = await client.send(command);
Expand Down
Expand Up @@ -14,7 +14,11 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@s
import { SerdeContext as __SerdeContext } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { DescribeVpnConnectionsRequest, DescribeVpnConnectionsResult } from "../models/models_5";
import {
DescribeVpnConnectionsRequest,
DescribeVpnConnectionsResult,
DescribeVpnConnectionsResultFilterSensitiveLog,
} from "../models/models_5";
import { de_DescribeVpnConnectionsCommand, se_DescribeVpnConnectionsCommand } from "../protocols/Aws_ec2";

/**
Expand Down Expand Up @@ -233,7 +237,7 @@ export class DescribeVpnConnectionsCommand extends $Command<
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: DescribeVpnConnectionsResultFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
Expand Down

0 comments on commit fa71f14

Please sign in to comment.