Class CfnPrincipalPermissions
- All Implemented Interfaces:
IInspectable,IPrincipalPermissionsRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnPrincipalPermissions.static interfaceA wildcard object, consisting of an optional list of excluded column names or indexes.static interfaceA structure for the database object.static interfaceA structure that describes certain columns on certain rows.static interfaceThe AWS Lake Formation principal.static interfaceA structure for a data location object where permissions are granted or revoked.static interfaceA structure containing an LF-tag key and values for a resource.static interfaceA list of LF-tag conditions that define a resource's LF-tag policy.static interfaceThe LF-tag key and values attached to a resource.static interfaceA structure for the resource.static interfaceA structure for the table object.static interfaceA structure for a table with columns object.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.lakeformation.IPrincipalPermissionsRef
IPrincipalPermissionsRef.Jsii$Default, IPrincipalPermissionsRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnPrincipalPermissions(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnPrincipalPermissions(software.amazon.jsii.JsiiObjectRef objRef) CfnPrincipalPermissions(software.constructs.Construct scope, String id, CfnPrincipalPermissionsProps props) -
Method Summary
Modifier and TypeMethodDescriptionJson encoding of the input principal.Json encoding of the input resource.The identifier for the Data Catalog .The permissions granted or revoked.Indicates the ability to grant permissions (as a subset of permissions granted).The principal to be granted a permission.A reference to a PrincipalPermissions resource.The resource to be granted or revoked permissions.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetCatalog(String value) The identifier for the Data Catalog .voidsetPermissions(List<String> value) The permissions granted or revoked.voidsetPermissionsWithGrantOption(List<String> value) Indicates the ability to grant permissions (as a subset of permissions granted).voidsetPrincipal(IResolvable value) The principal to be granted a permission.voidThe principal to be granted a permission.voidsetResource(IResolvable value) The resource to be granted or revoked permissions.voidThe resource to be granted or revoked permissions.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrPrincipalIdentifier
Json encoding of the input principal.For example:
{"DataLakePrincipalIdentifier":"arn:aws:iam::123456789012:role/ExampleRole"} -
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
- Overrides:
getCfnPropertiesin classCfnResource
-
getPrincipalPermissionsRef
A reference to a PrincipalPermissions resource.- Specified by:
getPrincipalPermissionsRefin interfaceIPrincipalPermissionsRef
-
getPermissions
The permissions granted or revoked. -
setPermissions
The permissions granted or revoked. -
getPermissionsWithGrantOption
Indicates the ability to grant permissions (as a subset of permissions granted). -
setPermissionsWithGrantOption
Indicates the ability to grant permissions (as a subset of permissions granted). -
getPrincipal
The principal to be granted a permission.Returns union: either
IResolvableorCfnPrincipalPermissions.DataLakePrincipalProperty -
setPrincipal
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
The resource to be granted or revoked permissions.Returns union: either
IResolvableorCfnPrincipalPermissions.ResourceProperty -
setResource
The resource to be granted or revoked permissions. -
setResource
The resource to be granted or revoked permissions. -
getCatalog
The identifier for the Data Catalog . -
setCatalog
The identifier for the Data Catalog .
-