Skip to content

Commit d277dd7

Browse files
author
awstools
committed
feat(client-route-53): Add new APIs to support Route 53 IP Based Routing
1 parent 4910403 commit d277dd7

File tree

73 files changed

+7969
-3616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+7969
-3616
lines changed

clients/client-route-53/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
AWS SDK for JavaScript Route53 Client for Node.js, Browser and React Native.
1111

12-
<p>Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service.</p>
12+
<p>Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web
13+
service.</p>
1314

1415
## Installing
1516

clients/client-route-53/src/Route53.ts

Lines changed: 948 additions & 557 deletions
Large diffs are not rendered by default.

clients/client-route-53/src/Route53Client.ts

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ import {
6060
AssociateVPCWithHostedZoneCommandInput,
6161
AssociateVPCWithHostedZoneCommandOutput,
6262
} from "./commands/AssociateVPCWithHostedZoneCommand";
63+
import {
64+
ChangeCidrCollectionCommandInput,
65+
ChangeCidrCollectionCommandOutput,
66+
} from "./commands/ChangeCidrCollectionCommand";
6367
import {
6468
ChangeResourceRecordSetsCommandInput,
6569
ChangeResourceRecordSetsCommandOutput,
@@ -68,6 +72,10 @@ import {
6872
ChangeTagsForResourceCommandInput,
6973
ChangeTagsForResourceCommandOutput,
7074
} from "./commands/ChangeTagsForResourceCommand";
75+
import {
76+
CreateCidrCollectionCommandInput,
77+
CreateCidrCollectionCommandOutput,
78+
} from "./commands/CreateCidrCollectionCommand";
7179
import { CreateHealthCheckCommandInput, CreateHealthCheckCommandOutput } from "./commands/CreateHealthCheckCommand";
7280
import { CreateHostedZoneCommandInput, CreateHostedZoneCommandOutput } from "./commands/CreateHostedZoneCommand";
7381
import {
@@ -102,6 +110,10 @@ import {
102110
DeactivateKeySigningKeyCommandInput,
103111
DeactivateKeySigningKeyCommandOutput,
104112
} from "./commands/DeactivateKeySigningKeyCommand";
113+
import {
114+
DeleteCidrCollectionCommandInput,
115+
DeleteCidrCollectionCommandOutput,
116+
} from "./commands/DeleteCidrCollectionCommand";
105117
import { DeleteHealthCheckCommandInput, DeleteHealthCheckCommandOutput } from "./commands/DeleteHealthCheckCommand";
106118
import { DeleteHostedZoneCommandInput, DeleteHostedZoneCommandOutput } from "./commands/DeleteHostedZoneCommand";
107119
import {
@@ -182,6 +194,12 @@ import {
182194
GetTrafficPolicyInstanceCountCommandInput,
183195
GetTrafficPolicyInstanceCountCommandOutput,
184196
} from "./commands/GetTrafficPolicyInstanceCountCommand";
197+
import { ListCidrBlocksCommandInput, ListCidrBlocksCommandOutput } from "./commands/ListCidrBlocksCommand";
198+
import {
199+
ListCidrCollectionsCommandInput,
200+
ListCidrCollectionsCommandOutput,
201+
} from "./commands/ListCidrCollectionsCommand";
202+
import { ListCidrLocationsCommandInput, ListCidrLocationsCommandOutput } from "./commands/ListCidrLocationsCommand";
185203
import { ListGeoLocationsCommandInput, ListGeoLocationsCommandOutput } from "./commands/ListGeoLocationsCommand";
186204
import { ListHealthChecksCommandInput, ListHealthChecksCommandOutput } from "./commands/ListHealthChecksCommand";
187205
import {
@@ -256,8 +274,10 @@ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
256274
export type ServiceInputTypes =
257275
| ActivateKeySigningKeyCommandInput
258276
| AssociateVPCWithHostedZoneCommandInput
277+
| ChangeCidrCollectionCommandInput
259278
| ChangeResourceRecordSetsCommandInput
260279
| ChangeTagsForResourceCommandInput
280+
| CreateCidrCollectionCommandInput
261281
| CreateHealthCheckCommandInput
262282
| CreateHostedZoneCommandInput
263283
| CreateKeySigningKeyCommandInput
@@ -268,6 +288,7 @@ export type ServiceInputTypes =
268288
| CreateTrafficPolicyVersionCommandInput
269289
| CreateVPCAssociationAuthorizationCommandInput
270290
| DeactivateKeySigningKeyCommandInput
291+
| DeleteCidrCollectionCommandInput
271292
| DeleteHealthCheckCommandInput
272293
| DeleteHostedZoneCommandInput
273294
| DeleteKeySigningKeyCommandInput
@@ -297,6 +318,9 @@ export type ServiceInputTypes =
297318
| GetTrafficPolicyCommandInput
298319
| GetTrafficPolicyInstanceCommandInput
299320
| GetTrafficPolicyInstanceCountCommandInput
321+
| ListCidrBlocksCommandInput
322+
| ListCidrCollectionsCommandInput
323+
| ListCidrLocationsCommandInput
300324
| ListGeoLocationsCommandInput
301325
| ListHealthChecksCommandInput
302326
| ListHostedZonesByNameCommandInput
@@ -322,8 +346,10 @@ export type ServiceInputTypes =
322346
export type ServiceOutputTypes =
323347
| ActivateKeySigningKeyCommandOutput
324348
| AssociateVPCWithHostedZoneCommandOutput
349+
| ChangeCidrCollectionCommandOutput
325350
| ChangeResourceRecordSetsCommandOutput
326351
| ChangeTagsForResourceCommandOutput
352+
| CreateCidrCollectionCommandOutput
327353
| CreateHealthCheckCommandOutput
328354
| CreateHostedZoneCommandOutput
329355
| CreateKeySigningKeyCommandOutput
@@ -334,6 +360,7 @@ export type ServiceOutputTypes =
334360
| CreateTrafficPolicyVersionCommandOutput
335361
| CreateVPCAssociationAuthorizationCommandOutput
336362
| DeactivateKeySigningKeyCommandOutput
363+
| DeleteCidrCollectionCommandOutput
337364
| DeleteHealthCheckCommandOutput
338365
| DeleteHostedZoneCommandOutput
339366
| DeleteKeySigningKeyCommandOutput
@@ -363,6 +390,9 @@ export type ServiceOutputTypes =
363390
| GetTrafficPolicyCommandOutput
364391
| GetTrafficPolicyInstanceCommandOutput
365392
| GetTrafficPolicyInstanceCountCommandOutput
393+
| ListCidrBlocksCommandOutput
394+
| ListCidrCollectionsCommandOutput
395+
| ListCidrLocationsCommandOutput
366396
| ListGeoLocationsCommandOutput
367397
| ListHealthChecksCommandOutput
368398
| ListHostedZonesByNameCommandOutput
@@ -539,7 +569,8 @@ type Route53ClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandl
539569
export interface Route53ClientResolvedConfig extends Route53ClientResolvedConfigType {}
540570

541571
/**
542-
* <p>Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service.</p>
572+
* <p>Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web
573+
* service.</p>
543574
*/
544575
export class Route53Client extends __Client<
545576
__HttpHandlerOptions,

clients/client-route-53/src/commands/ActivateKeySigningKeyCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export interface ActivateKeySigningKeyCommandInput extends ActivateKeySigningKey
2424
export interface ActivateKeySigningKeyCommandOutput extends ActivateKeySigningKeyResponse, __MetadataBearer {}
2525

2626
/**
27-
* <p>Activates a key-signing key (KSK) so that it can be used for signing by DNSSEC. This operation changes the
28-
* KSK status to <code>ACTIVE</code>.</p>
27+
* <p>Activates a key-signing key (KSK) so that it can be used for signing by DNSSEC. This
28+
* operation changes the KSK status to <code>ACTIVE</code>.</p>
2929
* @example
3030
* Use a bare-bones client and the command you need to make an API call.
3131
* ```javascript

clients/client-route-53/src/commands/AssociateVPCWithHostedZoneCommand.ts

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,38 @@ export interface AssociateVPCWithHostedZoneCommandOutput extends AssociateVPCWit
2626
/**
2727
* <p>Associates an Amazon VPC with a private hosted zone. </p>
2828
* <important>
29-
* <p>To perform the association, the VPC and the private hosted zone must already exist.
30-
* You can't convert a public hosted zone into a private hosted zone.</p>
31-
* </important>
29+
* <p>To perform the association, the VPC and the private hosted zone must already
30+
* exist. You can't convert a public hosted zone into a private hosted zone.</p>
31+
* </important>
3232
* <note>
33-
* <p>If you want to associate a VPC that was created by using one Amazon Web Services account with a private hosted zone that was created
34-
* by using a different account, the Amazon Web Services account that created the private hosted zone must first submit a
35-
* <code>CreateVPCAssociationAuthorization</code> request. Then the account that created the VPC must submit an
36-
* <code>AssociateVPCWithHostedZone</code> request.</p>
37-
* </note>
33+
* <p>If you want to associate a VPC that was created by using one Amazon Web Services account with a private hosted zone that was created by using a
34+
* different account, the Amazon Web Services account that created the private hosted
35+
* zone must first submit a <code>CreateVPCAssociationAuthorization</code> request.
36+
* Then the account that created the VPC must submit an
37+
* <code>AssociateVPCWithHostedZone</code> request.</p>
38+
* </note>
3839
* <note>
39-
* <p>When granting access, the hosted zone and the Amazon VPC must belong to the same partition. A
40-
* partition is a group of Amazon Web Services Regions. Each Amazon Web Services account is scoped to one
41-
* partition.</p>
40+
* <p>When granting access, the hosted zone and the Amazon VPC must belong to
41+
* the same partition. A partition is a group of Amazon Web Services Regions. Each
42+
* Amazon Web Services account is scoped to one partition.</p>
4243
* <p>The following are the supported partitions:</p>
4344
* <ul>
4445
* <li>
45-
* <p>
46+
* <p>
4647
* <code>aws</code> - Amazon Web Services Regions</p>
47-
* </li>
48+
* </li>
4849
* <li>
49-
* <p>
50+
* <p>
5051
* <code>aws-cn</code> - China Regions</p>
51-
* </li>
52+
* </li>
5253
* <li>
53-
* <p>
54+
* <p>
5455
* <code>aws-us-gov</code> - Amazon Web Services GovCloud (US) Region</p>
55-
* </li>
56+
* </li>
5657
* </ul>
5758
* <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Access Management</a>
5859
* in the <i>Amazon Web Services General Reference</i>.</p>
59-
* </note>
60+
* </note>
6061
* @example
6162
* Use a bare-bones client and the command you need to make an API call.
6263
* ```javascript
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
// smithy-typescript generated code
2+
import { getIdNormalizerPlugin } from "@aws-sdk/middleware-sdk-route53";
3+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
4+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
5+
import { Command as $Command } from "@aws-sdk/smithy-client";
6+
import {
7+
FinalizeHandlerArguments,
8+
Handler,
9+
HandlerExecutionContext,
10+
HttpHandlerOptions as __HttpHandlerOptions,
11+
MetadataBearer as __MetadataBearer,
12+
MiddlewareStack,
13+
SerdeContext as __SerdeContext,
14+
} from "@aws-sdk/types";
15+
16+
import { ChangeCidrCollectionRequest, ChangeCidrCollectionResponse } from "../models/models_0";
17+
import {
18+
deserializeAws_restXmlChangeCidrCollectionCommand,
19+
serializeAws_restXmlChangeCidrCollectionCommand,
20+
} from "../protocols/Aws_restXml";
21+
import { Route53ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../Route53Client";
22+
23+
export interface ChangeCidrCollectionCommandInput extends ChangeCidrCollectionRequest {}
24+
export interface ChangeCidrCollectionCommandOutput extends ChangeCidrCollectionResponse, __MetadataBearer {}
25+
26+
/**
27+
* <p>Creates, changes, or deletes CIDR blocks within a collection. Contains authoritative
28+
* IP information mapping blocks to one or multiple locations.</p>
29+
* <p>A change request can update multiple locations in a collection at a time, which is
30+
* helpful if you want to move one or more CIDR blocks from one location to another in one
31+
* transaction, without downtime. </p>
32+
* <p>
33+
* <b>Limits</b>
34+
* </p>
35+
* <p>The max number of CIDR blocks included in the request is
36+
* 1000.
37+
* As a result, big updates require multiple API calls.</p>
38+
* <p>
39+
* <b> PUT and DELETE_IF_EXISTS</b>
40+
* </p>
41+
* <p>Use <code>ChangeCidrCollection</code> to perform the following actions:</p>
42+
* <ul>
43+
* <li>
44+
* <p>
45+
* <code>PUT</code>: Create a CIDR block within the specified collection.</p>
46+
* </li>
47+
* <li>
48+
* <p>
49+
* <code> DELETE_IF_EXISTS</code>: Delete an existing CIDR block from the
50+
* collection.</p>
51+
* </li>
52+
* </ul>
53+
* @example
54+
* Use a bare-bones client and the command you need to make an API call.
55+
* ```javascript
56+
* import { Route53Client, ChangeCidrCollectionCommand } from "@aws-sdk/client-route-53"; // ES Modules import
57+
* // const { Route53Client, ChangeCidrCollectionCommand } = require("@aws-sdk/client-route-53"); // CommonJS import
58+
* const client = new Route53Client(config);
59+
* const command = new ChangeCidrCollectionCommand(input);
60+
* const response = await client.send(command);
61+
* ```
62+
*
63+
* @see {@link ChangeCidrCollectionCommandInput} for command's `input` shape.
64+
* @see {@link ChangeCidrCollectionCommandOutput} for command's `response` shape.
65+
* @see {@link Route53ClientResolvedConfig | config} for Route53Client's `config` shape.
66+
*
67+
*/
68+
export class ChangeCidrCollectionCommand extends $Command<
69+
ChangeCidrCollectionCommandInput,
70+
ChangeCidrCollectionCommandOutput,
71+
Route53ClientResolvedConfig
72+
> {
73+
// Start section: command_properties
74+
// End section: command_properties
75+
76+
constructor(readonly input: ChangeCidrCollectionCommandInput) {
77+
// Start section: command_constructor
78+
super();
79+
// End section: command_constructor
80+
}
81+
82+
/**
83+
* @internal
84+
*/
85+
resolveMiddleware(
86+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
87+
configuration: Route53ClientResolvedConfig,
88+
options?: __HttpHandlerOptions
89+
): Handler<ChangeCidrCollectionCommandInput, ChangeCidrCollectionCommandOutput> {
90+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
91+
this.middlewareStack.use(getIdNormalizerPlugin(configuration));
92+
93+
const stack = clientStack.concat(this.middlewareStack);
94+
95+
const { logger } = configuration;
96+
const clientName = "Route53Client";
97+
const commandName = "ChangeCidrCollectionCommand";
98+
const handlerExecutionContext: HandlerExecutionContext = {
99+
logger,
100+
clientName,
101+
commandName,
102+
inputFilterSensitiveLog: ChangeCidrCollectionRequest.filterSensitiveLog,
103+
outputFilterSensitiveLog: ChangeCidrCollectionResponse.filterSensitiveLog,
104+
};
105+
const { requestHandler } = configuration;
106+
return stack.resolve(
107+
(request: FinalizeHandlerArguments<any>) =>
108+
requestHandler.handle(request.request as __HttpRequest, options || {}),
109+
handlerExecutionContext
110+
);
111+
}
112+
113+
private serialize(input: ChangeCidrCollectionCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
114+
return serializeAws_restXmlChangeCidrCollectionCommand(input, context);
115+
}
116+
117+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ChangeCidrCollectionCommandOutput> {
118+
return deserializeAws_restXmlChangeCidrCollectionCommand(output, context);
119+
}
120+
121+
// Start section: command_body_extra
122+
// End section: command_body_extra
123+
}

0 commit comments

Comments
 (0)