Class CfnPermissions
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::LakeFormation::Permissions.
The AWS::LakeFormation::Permissions resource represents the permissions that a principal has on an AWS Glue Data Catalog resource (such as AWS Glue database or AWS Glue tables). When you upload a permissions stack, the permissions are granted to the principal and when you remove the stack, the permissions are revoked from the principal. If you remove a stack, and the principal does not have the permissions referenced in the stack then AWS Lake Formation will throw an error because you can’t call revoke on non-existing permissions. To successfully remove the stack, you’ll need to regrant those permissions and then remove the stack.
New versions of AWS Lake Formation permission resources are now available. For more information, see: AWS:LakeFormation::PrincipalPermissions
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.*;
CfnPermissions cfnPermissions = CfnPermissions.Builder.create(this, "MyCfnPermissions")
.dataLakePrincipal(DataLakePrincipalProperty.builder()
.dataLakePrincipalIdentifier("dataLakePrincipalIdentifier")
.build())
.resource(ResourceProperty.builder()
.databaseResource(DatabaseResourceProperty.builder()
.catalogId("catalogId")
.name("name")
.build())
.dataLocationResource(DataLocationResourceProperty.builder()
.catalogId("catalogId")
.s3Resource("s3Resource")
.build())
.tableResource(TableResourceProperty.builder()
.catalogId("catalogId")
.databaseName("databaseName")
.name("name")
.tableWildcard(TableWildcardProperty.builder().build())
.build())
.tableWithColumnsResource(TableWithColumnsResourceProperty.builder()
.catalogId("catalogId")
.columnNames(List.of("columnNames"))
.columnWildcard(ColumnWildcardProperty.builder()
.excludedColumnNames(List.of("excludedColumnNames"))
.build())
.databaseName("databaseName")
.name("name")
.build())
.build())
// the properties below are optional
.permissions(List.of("permissions"))
.permissionsWithGrantOption(List.of("permissionsWithGrantOption"))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnPermissions.static interfaceA wildcard object, consisting of an optional list of excluded column names or indexes.static interfaceA structure for the database object.static interfaceThe Lake Formation principal.static interfaceA structure for a data location object where permissions are granted or revoked.static interfaceA structure for the resource.static interfaceA structure for the table object.static interfaceA wildcard object representing every table under a database.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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnPermissions(Construct scope, String id, CfnPermissionsProps props) Create a newAWS::LakeFormation::Permissions.protectedCfnPermissions(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnPermissions(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe AWS Lake Formation principal.The permissions granted or revoked.Indicates the ability to grant permissions (as a subset of permissions granted).A structure for the resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDataLakePrincipal(IResolvable value) The AWS Lake Formation principal.voidThe AWS Lake Formation principal.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).voidsetResource(IResolvable value) A structure for the resource.voidA structure for the resource.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnPermissions
protected CfnPermissions(software.amazon.jsii.JsiiObjectRef objRef) -
CfnPermissions
protected CfnPermissions(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnPermissions
@Stability(Stable) public CfnPermissions(@NotNull Construct scope, @NotNull String id, @NotNull CfnPermissionsProps props) Create a newAWS::LakeFormation::Permissions.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDataLakePrincipal
The AWS Lake Formation principal. -
setDataLakePrincipal
The AWS Lake Formation principal. -
setDataLakePrincipal
@Stability(Stable) public void setDataLakePrincipal(@NotNull CfnPermissions.DataLakePrincipalProperty value) The AWS Lake Formation principal. -
getResource
A structure for the resource. -
setResource
A structure for the resource. -
setResource
A structure for the resource. -
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).
-