Class PolicyProps.Jsii$Proxy

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.iam.PolicyProps.Jsii$Proxy
All Implemented Interfaces:
PolicyProps, software.amazon.jsii.JsiiSerializable
Enclosing interface:
PolicyProps

@Stability(Stable) @Internal public static final class PolicyProps.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements PolicyProps
An implementation for PolicyProps
  • Constructor Details

    • Jsii$Proxy

      protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
      Constructor that initializes the object based on values retrieved from the JsiiObject.
      Parameters:
      objRef - Reference to the JSII managed object.
    • Jsii$Proxy

      protected Jsii$Proxy(PolicyProps.Builder builder)
      Constructor that initializes the object based on literal property values passed by the PolicyProps.Builder.
  • Method Details

    • getDocument

      public final PolicyDocument getDocument()
      Description copied from interface: PolicyProps
      Initial PolicyDocument to use for this Policy.

      If omited, any PolicyStatement provided in the statements property will be applied against the empty default PolicyDocument.

      Default: - An empty policy.

      Specified by:
      getDocument in interface PolicyProps
    • getForce

      public final Boolean getForce()
      Description copied from interface: PolicyProps
      Force creation of an AWS::IAM::Policy.

      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

      Specified by:
      getForce in interface PolicyProps
    • getGroups

      public final List<IGroup> getGroups()
      Description copied from interface: PolicyProps
      Groups to attach this policy to.

      You can also use attachToGroup(group) to attach this policy to a group.

      Default: - No groups.

      Specified by:
      getGroups in interface PolicyProps
    • getPolicyName

      public final String getPolicyName()
      Description copied from interface: PolicyProps
      The name of the policy.

      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.

      Specified by:
      getPolicyName in interface PolicyProps
    • getRoles

      public final List<IRole> getRoles()
      Description copied from interface: PolicyProps
      Roles to attach this policy to.

      You can also use attachToRole(role) to attach this policy to a role.

      Default: - No roles.

      Specified by:
      getRoles in interface PolicyProps
    • getStatements

      public final List<PolicyStatement> getStatements()
      Description copied from interface: PolicyProps
      Initial set of permissions to add to this policy document.

      You can also use addStatements(...statement) to add permissions later.

      Default: - No statements.

      Specified by:
      getStatements in interface PolicyProps
    • getUsers

      public final List<IUser> getUsers()
      Description copied from interface: PolicyProps
      Users to attach this policy to.

      You can also use attachToUser(user) to attach this policy to a user.

      Default: - No users.

      Specified by:
      getUsers in interface PolicyProps
    • $jsii$toJson

      @Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
      Specified by:
      $jsii$toJson in interface software.amazon.jsii.JsiiSerializable
    • equals

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object