Skip to content

Commit fcac15c

Browse files
author
awstools
committed
feat(client-cloudfront): Add distribution tenant, connection group, and multi-tenant distribution APIs to the CloudFront SDK.
1 parent 3d9e319 commit fcac15c

File tree

85 files changed

+16706
-4532
lines changed

Some content is hidden

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

85 files changed

+16706
-4532
lines changed

clients/client-cloudfront/README.md

Lines changed: 200 additions & 0 deletions
Large diffs are not rendered by default.

clients/client-cloudfront/src/CloudFront.ts

Lines changed: 578 additions & 0 deletions
Large diffs are not rendered by default.

clients/client-cloudfront/src/CloudFrontClient.ts

Lines changed: 149 additions & 2 deletions
Large diffs are not rendered by default.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { AssociateDistributionTenantWebACLRequest, AssociateDistributionTenantWebACLResult } from "../models/models_0";
10+
import {
11+
de_AssociateDistributionTenantWebACLCommand,
12+
se_AssociateDistributionTenantWebACLCommand,
13+
} from "../protocols/Aws_restXml";
14+
15+
/**
16+
* @public
17+
*/
18+
export type { __MetadataBearer };
19+
export { $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link AssociateDistributionTenantWebACLCommand}.
24+
*/
25+
export interface AssociateDistributionTenantWebACLCommandInput extends AssociateDistributionTenantWebACLRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link AssociateDistributionTenantWebACLCommand}.
30+
*/
31+
export interface AssociateDistributionTenantWebACLCommandOutput
32+
extends AssociateDistributionTenantWebACLResult,
33+
__MetadataBearer {}
34+
35+
/**
36+
* <p>Associates the WAF web ACL with a distribution tenant.</p>
37+
* @example
38+
* Use a bare-bones client and the command you need to make an API call.
39+
* ```javascript
40+
* import { CloudFrontClient, AssociateDistributionTenantWebACLCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import
41+
* // const { CloudFrontClient, AssociateDistributionTenantWebACLCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import
42+
* const client = new CloudFrontClient(config);
43+
* const input = { // AssociateDistributionTenantWebACLRequest
44+
* Id: "STRING_VALUE", // required
45+
* WebACLArn: "STRING_VALUE", // required
46+
* IfMatch: "STRING_VALUE",
47+
* };
48+
* const command = new AssociateDistributionTenantWebACLCommand(input);
49+
* const response = await client.send(command);
50+
* // { // AssociateDistributionTenantWebACLResult
51+
* // Id: "STRING_VALUE",
52+
* // WebACLArn: "STRING_VALUE",
53+
* // ETag: "STRING_VALUE",
54+
* // };
55+
*
56+
* ```
57+
*
58+
* @param AssociateDistributionTenantWebACLCommandInput - {@link AssociateDistributionTenantWebACLCommandInput}
59+
* @returns {@link AssociateDistributionTenantWebACLCommandOutput}
60+
* @see {@link AssociateDistributionTenantWebACLCommandInput} for command's `input` shape.
61+
* @see {@link AssociateDistributionTenantWebACLCommandOutput} for command's `response` shape.
62+
* @see {@link CloudFrontClientResolvedConfig | config} for CloudFrontClient's `config` shape.
63+
*
64+
* @throws {@link AccessDenied} (client fault)
65+
* <p>Access denied.</p>
66+
*
67+
* @throws {@link EntityNotFound} (client fault)
68+
* <p>The entity was not found.</p>
69+
*
70+
* @throws {@link InvalidArgument} (client fault)
71+
* <p>An argument is invalid.</p>
72+
*
73+
* @throws {@link InvalidIfMatchVersion} (client fault)
74+
* <p>The <code>If-Match</code> version is missing or not valid.</p>
75+
*
76+
* @throws {@link PreconditionFailed} (client fault)
77+
* <p>The precondition in one or more of the request fields evaluated to
78+
* <code>false</code>.</p>
79+
*
80+
* @throws {@link CloudFrontServiceException}
81+
* <p>Base exception class for all service exceptions from CloudFront service.</p>
82+
*
83+
*
84+
* @public
85+
*/
86+
export class AssociateDistributionTenantWebACLCommand extends $Command
87+
.classBuilder<
88+
AssociateDistributionTenantWebACLCommandInput,
89+
AssociateDistributionTenantWebACLCommandOutput,
90+
CloudFrontClientResolvedConfig,
91+
ServiceInputTypes,
92+
ServiceOutputTypes
93+
>()
94+
.ep(commonParams)
95+
.m(function (this: any, Command: any, cs: any, config: CloudFrontClientResolvedConfig, o: any) {
96+
return [
97+
getSerdePlugin(config, this.serialize, this.deserialize),
98+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
99+
];
100+
})
101+
.s("Cloudfront2020_05_31", "AssociateDistributionTenantWebACL", {})
102+
.n("CloudFrontClient", "AssociateDistributionTenantWebACLCommand")
103+
.f(void 0, void 0)
104+
.ser(se_AssociateDistributionTenantWebACLCommand)
105+
.de(de_AssociateDistributionTenantWebACLCommand)
106+
.build() {
107+
/** @internal type navigation helper, not in runtime. */
108+
protected declare static __types: {
109+
api: {
110+
input: AssociateDistributionTenantWebACLRequest;
111+
output: AssociateDistributionTenantWebACLResult;
112+
};
113+
sdk: {
114+
input: AssociateDistributionTenantWebACLCommandInput;
115+
output: AssociateDistributionTenantWebACLCommandOutput;
116+
};
117+
};
118+
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { AssociateDistributionWebACLRequest, AssociateDistributionWebACLResult } from "../models/models_0";
10+
import { de_AssociateDistributionWebACLCommand, se_AssociateDistributionWebACLCommand } from "../protocols/Aws_restXml";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link AssociateDistributionWebACLCommand}.
21+
*/
22+
export interface AssociateDistributionWebACLCommandInput extends AssociateDistributionWebACLRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link AssociateDistributionWebACLCommand}.
27+
*/
28+
export interface AssociateDistributionWebACLCommandOutput extends AssociateDistributionWebACLResult, __MetadataBearer {}
29+
30+
/**
31+
* <p>Associates the WAF web ACL with a distribution.</p>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { CloudFrontClient, AssociateDistributionWebACLCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import
36+
* // const { CloudFrontClient, AssociateDistributionWebACLCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import
37+
* const client = new CloudFrontClient(config);
38+
* const input = { // AssociateDistributionWebACLRequest
39+
* Id: "STRING_VALUE", // required
40+
* WebACLArn: "STRING_VALUE", // required
41+
* IfMatch: "STRING_VALUE",
42+
* };
43+
* const command = new AssociateDistributionWebACLCommand(input);
44+
* const response = await client.send(command);
45+
* // { // AssociateDistributionWebACLResult
46+
* // Id: "STRING_VALUE",
47+
* // WebACLArn: "STRING_VALUE",
48+
* // ETag: "STRING_VALUE",
49+
* // };
50+
*
51+
* ```
52+
*
53+
* @param AssociateDistributionWebACLCommandInput - {@link AssociateDistributionWebACLCommandInput}
54+
* @returns {@link AssociateDistributionWebACLCommandOutput}
55+
* @see {@link AssociateDistributionWebACLCommandInput} for command's `input` shape.
56+
* @see {@link AssociateDistributionWebACLCommandOutput} for command's `response` shape.
57+
* @see {@link CloudFrontClientResolvedConfig | config} for CloudFrontClient's `config` shape.
58+
*
59+
* @throws {@link AccessDenied} (client fault)
60+
* <p>Access denied.</p>
61+
*
62+
* @throws {@link EntityNotFound} (client fault)
63+
* <p>The entity was not found.</p>
64+
*
65+
* @throws {@link InvalidArgument} (client fault)
66+
* <p>An argument is invalid.</p>
67+
*
68+
* @throws {@link InvalidIfMatchVersion} (client fault)
69+
* <p>The <code>If-Match</code> version is missing or not valid.</p>
70+
*
71+
* @throws {@link PreconditionFailed} (client fault)
72+
* <p>The precondition in one or more of the request fields evaluated to
73+
* <code>false</code>.</p>
74+
*
75+
* @throws {@link CloudFrontServiceException}
76+
* <p>Base exception class for all service exceptions from CloudFront service.</p>
77+
*
78+
*
79+
* @public
80+
*/
81+
export class AssociateDistributionWebACLCommand extends $Command
82+
.classBuilder<
83+
AssociateDistributionWebACLCommandInput,
84+
AssociateDistributionWebACLCommandOutput,
85+
CloudFrontClientResolvedConfig,
86+
ServiceInputTypes,
87+
ServiceOutputTypes
88+
>()
89+
.ep(commonParams)
90+
.m(function (this: any, Command: any, cs: any, config: CloudFrontClientResolvedConfig, o: any) {
91+
return [
92+
getSerdePlugin(config, this.serialize, this.deserialize),
93+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
94+
];
95+
})
96+
.s("Cloudfront2020_05_31", "AssociateDistributionWebACL", {})
97+
.n("CloudFrontClient", "AssociateDistributionWebACLCommand")
98+
.f(void 0, void 0)
99+
.ser(se_AssociateDistributionWebACLCommand)
100+
.de(de_AssociateDistributionWebACLCommand)
101+
.build() {
102+
/** @internal type navigation helper, not in runtime. */
103+
protected declare static __types: {
104+
api: {
105+
input: AssociateDistributionWebACLRequest;
106+
output: AssociateDistributionWebACLResult;
107+
};
108+
sdk: {
109+
input: AssociateDistributionWebACLCommandInput;
110+
output: AssociateDistributionWebACLCommandOutput;
111+
};
112+
};
113+
}

