Class CfnWorkGroup

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:12.867Z") @Stability(Stable) public class CfnWorkGroup extends CfnResource implements IInspectable, ITaggable
The AWS::Athena::WorkGroup resource specifies an Amazon Athena workgroup, which contains a name, description, creation time, state, and other configuration, listed under WorkGroupConfiguration .

Each workgroup enables you to isolate queries for you or your group from other queries in the same account. For more information, see CreateWorkGroup in the Amazon Athena API Reference .

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.athena.*;
 CfnWorkGroup cfnWorkGroup = CfnWorkGroup.Builder.create(this, "MyCfnWorkGroup")
         .name("name")
         // the properties below are optional
         .description("description")
         .recursiveDeleteOption(false)
         .state("state")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .workGroupConfiguration(WorkGroupConfigurationProperty.builder()
                 .additionalConfiguration("additionalConfiguration")
                 .bytesScannedCutoffPerQuery(123)
                 .customerContentEncryptionConfiguration(CustomerContentEncryptionConfigurationProperty.builder()
                         .kmsKey("kmsKey")
                         .build())
                 .enforceWorkGroupConfiguration(false)
                 .engineVersion(EngineVersionProperty.builder()
                         .effectiveEngineVersion("effectiveEngineVersion")
                         .selectedEngineVersion("selectedEngineVersion")
                         .build())
                 .executionRole("executionRole")
                 .publishCloudWatchMetricsEnabled(false)
                 .requesterPaysEnabled(false)
                 .resultConfiguration(ResultConfigurationProperty.builder()
                         .aclConfiguration(AclConfigurationProperty.builder()
                                 .s3AclOption("s3AclOption")
                                 .build())
                         .encryptionConfiguration(EncryptionConfigurationProperty.builder()
                                 .encryptionOption("encryptionOption")
                                 // the properties below are optional
                                 .kmsKey("kmsKey")
                                 .build())
                         .expectedBucketOwner("expectedBucketOwner")
                         .outputLocation("outputLocation")
                         .build())
                 .build())
         .workGroupConfigurationUpdates(WorkGroupConfigurationUpdatesProperty.builder()
                 .additionalConfiguration("additionalConfiguration")
                 .bytesScannedCutoffPerQuery(123)
                 .customerContentEncryptionConfiguration(CustomerContentEncryptionConfigurationProperty.builder()
                         .kmsKey("kmsKey")
                         .build())
                 .enforceWorkGroupConfiguration(false)
                 .engineVersion(EngineVersionProperty.builder()
                         .effectiveEngineVersion("effectiveEngineVersion")
                         .selectedEngineVersion("selectedEngineVersion")
                         .build())
                 .executionRole("executionRole")
                 .publishCloudWatchMetricsEnabled(false)
                 .removeBytesScannedCutoffPerQuery(false)
                 .removeCustomerContentEncryptionConfiguration(false)
                 .requesterPaysEnabled(false)
                 .resultConfigurationUpdates(ResultConfigurationUpdatesProperty.builder()
                         .aclConfiguration(AclConfigurationProperty.builder()
                                 .s3AclOption("s3AclOption")
                                 .build())
                         .encryptionConfiguration(EncryptionConfigurationProperty.builder()
                                 .encryptionOption("encryptionOption")
                                 // the properties below are optional
                                 .kmsKey("kmsKey")
                                 .build())
                         .expectedBucketOwner("expectedBucketOwner")
                         .outputLocation("outputLocation")
                         .removeAclConfiguration(false)
                         .removeEncryptionConfiguration(false)
                         .removeExpectedBucketOwner(false)
                         .removeOutputLocation(false)
                         .build())
                 .build())
         .build();
 

