-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathacm.ts
More file actions
825 lines (767 loc) · 27.5 KB
/
Copy pathacm.ts
File metadata and controls
825 lines (767 loc) · 27.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
import { AccessLevelList } from '../../shared/access-level';
import { PolicyStatement, Operator } from '../../shared';
/**
* Statement provider for service [acm](https://docs.aws.amazon.com/service-authorization/latest/reference/list_acm.html).
*
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
*/
export class Acm extends PolicyStatement {
public servicePrefix = 'acm';
/**
* Statement provider for service [acm](https://docs.aws.amazon.com/service-authorization/latest/reference/list_acm.html).
*
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
*/
constructor(sid?: string) {
super(sid);
}
/**
* Grants permission to add one or more tags to a certificate
*
* Access Level: Tagging, Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_AddTagsToCertificate.html
*/
public toAddTagsToCertificate() {
return this.to('AddTagsToCertificate');
}
/**
* Grants permission to create an ACME domain validation
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_CreateAcmeDomainValidation.html
*/
public toCreateAcmeDomainValidation() {
return this.to('CreateAcmeDomainValidation');
}
/**
* Grants permission to create an ACME endpoint
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_CreateAcmeEndpoint.html
*/
public toCreateAcmeEndpoint() {
return this.to('CreateAcmeEndpoint');
}
/**
* Grants permission to create an ACME external account binding
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_CreateAcmeExternalAccountBinding.html
*/
public toCreateAcmeExternalAccountBinding() {
return this.to('CreateAcmeExternalAccountBinding');
}
/**
* Grants permission to delete an ACME domain validation
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_DeleteAcmeDomainValidation.html
*/
public toDeleteAcmeDomainValidation() {
return this.to('DeleteAcmeDomainValidation');
}
/**
* Grants permission to delete an ACME endpoint
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_DeleteAcmeEndpoint.html
*/
public toDeleteAcmeEndpoint() {
return this.to('DeleteAcmeEndpoint');
}
/**
* Grants permission to delete an ACME external account binding
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_DeleteAcmeExternalAccountBinding.html
*/
public toDeleteAcmeExternalAccountBinding() {
return this.to('DeleteAcmeExternalAccountBinding');
}
/**
* Grants permission to delete a certificate and its associated private key
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_DeleteCertificate.html
*/
public toDeleteCertificate() {
return this.to('DeleteCertificate');
}
/**
* Grants permission to retrieve details of an ACME account
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeAcmeAccount.html
*/
public toDescribeAcmeAccount() {
return this.to('DescribeAcmeAccount');
}
/**
* Grants permission to retrieve details of an ACME domain validation
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeAcmeDomainValidation.html
*/
public toDescribeAcmeDomainValidation() {
return this.to('DescribeAcmeDomainValidation');
}
/**
* Grants permission to retrieve details of an ACME endpoint
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeAcmeEndpoint.html
*/
public toDescribeAcmeEndpoint() {
return this.to('DescribeAcmeEndpoint');
}
/**
* Grants permission to retrieve details of an ACME external account binding
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeAcmeExternalAccountBinding.html
*/
public toDescribeAcmeExternalAccountBinding() {
return this.to('DescribeAcmeExternalAccountBinding');
}
/**
* Grants permission to retreive a certificates and its metadata
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html
*/
public toDescribeCertificate() {
return this.to('DescribeCertificate');
}
/**
* Grants permission to export an exportable certificate for use anywhere
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ExportCertificate.html
*/
public toExportCertificate() {
return this.to('ExportCertificate');
}
/**
* Grants permission to retrieve account level configuration from AWS Certificate Manager
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_GetAccountConfiguration.html
*/
public toGetAccountConfiguration() {
return this.to('GetAccountConfiguration');
}
/**
* Grants permission to retrieve credentials for an ACME external account binding
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_GetAcmeExternalAccountBindingCredentials.html
*/
public toGetAcmeExternalAccountBindingCredentials() {
return this.to('GetAcmeExternalAccountBindingCredentials');
}
/**
* Grants permission to retrieve a certificate and certificate chain for a certificate ARN
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_GetCertificate.html
*/
public toGetCertificate() {
return this.to('GetCertificate');
}
/**
* Grants permission to import a 3rd party certificate into AWS Certificate Manager (ACM)
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ImportCertificate.html
*/
public toImportCertificate() {
return this.to('ImportCertificate');
}
/**
* Grants permission to list ACME accounts
*
* Access Level: List
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ListAcmeAccounts.html
*/
public toListAcmeAccounts() {
return this.to('ListAcmeAccounts');
}
/**
* Grants permission to list ACME domain validations
*
* Access Level: List
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ListAcmeDomainValidations.html
*/
public toListAcmeDomainValidations() {
return this.to('ListAcmeDomainValidations');
}
/**
* Grants permission to list ACME endpoints
*
* Access Level: List
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ListAcmeEndpoints.html
*/
public toListAcmeEndpoints() {
return this.to('ListAcmeEndpoints');
}
/**
* Grants permission to list ACME external account bindings
*
* Access Level: List
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ListAcmeExternalAccountBindings.html
*/
public toListAcmeExternalAccountBindings() {
return this.to('ListAcmeExternalAccountBindings');
}
/**
* Grants permission to list domain validation methods for a certificate
*
* Access Level: List
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ListCertificateDomainValidations.html
*/
public toListCertificateDomainValidations() {
return this.to('ListCertificateDomainValidations');
}
/**
* Grants permission to retrieve a list of certificates for specific certificate parameters
*
* Access Level: List
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ListCertificates.html
*/
public toListCertificates() {
return this.to('ListCertificates');
}
/**
* Grants permission to lists the tags that have been associated with a certificate
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ListTagsForCertificate.html
*/
public toListTagsForCertificate() {
return this.to('ListTagsForCertificate');
}
/**
* Grants permission to list tags for a resource
*
* Access Level: Read
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ListTagsForResource.html
*/
public toListTagsForResource() {
return this.to('ListTagsForResource');
}
/**
* Grants permission to update account level configuration in AWS Certificate Manager
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_PutAccountConfiguration.html
*/
public toPutAccountConfiguration() {
return this.to('PutAccountConfiguration');
}
/**
* Grants permission to remove one or more tags from a certificate
*
* Access Level: Tagging, Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_RemoveTagsFromCertificate.html
*/
public toRemoveTagsFromCertificate() {
return this.to('RemoveTagsFromCertificate');
}
/**
* Grants permission to renew an eligible private certificate
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_RenewCertificate.html
*/
public toRenewCertificate() {
return this.to('RenewCertificate');
}
/**
* Grants permission to requests a public or private certificate
*
* Access Level: Write
*
* Possible conditions:
* - .ifCertificateAuthority()
* - .ifCertificateKeyPairOrigin()
* - .ifCertificateTransparencyLogging()
* - .ifDomainNames()
* - .ifExport()
* - .ifKeyAlgorithm()
* - .ifValidationMethod()
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_RequestCertificate.html
*/
public toRequestCertificate() {
return this.to('RequestCertificate');
}
/**
* Grants permission to resend an email to request domain ownership validation
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_ResendValidationEmail.html
*/
public toResendValidationEmail() {
return this.to('ResendValidationEmail');
}
/**
* Grants permission to revoke an ACME account
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_RevokeAcmeAccount.html
*/
public toRevokeAcmeAccount() {
return this.to('RevokeAcmeAccount');
}
/**
* Grants permission to revoke an ACME external account binding
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_RevokeAcmeExternalAccountBinding.html
*/
public toRevokeAcmeExternalAccountBinding() {
return this.to('RevokeAcmeExternalAccountBinding');
}
/**
* Grants permission to revoke an exportable certificate
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_RevokeCertificate.html
*/
public toRevokeCertificate() {
return this.to('RevokeCertificate');
}
/**
* Grants permission to retrieve a list of certificates matching search criteria
*
* Access Level: List
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_SearchCertificates.html
*/
public toSearchCertificates() {
return this.to('SearchCertificates');
}
/**
* Grants permission to add tags to a resource
*
* Access Level: Tagging, Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_TagResource.html
*/
public toTagResource() {
return this.to('TagResource');
}
/**
* Grants permission to remove tags from a resource
*
* Access Level: Tagging, Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_UntagResource.html
*/
public toUntagResource() {
return this.to('UntagResource');
}
/**
* Grants permission to update an ACME domain validation
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_UpdateAcmeDomainValidation.html
*/
public toUpdateAcmeDomainValidation() {
return this.to('UpdateAcmeDomainValidation');
}
/**
* Grants permission to update an ACME endpoint
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_UpdateAcmeEndpoint.html
*/
public toUpdateAcmeEndpoint() {
return this.to('UpdateAcmeEndpoint');
}
/**
* Grants permission to update a certificate
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_UpdateCertificate.html
*/
public toUpdateCertificate() {
return this.to('UpdateCertificate');
}
/**
* Grants permission to update a certificate configuration. Use this to specify whether to opt in to or out of certificate transparency logging or to update the certificate domain validation method
*
* Access Level: Write
*
* https://docs.aws.amazon.com/acm/latest/APIReference/API_UpdateCertificateOptions.html
*/
public toUpdateCertificateOptions() {
return this.to('UpdateCertificateOptions');
}
protected accessLevelList: AccessLevelList = {
Tagging: [
'AddTagsToCertificate',
'RemoveTagsFromCertificate',
'TagResource',
'UntagResource'
],
Write: [
'AddTagsToCertificate',
'CreateAcmeDomainValidation',
'CreateAcmeEndpoint',
'CreateAcmeExternalAccountBinding',
'DeleteAcmeDomainValidation',
'DeleteAcmeEndpoint',
'DeleteAcmeExternalAccountBinding',
'DeleteCertificate',
'ImportCertificate',
'PutAccountConfiguration',
'RemoveTagsFromCertificate',
'RenewCertificate',
'RequestCertificate',
'ResendValidationEmail',
'RevokeAcmeAccount',
'RevokeAcmeExternalAccountBinding',
'RevokeCertificate',
'TagResource',
'UntagResource',
'UpdateAcmeDomainValidation',
'UpdateAcmeEndpoint',
'UpdateCertificate',
'UpdateCertificateOptions'
],
Read: [
'DescribeAcmeAccount',
'DescribeAcmeDomainValidation',
'DescribeAcmeEndpoint',
'DescribeAcmeExternalAccountBinding',
'DescribeCertificate',
'ExportCertificate',
'GetAccountConfiguration',
'GetAcmeExternalAccountBindingCredentials',
'GetCertificate',
'ListTagsForCertificate',
'ListTagsForResource'
],
List: [
'ListAcmeAccounts',
'ListAcmeDomainValidations',
'ListAcmeEndpoints',
'ListAcmeExternalAccountBindings',
'ListCertificateDomainValidations',
'ListCertificates',
'SearchCertificates'
]
};
/**
* Adds a resource of type acme-domain-validation to the statement
*
* https://docs.aws.amazon.com/acm/latest/userguide/acm-acme-domain-validation.html
*
* @param acmeEndpointId - Identifier for the acmeEndpointId.
* @param acmeDomainValidationId - Identifier for the acmeDomainValidationId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
public onAcmeDomainValidation(acmeEndpointId: string, acmeDomainValidationId: string, account?: string, region?: string, partition?: string) {
return this.on(`arn:${ partition ?? this.defaultPartition }:acm:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:acme-endpoint/${ acmeEndpointId }/acme-domain-validation/${ acmeDomainValidationId }`);
}
/**
* Adds a resource of type acme-endpoint to the statement
*
* https://docs.aws.amazon.com/acm/latest/userguide/acm-acme-endpoints.html
*
* @param acmeEndpointId - Identifier for the acmeEndpointId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
public onAcmeEndpoint(acmeEndpointId: string, account?: string, region?: string, partition?: string) {
return this.on(`arn:${ partition ?? this.defaultPartition }:acm:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:acme-endpoint/${ acmeEndpointId }`);
}
/**
* Adds a resource of type acme-external-account-binding to the statement
*
* https://docs.aws.amazon.com/acm/latest/userguide/acm-acme-eab.html
*
* @param acmeEndpointId - Identifier for the acmeEndpointId.
* @param externalAccountBindingId - Identifier for the externalAccountBindingId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
public onAcmeExternalAccountBinding(acmeEndpointId: string, externalAccountBindingId: string, account?: string, region?: string, partition?: string) {
return this.on(`arn:${ partition ?? this.defaultPartition }:acm:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:acme-endpoint/${ acmeEndpointId }/acme-external-account-binding/${ externalAccountBindingId }`);
}
/**
* Adds a resource of type certificate to the statement
*
* https://docs.aws.amazon.com/acm/latest/userguide/acm-concepts.html#concept-acm-cert
*
* @param certificateId - Identifier for the certificateId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
public onCertificate(certificateId: string, account?: string, region?: string, partition?: string) {
return this.on(`arn:${ partition ?? this.defaultPartition }:acm:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:certificate/${ certificateId }`);
}
/**
* Filters access by certificateAuthority in the request. Can be used to restrict which Certificate Authorites certificates can be issued from
*
* https://docs.aws.amazon.com/acm/latest/userguide/security-iam.html
*
* Applies to actions:
* - .toRequestCertificate()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifCertificateAuthority(value: string | string[], operator?: Operator | string) {
return this.if(`CertificateAuthority`, value, operator ?? 'StringLike');
}
/**
* Filters access by certificateKeyPairOrigin in the request. Can be used to restrict which certificate provisioning paths are permitted
*
* https://docs.aws.amazon.com/acm/latest/userguide/security-iam.html
*
* Applies to actions:
* - .toAddTagsToCertificate()
* - .toDeleteCertificate()
* - .toRequestCertificate()
* - .toRevokeCertificate()
* - .toUpdateCertificate()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifCertificateKeyPairOrigin(value: string | string[], operator?: Operator | string) {
return this.if(`CertificateKeyPairOrigin`, value, operator ?? 'StringLike');
}
/**
* Filters access by certificateTransparencyLogging option in the request. Default 'ENABLED' if no key is present in the request
*
* https://docs.aws.amazon.com/acm/latest/userguide/security-iam.html
*
* Applies to actions:
* - .toRequestCertificate()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifCertificateTransparencyLogging(value: string | string[], operator?: Operator | string) {
return this.if(`CertificateTransparencyLogging`, value, operator ?? 'StringLike');
}
/**
* Filters access by domainNames in the request. This key can be used to restrict which domains can be in certificate requests
*
* https://docs.aws.amazon.com/acm/latest/userguide/security-iam.html
*
* Applies to actions:
* - .toExportCertificate()
* - .toRequestCertificate()
* - .toRevokeCertificate()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifDomainNames(value: string | string[], operator?: Operator | string) {
return this.if(`DomainNames`, value, operator ?? 'StringLike');
}
/**
* Filters access by the export option in the request. Can be used to restrict creation of certificates that can be exported
*
* https://docs.aws.amazon.com/acm/latest/userguide/security-iam.html
*
* Applies to actions:
* - .toRequestCertificate()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifExport(value: string | string[], operator?: Operator | string) {
return this.if(`Export`, value, operator ?? 'StringLike');
}
/**
* Filters access by keyAlgorithm in the request
*
* https://docs.aws.amazon.com/acm/latest/userguide/security-iam.html
*
* Applies to actions:
* - .toRequestCertificate()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifKeyAlgorithm(value: string | string[], operator?: Operator | string) {
return this.if(`KeyAlgorithm`, value, operator ?? 'StringLike');
}
/**
* Filters access by validationMethod in the request. Default 'EMAIL' if no key is present in the request
*
* https://docs.aws.amazon.com/acm/latest/userguide/security-iam.html
*
* Applies to actions:
* - .toRequestCertificate()
* - .toUpdateCertificateOptions()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifValidationMethod(value: string | string[], operator?: Operator | string) {
return this.if(`ValidationMethod`, value, operator ?? 'StringLike');
}
/**
* Filters access by the presence of tag key-value pairs in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag
*
* Applies to actions:
* - .toAddTagsToCertificate()
* - .toCreateAcmeDomainValidation()
* - .toCreateAcmeEndpoint()
* - .toCreateAcmeExternalAccountBinding()
* - .toImportCertificate()
* - .toRemoveTagsFromCertificate()
* - .toRequestCertificate()
* - .toTagResource()
*
* @param tagKey The tag key to check
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifAwsRequestTag(tagKey: string, value: string | string[], operator?: Operator | string) {
return this.if(`aws:RequestTag/${ tagKey }`, value, operator ?? 'StringLike');
}
/**
* Filters access by tag key-value pairs attached to the resource
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag
*
* Applies to actions:
* - .toAddTagsToCertificate()
* - .toCreateAcmeDomainValidation()
* - .toCreateAcmeExternalAccountBinding()
* - .toDeleteAcmeDomainValidation()
* - .toDeleteAcmeEndpoint()
* - .toDeleteAcmeExternalAccountBinding()
* - .toDeleteCertificate()
* - .toDescribeAcmeAccount()
* - .toDescribeAcmeDomainValidation()
* - .toDescribeAcmeEndpoint()
* - .toDescribeAcmeExternalAccountBinding()
* - .toDescribeCertificate()
* - .toExportCertificate()
* - .toGetAcmeExternalAccountBindingCredentials()
* - .toGetCertificate()
* - .toImportCertificate()
* - .toListAcmeAccounts()
* - .toListAcmeDomainValidations()
* - .toListAcmeExternalAccountBindings()
* - .toListCertificateDomainValidations()
* - .toListTagsForCertificate()
* - .toListTagsForResource()
* - .toRemoveTagsFromCertificate()
* - .toRenewCertificate()
* - .toResendValidationEmail()
* - .toRevokeAcmeAccount()
* - .toRevokeAcmeExternalAccountBinding()
* - .toRevokeCertificate()
* - .toTagResource()
* - .toUntagResource()
* - .toUpdateAcmeDomainValidation()
* - .toUpdateAcmeEndpoint()
* - .toUpdateCertificate()
* - .toUpdateCertificateOptions()
*
* Applies to resource types:
* - acme-domain-validation
* - acme-endpoint
* - acme-external-account-binding
* - certificate
*
* @param tagKey The tag key to check
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifAwsResourceTag(tagKey: string, value: string | string[], operator?: Operator | string) {
return this.if(`aws:ResourceTag/${ tagKey }`, value, operator ?? 'StringLike');
}
/**
* Filters access by the presence of tag keys in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys
*
* Applies to actions:
* - .toAddTagsToCertificate()
* - .toCreateAcmeDomainValidation()
* - .toCreateAcmeEndpoint()
* - .toCreateAcmeExternalAccountBinding()
* - .toImportCertificate()
* - .toRemoveTagsFromCertificate()
* - .toRequestCertificate()
* - .toTagResource()
* - .toUntagResource()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifAwsTagKeys(value: string | string[], operator?: Operator | string) {
return this.if(`aws:TagKeys`, value, operator ?? 'StringLike');
}
}