@Stability(value=Experimental) public static final class ManagedPolicy.Builder extends Object implements software.amazon.jsii.Builder<ManagedPolicy>
ManagedPolicy.| Modifier and Type | Method and Description |
|---|---|
ManagedPolicy |
build() |
static ManagedPolicy.Builder |
create(software.constructs.Construct scope,
String id) |
ManagedPolicy.Builder |
description(String description)
(experimental) A description of the managed policy.
|
ManagedPolicy.Builder |
document(PolicyDocument document)
(experimental) Initial PolicyDocument to use for this ManagedPolicy.
|
ManagedPolicy.Builder |
groups(List<? extends IGroup> groups)
(experimental) Groups to attach this policy to.
|
ManagedPolicy.Builder |
managedPolicyName(String managedPolicyName)
(experimental) The name of the managed policy.
|
ManagedPolicy.Builder |
path(String path)
(experimental) The path for the policy.
|
ManagedPolicy.Builder |
roles(List<? extends IRole> roles)
(experimental) Roles to attach this policy to.
|
ManagedPolicy.Builder |
statements(List<? extends PolicyStatement> statements)
(experimental) Initial set of permissions to add to this policy document.
|
ManagedPolicy.Builder |
users(List<? extends IUser> users)
(experimental) Users to attach this policy to.
|
@Stability(value=Experimental) public static ManagedPolicy.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.ManagedPolicy.Builder.@Stability(value=Experimental) public ManagedPolicy.Builder description(String description)
Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables." The policy description is immutable. After a value is assigned, it cannot be changed.
Default: - empty
description - A description of the managed policy. This parameter is required.this@Stability(value=Experimental) public ManagedPolicy.Builder document(PolicyDocument document)
If omited, any
PolicyStatement provided in the statements property will be applied
against the empty default PolicyDocument.
Default: - An empty policy.
document - Initial PolicyDocument to use for this ManagedPolicy. This parameter is required.this@Stability(value=Experimental) public ManagedPolicy.Builder groups(List<? extends IGroup> groups)
You can also use attachToGroup(group) to attach this policy to a group.
Default: - No groups.
groups - Groups to attach this policy to. This parameter is required.this@Stability(value=Experimental) public ManagedPolicy.Builder managedPolicyName(String managedPolicyName)
If you specify multiple policies for an entity, specify unique names. For example, if you specify a list of policies for an IAM role, each policy must have a unique name.
Default: - A name is automatically generated.
managedPolicyName - The name of the managed policy. This parameter is required.this@Stability(value=Experimental) public ManagedPolicy.Builder path(String path)
This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (!) through the DEL character (), including most punctuation characters, digits, and upper and lowercased letters.
For more information about paths, see IAM Identifiers in the IAM User Guide.
Default: - "/"
path - The path for the policy. This parameter is required.this@Stability(value=Experimental) public ManagedPolicy.Builder roles(List<? extends IRole> roles)
You can also use attachToRole(role) to attach this policy to a role.
Default: - No roles.
roles - Roles to attach this policy to. This parameter is required.this@Stability(value=Experimental) public ManagedPolicy.Builder statements(List<? extends PolicyStatement> statements)
You can also use addPermission(statement) to add permissions later.
Default: - No statements.
statements - Initial set of permissions to add to this policy document. This parameter is required.this@Stability(value=Experimental) public ManagedPolicy.Builder users(List<? extends IUser> users)
You can also use attachToUser(user) to attach this policy to a user.
Default: - No users.
users - Users to attach this policy to. This parameter is required.this@Stability(value=Experimental) public ManagedPolicy build()
build in interface software.amazon.jsii.Builder<ManagedPolicy>Copyright © 2021. All rights reserved.