Skip to content

Commit 3d9e319

Browse files
author
awstools
committed
feat(client-acm): Add support for file-based HTTP domain control validation, available through Amazon CloudFront.
1 parent f640491 commit 3d9e319

File tree

7 files changed

+183
-50
lines changed

7 files changed

+183
-50
lines changed

clients/client-acm/src/commands/DescribeCertificateCommand.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export interface DescribeCertificateCommandOutput extends DescribeCertificateRes
4949
* // SubjectAlternativeNames: [ // DomainList
5050
* // "STRING_VALUE",
5151
* // ],
52+
* // ManagedBy: "CLOUDFRONT",
5253
* // DomainValidationOptions: [ // DomainValidationList
5354
* // { // DomainValidation
5455
* // DomainName: "STRING_VALUE", // required
@@ -62,7 +63,11 @@ export interface DescribeCertificateCommandOutput extends DescribeCertificateRes
6263
* // Type: "CNAME", // required
6364
* // Value: "STRING_VALUE", // required
6465
* // },
65-
* // ValidationMethod: "EMAIL" || "DNS",
66+
* // HttpRedirect: { // HttpRedirect
67+
* // RedirectFrom: "STRING_VALUE",
68+
* // RedirectTo: "STRING_VALUE",
69+
* // },
70+
* // ValidationMethod: "EMAIL" || "DNS" || "HTTP",
6671
* // },
6772
* // ],
6873
* // Serial: "STRING_VALUE",
@@ -73,7 +78,7 @@ export interface DescribeCertificateCommandOutput extends DescribeCertificateRes
7378
* // ImportedAt: new Date("TIMESTAMP"),
7479
* // Status: "PENDING_VALIDATION" || "ISSUED" || "INACTIVE" || "EXPIRED" || "VALIDATION_TIMED_OUT" || "REVOKED" || "FAILED",
7580
* // RevokedAt: new Date("TIMESTAMP"),
76-
* // RevocationReason: "UNSPECIFIED" || "KEY_COMPROMISE" || "CA_COMPROMISE" || "AFFILIATION_CHANGED" || "SUPERCEDED" || "CESSATION_OF_OPERATION" || "CERTIFICATE_HOLD" || "REMOVE_FROM_CRL" || "PRIVILEGE_WITHDRAWN" || "A_A_COMPROMISE",
81+
* // RevocationReason: "UNSPECIFIED" || "KEY_COMPROMISE" || "CA_COMPROMISE" || "AFFILIATION_CHANGED" || "SUPERCEDED" || "SUPERSEDED" || "CESSATION_OF_OPERATION" || "CERTIFICATE_HOLD" || "REMOVE_FROM_CRL" || "PRIVILEGE_WITHDRAWN" || "A_A_COMPROMISE",
7782
* // NotBefore: new Date("TIMESTAMP"),
7883
* // NotAfter: new Date("TIMESTAMP"),
7984
* // KeyAlgorithm: "RSA_1024" || "RSA_2048" || "RSA_3072" || "RSA_4096" || "EC_prime256v1" || "EC_secp384r1" || "EC_secp521r1",
@@ -98,7 +103,11 @@ export interface DescribeCertificateCommandOutput extends DescribeCertificateRes
98103
* // Type: "CNAME", // required
99104
* // Value: "STRING_VALUE", // required
100105
* // },
101-
* // ValidationMethod: "EMAIL" || "DNS",
106+
* // HttpRedirect: {
107+
* // RedirectFrom: "STRING_VALUE",
108+
* // RedirectTo: "STRING_VALUE",
109+
* // },
110+
* // ValidationMethod: "EMAIL" || "DNS" || "HTTP",
102111
* // },
103112
* // ],
104113
* // RenewalStatusReason: "NO_AVAILABLE_CONTACTS" || "ADDITIONAL_VERIFICATION_REQUIRED" || "DOMAIN_NOT_ALLOWED" || "INVALID_PUBLIC_DOMAIN" || "DOMAIN_VALIDATION_DENIED" || "CAA_ERROR" || "PCA_LIMIT_EXCEEDED" || "PCA_INVALID_ARN" || "PCA_INVALID_STATE" || "PCA_REQUEST_FAILED" || "PCA_NAME_CONSTRAINTS_VALIDATION" || "PCA_RESOURCE_NOT_FOUND" || "PCA_INVALID_ARGS" || "PCA_INVALID_DURATION" || "PCA_ACCESS_DENIED" || "SLR_NOT_FOUND" || "OTHER",

