This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.

athena

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

class pulumi_aws.athena.Database(resource_name, opts=None, bucket=None, encryption_configuration=None, force_destroy=None, name=None, __props__=None, __name__=None, __opts__=None)

Provides an Athena database.

import pulumi
import pulumi_aws as aws

hoge_bucket = aws.s3.Bucket("hogeBucket")
hoge_database = aws.athena.Database("hogeDatabase",
    bucket=hoge_bucket.bucket,
    name="database_name")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • bucket (pulumi.Input[str]) – Name of s3 bucket to save the results of the query execution.

  • encryption_configuration (pulumi.Input[dict]) – The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

  • force_destroy (pulumi.Input[bool]) – A boolean that indicates all tables should be deleted from the database so that the database can be destroyed without error. The tables are not recoverable.

  • name (pulumi.Input[str]) – Name of the database to create.

The encryption_configuration object supports the following:

  • encryptionOption (pulumi.Input[str]) - The type of key; one of SSE_S3, SSE_KMS, CSE_KMS

  • kmsKey (pulumi.Input[str]) - The KMS key ARN or ID; required for key types SSE_KMS and CSE_KMS.

bucket: pulumi.Output[str] = None

Name of s3 bucket to save the results of the query execution.

encryption_configuration: pulumi.Output[dict] = None

The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

  • encryptionOption (str) - The type of key; one of SSE_S3, SSE_KMS, CSE_KMS

  • kmsKey (str) - The KMS key ARN or ID; required for key types SSE_KMS and CSE_KMS.

force_destroy: pulumi.Output[bool] = None

A boolean that indicates all tables should be deleted from the database so that the database can be destroyed without error. The tables are not recoverable.

name: pulumi.Output[str] = None

Name of the database to create.

static get(resource_name, id, opts=None, bucket=None, encryption_configuration=None, force_destroy=None, name=None)

Get an existing Database resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • bucket (pulumi.Input[str]) – Name of s3 bucket to save the results of the query execution.

  • encryption_configuration (pulumi.Input[dict]) – The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An encryption_configuration block is documented below.

  • force_destroy (pulumi.Input[bool]) – A boolean that indicates all tables should be deleted from the database so that the database can be destroyed without error. The tables are not recoverable.

  • name (pulumi.Input[str]) – Name of the database to create.

The encryption_configuration object supports the following:

  • encryptionOption (pulumi.Input[str]) - The type of key; one of SSE_S3, SSE_KMS, CSE_KMS

  • kmsKey (pulumi.Input[str]) - The KMS key ARN or ID; required for key types SSE_KMS and CSE_KMS.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.athena.NamedQuery(resource_name, opts=None, database=None, description=None, name=None, query=None, workgroup=None, __props__=None, __name__=None, __opts__=None)

Provides an Athena Named Query resource.

import pulumi
import pulumi_aws as aws

hoge_bucket = aws.s3.Bucket("hogeBucket")
test_key = aws.kms.Key("testKey",
    deletion_window_in_days=7,
    description="Athena KMS Key")
test_workgroup = aws.athena.Workgroup("testWorkgroup", configuration={
    "resultConfiguration": {
        "encryption_configuration": {
            "encryptionOption": "SSE_KMS",
            "kms_key_arn": test_key.arn,
        },
    },
})
hoge_database = aws.athena.Database("hogeDatabase",
    bucket=hoge_bucket.id,
    name="users")