clients/client-cloudfront/src/commands/CopyDistributionCommand.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ export interface CopyDistributionCommandOutput extends CopyDistributionResult, _
383383
* // Bucket: "STRING_VALUE",
384384
* // Prefix: "STRING_VALUE",
385385
* // },
386-
* // PriceClass: "PriceClass_100" || "PriceClass_200" || "PriceClass_All",
386+
* // PriceClass: "PriceClass_100" || "PriceClass_200" || "PriceClass_All" || "None",
387387
* // Enabled: true || false, // required
388388
* // ViewerCertificate: { // ViewerCertificate
389389
* // CloudFrontDefaultCertificate: true || false,
@@ -409,6 +409,21 @@ export interface CopyDistributionCommandOutput extends CopyDistributionResult, _
409409
* // ContinuousDeploymentPolicyId: "STRING_VALUE",
410410
* // Staging: true || false,
411411
* // AnycastIpListId: "STRING_VALUE",
412+
* // TenantConfig: { // TenantConfig
413+
* // ParameterDefinitions: [ // ParameterDefinitions
414+
* // { // ParameterDefinition
415+
* // Name: "STRING_VALUE", // required
416+
* // Definition: { // ParameterDefinitionSchema
417+
* // StringSchema: { // StringSchemaConfig
418+
* // Comment: "STRING_VALUE",
419+
* // DefaultValue: "STRING_VALUE",
420+
* // Required: true || false, // required
421+
* // },
422+
* // },
423+
* // },
424+
* // ],
425+
* // },
426+
* // ConnectionMode: "direct" || "tenant-only",
412427
* // },
413428
* // AliasICPRecordals: [ // AliasICPRecordals
414429
* // { // AliasICPRecordal

0 commit comments

Comments
 (0)