Class CfnPolicyGrant

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-09-02T11:25:29.415Z") @Stability(Stable) public class CfnPolicyGrant extends CfnResource implements IInspectable
Adds a policy grant (an authorization policy) to a specified entity, including domain units, environment blueprint configurations, or environment profiles.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.datazone.*;
 Object allDomainUnitsGrantFilter;
 Object allUsersGrantFilter;
 Object createEnvironment;
 Object createEnvironmentFromBlueprint;
 Object delegateCreateEnvironmentProfile;
 CfnPolicyGrant cfnPolicyGrant = CfnPolicyGrant.Builder.create(this, "MyCfnPolicyGrant")
         .domainIdentifier("domainIdentifier")
         .entityIdentifier("entityIdentifier")
         .entityType("entityType")
         .policyType("policyType")
         // the properties below are optional
         .detail(PolicyGrantDetailProperty.builder()
                 .addToProjectMemberPool(AddToProjectMemberPoolPolicyGrantDetailProperty.builder()
                         .includeChildDomainUnits(false)
                         .build())
                 .createAssetType(CreateAssetTypePolicyGrantDetailProperty.builder()
                         .includeChildDomainUnits(false)
                         .build())
                 .createDomainUnit(CreateDomainUnitPolicyGrantDetailProperty.builder()
                         .includeChildDomainUnits(false)
                         .build())
                 .createEnvironment(createEnvironment)
                 .createEnvironmentFromBlueprint(createEnvironmentFromBlueprint)
                 .createEnvironmentProfile(CreateEnvironmentProfilePolicyGrantDetailProperty.builder()
                         .domainUnitId("domainUnitId")
                         .build())
                 .createFormType(CreateFormTypePolicyGrantDetailProperty.builder()
                         .includeChildDomainUnits(false)
                         .build())
                 .createGlossary(CreateGlossaryPolicyGrantDetailProperty.builder()
                         .includeChildDomainUnits(false)
                         .build())
                 .createProject(CreateProjectPolicyGrantDetailProperty.builder()
                         .includeChildDomainUnits(false)
                         .build())
                 .createProjectFromProjectProfile(CreateProjectFromProjectProfilePolicyGrantDetailProperty.builder()
                         .includeChildDomainUnits(false)
                         .projectProfiles(List.of("projectProfiles"))
                         .build())
                 .delegateCreateEnvironmentProfile(delegateCreateEnvironmentProfile)
                 .overrideDomainUnitOwners(OverrideDomainUnitOwnersPolicyGrantDetailProperty.builder()
                         .includeChildDomainUnits(false)
                         .build())
                 .overrideProjectOwners(OverrideProjectOwnersPolicyGrantDetailProperty.builder()
                         .includeChildDomainUnits(false)
                         .build())
                 .build())
         .principal(PolicyGrantPrincipalProperty.builder()
                 .domainUnit(DomainUnitPolicyGrantPrincipalProperty.builder()
                         .domainUnitDesignation("domainUnitDesignation")
                         .domainUnitGrantFilter(DomainUnitGrantFilterProperty.builder()
                                 .allDomainUnitsGrantFilter(allDomainUnitsGrantFilter)
                                 .build())
                         .domainUnitIdentifier("domainUnitIdentifier")
                         .build())
                 .group(GroupPolicyGrantPrincipalProperty.builder()
                         .groupIdentifier("groupIdentifier")
                         .build())
                 .project(ProjectPolicyGrantPrincipalProperty.builder()
                         .projectDesignation("projectDesignation")
                         .projectGrantFilter(ProjectGrantFilterProperty.builder()
                                 .domainUnitFilter(DomainUnitFilterForProjectProperty.builder()
                                         .domainUnit("domainUnit")
                                         // the properties below are optional
                                         .includeChildDomainUnits(false)
                                         .build())
                                 .build())
                         .projectIdentifier("projectIdentifier")
                         .build())
                 .user(UserPolicyGrantPrincipalProperty.builder()
                         .allUsersGrantFilter(allUsersGrantFilter)
                         .userIdentifier("userIdentifier")
                         .build())
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnPolicyGrant

      protected CfnPolicyGrant(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnPolicyGrant

      protected CfnPolicyGrant(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnPolicyGrant

      @Stability(Stable) public CfnPolicyGrant(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPolicyGrantProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      Specifies the timestamp at which policy grant member was created.
    • getAttrCreatedBy

      @Stability(Stable) @NotNull public String getAttrCreatedBy()
      Specifies the user who created the policy grant member.
    • getAttrGrantId

      @Stability(Stable) @NotNull public String getAttrGrantId()
      The unique identifier of the policy grant returned by the AddPolicyGrant API.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getDomainIdentifier

      @Stability(Stable) @NotNull public String getDomainIdentifier()
      The ID of the domain where you want to add a policy grant.
    • setDomainIdentifier

      @Stability(Stable) public void setDomainIdentifier(@NotNull String value)
      The ID of the domain where you want to add a policy grant.
    • getEntityIdentifier

      @Stability(Stable) @NotNull public String getEntityIdentifier()
      The ID of the entity (resource) to which you want to add a policy grant.
    • setEntityIdentifier

      @Stability(Stable) public void setEntityIdentifier(@NotNull String value)
      The ID of the entity (resource) to which you want to add a policy grant.
    • getEntityType

      @Stability(Stable) @NotNull public String getEntityType()
      The type of entity (resource) to which the grant is added.
    • setEntityType

      @Stability(Stable) public void setEntityType(@NotNull String value)
      The type of entity (resource) to which the grant is added.
    • getPolicyType

      @Stability(Stable) @NotNull public String getPolicyType()
      The type of policy that you want to grant.
    • setPolicyType

      @Stability(Stable) public void setPolicyType(@NotNull String value)
      The type of policy that you want to grant.
    • getDetail

      @Stability(Stable) @Nullable public Object getDetail()
      The details of the policy grant member.
    • setDetail

      @Stability(Stable) public void setDetail(@Nullable IResolvable value)
      The details of the policy grant member.
    • setDetail

      @Stability(Stable) public void setDetail(@Nullable CfnPolicyGrant.PolicyGrantDetailProperty value)
      The details of the policy grant member.
    • getPrincipal

      @Stability(Stable) @Nullable public Object getPrincipal()
      The principal of the policy grant member.
    • setPrincipal

      @Stability(Stable) public void setPrincipal(@Nullable IResolvable value)
      The principal of the policy grant member.
    • setPrincipal

      @Stability(Stable) public void setPrincipal(@Nullable CfnPolicyGrant.PolicyGrantPrincipalProperty value)
      The principal of the policy grant member.