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

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 WorkgroupConfigurationArgs

Configuration block with various settings for the workgroup. Documented below.

Description string

Description of the workgroup.

ForceDestroy 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 DISABLED or ENABLED. Defaults to ENABLED.

Tags Dictionary<string, string>

Key-value map of resource tags for the workgroup.

Configuration WorkgroupConfiguration

Configuration block with various settings for the workgroup. Documented below.

Description string

Description of the workgroup.

ForceDestroy 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 DISABLED or ENABLED. Defaults to ENABLED.

Tags map[string]string

Key-value map of resource tags for the workgroup.

configuration WorkgroupConfiguration

Configuration block with various settings for the workgroup. Documented below.

description string

Description of the workgroup.

forceDestroy 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 DISABLED or ENABLED. Defaults to ENABLED.

tags {[key: string]: string}

Key-value map of resource tags for the workgroup.

configuration Dict[WorkgroupConfiguration]

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 DISABLED or ENABLED. Defaults to ENABLED.

tags 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:

Arn string

Amazon Resource Name (ARN) of the workgroup

Id string
The provider-assigned unique ID for this managed resource.
Arn string

Amazon Resource Name (ARN) of the workgroup

Id string
The provider-assigned unique ID for this managed resource.
arn string

Amazon Resource Name (ARN) of the workgroup

id string
The provider-assigned unique ID for this managed resource.
arn str

Amazon Resource Name (ARN) of the workgroup

id str
The provider-assigned unique ID for this managed resource.

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): Workgroup
static 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 WorkgroupConfigurationArgs

Configuration block with various settings for the workgroup. Documented below.

Description string

Description of the workgroup.

ForceDestroy 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 DISABLED or ENABLED. Defaults to ENABLED.

Tags Dictionary<string, string>

Key-value map of resource tags for the workgroup.

Arn string

Amazon Resource Name (ARN) of the workgroup

Configuration WorkgroupConfiguration

Configuration block with various settings for the workgroup. Documented below.

Description string

Description of the workgroup.

ForceDestroy 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 DISABLED or ENABLED. Defaults to ENABLED.

Tags map[string]string

Key-value map of resource tags for the workgroup.

arn string

Amazon Resource Name (ARN) of the workgroup

configuration WorkgroupConfiguration

Configuration block with various settings for the workgroup. Documented below.

description string

Description of the workgroup.

forceDestroy 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 DISABLED or ENABLED. Defaults to ENABLED.

tags {[key: string]: string}

Key-value map of resource tags for the workgroup.

arn str

Amazon Resource Name (ARN) of the workgroup

configuration Dict[WorkgroupConfiguration]

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 DISABLED or ENABLED. Defaults to ENABLED.

tags Dict[str, str]

Key-value map of resource tags for the workgroup.

Supporting Types

WorkgroupConfiguration

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

BytesScannedCutoffPerQuery int

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.

EnforceWorkgroupConfiguration bool

Boolean whether the settings for the workgroup override client-side settings. For more information, see Workgroup Settings Override Client-Side Settings. Defaults to true.

PublishCloudwatchMetricsEnabled bool

Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to true.

ResultConfiguration WorkgroupConfigurationResultConfigurationArgs

Configuration block with result settings. Documented below.

BytesScannedCutoffPerQuery int

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.

EnforceWorkgroupConfiguration bool

Boolean whether the settings for the workgroup override client-side settings. For more information, see Workgroup Settings Override Client-Side Settings. Defaults to true.

PublishCloudwatchMetricsEnabled bool

Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to true.

ResultConfiguration WorkgroupConfigurationResultConfiguration

Configuration block with result settings. Documented below.

bytesScannedCutoffPerQuery number

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.

enforceWorkgroupConfiguration boolean

Boolean whether the settings for the workgroup override client-side settings. For more information, see Workgroup Settings Override Client-Side Settings. Defaults to true.

publishCloudwatchMetricsEnabled boolean

Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to true.

resultConfiguration WorkgroupConfigurationResultConfiguration

Configuration block with result settings. Documented below.

bytesScannedCutoffPerQuery float

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.

enforceWorkgroupConfiguration bool

Boolean whether the settings for the workgroup override client-side settings. For more information, see Workgroup Settings Override Client-Side Settings. Defaults to true.

publishCloudwatchMetricsEnabled bool

Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to true.

resultConfiguration Dict[WorkgroupConfigurationResultConfiguration]

Configuration block with result settings. Documented below.

WorkgroupConfigurationResultConfiguration

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

EncryptionConfiguration WorkgroupConfigurationResultConfigurationEncryptionConfigurationArgs

Configuration block with encryption settings. Documented below.

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

EncryptionConfiguration WorkgroupConfigurationResultConfigurationEncryptionConfiguration

Configuration block with encryption settings. Documented below.

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

encryptionConfiguration WorkgroupConfigurationResultConfigurationEncryptionConfiguration

Configuration block with encryption settings. Documented below.

outputLocation 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[WorkgroupConfigurationResultConfigurationEncryptionConfiguration]

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

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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

KmsKeyArn string

For SSE_KMS and CSE_KMS, this is the KMS key Amazon Resource Name (ARN).

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

KmsKeyArn string

For SSE_KMS and CSE_KMS, this is the KMS key Amazon Resource Name (ARN).

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

kmsKeyArn string

For SSE_KMS and CSE_KMS, this is the KMS key Amazon Resource Name (ARN).

encryptionOption 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_arn str

For SSE_KMS and CSE_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 aws Terraform Provider.