@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.355Z") @Stability(value=Stable) public class CfnPermissions extends CfnResource implements IInspectable
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.
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnPermissions.Builder
A fluent builder for
CfnPermissions. |
static interface |
CfnPermissions.ColumnWildcardProperty
A wildcard object, consisting of an optional list of excluded column names or indexes.
|
static interface |
CfnPermissions.DatabaseResourceProperty
A structure for the database object.
|
static interface |
CfnPermissions.DataLakePrincipalProperty
The Lake Formation principal.
|
static interface |
CfnPermissions.DataLocationResourceProperty
A structure for a data location object where permissions are granted or revoked.
|
static interface |
CfnPermissions.ResourceProperty
A structure for the resource.
|
static interface |
CfnPermissions.TableResourceProperty
A structure for the table object.
|
static interface |
CfnPermissions.TableWildcardProperty
A wildcard object representing every table under a database.
|
static interface |
CfnPermissions.TableWithColumnsResourceProperty
A structure for a table with columns object.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnPermissions(software.constructs.Construct scope,
String id,
CfnPermissionsProps props)
Create a new `AWS::LakeFormation::Permissions`.
|
protected |
CfnPermissions(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnPermissions(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
getCfnProperties() |
Object |
getDataLakePrincipal()
The AWS Lake Formation principal.
|
List<String> |
getPermissions()
The permissions granted or revoked.
|
List<String> |
getPermissionsWithGrantOption()
Indicates whether to grant the ability to grant permissions (as a subset of permissions granted).
|
Object |
getResource()
A structure for the resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDataLakePrincipal(CfnPermissions.DataLakePrincipalProperty value)
The AWS Lake Formation principal.
|
void |
setDataLakePrincipal(IResolvable value)
The AWS Lake Formation principal.
|
void |
setPermissions(List<String> value)
The permissions granted or revoked.
|
void |
setPermissionsWithGrantOption(List<String> value)
Indicates whether to grant the ability to grant permissions (as a subset of permissions granted).
|
void |
setResource(CfnPermissions.ResourceProperty value)
A structure for the resource.
|
void |
setResource(IResolvable value)
A structure for the resource.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnPermissions(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnPermissions(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnPermissions(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnPermissionsProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public Object getDataLakePrincipal()
@Stability(value=Stable)
public void setDataLakePrincipal(@NotNull
CfnPermissions.DataLakePrincipalProperty value)
@Stability(value=Stable)
public void setDataLakePrincipal(@NotNull
IResolvable value)
@Stability(value=Stable) @NotNull public Object getResource()
@Stability(value=Stable)
public void setResource(@NotNull
CfnPermissions.ResourceProperty value)
@Stability(value=Stable)
public void setResource(@NotNull
IResolvable value)
@Stability(value=Stable) @Nullable public List<String> getPermissions()
@Stability(value=Stable)
public void setPermissions(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public List<String> getPermissionsWithGrantOption()
Copyright © 2022. All rights reserved.