Interface CfnTagProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnTagProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.102.0 (build e354887)",
date="2024-08-23T05:56:18.808Z")
@Stability(Stable)
public interface CfnTagProps
extends software.amazon.jsii.JsiiSerializable
Properties for defining a
CfnTag
.
Example:
import software.amazon.awscdk.*; import software.amazon.awscdk.services.glue.alpha.S3Table; import software.amazon.awscdk.services.glue.alpha.Database; import software.amazon.awscdk.services.glue.alpha.DataFormat; import software.amazon.awscdk.services.glue.alpha.Schema; import software.amazon.awscdk.services.lakeformation.CfnDataLakeSettings; import software.amazon.awscdk.services.lakeformation.CfnTag; import software.amazon.awscdk.services.lakeformation.CfnTagAssociation; Stack stack; String accountId; String tagKey = "aws"; String[] tagValues = List.of("dev"); Database database = new Database(this, "Database"); S3Table table = S3Table.Builder.create(this, "Table") .database(database) .columns(List.of(Column.builder() .name("col1") .type(Schema.STRING) .build(), Column.builder() .name("col2") .type(Schema.STRING) .build())) .dataFormat(DataFormat.CSV) .build(); DefaultStackSynthesizer synthesizer = (DefaultStackSynthesizer)stack.getSynthesizer(); CfnDataLakeSettings.Builder.create(this, "DataLakeSettings") .admins(List.of(DataLakePrincipalProperty.builder() .dataLakePrincipalIdentifier(stack.formatArn(ArnComponents.builder() .service("iam") .resource("role") .region("") .account(accountId) .resourceName("Admin") .build())) .build(), DataLakePrincipalProperty.builder() // The CDK cloudformation execution role. .dataLakePrincipalIdentifier(synthesizer.cloudFormationExecutionRoleArn.replace("${AWS::Partition}", "aws")) .build())) .build(); CfnTag tag = CfnTag.Builder.create(this, "Tag") .catalogId(accountId) .tagKey(tagKey) .tagValues(tagValues) .build(); LFTagPairProperty lfTagPairProperty = LFTagPairProperty.builder() .catalogId(accountId) .tagKey(tagKey) .tagValues(tagValues) .build(); CfnTagAssociation tagAssociation = CfnTagAssociation.Builder.create(this, "TagAssociation") .lfTags(List.of(lfTagPairProperty)) .resource(ResourceProperty.builder() .tableWithColumns(TableWithColumnsResourceProperty.builder() .databaseName(database.getDatabaseName()) .columnNames(List.of("col1", "col2")) .catalogId(accountId) .name(table.getTableName()) .build()) .build()) .build(); tagAssociation.node.addDependency(tag); tagAssociation.node.addDependency(table);
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forCfnTagProps
static final class
An implementation forCfnTagProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic CfnTagProps.Builder
builder()
default String
Catalog id string, not less than 1 or more than 255 bytes long, matching the single-line string pattern .UTF-8 string, not less than 1 or more than 255 bytes long, matching the single-line string pattern .An array of UTF-8 strings, not less than 1 or more than 50 strings.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getTagKey
UTF-8 string, not less than 1 or more than 255 bytes long, matching the single-line string pattern .The key-name for the LF-tag.
- See Also:
-
getTagValues
An array of UTF-8 strings, not less than 1 or more than 50 strings.A list of possible values of the corresponding
TagKey
of an LF-tag key-value pair.- See Also:
-
getCatalogId
Catalog id string, not less than 1 or more than 255 bytes long, matching the single-line string pattern .The identifier for the Data Catalog . 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 AWS Lake Formation environment.
- See Also:
-
builder
- Returns:
- a
CfnTagProps.Builder
ofCfnTagProps
-