Class CfnWorkGroup

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:55.778Z") @Stability(Stable) public class CfnWorkGroup extends CfnResource implements IInspectable
A CloudFormation AWS::Athena::WorkGroup.

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())
         .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

    • CfnWorkGroup

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

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

      @Stability(Stable) public CfnWorkGroup(@NotNull Construct scope, @NotNull String id, @NotNull CfnWorkGroupProps props)
      Create a new AWS::Athena::WorkGroup.

      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.
    • 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()
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      The tags (key-value pairs) to associate with this resource.
    • 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.

      The default is false.

    • 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.

      The default is false.

    • 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.

      The default is false.

    • 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.
    • 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.

      The EnforceWorkGroupConfiguration option determines whether workgroup settings override client-side query settings.

    • 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.

      The EnforceWorkGroupConfiguration option determines whether workgroup settings override client-side query settings.

    • 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.

      The EnforceWorkGroupConfiguration option determines whether workgroup settings override client-side query settings.