Skip to content

Commit

Permalink
feat(client-ec2): We add Prefix Lists as a new route destination opti…
Browse files Browse the repository at this point in the history
…on for LocalGatewayRoutes. This will allow customers to create routes to Prefix Lists. Prefix List routes will allow customers to group individual CIDR routes with the same target into a single route.
  • Loading branch information
awstools committed Jan 30, 2023
1 parent 1295499 commit 52a9d0c
Show file tree
Hide file tree
Showing 5 changed files with 282 additions and 203 deletions.
17 changes: 16 additions & 1 deletion clients/client-ec2/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6209,7 +6209,7 @@ export interface CreateLocalGatewayRouteRequest {
* <p>The CIDR range used for destination matches. Routing decisions are based on
* the most specific match.</p>
*/
DestinationCidrBlock: string | undefined;
DestinationCidrBlock?: string;

/**
* <p>The ID of the local gateway route table.</p>
Expand All @@ -6232,6 +6232,14 @@ export interface CreateLocalGatewayRouteRequest {
* <p>The ID of the network interface.</p>
*/
NetworkInterfaceId?: string;

/**
* <p>
* The ID of the prefix list. Use a prefix list in place of <code>DestinationCidrBlock</code>. You
* cannot use <code>DestinationPrefixListId</code> and <code>DestinationCidrBlock</code> in the same request.
* </p>
*/
DestinationPrefixListId?: string;
}

export enum LocalGatewayRouteState {
Expand Down Expand Up @@ -6300,6 +6308,13 @@ export interface LocalGatewayRoute {
* <p>The ID of the network interface.</p>
*/
NetworkInterfaceId?: string;

/**
* <p>
* The ID of the prefix list.
* </p>
*/
DestinationPrefixListId?: string;
}

export interface CreateLocalGatewayRouteResult {
Expand Down
12 changes: 10 additions & 2 deletions clients/client-ec2/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export interface InstanceSpecification {
/**
* <p>The instance to specify which volumes should be snapshotted.</p>
*/
InstanceId?: string;
InstanceId: string | undefined;

/**
* <p>Excludes the root volume from being snapshotted.</p>
Expand Down Expand Up @@ -5632,7 +5632,7 @@ export interface DeleteLocalGatewayRouteRequest {
/**
* <p>The CIDR range for the route. This must match the CIDR for the route exactly.</p>
*/
DestinationCidrBlock: string | undefined;
DestinationCidrBlock?: string;

/**
* <p>The ID of the local gateway route table.</p>
Expand All @@ -5645,6 +5645,14 @@ export interface DeleteLocalGatewayRouteRequest {
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
*/
DryRun?: boolean;

/**
* <p>
* Use a prefix list in place of <code>DestinationCidrBlock</code>. You cannot use
* <code>DestinationPrefixListId</code> and <code>DestinationCidrBlock</code> in the same request.
* </p>
*/
DestinationPrefixListId?: string;
}

export interface DeleteLocalGatewayRouteResult {
Expand Down
14 changes: 13 additions & 1 deletion clients/client-ec2/src/models/models_6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@ export interface ModifyLocalGatewayRouteRequest {
/**
* <p>The CIDR block used for destination matches. The value that you provide must match the CIDR of an existing route in the table.</p>
*/
DestinationCidrBlock: string | undefined;
DestinationCidrBlock?: string;

/**
* <p>The ID of the local gateway route table.</p>
Expand All @@ -1586,6 +1586,14 @@ export interface ModifyLocalGatewayRouteRequest {
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
*/
DryRun?: boolean;

/**
* <p>
* The ID of the prefix list. Use a prefix list in place of <code>DestinationCidrBlock</code>. You
* cannot use <code>DestinationPrefixListId</code> and <code>DestinationCidrBlock</code> in the same request.
* </p>
*/
DestinationPrefixListId?: string;
}

export interface ModifyLocalGatewayRouteResult {
Expand Down Expand Up @@ -6789,6 +6797,10 @@ export interface SearchLocalGatewayRoutesRequest {
* <ul>
* <li>
* <p>
* <code>prefix-list-id</code> - The ID of the prefix list.</p>
* </li>
* <li>
* <p>
* <code>route-search.exact-match</code> - The exact match of the specified filter.</p>
* </li>
* <li>
Expand Down
13 changes: 13 additions & 0 deletions clients/client-ec2/src/protocols/Aws_ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36611,6 +36611,9 @@ const serializeAws_ec2CreateLocalGatewayRouteRequest = (
if (input.NetworkInterfaceId != null) {
entries["NetworkInterfaceId"] = input.NetworkInterfaceId;
}
if (input.DestinationPrefixListId != null) {
entries["DestinationPrefixListId"] = input.DestinationPrefixListId;
}
return entries;
};

Expand Down Expand Up @@ -39223,6 +39226,9 @@ const serializeAws_ec2DeleteLocalGatewayRouteRequest = (
if (input.DryRun != null) {
entries["DryRun"] = input.DryRun;
}
if (input.DestinationPrefixListId != null) {
entries["DestinationPrefixListId"] = input.DestinationPrefixListId;
}
return entries;
};

Expand Down Expand Up @@ -51367,6 +51373,9 @@ const serializeAws_ec2ModifyLocalGatewayRouteRequest = (
if (input.DryRun != null) {
entries["DryRun"] = input.DryRun;
}
if (input.DestinationPrefixListId != null) {
entries["DestinationPrefixListId"] = input.DestinationPrefixListId;
}
return entries;
};

Expand Down Expand Up @@ -76480,6 +76489,7 @@ const deserializeAws_ec2LocalGatewayRoute = (output: any, context: __SerdeContex
SubnetId: undefined,
CoipPoolId: undefined,
NetworkInterfaceId: undefined,
DestinationPrefixListId: undefined,
};
if (output["destinationCidrBlock"] !== undefined) {
contents.DestinationCidrBlock = __expectString(output["destinationCidrBlock"]);
Expand Down Expand Up @@ -76511,6 +76521,9 @@ const deserializeAws_ec2LocalGatewayRoute = (output: any, context: __SerdeContex
if (output["networkInterfaceId"] !== undefined) {
contents.NetworkInterfaceId = __expectString(output["networkInterfaceId"]);
}
if (output["destinationPrefixListId"] !== undefined) {
contents.DestinationPrefixListId = __expectString(output["destinationPrefixListId"]);
}
return contents;
};

Expand Down
Loading

0 comments on commit 52a9d0c

Please sign in to comment.