Class CfnTagAssociation

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:58.434Z") @Stability(Stable) public class CfnTagAssociation extends CfnResource implements IInspectable
A CloudFormation AWS::LakeFormation::TagAssociation.

The AWS::LakeFormation::TagAssociation resource represents an assignment of an LF-tag to a Data Catalog resource (database, table, or column). During a stack operation, CloudFormation calls AWS Lake Formation AddLFTagsToResource API to create a TagAssociation resource and calls the RemoveLFTagsToResource API to delete it.

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;
 CfnTagAssociation cfnTagAssociation = CfnTagAssociation.Builder.create(this, "MyCfnTagAssociation")
         .lfTags(List.of(LFTagPairProperty.builder()
                 .catalogId("catalogId")
                 .tagKey("tagKey")
                 .tagValues(List.of("tagValues"))
                 .build()))
         .resource(ResourceProperty.builder()
                 .catalog(catalog)
                 .database(DatabaseResourceProperty.builder()
                         .catalogId("catalogId")
                         .name("name")
                         .build())
                 .table(TableResourceProperty.builder()
                         .catalogId("catalogId")
                         .databaseName("databaseName")
                         // the properties below are optional
                         .name("name")
                         .tableWildcard(tableWildcard)
                         .build())
                 .tableWithColumns(TableWithColumnsResourceProperty.builder()
                         .catalogId("catalogId")
                         .columnNames(List.of("columnNames"))
                         .databaseName("databaseName")
                         .name("name")
                         .build())
                 .build())
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTagAssociation

      protected CfnTagAssociation(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTagAssociation

      protected CfnTagAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTagAssociation

      @Stability(Stable) public CfnTagAssociation(@NotNull Construct scope, @NotNull String id, @NotNull CfnTagAssociationProps props)
      Create a new AWS::LakeFormation::TagAssociation.

      Parameters:
      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.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrResourceIdentifier

      @Stability(Stable) @NotNull public String getAttrResourceIdentifier()
      Json encoding of the input resource.

      Examples - Database: {"Catalog":null,"Database":{"CatalogId":"123456789012","Name":"ExampleDbName"},"Table":null,"TableWithColumns":null}

      • Table: {"Catalog":null,"Database":null,"Table":{"CatalogId":"123456789012","DatabaseName":"ExampleDbName","Name":"ExampleTableName","TableWildcard":null},"TableWithColumns":null}
      • Columns: {"Catalog":null,"Database":null,"Table":null,"TableWithColumns":{"CatalogId":"123456789012","DatabaseName":"ExampleDbName","Name":"ExampleTableName","ColumnNames":["ExampleColName1","ExampleColName2"]}}
    • getAttrTagsIdentifier

      @Stability(Stable) @NotNull public String getAttrTagsIdentifier()
      Json encoding of the input LFTags list.

      For example: [{"CatalogId":null,"TagKey":"tagKey1","TagValues":null},{"CatalogId":null,"TagKey":"tagKey2","TagValues":null}]

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getLfTags

      @Stability(Stable) @NotNull public Object getLfTags()
      A structure containing an LF-tag key-value pair.
    • setLfTags

      @Stability(Stable) public void setLfTags(@NotNull IResolvable value)
      A structure containing an LF-tag key-value pair.
    • setLfTags

      @Stability(Stable) public void setLfTags(@NotNull List<Object> value)
      A structure containing an LF-tag key-value pair.
    • getResource

      @Stability(Stable) @NotNull public Object getResource()
      UTF-8 string (valid values: DATABASE | TABLE ).

      The resource for which the LF-tag policy applies.

    • setResource

      @Stability(Stable) public void setResource(@NotNull IResolvable value)
      UTF-8 string (valid values: DATABASE | TABLE ).

      The resource for which the LF-tag policy applies.

    • setResource

      @Stability(Stable) public void setResource(@NotNull CfnTagAssociation.ResourceProperty value)
      UTF-8 string (valid values: DATABASE | TABLE ).

      The resource for which the LF-tag policy applies.