Class CfnPrincipalPermissions

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.lakeformation.CfnPrincipalPermissions
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-13T21:17:36.332Z") @Stability(Stable) public class CfnPrincipalPermissions extends CfnResource implements IInspectable
The AWS::LakeFormation::PrincipalPermissions resource represents the permissions that a principal has on a Data Catalog resource (such as AWS Glue databases or AWS Glue tables).

When you create a PrincipalPermissions resource, the permissions are granted via the AWS Lake Formation GrantPermissions API operation. When you delete a PrincipalPermissions resource, the permissions on principal-resource pair are revoked via the AWS Lake Formation RevokePermissions API operation.

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.lakeformation.*;
 Object catalog;
 Object tableWildcard;
 CfnPrincipalPermissions cfnPrincipalPermissions = CfnPrincipalPermissions.Builder.create(this, "MyCfnPrincipalPermissions")
         .permissions(List.of("permissions"))
         .permissionsWithGrantOption(List.of("permissionsWithGrantOption"))
         .principal(DataLakePrincipalProperty.builder()
                 .dataLakePrincipalIdentifier("dataLakePrincipalIdentifier")
                 .build())
         .resource(ResourceProperty.builder()
                 .catalog(catalog)
                 .database(DatabaseResourceProperty.builder()
                         .catalogId("catalogId")
                         .name("name")
                         .build())
                 .dataCellsFilter(DataCellsFilterResourceProperty.builder()
                         .databaseName("databaseName")
                         .name("name")
                         .tableCatalogId("tableCatalogId")
                         .tableName("tableName")
                         .build())
                 .dataLocation(DataLocationResourceProperty.builder()
                         .catalogId("catalogId")
                         .resourceArn("resourceArn")
                         .build())
                 .lfTag(LFTagKeyResourceProperty.builder()
                         .catalogId("catalogId")
                         .tagKey("tagKey")
                         .tagValues(List.of("tagValues"))
                         .build())
                 .lfTagPolicy(LFTagPolicyResourceProperty.builder()
                         .catalogId("catalogId")
                         .expression(List.of(LFTagProperty.builder()
                                 .tagKey("tagKey")
                                 .tagValues(List.of("tagValues"))
                                 .build()))
                         .resourceType("resourceType")
                         .build())
                 .table(TableResourceProperty.builder()
                         .catalogId("catalogId")
                         .databaseName("databaseName")
                         // the properties below are optional
                         .name("name")
                         .tableWildcard(tableWildcard)
                         .build())
                 .tableWithColumns(TableWithColumnsResourceProperty.builder()
                         .catalogId("catalogId")
                         .databaseName("databaseName")
                         .name("name")
                         // the properties below are optional
                         .columnNames(List.of("columnNames"))
                         .columnWildcard(ColumnWildcardProperty.builder()
                                 .excludedColumnNames(List.of("excludedColumnNames"))
                                 .build())
                         .build())
                 .build())
         // the properties below are optional
         .catalog("catalog")
         .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

    • CfnPrincipalPermissions

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

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

      @Stability(Stable) public CfnPrincipalPermissions(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPrincipalPermissionsProps 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.
    • getAttrPrincipalIdentifier

      @Stability(Stable) @NotNull public String getAttrPrincipalIdentifier()
      Json encoding of the input principal.

      For example: {"DataLakePrincipalIdentifier":"arn:aws:iam::123456789012:role/ExampleRole"}

    • getAttrResourceIdentifier

      @Stability(Stable) @NotNull public String getAttrResourceIdentifier()
      Json encoding of the input resource.

      For example: {"Catalog":null,"Database":null,"Table":null,"TableWithColumns":null,"DataLocation":null,"DataCellsFilter":{"TableCatalogId":"123456789012","DatabaseName":"ExampleDatabase","TableName":"ExampleTable","Name":"ExampleFilter"},"LFTag":null,"LFTagPolicy":null}

    • getCfnProperties

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

      @Stability(Stable) @NotNull public List<String> getPermissions()
      The permissions granted or revoked.
    • setPermissions

      @Stability(Stable) public void setPermissions(@NotNull List<String> value)
      The permissions granted or revoked.
    • getPermissionsWithGrantOption

      @Stability(Stable) @NotNull public List<String> getPermissionsWithGrantOption()
      Indicates the ability to grant permissions (as a subset of permissions granted).
    • setPermissionsWithGrantOption

      @Stability(Stable) public void setPermissionsWithGrantOption(@NotNull List<String> value)
      Indicates the ability to grant permissions (as a subset of permissions granted).
    • getPrincipal

      @Stability(Stable) @NotNull public Object getPrincipal()
      The principal to be granted a permission.
    • setPrincipal

      @Stability(Stable) public void setPrincipal(@NotNull IResolvable value)
      The principal to be granted a permission.
    • setPrincipal

      @Stability(Stable) public void setPrincipal(@NotNull CfnPrincipalPermissions.DataLakePrincipalProperty value)
      The principal to be granted a permission.
    • getResource

      @Stability(Stable) @NotNull public Object getResource()
      The resource to be granted or revoked permissions.
    • setResource

      @Stability(Stable) public void setResource(@NotNull IResolvable value)
      The resource to be granted or revoked permissions.
    • setResource

      @Stability(Stable) public void setResource(@NotNull CfnPrincipalPermissions.ResourceProperty value)
      The resource to be granted or revoked permissions.
    • getCatalog

      @Stability(Stable) @Nullable public String getCatalog()
      The identifier for the Data Catalog .
    • setCatalog

      @Stability(Stable) public void setCatalog(@Nullable String value)
      The identifier for the Data Catalog .