@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.780Z") @Stability(value=Stable) public interface PolicyDocumentProps extends software.amazon.jsii.JsiiSerializable
Example:
IRole myTrustedAdminRole = Role.fromRoleArn(this, "TrustedRole", "arn:aws:iam:....");
// Creates a limited admin policy and assigns to the account root.
PolicyDocument myCustomPolicy = PolicyDocument.Builder.create()
.statements(List.of(PolicyStatement.Builder.create()
.actions(List.of("kms:Create*", "kms:Describe*", "kms:Enable*", "kms:List*", "kms:Put*"))
.principals(List.of(new AccountRootPrincipal()))
.resources(List.of("*"))
.build()))
.build();
Key key = Key.Builder.create(this, "MyKey")
.policy(myCustomPolicy)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
PolicyDocumentProps.Builder
A builder for
PolicyDocumentProps |
static class |
PolicyDocumentProps.Jsii$Proxy
An implementation for
PolicyDocumentProps |
| Modifier and Type | Method and Description |
|---|---|
static PolicyDocumentProps.Builder |
builder() |
default Boolean |
getAssignSids()
Automatically assign Statement Ids to all statements.
|
default Boolean |
getMinimize()
Try to minimize the policy by merging statements.
|
default List<PolicyStatement> |
getStatements()
Initial statements to add to the policy document.
|
@Stability(value=Stable) @Nullable default Boolean getAssignSids()
Default: false
@Stability(value=Stable) @Nullable default Boolean getMinimize()
To avoid overrunning the maximum policy size, combine statements if they produce the same result. Merging happens according to the following rules:
Default: - false, unless the feature flag `@aws-cdk/aws-iam:minimizePolicies` is set
@Stability(value=Stable) @Nullable default List<PolicyStatement> getStatements()
Default: - No statements
@Stability(value=Stable) static PolicyDocumentProps.Builder builder()
PolicyDocumentProps.Builder of PolicyDocumentPropsCopyright © 2022. All rights reserved.