foo = aws.athena.NamedQuery("foo",
    database=hoge_database.name,
    query=hoge_database.name.apply(lambda name: f"SELECT * FROM {name} limit 10;"),
    workgroup=test_workgroup.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • database (pulumi.Input[str]) – The database to which the query belongs.

  • description (pulumi.Input[str]) – A brief explanation of the query. Maximum length of 1024.

  • name (pulumi.Input[str]) – The plain language name for the query. Maximum length of 128.

  • query (pulumi.Input[str]) – The text of the query itself. In other words, all query statements. Maximum length of 262144.

  • workgroup (pulumi.Input[str]) – The workgroup to which the query belongs. Defaults to primary

database: pulumi.Output[str] = None

The database to which the query belongs.

description: pulumi.Output[str] = None

A brief explanation of the query. Maximum length of 1024.

name: pulumi.Output[str] = None

The plain language name for the query. Maximum length of 128.

query: pulumi.Output[str] = None

The text of the query itself. In other words, all query statements. Maximum length of 262144.

workgroup: pulumi.Output[str] = None

The workgroup to which the query belongs. Defaults to primary

static get(resource_name, id, opts=None, database=None, description=None, name=None, query=None, workgroup=None)

Get an existing NamedQuery resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • database (pulumi.Input[str]) – The database to which the query belongs.

  • description (pulumi.Input[str]) – A brief explanation of the query. Maximum length of 1024.

  • name (pulumi.Input[str]) – The plain language name for the query. Maximum length of 128.

  • query (pulumi.Input[str]) – The text of the query itself. In other words, all query statements. Maximum length of 262144.

  • workgroup (pulumi.Input[str]) – The workgroup to which the query belongs. Defaults to primary

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_aws.athena.Workgroup(resource_name, opts=None, configuration=None, description=None, force_destroy=None, name=None, state=None, tags=None, __props__=None, __name__=None, __opts__=None)

Provides an Athena Workgroup.

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/",
    },
})
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • configuration (pulumi.Input[dict]) – Configuration block with various settings for the workgroup. Documented below.

  • description (pulumi.Input[str]) – Description of the workgroup.

  • force_destroy (pulumi.Input[bool]) – The option to delete the workgroup and its contents even if the workgroup contains any named queries.

  • name (pulumi.Input[str]) – Name of the workgroup.

  • state (pulumi.Input[str]) – State of the workgroup. Valid values are DISABLED or ENABLED. Defaults to ENABLED.

  • tags (pulumi.Input[dict]) – Key-value map of resource tags for the workgroup.

The configuration object supports the following:

  • bytesScannedCutoffPerQuery (pulumi.Input[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 (pulumi.Input[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 (pulumi.Input[bool]) - Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to true.

  • resultConfiguration (pulumi.Input[dict]) - Configuration block with result settings. Documented below.

    • encryption_configuration (pulumi.Input[dict]) - Configuration block with encryption settings. Documented below.

      • encryptionOption (pulumi.Input[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 (pulumi.Input[str]) - For SSE_KMS and CSE_KMS, this is the KMS key Amazon Resource Name (ARN).

    • output_location (pulumi.Input[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.

arn: pulumi.Output[str] = None

Amazon Resource Name (ARN) of the workgroup

configuration: pulumi.Output[dict] = None

Configuration block with various settings for the workgroup. 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) - Configuration block with result settings. Documented below.

    • encryption_configuration (dict) - Configuration block with encryption settings. Documented below.

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

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

description: pulumi.Output[str] = None

Description of the workgroup.

force_destroy: pulumi.Output[bool] = None

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

name: pulumi.Output[str] = None

Name of the workgroup.

state: pulumi.Output[str] = None

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

tags: pulumi.Output[dict] = None

Key-value map of resource tags for the workgroup.

static get(resource_name, id, opts=None, arn=None, configuration=None, description=None, force_destroy=None, name=None, state=None, tags=None)

Get an existing Workgroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • arn (pulumi.Input[str]) – Amazon Resource Name (ARN) of the workgroup

  • configuration (pulumi.Input[dict]) – Configuration block with various settings for the workgroup. Documented below.

  • description (pulumi.Input[str]) – Description of the workgroup.

  • force_destroy (pulumi.Input[bool]) – The option to delete the workgroup and its contents even if the workgroup contains any named queries.

  • name (pulumi.Input[str]) – Name of the workgroup.

  • state (pulumi.Input[str]) – State of the workgroup. Valid values are DISABLED or ENABLED. Defaults to ENABLED.

  • tags (pulumi.Input[dict]) – Key-value map of resource tags for the workgroup.

The configuration object supports the following:

  • bytesScannedCutoffPerQuery (pulumi.Input[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 (pulumi.Input[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 (pulumi.Input[bool]) - Boolean whether Amazon CloudWatch metrics are enabled for the workgroup. Defaults to true.

  • resultConfiguration (pulumi.Input[dict]) - Configuration block with result settings. Documented below.

    • encryption_configuration (pulumi.Input[dict]) - Configuration block with encryption settings. Documented below.

      • encryptionOption (pulumi.Input[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 (pulumi.Input[str]) - For SSE_KMS and CSE_KMS, this is the KMS key Amazon Resource Name (ARN).

    • output_location (pulumi.Input[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.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str