See Also:
  • 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

    • CfnWorkGroup

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

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

      @Stability(Stable) public CfnWorkGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnWorkGroupProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). 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.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      The date and time the workgroup was created, as a UNIX timestamp in seconds.

      For example: 1582761016 .

    • getAttrWorkGroupConfigurationEngineVersionEffectiveEngineVersion

      @Stability(Stable) @NotNull public String getAttrWorkGroupConfigurationEngineVersionEffectiveEngineVersion()
      Read only.

      The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a CreateWorkGroup or UpdateWorkGroup operation, the EffectiveEngineVersion field is ignored.

    • getAttrWorkGroupConfigurationUpdatesEngineVersionEffectiveEngineVersion

      @Stability(Stable) @NotNull public String getAttrWorkGroupConfigurationUpdatesEngineVersionEffectiveEngineVersion()
      Read only.

      The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a CreateWorkGroup or UpdateWorkGroup operation, the EffectiveEngineVersion field is ignored.

    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getName

      @Stability(Stable) @NotNull public String getName()
      The workgroup name.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The workgroup name.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The workgroup description.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The workgroup description.
    • getRecursiveDeleteOption

      @Stability(Stable) @Nullable public Object getRecursiveDeleteOption()
      The option to delete a workgroup and its contents even if the workgroup contains any named queries.
    • setRecursiveDeleteOption

      @Stability(Stable) public void setRecursiveDeleteOption(@Nullable Boolean value)
      The option to delete a workgroup and its contents even if the workgroup contains any named queries.
    • setRecursiveDeleteOption

      @Stability(Stable) public void setRecursiveDeleteOption(@Nullable IResolvable value)
      The option to delete a workgroup and its contents even if the workgroup contains any named queries.
    • getState

      @Stability(Stable) @Nullable public String getState()
      The state of the workgroup: ENABLED or DISABLED.
    • setState

      @Stability(Stable) public void setState(@Nullable String value)
      The state of the workgroup: ENABLED or DISABLED.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags (key-value pairs) to associate with this resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags (key-value pairs) to associate with this resource.
    • getWorkGroupConfiguration

      @Stability(Stable) @Nullable public Object getWorkGroupConfiguration()
      The configuration of the workgroup, which includes the location in Amazon S3 where query results are stored, the encryption option, if any, used for query results, whether Amazon CloudWatch Metrics are enabled for the workgroup, and the limit for the amount of bytes scanned (cutoff) per query, if it is specified.
    • setWorkGroupConfiguration

      @Stability(Stable) public void setWorkGroupConfiguration(@Nullable IResolvable value)
      The configuration of the workgroup, which includes the location in Amazon S3 where query results are stored, the encryption option, if any, used for query results, whether Amazon CloudWatch Metrics are enabled for the workgroup, and the limit for the amount of bytes scanned (cutoff) per query, if it is specified.
    • setWorkGroupConfiguration

      @Stability(Stable) public void setWorkGroupConfiguration(@Nullable CfnWorkGroup.WorkGroupConfigurationProperty value)
      The configuration of the workgroup, which includes the location in Amazon S3 where query results are stored, the encryption option, if any, used for query results, whether Amazon CloudWatch Metrics are enabled for the workgroup, and the limit for the amount of bytes scanned (cutoff) per query, if it is specified.
    • getWorkGroupConfigurationUpdates

      @Stability(Deprecated) @Deprecated @Nullable public Object getWorkGroupConfigurationUpdates()
      Deprecated.
      this property has been deprecated
      (deprecated) The configuration information that will be updated for this workgroup, which includes the location in Amazon S3 where query results are stored, the encryption option, if any, used for query results, whether the Amazon CloudWatch Metrics are enabled for the workgroup, whether the workgroup settings override the client-side settings, and the data usage limit for the amount of bytes scanned per query, if it is specified.

    • setWorkGroupConfigurationUpdates

      @Stability(Deprecated) @Deprecated public void setWorkGroupConfigurationUpdates(@Nullable IResolvable value)
      Deprecated.
      this property has been deprecated
      (deprecated) The configuration information that will be updated for this workgroup, which includes the location in Amazon S3 where query results are stored, the encryption option, if any, used for query results, whether the Amazon CloudWatch Metrics are enabled for the workgroup, whether the workgroup settings override the client-side settings, and the data usage limit for the amount of bytes scanned per query, if it is specified.

    • setWorkGroupConfigurationUpdates

      @Stability(Deprecated) @Deprecated public void setWorkGroupConfigurationUpdates(@Nullable CfnWorkGroup.WorkGroupConfigurationUpdatesProperty value)
      Deprecated.
      this property has been deprecated
      (deprecated) The configuration information that will be updated for this workgroup, which includes the location in Amazon S3 where query results are stored, the encryption option, if any, used for query results, whether the Amazon CloudWatch Metrics are enabled for the workgroup, whether the workgroup settings override the client-side settings, and the data usage limit for the amount of bytes scanned per query, if it is specified.