@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:37.428Z") 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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnPrincipalPermissions.Builder
A fluent builder for
CfnPrincipalPermissions . |
static interface |
CfnPrincipalPermissions.ColumnWildcardProperty
A wildcard object, consisting of an optional list of excluded column names or indexes.
|
static interface |
CfnPrincipalPermissions.DatabaseResourceProperty
A structure for the database object.
|
static interface |
CfnPrincipalPermissions.DataCellsFilterResourceProperty
A structure that describes certain columns on certain rows.
|
static interface |
CfnPrincipalPermissions.DataLakePrincipalProperty
The AWS Lake Formation principal.
|
static interface |
CfnPrincipalPermissions.DataLocationResourceProperty
A structure for a data location object where permissions are granted or revoked.
|
static interface |
CfnPrincipalPermissions.LFTagKeyResourceProperty
A structure containing an LF-tag key and values for a resource.
|
static interface |
CfnPrincipalPermissions.LFTagPolicyResourceProperty
A list of LF-tag conditions that define a resource's LF-tag policy.
|
static interface |
CfnPrincipalPermissions.LFTagProperty
The LF-tag key and values attached to a resource.
|
static interface |
CfnPrincipalPermissions.ResourceProperty
A structure for the resource.
|
static interface |
CfnPrincipalPermissions.TableResourceProperty
A structure for the table object.
|
static interface |
CfnPrincipalPermissions.TableWithColumnsResourceProperty
A structure for a table with columns object.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnPrincipalPermissions(Construct scope,
java.lang.String id,
CfnPrincipalPermissionsProps props)
Create a new `AWS::LakeFormation::PrincipalPermissions`.
|
protected |
CfnPrincipalPermissions(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnPrincipalPermissions(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrPrincipalIdentifier()
Json encoding of the input principal.
|
java.lang.String |
getAttrResourceIdentifier()
Json encoding of the input resource.
|
java.lang.String |
getCatalog()
The identifier for the Data Catalog .
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.util.List<java.lang.String> |
getPermissions()
The permissions granted or revoked.
|
java.util.List<java.lang.String> |
getPermissionsWithGrantOption()
Indicates the ability to grant permissions (as a subset of permissions granted).
|
java.lang.Object |
getPrincipal()
The principal to be granted a permission.
|
java.lang.Object |
getResource()
The resource to be granted or revoked permissions.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setCatalog(java.lang.String value)
The identifier for the Data Catalog .
|
void |
setPermissions(java.util.List<java.lang.String> value)
The permissions granted or revoked.
|
void |
setPermissionsWithGrantOption(java.util.List<java.lang.String> value)
Indicates the ability to grant permissions (as a subset of permissions granted).
|
void |
setPrincipal(CfnPrincipalPermissions.DataLakePrincipalProperty value)
The principal to be granted a permission.
|
void |
setPrincipal(IResolvable value)
The principal to be granted a permission.
|
void |
setResource(CfnPrincipalPermissions.ResourceProperty value)
The resource to be granted or revoked permissions.
|
void |
setResource(IResolvable value)
The resource to be granted or revoked permissions.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnPrincipalPermissions(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnPrincipalPermissions(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnPrincipalPermissions(Construct scope, java.lang.String id, CfnPrincipalPermissionsProps 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrPrincipalIdentifier()
For example: {"DataLakePrincipalIdentifier":"arn:aws:iam::123456789012:role/ExampleRole"}
public java.lang.String getAttrResourceIdentifier()
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}
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.util.List<java.lang.String> getPermissions()
public void setPermissions(java.util.List<java.lang.String> value)
public java.util.List<java.lang.String> getPermissionsWithGrantOption()
public void setPermissionsWithGrantOption(java.util.List<java.lang.String> value)
public java.lang.Object getPrincipal()
public void setPrincipal(IResolvable value)
public void setPrincipal(CfnPrincipalPermissions.DataLakePrincipalProperty value)
public java.lang.Object getResource()
public void setResource(IResolvable value)
public void setResource(CfnPrincipalPermissions.ResourceProperty value)
public java.lang.String getCatalog()
By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
public void setCatalog(java.lang.String value)
By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.