Resource: awsAthenaWorkgroup
Provides an Athena Workgroup.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.athenaWorkgroup.AthenaWorkgroup(this, "example", {
configuration: {
enforceWorkgroupConfiguration: true,
publishCloudwatchMetricsEnabled: true,
resultConfiguration: {
encryptionConfiguration: {
encryptionOption: "SSE_KMS",
kmsKeyArn: "${aws_kms_key.example.arn}",
},
outputLocation: "s3://${aws_s3_bucket.example.bucket}/output/",
},
},
name: "example",
});
Argument Reference
The following arguments are supported:
name
- (Required) Name of the workgroup.configuration
- (Optional) Configuration block with various settings for the workgroup. Documented below.description
- (Optional) Description of the workgroup.state
- (Optional) State of the workgroup. Valid values aredisabled
orenabled
. Defaults toenabled
.tags
- (Optional) Key-value map of resource tags for the workgroup. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.forceDestroy
- (Optional) Option to delete the workgroup and its contents even if the workgroup contains any named queries.
Configuration
bytesScannedCutoffPerQuery
- (Optional) Integer for the upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan. Must be at least10485760
.enforceWorkgroupConfiguration
- (Optional) Boolean whether the settings for the workgroup override client-side settings. For more information, see Workgroup Settings Override Client-Side Settings. Defaults totrue
.engineVersion
- (Optional) Configuration block for the Athena Engine Versioning. For more information, see Athena Engine Versioning. See Engine Version below.executionRole
- (Optional) Role used in a notebook session for accessing the user's resources.publishCloudwatchMetricsEnabled
- (Optional) Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults totrue
.resultConfiguration
- (Optional) Configuration block with result settings. See Result Configuration below.requesterPaysEnabled
- (Optional) If set to true , allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets in queries. If set to false , workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is false . For more information about Requester Pays buckets, see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.
Engine Version
selectedEngineVersion
- (Optional) Requested engine version. Defaults toauto
.
Result Configuration
encryptionConfiguration
- (Optional) Configuration block with encryption settings. See Encryption Configuration below.aclConfiguration
- (Optional) That an Amazon S3 canned ACL should be set to control ownership of stored query results. See ACL Configuration below.expectedBucketOwner
- (Optional) AWS account ID that you expect to be the owner of the Amazon S3 bucket.outputLocation
- (Optional) Location in Amazon S3 where your query results are stored, such ass3://path/to/query/bucket/
. For more information, see Queries and Query Result Files.
ACL Configuration
s3AclOption
- (Required) Amazon S3 canned ACL that Athena should specify when storing query results. Valid value isBUCKET_OWNER_FULL_CONTROL
.
Encryption Configuration
encryptionOption
- (Required) Whether Amazon S3 server-side encryption with Amazon S3-managed keys (SSE_S3
), server-side encryption with KMS-managed keys (SSE_KMS
), or client-side encryption with KMS-managed keys (CSE_KMS
) is used. If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.kmsKeyArn
- (Optional) ForSSE_KMS
andCSE_KMS
, this is the KMS key ARN.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- ARN of the workgroupconfiguration
- Configuration block with various settings for the workgroupengineVersion
- Configuration block for the Athena Engine VersioningeffectiveEngineVersion
- The engine version on which the query runs. IfselectedEngineVersion
is set toauto
, the effective engine version is chosen by Athena.
id
- Workgroup nametagsAll
- Map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
Athena Workgroups can be imported using their name, e.g.,