clients/client-acm/src/commands/ListCertificatesCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ export interface ListCertificatesCommandInput extends ListCertificatesRequest {}
2828
export interface ListCertificatesCommandOutput extends ListCertificatesResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>Retrieves a list of certificate ARNs and domain names. By default, the API returns RSA_2048 certificates. To return all certificates in the account, include the <code>keyType</code> filter with the values <code>[RSA_1024, RSA_2048, RSA_3072, RSA_4096, EC_prime256v1, EC_secp384r1, EC_secp521r1]</code>.</p>
32-
* <p>In addition to <code>keyType</code>, you can also filter by the <code>CertificateStatuses</code>, <code>keyUsage</code>, and <code>extendedKeyUsage</code> attributes on the certificate. For more information, see <a>Filters</a>.</p>
31+
* <p>Retrieves a list of certificate ARNs and domain names. You can request that only
32+
* certificates that match a specific status be listed. You can also filter by specific
33+
* attributes of the certificate. Default filtering returns only <code>RSA_2048</code>
34+
* certificates. For more information, see <a>Filters</a>.</p>
3335
* @example
3436
* Use a bare-bones client and the command you need to make an API call.
3537
* ```javascript
@@ -50,6 +52,7 @@ export interface ListCertificatesCommandOutput extends ListCertificatesResponse,
5052
* keyTypes: [ // KeyAlgorithmList
5153
* "RSA_1024" || "RSA_2048" || "RSA_3072" || "RSA_4096" || "EC_prime256v1" || "EC_secp384r1" || "EC_secp521r1",
5254
* ],
55+
* managedBy: "CLOUDFRONT",
5356
* },
5457
* NextToken: "STRING_VALUE",
5558
* MaxItems: Number("int"),
@@ -86,6 +89,7 @@ export interface ListCertificatesCommandOutput extends ListCertificatesResponse,
8689
* // IssuedAt: new Date("TIMESTAMP"),
8790
* // ImportedAt: new Date("TIMESTAMP"),
8891
* // RevokedAt: new Date("TIMESTAMP"),
92+
* // ManagedBy: "CLOUDFRONT",
8993
* // },
9094
* // ],
9195
* // };

clients/client-acm/src/commands/RenewCertificateCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ export interface RenewCertificateCommandOutput extends __MetadataBearer {}
5757
* @throws {@link InvalidArnException} (client fault)
5858
* <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p>
5959
*
60+
* @throws {@link RequestInProgressException} (client fault)
61+
* <p>The certificate request is in process and the certificate in your account has not yet been
62+
* issued.</p>
63+
*
6064
* @throws {@link ResourceNotFoundException} (client fault)
6165
* <p>The specified certificate cannot be found in the caller's account or the caller's account
6266
* cannot be found.</p>

clients/client-acm/src/commands/RequestCertificateCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export interface RequestCertificateCommandOutput extends RequestCertificateRespo
5252
* const client = new ACMClient(config);
5353
* const input = { // RequestCertificateRequest
5454
* DomainName: "STRING_VALUE", // required
55-
* ValidationMethod: "EMAIL" || "DNS",
55+
* ValidationMethod: "EMAIL" || "DNS" || "HTTP",
5656
* SubjectAlternativeNames: [ // DomainList
5757
* "STRING_VALUE",
5858
* ],
@@ -74,6 +74,7 @@ export interface RequestCertificateCommandOutput extends RequestCertificateRespo
7474
* },
7575
* ],
7676
* KeyAlgorithm: "RSA_1024" || "RSA_2048" || "RSA_3072" || "RSA_4096" || "EC_prime256v1" || "EC_secp384r1" || "EC_secp521r1",
77+
* ManagedBy: "CLOUDFRONT",
7778
* };
7879
* const command = new RequestCertificateCommand(input);
7980
* const response = await client.send(command);

clients/client-acm/src/models/models_0.ts

Lines changed: 72 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,25 @@ export class TooManyTagsException extends __BaseException {
207207
}
208208
}
209209

210+
/**
211+
* <p>Contains information for HTTP-based domain validation of certificates requested through CloudFront and issued by ACM.
212+
* This field exists only when the certificate type is <code>AMAZON_ISSUED</code> and the validation method is <code>HTTP</code>.</p>
213+
* @public
214+
*/
215+
export interface HttpRedirect {
216+
/**
217+
* <p>The URL including the domain to be validated. The certificate authority sends <code>GET</code> requests here during validation.</p>
218+
* @public
219+
*/
220+
RedirectFrom?: string | undefined;
221+
222+
/**
223+
* <p>The URL hosting the validation token. <code>RedirectFrom</code> must return this content or redirect here.</p>
224+
* @public
225+
*/
226+
RedirectTo?: string | undefined;
227+
}
228+
210229
/**
211230
* @public
212231
* @enum
@@ -253,6 +272,7 @@ export interface ResourceRecord {
253272
export const ValidationMethod = {
254273
DNS: "DNS",
255274
EMAIL: "EMAIL",
275+
HTTP: "HTTP",
256276
} as const;
257277

258278
/**
@@ -309,13 +329,11 @@ export interface DomainValidation {
309329
* </li>
310330
* <li>
311331
* <p>
312-
* <code>SUCCESS</code>
313-
* </p>
332+
* <code/>SUCCESS</p>
314333
* </li>
315334
* <li>
316335
* <p>
317-
* <code>FAILED</code>
318-
* </p>
336+
* <code/>FAILED</p>
319337
* </li>
320338
* </ul>
321339
* @public
@@ -326,13 +344,20 @@ export interface DomainValidation {
326344
* <p>Contains the CNAME record that you add to your DNS database for domain validation. For
327345
* more information, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html">Use DNS to Validate Domain Ownership</a>.</p>
328346
* <p>Note: The CNAME information that you need does not include the name of your domain. If you
329-
* include your domain name in the DNS database CNAME record, validation fails. For example, if
347+
* include your domain name in the DNS database CNAME record, validation fails. For example, if
330348
* the name is "_a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com", only
331349
* "_a79865eb4cd1a6ab990a45779b4e0b96" must be used.</p>
332350
* @public
333351
*/
334352
ResourceRecord?: ResourceRecord | undefined;
335353

354+
/**
355+
* <p>Contains information for HTTP-based domain validation of certificates requested through CloudFront and issued by ACM.
356+
* This field exists only when the certificate type is <code>AMAZON_ISSUED</code> and the validation method is <code>HTTP</code>.</p>
357+
* @public
358+
*/
359+
HttpRedirect?: HttpRedirect | undefined;
360+
336361
/**
337362
* <p>Specifies the domain validation method.</p>
338363
* @public
@@ -516,6 +541,19 @@ export interface KeyUsage {
516541
Name?: KeyUsageName | undefined;
517542
}
518543

544+
/**
545+
* @public
546+
* @enum
547+
*/
548+
export const CertificateManagedBy = {
549+
CLOUDFRONT: "CLOUDFRONT",
550+
} as const;
551+
552+
/**
553+
* @public
554+
*/
555+
export type CertificateManagedBy = (typeof CertificateManagedBy)[keyof typeof CertificateManagedBy];
556+
519557
/**
520558
* @public
521559
* @enum
@@ -629,6 +667,7 @@ export const RevocationReason = {
629667
PRIVILEGE_WITHDRAWN: "PRIVILEGE_WITHDRAWN",
630668
REMOVE_FROM_CRL: "REMOVE_FROM_CRL",
631669
SUPERCEDED: "SUPERCEDED",
670+
SUPERSEDED: "SUPERSEDED",
632671
UNSPECIFIED: "UNSPECIFIED",
633672
} as const;
634673

@@ -702,6 +741,12 @@ export interface CertificateDetail {
702741
*/
703742
SubjectAlternativeNames?: string[] | undefined;
704743

744+
/**
745+
* <p>Identifies the Amazon Web Services service that manages the certificate issued by ACM.</p>
746+
* @public
747+
*/
748+
ManagedBy?: CertificateManagedBy | undefined;
749+
705750
/**
706751
* <p>Contains information about the initial validation of each domain name that occurs as a
707752
* result of the <a>RequestCertificate</a> request. This field exists only when the
@@ -1213,6 +1258,12 @@ export interface Filters {
12131258
* @public
12141259
*/
12151260
keyTypes?: KeyAlgorithm[] | undefined;
1261+
1262+
/**
1263+
* <p>Identifies the Amazon Web Services service that manages the certificate issued by ACM.</p>
1264+
* @public
1265+
*/
1266+
managedBy?: CertificateManagedBy | undefined;
12161267
}
12171268

12181269
/**
@@ -1320,19 +1371,19 @@ export interface CertificateSummary {
13201371
* list contains the domain names that are bound to the public key that is contained in the
13211372
* certificate. The subject alternative names include the canonical domain name (CN) of the
13221373
* certificate and additional domain names that can be used to connect to the website. </p>
1323-
* <p>When called by <a>ListCertificates</a>, this parameter will only return the first 100 subject alternative
1374+
* <p>When called by <a href="https://docs.aws.amazon.com/acm/latestAPIReference/API_ListCertificates.html">ListCertificates</a>, this parameter will only return the first 100 subject alternative
13241375
* names included in the certificate. To display the full list of subject alternative names, use
1325-
* <a>DescribeCertificate</a>.</p>
1376+
* <a href="https://docs.aws.amazon.com/acm/latestAPIReference/API_DescribeCertificate.html">DescribeCertificate</a>.</p>
13261377
* @public
13271378
*/
13281379
SubjectAlternativeNameSummaries?: string[] | undefined;
13291380

13301381
/**
1331-
* <p>When called by <a>ListCertificates</a>, indicates whether the full list of subject alternative names has
1382+
* <p>When called by <a href="https://docs.aws.amazon.com/acm/latestAPIReference/API_ListCertificates.html">ListCertificates</a>, indicates whether the full list of subject alternative names has
13321383
* been included in the response. If false, the response includes all of the subject alternative
13331384
* names included in the certificate. If true, the response only includes the first 100 subject
13341385
* alternative names included in the certificate. To display the full list of subject alternative
1335-
* names, use <a>DescribeCertificate</a>.</p>
1386+
* names, use <a href="https://docs.aws.amazon.com/acm/latestAPIReference/API_DescribeCertificate.html">DescribeCertificate</a>.</p>
13361387
* @public
13371388
*/
13381389
HasAdditionalSubjectAlternativeNames?: boolean | undefined;
@@ -1440,6 +1491,12 @@ export interface CertificateSummary {
14401491
* @public
14411492
*/
14421493
RevokedAt?: Date | undefined;
1494+
1495+
/**
1496+
* <p>Identifies the Amazon Web Services service that manages the certificate issued by ACM.</p>
1497+
* @public
1498+
*/
1499+
ManagedBy?: CertificateManagedBy | undefined;
14431500
}
14441501

14451502
/**
@@ -1770,6 +1827,12 @@ export interface RequestCertificateRequest {
17701827
* @public
17711828
*/
17721829
KeyAlgorithm?: KeyAlgorithm | undefined;
1830+
1831+
/**
1832+
* <p>Identifies the Amazon Web Services service that manages the certificate issued by ACM.</p>
1833+
* @public
1834+
*/
1835+
ManagedBy?: CertificateManagedBy | undefined;
17731836
}
17741837

17751838
/**

clients/client-acm/src/protocols/Aws_json1_1.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,7 @@ const de_CertificateDetail = (output: any, context: __SerdeContext): Certificate
977977
Issuer: __expectString,
978978
KeyAlgorithm: __expectString,
979979
KeyUsages: _json,
980+
ManagedBy: __expectString,
980981
NotAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
981982
NotBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
982983
Options: _json,
@@ -1011,6 +1012,7 @@ const de_CertificateSummary = (output: any, context: __SerdeContext): Certificat
10111012
IssuedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
10121013
KeyAlgorithm: __expectString,
10131014
KeyUsages: _json,
1015+
ManagedBy: __expectString,
10141016
NotAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
10151017
NotBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
10161018
RenewalEligibility: __expectString,
@@ -1064,6 +1066,8 @@ const de_DescribeCertificateResponse = (output: any, context: __SerdeContext): D
10641066

10651067
// de_GetCertificateResponse omitted.
10661068

1069+
// de_HttpRedirect omitted.
1070+
10671071
// de_ImportCertificateResponse omitted.
10681072

10691073
// de_InUseList omitted.

0 commit comments

Comments
 (0)