Workgroup
Provides an Athena Workgroup.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Athena.Workgroup("example", new Aws.Athena.WorkgroupArgs
{
Configuration = new Aws.Athena.Inputs.WorkgroupConfigurationArgs
{
EnforceWorkgroupConfiguration = true,
PublishCloudwatchMetricsEnabled = true,
ResultConfiguration = new Aws.Athena.Inputs.WorkgroupConfigurationResultConfigurationArgs
{
EncryptionConfiguration = new Aws.Athena.Inputs.WorkgroupConfigurationResultConfigurationEncryptionConfigurationArgs
{
EncryptionOption = "SSE_KMS",
KmsKeyArn = aws_kms_key.Example.Arn,
},
OutputLocation = "s3://{aws_s3_bucket.example.bucket}/output/",
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/athena"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := athena.NewWorkgroup(ctx, "example", &athena.WorkgroupArgs{
Configuration: &athena.WorkgroupConfigurationArgs{
EnforceWorkgroupConfiguration: pulumi.Bool(true),
PublishCloudwatchMetricsEnabled: pulumi.Bool(true),
ResultConfiguration: &athena.WorkgroupConfigurationResultConfigurationArgs{
EncryptionConfiguration: &athena.WorkgroupConfigurationResultConfigurationEncryptionConfigurationArgs{
EncryptionOption: pulumi.String("SSE_KMS"),
KmsKeyArn: pulumi.String(aws_kms_key.Example.Arn),
},
OutputLocation: pulumi.String("s3://{aws_s3_bucket.example.bucket}/output/"),
},
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.athena.Workgroup("example", configuration={
"enforceWorkgroupConfiguration": True,
"publishCloudwatchMetricsEnabled": True,
"resultConfiguration": {
"encryption_configuration": {
"encryptionOption": "SSE_KMS",
"kms_key_arn": aws_kms_key["example"]["arn"],
},
"output_location": "s3://{aws_s3_bucket.example.bucket}/output/",
},
})import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.athena.Workgroup("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/",
},
},
});Create a Workgroup Resource
new Workgroup(name: string, args?: WorkgroupArgs, opts?: CustomResourceOptions);def Workgroup(resource_name, opts=None, configuration=None, description=None, force_destroy=None, name=None, state=None, tags=None, __props__=None);func NewWorkgroup(ctx *Context, name string, args *WorkgroupArgs, opts ...ResourceOption) (*Workgroup, error)public Workgroup(string name, WorkgroupArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args WorkgroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WorkgroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkgroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Workgroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Workgroup resource accepts the following input properties:
- Configuration
Workgroup
Configuration Args Configuration block with various settings for the workgroup. Documented below.
- Description string
Description of the workgroup.
- Force
Destroy bool The option to delete the workgroup and its contents even if the workgroup contains any named queries.
- Name string
Name of the workgroup.
- State string
State of the workgroup. Valid values are
DISABLEDorENABLED. Defaults toENABLED.- Dictionary<string, string>
Key-value map of resource tags for the workgroup.
- Configuration
Workgroup
Configuration Configuration block with various settings for the workgroup. Documented below.
- Description string
Description of the workgroup.
- Force
Destroy bool The option to delete the workgroup and its contents even if the workgroup contains any named queries.
- Name string
Name of the workgroup.
- State string
State of the workgroup. Valid values are
DISABLEDorENABLED. Defaults toENABLED.- map[string]string
Key-value map of resource tags for the workgroup.
- configuration
Workgroup
Configuration Configuration block with various settings for the workgroup. Documented below.
- description string
Description of the workgroup.
- force
Destroy boolean The option to delete the workgroup and its contents even if the workgroup contains any named queries.
- name string
Name of the workgroup.
- state string
State of the workgroup. Valid values are
DISABLEDorENABLED. Defaults toENABLED.- {[key: string]: string}
Key-value map of resource tags for the workgroup.
- configuration
Dict[Workgroup
Configuration] Configuration block with various settings for the workgroup. Documented below.
- description str
Description of the workgroup.
- force_
destroy bool The option to delete the workgroup and its contents even if the workgroup contains any named queries.
- name str
Name of the workgroup.
- state str
State of the workgroup. Valid values are
DISABLEDorENABLED. Defaults toENABLED.- Dict[str, str]
Key-value map of resource tags for the workgroup.
Outputs
All input properties are implicitly available as output properties. Additionally, the Workgroup resource produces the following output properties:
Look up an Existing Workgroup Resource
Get an existing Workgroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WorkgroupState, opts?: CustomResourceOptions): Workgroupstatic get(resource_name, id, opts=None, arn=None, configuration=None, description=None, force_destroy=None, name=None, state=None, tags=None, __props__=None);func GetWorkgroup(ctx *Context, name string, id IDInput, state *WorkgroupState, opts ...ResourceOption) (*Workgroup, error)public static Workgroup Get(string name, Input<string> id, WorkgroupState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Arn string
Amazon Resource Name (ARN) of the workgroup
- Configuration
Workgroup
Configuration Args Configuration block with various settings for the workgroup. Documented below.
- Description string
Description of the workgroup.
- Force
Destroy bool The option to delete the workgroup and its contents even if the workgroup contains any named queries.
- Name string
Name of the workgroup.
- State string
State of the workgroup. Valid values are
DISABLEDorENABLED. Defaults toENABLED.- Dictionary<string, string>
Key-value map of resource tags for the workgroup.
- Arn string
Amazon Resource Name (ARN) of the workgroup
- Configuration
Workgroup
Configuration Configuration block with various settings for the workgroup. Documented below.
- Description string
Description of the workgroup.
- Force
Destroy bool The option to delete the workgroup and its contents even if the workgroup contains any named queries.
- Name string
Name of the workgroup.
- State string
State of the workgroup. Valid values are
DISABLEDorENABLED. Defaults toENABLED.- map[string]string
Key-value map of resource tags for the workgroup.
- arn string
Amazon Resource Name (ARN) of the workgroup
- configuration
Workgroup
Configuration Configuration block with various settings for the workgroup. Documented below.
- description string
Description of the workgroup.
- force
Destroy boolean The option to delete the workgroup and its contents even if the workgroup contains any named queries.
- name string
Name of the workgroup.
- state string
State of the workgroup. Valid values are
DISABLEDorENABLED. Defaults toENABLED.- {[key: string]: string}
Key-value map of resource tags for the workgroup.
- arn str
Amazon Resource Name (ARN) of the workgroup
- configuration
Dict[Workgroup
Configuration] Configuration block with various settings for the workgroup. Documented below.
- description str
Description of the workgroup.
- force_
destroy bool The option to delete the workgroup and its contents even if the workgroup contains any named queries.
- name str
Name of the workgroup.
- state str
State of the workgroup. Valid values are
DISABLEDorENABLED. Defaults toENABLED.- Dict[str, str]
Key-value map of resource tags for the workgroup.
Supporting Types
WorkgroupConfiguration
- Bytes
Scanned intCutoff Per Query 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 least
10485760.- Enforce
Workgroup boolConfiguration Boolean whether the settings for the workgroup override client-side settings. For more information, see Workgroup Settings Override Client-Side Settings. Defaults to
true.- Publish
Cloudwatch boolMetrics Enabled Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to
true.- Result
Configuration WorkgroupConfiguration Result Configuration Args Configuration block with result settings. Documented below.
- Bytes
Scanned intCutoff Per Query 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 least
10485760.- Enforce
Workgroup boolConfiguration Boolean whether the settings for the workgroup override client-side settings. For more information, see Workgroup Settings Override Client-Side Settings. Defaults to
true.- Publish
Cloudwatch boolMetrics Enabled Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to
true.- Result
Configuration WorkgroupConfiguration Result Configuration Configuration block with result settings. Documented below.
- bytes
Scanned numberCutoff Per Query 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 least
10485760.- enforce
Workgroup booleanConfiguration Boolean whether the settings for the workgroup override client-side settings. For more information, see Workgroup Settings Override Client-Side Settings. Defaults to
true.- publish
Cloudwatch booleanMetrics Enabled Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to
true.- result
Configuration WorkgroupConfiguration Result Configuration Configuration block with result settings. Documented below.
- bytes
Scanned floatCutoff Per Query 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 least
10485760.- enforce
Workgroup boolConfiguration Boolean whether the settings for the workgroup override client-side settings. For more information, see Workgroup Settings Override Client-Side Settings. Defaults to
true.- publish
Cloudwatch boolMetrics Enabled Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to
true.- result
Configuration Dict[WorkgroupConfiguration Result Configuration] Configuration block with result settings. Documented below.
WorkgroupConfigurationResultConfiguration
- Encryption
Configuration WorkgroupConfiguration Result Configuration Encryption Configuration Args Configuration block with encryption settings. Documented below.
- Output
Location string The location in Amazon S3 where your query results are stored, such as
s3://path/to/query/bucket/. For more information, see Queries and Query Result Files.
- Encryption
Configuration WorkgroupConfiguration Result Configuration Encryption Configuration Configuration block with encryption settings. Documented below.
- Output
Location string The location in Amazon S3 where your query results are stored, such as
s3://path/to/query/bucket/. For more information, see Queries and Query Result Files.
- encryption
Configuration WorkgroupConfiguration Result Configuration Encryption Configuration Configuration block with encryption settings. Documented below.
- output
Location string The location in Amazon S3 where your query results are stored, such as
s3://path/to/query/bucket/. For more information, see Queries and Query Result Files.
- encryption_
configuration Dict[WorkgroupConfiguration Result Configuration Encryption Configuration] Configuration block with encryption settings. Documented below.
- output_
location str The location in Amazon S3 where your query results are stored, such as
s3://path/to/query/bucket/. For more information, see Queries and Query Result Files.
WorkgroupConfigurationResultConfigurationEncryptionConfiguration
- Encryption
Option string Indicates 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.- Kms
Key stringArn For
SSE_KMSandCSE_KMS, this is the KMS key Amazon Resource Name (ARN).
- Encryption
Option string Indicates 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.- Kms
Key stringArn For
SSE_KMSandCSE_KMS, this is the KMS key Amazon Resource Name (ARN).
- encryption
Option string Indicates 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.- kms
Key stringArn For
SSE_KMSandCSE_KMS, this is the KMS key Amazon Resource Name (ARN).
- encryption
Option str Indicates 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.- kms_
key_ strarn For
SSE_KMSandCSE_KMS, this is the KMS key Amazon Resource Name (ARN).
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.