Skip to content

Commit

Permalink
feat(client-ec2): This release adds new functionality that allows cus…
Browse files Browse the repository at this point in the history
…tomers to provision IPv6 CIDR blocks through Amazon VPC IP Address Manager (IPAM) as well as allowing customers to utilize IPAM Resource Discovery APIs.
  • Loading branch information
awstools committed Jan 25, 2023
1 parent bf7623f commit 8973fbd
Show file tree
Hide file tree
Showing 68 changed files with 18,546 additions and 12,807 deletions.
343 changes: 339 additions & 4 deletions clients/client-ec2/src/EC2.ts

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions clients/client-ec2/src/EC2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ import {
AssociateInstanceEventWindowCommandInput,
AssociateInstanceEventWindowCommandOutput,
} from "./commands/AssociateInstanceEventWindowCommand";
import {
AssociateIpamResourceDiscoveryCommandInput,
AssociateIpamResourceDiscoveryCommandOutput,
} from "./commands/AssociateIpamResourceDiscoveryCommand";
import {
AssociateRouteTableCommandInput,
AssociateRouteTableCommandOutput,
Expand Down Expand Up @@ -268,6 +272,10 @@ import {
} from "./commands/CreateInternetGatewayCommand";
import { CreateIpamCommandInput, CreateIpamCommandOutput } from "./commands/CreateIpamCommand";
import { CreateIpamPoolCommandInput, CreateIpamPoolCommandOutput } from "./commands/CreateIpamPoolCommand";
import {
CreateIpamResourceDiscoveryCommandInput,
CreateIpamResourceDiscoveryCommandOutput,
} from "./commands/CreateIpamResourceDiscoveryCommand";
import { CreateIpamScopeCommandInput, CreateIpamScopeCommandOutput } from "./commands/CreateIpamScopeCommand";
import { CreateKeyPairCommandInput, CreateKeyPairCommandOutput } from "./commands/CreateKeyPairCommand";
import {
Expand Down Expand Up @@ -498,6 +506,10 @@ import {
} from "./commands/DeleteInternetGatewayCommand";
import { DeleteIpamCommandInput, DeleteIpamCommandOutput } from "./commands/DeleteIpamCommand";
import { DeleteIpamPoolCommandInput, DeleteIpamPoolCommandOutput } from "./commands/DeleteIpamPoolCommand";
import {
DeleteIpamResourceDiscoveryCommandInput,
DeleteIpamResourceDiscoveryCommandOutput,
} from "./commands/DeleteIpamResourceDiscoveryCommand";
import { DeleteIpamScopeCommandInput, DeleteIpamScopeCommandOutput } from "./commands/DeleteIpamScopeCommand";
import { DeleteKeyPairCommandInput, DeleteKeyPairCommandOutput } from "./commands/DeleteKeyPairCommand";
import {
Expand Down Expand Up @@ -895,6 +907,14 @@ import {
DescribeInternetGatewaysCommandOutput,
} from "./commands/DescribeInternetGatewaysCommand";
import { DescribeIpamPoolsCommandInput, DescribeIpamPoolsCommandOutput } from "./commands/DescribeIpamPoolsCommand";
import {
DescribeIpamResourceDiscoveriesCommandInput,
DescribeIpamResourceDiscoveriesCommandOutput,
} from "./commands/DescribeIpamResourceDiscoveriesCommand";
import {
DescribeIpamResourceDiscoveryAssociationsCommandInput,
DescribeIpamResourceDiscoveryAssociationsCommandOutput,
} from "./commands/DescribeIpamResourceDiscoveryAssociationsCommand";
import { DescribeIpamsCommandInput, DescribeIpamsCommandOutput } from "./commands/DescribeIpamsCommand";
import { DescribeIpamScopesCommandInput, DescribeIpamScopesCommandOutput } from "./commands/DescribeIpamScopesCommand";
import { DescribeIpv6PoolsCommandInput, DescribeIpv6PoolsCommandOutput } from "./commands/DescribeIpv6PoolsCommand";
Expand Down Expand Up @@ -1300,6 +1320,10 @@ import {
DisassociateInstanceEventWindowCommandInput,
DisassociateInstanceEventWindowCommandOutput,
} from "./commands/DisassociateInstanceEventWindowCommand";
import {
DisassociateIpamResourceDiscoveryCommandInput,
DisassociateIpamResourceDiscoveryCommandOutput,
} from "./commands/DisassociateIpamResourceDiscoveryCommand";
import {
DisassociateRouteTableCommandInput,
DisassociateRouteTableCommandOutput,
Expand Down Expand Up @@ -1449,6 +1473,14 @@ import {
GetIpamAddressHistoryCommandInput,
GetIpamAddressHistoryCommandOutput,
} from "./commands/GetIpamAddressHistoryCommand";
import {
GetIpamDiscoveredAccountsCommandInput,
GetIpamDiscoveredAccountsCommandOutput,
} from "./commands/GetIpamDiscoveredAccountsCommand";
import {
GetIpamDiscoveredResourceCidrsCommandInput,
GetIpamDiscoveredResourceCidrsCommandOutput,
} from "./commands/GetIpamDiscoveredResourceCidrsCommand";
import {
GetIpamPoolAllocationsCommandInput,
GetIpamPoolAllocationsCommandOutput,
Expand Down Expand Up @@ -1637,6 +1669,10 @@ import {
ModifyIpamResourceCidrCommandInput,
ModifyIpamResourceCidrCommandOutput,
} from "./commands/ModifyIpamResourceCidrCommand";
import {
ModifyIpamResourceDiscoveryCommandInput,
ModifyIpamResourceDiscoveryCommandOutput,
} from "./commands/ModifyIpamResourceDiscoveryCommand";
import { ModifyIpamScopeCommandInput, ModifyIpamScopeCommandOutput } from "./commands/ModifyIpamScopeCommand";
import {
ModifyLaunchTemplateCommandInput,
Expand Down Expand Up @@ -2019,6 +2055,7 @@ export type ServiceInputTypes =
| AssociateEnclaveCertificateIamRoleCommandInput
| AssociateIamInstanceProfileCommandInput
| AssociateInstanceEventWindowCommandInput
| AssociateIpamResourceDiscoveryCommandInput
| AssociateRouteTableCommandInput
| AssociateSubnetCidrBlockCommandInput
| AssociateTransitGatewayMulticastDomainCommandInput
Expand Down Expand Up @@ -2071,6 +2108,7 @@ export type ServiceInputTypes =
| CreateInternetGatewayCommandInput
| CreateIpamCommandInput
| CreateIpamPoolCommandInput
| CreateIpamResourceDiscoveryCommandInput
| CreateIpamScopeCommandInput
| CreateKeyPairCommandInput
| CreateLaunchTemplateCommandInput
Expand Down Expand Up @@ -2145,6 +2183,7 @@ export type ServiceInputTypes =
| DeleteInternetGatewayCommandInput
| DeleteIpamCommandInput
| DeleteIpamPoolCommandInput
| DeleteIpamResourceDiscoveryCommandInput
| DeleteIpamScopeCommandInput
| DeleteKeyPairCommandInput
| DeleteLaunchTemplateCommandInput
Expand Down Expand Up @@ -2263,6 +2302,8 @@ export type ServiceInputTypes =
| DescribeInstancesCommandInput
| DescribeInternetGatewaysCommandInput
| DescribeIpamPoolsCommandInput
| DescribeIpamResourceDiscoveriesCommandInput
| DescribeIpamResourceDiscoveryAssociationsCommandInput
| DescribeIpamScopesCommandInput
| DescribeIpamsCommandInput
| DescribeIpv6PoolsCommandInput
Expand Down Expand Up @@ -2374,6 +2415,7 @@ export type ServiceInputTypes =
| DisassociateEnclaveCertificateIamRoleCommandInput
| DisassociateIamInstanceProfileCommandInput
| DisassociateInstanceEventWindowCommandInput
| DisassociateIpamResourceDiscoveryCommandInput
| DisassociateRouteTableCommandInput
| DisassociateSubnetCidrBlockCommandInput
| DisassociateTransitGatewayMulticastDomainCommandInput
Expand Down Expand Up @@ -2415,6 +2457,8 @@ export type ServiceInputTypes =
| GetInstanceTypesFromInstanceRequirementsCommandInput
| GetInstanceUefiDataCommandInput
| GetIpamAddressHistoryCommandInput
| GetIpamDiscoveredAccountsCommandInput
| GetIpamDiscoveredResourceCidrsCommandInput
| GetIpamPoolAllocationsCommandInput
| GetIpamPoolCidrsCommandInput
| GetIpamResourceCidrsCommandInput
Expand Down Expand Up @@ -2471,6 +2515,7 @@ export type ServiceInputTypes =
| ModifyIpamCommandInput
| ModifyIpamPoolCommandInput
| ModifyIpamResourceCidrCommandInput
| ModifyIpamResourceDiscoveryCommandInput
| ModifyIpamScopeCommandInput
| ModifyLaunchTemplateCommandInput
| ModifyLocalGatewayRouteCommandInput
Expand Down Expand Up @@ -2597,6 +2642,7 @@ export type ServiceOutputTypes =
| AssociateEnclaveCertificateIamRoleCommandOutput
| AssociateIamInstanceProfileCommandOutput
| AssociateInstanceEventWindowCommandOutput
| AssociateIpamResourceDiscoveryCommandOutput
| AssociateRouteTableCommandOutput
| AssociateSubnetCidrBlockCommandOutput
| AssociateTransitGatewayMulticastDomainCommandOutput
Expand Down Expand Up @@ -2649,6 +2695,7 @@ export type ServiceOutputTypes =
| CreateInternetGatewayCommandOutput
| CreateIpamCommandOutput
| CreateIpamPoolCommandOutput
| CreateIpamResourceDiscoveryCommandOutput
| CreateIpamScopeCommandOutput
| CreateKeyPairCommandOutput
| CreateLaunchTemplateCommandOutput
Expand Down Expand Up @@ -2723,6 +2770,7 @@ export type ServiceOutputTypes =
| DeleteInternetGatewayCommandOutput
| DeleteIpamCommandOutput
| DeleteIpamPoolCommandOutput
| DeleteIpamResourceDiscoveryCommandOutput
| DeleteIpamScopeCommandOutput
| DeleteKeyPairCommandOutput
| DeleteLaunchTemplateCommandOutput
Expand Down Expand Up @@ -2841,6 +2889,8 @@ export type ServiceOutputTypes =
| DescribeInstancesCommandOutput
| DescribeInternetGatewaysCommandOutput
| DescribeIpamPoolsCommandOutput
| DescribeIpamResourceDiscoveriesCommandOutput
| DescribeIpamResourceDiscoveryAssociationsCommandOutput
| DescribeIpamScopesCommandOutput
| DescribeIpamsCommandOutput
| DescribeIpv6PoolsCommandOutput
Expand Down Expand Up @@ -2952,6 +3002,7 @@ export type ServiceOutputTypes =
| DisassociateEnclaveCertificateIamRoleCommandOutput
| DisassociateIamInstanceProfileCommandOutput
| DisassociateInstanceEventWindowCommandOutput
| DisassociateIpamResourceDiscoveryCommandOutput
| DisassociateRouteTableCommandOutput
| DisassociateSubnetCidrBlockCommandOutput
| DisassociateTransitGatewayMulticastDomainCommandOutput
Expand Down Expand Up @@ -2993,6 +3044,8 @@ export type ServiceOutputTypes =
| GetInstanceTypesFromInstanceRequirementsCommandOutput
| GetInstanceUefiDataCommandOutput
| GetIpamAddressHistoryCommandOutput
| GetIpamDiscoveredAccountsCommandOutput
| GetIpamDiscoveredResourceCidrsCommandOutput
| GetIpamPoolAllocationsCommandOutput
| GetIpamPoolCidrsCommandOutput
| GetIpamResourceCidrsCommandOutput
Expand Down Expand Up @@ -3049,6 +3102,7 @@ export type ServiceOutputTypes =
| ModifyIpamCommandOutput
| ModifyIpamPoolCommandOutput
| ModifyIpamResourceCidrCommandOutput
| ModifyIpamResourceDiscoveryCommandOutput
| ModifyIpamScopeCommandOutput
| ModifyLaunchTemplateCommandOutput
| ModifyLocalGatewayRouteCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface AllocateIpamPoolCidrCommandInput extends AllocateIpamPoolCidrRe
export interface AllocateIpamPoolCidrCommandOutput extends AllocateIpamPoolCidrResult, __MetadataBearer {}

/**
* <p>Allocate a CIDR from an IPAM pool. In IPAM, an allocation is a CIDR assignment from an IPAM pool to another resource or IPAM pool. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/allocate-cidrs-ipam.html">Allocate CIDRs</a> in the <i>Amazon VPC IPAM User Guide</i>.
* <p>Allocate a CIDR from an IPAM pool. In IPAM, an allocation is a CIDR assignment from an IPAM pool to another IPAM pool or to a resource. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/allocate-cidrs-ipam.html">Allocate CIDRs</a> in the <i>Amazon VPC IPAM User Guide</i>.
* </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import {
AssociateIpamResourceDiscoveryRequest,
AssociateIpamResourceDiscoveryRequestFilterSensitiveLog,
AssociateIpamResourceDiscoveryResult,
AssociateIpamResourceDiscoveryResultFilterSensitiveLog,
} from "../models/models_0";
import {
deserializeAws_ec2AssociateIpamResourceDiscoveryCommand,
serializeAws_ec2AssociateIpamResourceDiscoveryCommand,
} from "../protocols/Aws_ec2";

export interface AssociateIpamResourceDiscoveryCommandInput extends AssociateIpamResourceDiscoveryRequest {}
export interface AssociateIpamResourceDiscoveryCommandOutput
extends AssociateIpamResourceDiscoveryResult,
__MetadataBearer {}

/**
* <p>Associates an IPAM resource discovery with an Amazon VPC IPAM. A resource discovery is an IPAM component that enables IPAM Service to manage and monitor resources that belong to the owning account.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { EC2Client, AssociateIpamResourceDiscoveryCommand } from "@aws-sdk/client-ec2"; // ES Modules import
* // const { EC2Client, AssociateIpamResourceDiscoveryCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
* const client = new EC2Client(config);
* const command = new AssociateIpamResourceDiscoveryCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link AssociateIpamResourceDiscoveryCommandInput} for command's `input` shape.
* @see {@link AssociateIpamResourceDiscoveryCommandOutput} for command's `response` shape.
* @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
*
*/
export class AssociateIpamResourceDiscoveryCommand extends $Command<
AssociateIpamResourceDiscoveryCommandInput,
AssociateIpamResourceDiscoveryCommandOutput,
EC2ClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

constructor(readonly input: AssociateIpamResourceDiscoveryCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: EC2ClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<AssociateIpamResourceDiscoveryCommandInput, AssociateIpamResourceDiscoveryCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, AssociateIpamResourceDiscoveryCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "EC2Client";
const commandName = "AssociateIpamResourceDiscoveryCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: AssociateIpamResourceDiscoveryRequestFilterSensitiveLog,
outputFilterSensitiveLog: AssociateIpamResourceDiscoveryResultFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(
input: AssociateIpamResourceDiscoveryCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> {
return serializeAws_ec2AssociateIpamResourceDiscoveryCommand(input, context);
}

private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<AssociateIpamResourceDiscoveryCommandOutput> {
return deserializeAws_ec2AssociateIpamResourceDiscoveryCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ import {
} from "@aws-sdk/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import {
CreateClientVpnRouteRequest,
CreateClientVpnRouteRequestFilterSensitiveLog,
CreateClientVpnRouteResult,
CreateClientVpnRouteResultFilterSensitiveLog,
} from "../models/models_0";
import { CreateClientVpnRouteRequest, CreateClientVpnRouteRequestFilterSensitiveLog } from "../models/models_0";
import { CreateClientVpnRouteResult, CreateClientVpnRouteResultFilterSensitiveLog } from "../models/models_1";
import {
deserializeAws_ec2CreateClientVpnRouteCommand,
serializeAws_ec2CreateClientVpnRouteCommand,
Expand Down
8 changes: 6 additions & 2 deletions clients/client-ec2/src/commands/CreateCoipCidrCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ import {
} from "@aws-sdk/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { CreateCoipCidrRequest, CreateCoipCidrRequestFilterSensitiveLog } from "../models/models_0";
import { CreateCoipCidrResult, CreateCoipCidrResultFilterSensitiveLog } from "../models/models_1";
import {
CreateCoipCidrRequest,
CreateCoipCidrRequestFilterSensitiveLog,
CreateCoipCidrResult,
CreateCoipCidrResultFilterSensitiveLog,
} from "../models/models_1";
import { deserializeAws_ec2CreateCoipCidrCommand, serializeAws_ec2CreateCoipCidrCommand } from "../protocols/Aws_ec2";

export interface CreateCoipCidrCommandInput extends CreateCoipCidrRequest {}
Expand Down
Loading

0 comments on commit 8973fbd

Please sign in to comment.