WorkgroupArgs

data class WorkgroupArgs(val configuration: Output<WorkgroupConfigurationArgs>? = null, val description: Output<String>? = null, val forceDestroy: Output<Boolean>? = null, val name: Output<String>? = null, val state: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<WorkgroupArgs>

Provides an Athena Workgroup.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.athena.Workgroup("example", {
name: "example",
configuration: {
enforceWorkgroupConfiguration: true,
publishCloudwatchMetricsEnabled: true,
resultConfiguration: {
outputLocation: `s3://${exampleAwsS3Bucket.bucket}/output/`,
encryptionConfiguration: {
encryptionOption: "SSE_KMS",
kmsKeyArn: exampleAwsKmsKey.arn,
},
},
},
});
import pulumi
import pulumi_aws as aws
example = aws.athena.Workgroup("example",
name="example",
configuration={
"enforce_workgroup_configuration": True,
"publish_cloudwatch_metrics_enabled": True,
"result_configuration": {
"output_location": f"s3://{example_aws_s3_bucket['bucket']}/output/",
"encryption_configuration": {
"encryption_option": "SSE_KMS",
"kms_key_arn": example_aws_kms_key["arn"],
},
},
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Athena.Workgroup("example", new()
{
Name = "example",
Configuration = new Aws.Athena.Inputs.WorkgroupConfigurationArgs
{
EnforceWorkgroupConfiguration = true,
PublishCloudwatchMetricsEnabled = true,
ResultConfiguration = new Aws.Athena.Inputs.WorkgroupConfigurationResultConfigurationArgs
{
OutputLocation = $"s3://{exampleAwsS3Bucket.Bucket}/output/",
EncryptionConfiguration = new Aws.Athena.Inputs.WorkgroupConfigurationResultConfigurationEncryptionConfigurationArgs
{
EncryptionOption = "SSE_KMS",
KmsKeyArn = exampleAwsKmsKey.Arn,
},
},
},
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/athena"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := athena.NewWorkgroup(ctx, "example", &athena.WorkgroupArgs{
Name: pulumi.String("example"),
Configuration: &athena.WorkgroupConfigurationArgs{
EnforceWorkgroupConfiguration: pulumi.Bool(true),
PublishCloudwatchMetricsEnabled: pulumi.Bool(true),
ResultConfiguration: &athena.WorkgroupConfigurationResultConfigurationArgs{
OutputLocation: pulumi.Sprintf("s3://%v/output/", exampleAwsS3Bucket.Bucket),
EncryptionConfiguration: &athena.WorkgroupConfigurationResultConfigurationEncryptionConfigurationArgs{
EncryptionOption: pulumi.String("SSE_KMS"),
KmsKeyArn: pulumi.Any(exampleAwsKmsKey.Arn),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.athena.Workgroup;
import com.pulumi.aws.athena.WorkgroupArgs;
import com.pulumi.aws.athena.inputs.WorkgroupConfigurationArgs;
import com.pulumi.aws.athena.inputs.WorkgroupConfigurationResultConfigurationArgs;
import com.pulumi.aws.athena.inputs.WorkgroupConfigurationResultConfigurationEncryptionConfigurationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Workgroup("example", WorkgroupArgs.builder()
.name("example")
.configuration(WorkgroupConfigurationArgs.builder()
.enforceWorkgroupConfiguration(true)
.publishCloudwatchMetricsEnabled(true)
.resultConfiguration(WorkgroupConfigurationResultConfigurationArgs.builder()
.outputLocation(String.format("s3://%s/output/", exampleAwsS3Bucket.bucket()))
.encryptionConfiguration(WorkgroupConfigurationResultConfigurationEncryptionConfigurationArgs.builder()
.encryptionOption("SSE_KMS")
.kmsKeyArn(exampleAwsKmsKey.arn())
.build())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:athena:Workgroup
properties:
name: example
configuration:
enforceWorkgroupConfiguration: true
publishCloudwatchMetricsEnabled: true
resultConfiguration:
outputLocation: s3://${exampleAwsS3Bucket.bucket}/output/
encryptionConfiguration:
encryptionOption: SSE_KMS
kmsKeyArn: ${exampleAwsKmsKey.arn}

Import

Using pulumi import, import Athena Workgroups using their name. For example:

$ pulumi import aws:athena/workgroup:Workgroup example example

Constructors

Link copied to clipboard
constructor(configuration: Output<WorkgroupConfigurationArgs>? = null, description: Output<String>? = null, forceDestroy: Output<Boolean>? = null, name: Output<String>? = null, state: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard

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

Link copied to clipboard
val description: Output<String>? = null

Description of the workgroup.

Link copied to clipboard
val forceDestroy: Output<Boolean>? = null

Option to delete the workgroup and its contents even if the workgroup contains any named queries.

Link copied to clipboard
val name: Output<String>? = null

Name of the workgroup.

Link copied to clipboard
val state: Output<String>? = null

State of the workgroup. Valid values are DISABLED or ENABLED. Defaults to ENABLED.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Key-value map of resource tags for the workgroup. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): WorkgroupArgs