@Stability(value=Experimental) @Internal public static final class PolicyProps.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements PolicyProps
PolicyProps
software.amazon.jsii.JsiiObject.InitializationMode
PolicyProps.Builder, PolicyProps.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.
|
protected |
Jsii$Proxy(PolicyDocument document,
Boolean force,
List<? extends IGroup> groups,
String policyName,
List<? extends IRole> roles,
List<? extends PolicyStatement> statements,
List<? extends IUser> users)
Constructor that initializes the object based on literal property values passed by the
PolicyProps.Builder . |
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.JsonNode |
$jsii$toJson() |
boolean |
equals(Object o) |
PolicyDocument |
getDocument()
(experimental) Initial PolicyDocument to use for this Policy.
|
Boolean |
getForce()
(experimental) Force creation of an `AWS::IAM::Policy`.
|
List<IGroup> |
getGroups()
(experimental) Groups to attach this policy to.
|
String |
getPolicyName()
(experimental) The name of the policy.
|
List<IRole> |
getRoles()
(experimental) Roles to attach this policy to.
|
List<PolicyStatement> |
getStatements()
(experimental) Initial set of permissions to add to this policy document.
|
List<IUser> |
getUsers()
(experimental) Users to attach this policy to.
|
int |
hashCode() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
builder
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
objRef
- Reference to the JSII managed object.protected Jsii$Proxy(PolicyDocument document, Boolean force, List<? extends IGroup> groups, String policyName, List<? extends IRole> roles, List<? extends PolicyStatement> statements, List<? extends IUser> users)
PolicyProps.Builder
.public final PolicyDocument getDocument()
PolicyProps
If omited, any
PolicyStatement
provided in the statements
property will be applied
against the empty default PolicyDocument
.
Default: - An empty policy.
getDocument
in interface PolicyProps
public final Boolean getForce()
PolicyProps
Unless set to true
, this Policy
construct will not materialize to an
AWS::IAM::Policy
CloudFormation resource in case it would have no effect
(for example, if it remains unattached to an IAM identity or if it has no
statements). This is generally desired behavior, since it prevents
creating invalid--and hence undeployable--CloudFormation templates.
In cases where you know the policy must be created and it is actually
an error if no statements have been added to it, you can set this to true
.
Default: false
getForce
in interface PolicyProps
public final List<IGroup> getGroups()
PolicyProps
You can also use attachToGroup(group)
to attach this policy to a group.
Default: - No groups.
getGroups
in interface PolicyProps
public final String getPolicyName()
PolicyProps
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: - Uses the logical ID of the policy resource, which is ensured to be unique within the stack.
getPolicyName
in interface PolicyProps
public final List<IRole> getRoles()
PolicyProps
You can also use attachToRole(role)
to attach this policy to a role.
Default: - No roles.
getRoles
in interface PolicyProps
public final List<PolicyStatement> getStatements()
PolicyProps
You can also use addStatements(...statement)
to add permissions later.
Default: - No statements.
getStatements
in interface PolicyProps
public final List<IUser> getUsers()
PolicyProps
You can also use attachToUser(user)
to attach this policy to a user.
Default: - No users.
getUsers
in interface PolicyProps
@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
$jsii$toJson
in interface software.amazon.jsii.JsiiSerializable
Copyright © 2021. All rights reserved.