CfnWorkGroup

class aws_cdk.aws_athena.CfnWorkGroup(scope, id, *, name, description=None, recursive_delete_option=None, state=None, tags=None, work_group_configuration=None)

Bases: CfnResource

A CloudFormation AWS::Athena::WorkGroup.

The AWS::Athena::WorkGroup resource specifies an Amazon Athena workgroup, which contains a name, description, creation time, state, and other configuration, listed under WorkGroupConfiguration . Each workgroup enables you to isolate queries for you or your group from other queries in the same account. For more information, see CreateWorkGroup in the Amazon Athena API Reference .

CloudformationResource:

AWS::Athena::WorkGroup

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-workgroup.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_athena as athena

cfn_work_group = athena.CfnWorkGroup(self, "MyCfnWorkGroup",
    name="name",

    # the properties below are optional
    description="description",
    recursive_delete_option=False,
    state="state",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    work_group_configuration=athena.CfnWorkGroup.WorkGroupConfigurationProperty(
        additional_configuration="additionalConfiguration",
        bytes_scanned_cutoff_per_query=123,
        customer_content_encryption_configuration=athena.CfnWorkGroup.CustomerContentEncryptionConfigurationProperty(
            kms_key="kmsKey"
        ),
        enforce_work_group_configuration=False,
        engine_version=athena.CfnWorkGroup.EngineVersionProperty(
            effective_engine_version="effectiveEngineVersion",
            selected_engine_version="selectedEngineVersion"
        ),
        execution_role="executionRole",
        publish_cloud_watch_metrics_enabled=False,
        requester_pays_enabled=False,
        result_configuration=athena.CfnWorkGroup.ResultConfigurationProperty(
            acl_configuration=athena.CfnWorkGroup.AclConfigurationProperty(
                s3_acl_option="s3AclOption"
            ),
            encryption_configuration=athena.CfnWorkGroup.EncryptionConfigurationProperty(
                encryption_option="encryptionOption",

                # the properties below are optional
                kms_key="kmsKey"
            ),
            expected_bucket_owner="expectedBucketOwner",
            output_location="outputLocation"
        )
    )
)

Create a new AWS::Athena::WorkGroup.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • name (str) – The workgroup name.

  • description (Optional[str]) – The workgroup description.

  • recursive_delete_option (Union[bool, IResolvable, None]) – The option to delete a workgroup and its contents even if the workgroup contains any named queries. The default is false.

  • state (Optional[str]) – The state of the workgroup: ENABLED or DISABLED.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The tags (key-value pairs) to associate with this resource.

  • work_group_configuration (Union[IResolvable, WorkGroupConfigurationProperty, Dict[str, Any], None]) – The configuration of the workgroup, which includes the location in Amazon S3 where query results are stored, the encryption option, if any, used for query results, whether Amazon CloudWatch Metrics are enabled for the workgroup, and the limit for the amount of bytes scanned (cutoff) per query, if it is specified. The EnforceWorkGroupConfiguration option determines whether workgroup settings override client-side query settings.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::Athena::WorkGroup'
attr_creation_time

The date and time the workgroup was created, as a UNIX timestamp in seconds.

For example: 1582761016 .

CloudformationAttribute:

CreationTime

attr_work_group_configuration_engine_version_effective_engine_version

WorkGroupConfiguration.EngineVersion.EffectiveEngineVersion

Type:

cloudformationAttribute

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

description

The workgroup description.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-workgroup.html#cfn-athena-workgroup-description

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

name

The workgroup name.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-workgroup.html#cfn-athena-workgroup-name

node

The construct tree node associated with this construct.

recursive_delete_option

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

The default is false.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-workgroup.html#cfn-athena-workgroup-recursivedeleteoption

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

state

ENABLED or DISABLED.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-workgroup.html#cfn-athena-workgroup-state

Type:

The state of the workgroup

tags

The tags (key-value pairs) to associate with this resource.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-workgroup.html#cfn-athena-workgroup-tags

work_group_configuration

The configuration of the workgroup, which includes the location in Amazon S3 where query results are stored, the encryption option, if any, used for query results, whether Amazon CloudWatch Metrics are enabled for the workgroup, and the limit for the amount of bytes scanned (cutoff) per query, if it is specified.

The EnforceWorkGroupConfiguration option determines whether workgroup settings override client-side query settings.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-workgroup.html#cfn-athena-workgroup-workgroupconfiguration

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

AclConfigurationProperty

class CfnWorkGroup.AclConfigurationProperty(*, s3_acl_option)

Bases: object

Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results.

When Athena stores query results in Amazon S3, the canned ACL is set with the x-amz-acl request header. For more information about S3 Object Ownership, see Object Ownership settings in the Amazon S3 User Guide .

Parameters:

s3_acl_option (str) – The Amazon S3 canned ACL that Athena should specify when storing query results. Currently the only supported canned ACL is BUCKET_OWNER_FULL_CONTROL . If a query runs in a workgroup and the workgroup overrides client-side settings, then the Amazon S3 canned ACL specified in the workgroup’s settings is used for all queries that run in the workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL in the Amazon S3 User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-aclconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_athena as athena

acl_configuration_property = athena.CfnWorkGroup.AclConfigurationProperty(
    s3_acl_option="s3AclOption"
)

Attributes

s3_acl_option

The Amazon S3 canned ACL that Athena should specify when storing query results.

Currently the only supported canned ACL is BUCKET_OWNER_FULL_CONTROL . If a query runs in a workgroup and the workgroup overrides client-side settings, then the Amazon S3 canned ACL specified in the workgroup’s settings is used for all queries that run in the workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL in the Amazon S3 User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-aclconfiguration.html#cfn-athena-workgroup-aclconfiguration-s3acloption

CustomerContentEncryptionConfigurationProperty

class CfnWorkGroup.CustomerContentEncryptionConfigurationProperty(*, kms_key)

Bases: object

Specifies the KMS key that is used to encrypt the user’s data stores in Athena.

This setting does not apply to Athena SQL workgroups.

Parameters:

kms_key (str) – The KMS key that is used to encrypt the user’s data stores in Athena.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-customercontentencryptionconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_athena as athena

customer_content_encryption_configuration_property = athena.CfnWorkGroup.CustomerContentEncryptionConfigurationProperty(
    kms_key="kmsKey"
)

Attributes

kms_key

The KMS key that is used to encrypt the user’s data stores in Athena.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-customercontentencryptionconfiguration.html#cfn-athena-workgroup-customercontentencryptionconfiguration-kmskey

EncryptionConfigurationProperty

class CfnWorkGroup.EncryptionConfigurationProperty(*, encryption_option, kms_key=None)

Bases: object

If query results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE_KMS or CSE_KMS ) and key information.

Parameters:
  • 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 (Optional[str]) – For SSE_KMS and CSE_KMS , this is the KMS key ARN or ID.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-encryptionconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_athena as athena

encryption_configuration_property = athena.CfnWorkGroup.EncryptionConfigurationProperty(
    encryption_option="encryptionOption",

    # the properties below are optional
    kms_key="kmsKey"
)

Attributes

encryption_option

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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-encryptionconfiguration.html#cfn-athena-workgroup-encryptionconfiguration-encryptionoption

kms_key

For SSE_KMS and CSE_KMS , this is the KMS key ARN or ID.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-encryptionconfiguration.html#cfn-athena-workgroup-encryptionconfiguration-kmskey

EngineVersionProperty

class CfnWorkGroup.EngineVersionProperty(*, effective_engine_version=None, selected_engine_version=None)

Bases: object

The Athena engine version for running queries, or the PySpark engine version for running sessions.

Parameters:
  • effective_engine_version (Optional[str]) – Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a CreateWorkGroup or UpdateWorkGroup operation, the EffectiveEngineVersion field is ignored.

  • selected_engine_version (Optional[str]) – The engine version requested by the user. Possible values are determined by the output of ListEngineVersions , including AUTO. The default is AUTO.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-engineversion.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_athena as athena

engine_version_property = athena.CfnWorkGroup.EngineVersionProperty(
    effective_engine_version="effectiveEngineVersion",
    selected_engine_version="selectedEngineVersion"
)

Attributes

effective_engine_version

Read only.

The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a CreateWorkGroup or UpdateWorkGroup operation, the EffectiveEngineVersion field is ignored.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-engineversion.html#cfn-athena-workgroup-engineversion-effectiveengineversion

selected_engine_version

The engine version requested by the user.

Possible values are determined by the output of ListEngineVersions , including AUTO. The default is AUTO.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-engineversion.html#cfn-athena-workgroup-engineversion-selectedengineversion

ResultConfigurationProperty

class CfnWorkGroup.ResultConfigurationProperty(*, acl_configuration=None, encryption_configuration=None, expected_bucket_owner=None, output_location=None)

Bases: object

The location in Amazon S3 where query and calculation results are stored and the encryption option, if any, used for query and calculation results.

These are known as “client-side settings”. If workgroup settings override client-side settings, then the query uses the workgroup settings.

Parameters:
  • acl_configuration (Union[IResolvable, AclConfigurationProperty, Dict[str, Any], None]) – Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. Currently the only supported canned ACL is BUCKET_OWNER_FULL_CONTROL . This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ACL configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See EnforceWorkGroupConfiguration .

  • encryption_configuration (Union[IResolvable, EncryptionConfigurationProperty, Dict[str, Any], None]) – If query results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE_KMS or CSE_KMS ) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings .

  • expected_bucket_owner (Optional[str]) – The account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration:OutputLocation . If set, Athena uses the value for ExpectedBucketOwner when it makes Amazon S3 calls to your specified output location. If the ExpectedBucketOwner account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ExpectedBucketOwner setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See EnforceWorkGroupConfiguration .

  • output_location (Optional[str]) – The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/ . To run a query, you must specify the query results location using either a client-side setting for individual queries or a location specified by the workgroup. If workgroup settings override client-side settings, then the query uses the location specified for the workgroup. If no query location is set, Athena issues an error. For more information, see Working with Query Results, Output Files, and Query History and EnforceWorkGroupConfiguration .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_athena as athena

result_configuration_property = athena.CfnWorkGroup.ResultConfigurationProperty(
    acl_configuration=athena.CfnWorkGroup.AclConfigurationProperty(
        s3_acl_option="s3AclOption"
    ),
    encryption_configuration=athena.CfnWorkGroup.EncryptionConfigurationProperty(
        encryption_option="encryptionOption",

        # the properties below are optional
        kms_key="kmsKey"
    ),
    expected_bucket_owner="expectedBucketOwner",
    output_location="outputLocation"
)

Attributes

acl_configuration

Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results.

Currently the only supported canned ACL is BUCKET_OWNER_FULL_CONTROL . This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ACL configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See EnforceWorkGroupConfiguration .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfiguration.html#cfn-athena-workgroup-resultconfiguration-aclconfiguration

encryption_configuration

If query results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE_KMS or CSE_KMS ) and key information.

This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfiguration.html#cfn-athena-workgroup-resultconfiguration-encryptionconfiguration

expected_bucket_owner

The account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration:OutputLocation .

If set, Athena uses the value for ExpectedBucketOwner when it makes Amazon S3 calls to your specified output location. If the ExpectedBucketOwner account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error.

This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ExpectedBucketOwner setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See EnforceWorkGroupConfiguration .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfiguration.html#cfn-athena-workgroup-resultconfiguration-expectedbucketowner

output_location

The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/ .

To run a query, you must specify the query results location using either a client-side setting for individual queries or a location specified by the workgroup. If workgroup settings override client-side settings, then the query uses the location specified for the workgroup. If no query location is set, Athena issues an error. For more information, see Working with Query Results, Output Files, and Query History and EnforceWorkGroupConfiguration .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfiguration.html#cfn-athena-workgroup-resultconfiguration-outputlocation

WorkGroupConfigurationProperty

class CfnWorkGroup.WorkGroupConfigurationProperty(*, additional_configuration=None, bytes_scanned_cutoff_per_query=None, customer_content_encryption_configuration=None, enforce_work_group_configuration=None, engine_version=None, execution_role=None, publish_cloud_watch_metrics_enabled=None, requester_pays_enabled=None, result_configuration=None)

Bases: object

The configuration of the workgroup, which includes the location in Amazon S3 where query results are stored, the encryption option, if any, used for query results, whether Amazon CloudWatch Metrics are enabled for the workgroup, and the limit for the amount of bytes scanned (cutoff) per query, if it is specified.

The EnforceWorkGroupConfiguration option determines whether workgroup settings override client-side query settings.

Parameters:
  • additional_configuration (Optional[str]) – Specifies a user defined JSON string that is passed to the session engine.

  • bytes_scanned_cutoff_per_query (Union[int, float, None]) – The upper limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan. No default is defined. .. epigraph:: This property currently supports integer types. Support for long values is planned.

  • customer_content_encryption_configuration (Union[IResolvable, CustomerContentEncryptionConfigurationProperty, Dict[str, Any], None]) – Specifies the KMS key that is used to encrypt the user’s data stores in Athena. This setting does not apply to Athena SQL workgroups.

  • enforce_work_group_configuration (Union[bool, IResolvable, None]) –

    If set to “true”, the settings for the workgroup override client-side settings. If set to “false”, client-side settings are used. For more information, see Workgroup Settings Override Client-Side Settings .

  • engine_version (Union[IResolvable, EngineVersionProperty, Dict[str, Any], None]) – The engine version that all queries running on the workgroup use.

  • execution_role (Optional[str]) – Role used to access user resources in an Athena for Apache Spark session. This property applies only to Spark-enabled workgroups in Athena.

  • publish_cloud_watch_metrics_enabled (Union[bool, IResolvable, None]) – Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.

  • requester_pays_enabled (Union[bool, IResolvable, None]) – 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 .

  • result_configuration (Union[IResolvable, ResultConfigurationProperty, Dict[str, Any], None]) –

    Specifies the location in Amazon S3 where query results are stored and the encryption option, if any, used for query results. For more information, see Working with Query Results, Output Files, and Query History .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-workgroupconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_athena as athena

work_group_configuration_property = athena.CfnWorkGroup.WorkGroupConfigurationProperty(
    additional_configuration="additionalConfiguration",
    bytes_scanned_cutoff_per_query=123,
    customer_content_encryption_configuration=athena.CfnWorkGroup.CustomerContentEncryptionConfigurationProperty(
        kms_key="kmsKey"
    ),
    enforce_work_group_configuration=False,
    engine_version=athena.CfnWorkGroup.EngineVersionProperty(
        effective_engine_version="effectiveEngineVersion",
        selected_engine_version="selectedEngineVersion"
    ),
    execution_role="executionRole",
    publish_cloud_watch_metrics_enabled=False,
    requester_pays_enabled=False,
    result_configuration=athena.CfnWorkGroup.ResultConfigurationProperty(
        acl_configuration=athena.CfnWorkGroup.AclConfigurationProperty(
            s3_acl_option="s3AclOption"
        ),
        encryption_configuration=athena.CfnWorkGroup.EncryptionConfigurationProperty(
            encryption_option="encryptionOption",

            # the properties below are optional
            kms_key="kmsKey"
        ),
        expected_bucket_owner="expectedBucketOwner",
        output_location="outputLocation"
    )
)

Attributes

additional_configuration

Specifies a user defined JSON string that is passed to the session engine.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-workgroupconfiguration.html#cfn-athena-workgroup-workgroupconfiguration-additionalconfiguration

bytes_scanned_cutoff_per_query

The upper limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.

No default is defined. .. epigraph:

This property currently supports integer types. Support for long values is planned.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-workgroupconfiguration.html#cfn-athena-workgroup-workgroupconfiguration-bytesscannedcutoffperquery

customer_content_encryption_configuration

Specifies the KMS key that is used to encrypt the user’s data stores in Athena.

This setting does not apply to Athena SQL workgroups.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-workgroupconfiguration.html#cfn-athena-workgroup-workgroupconfiguration-customercontentencryptionconfiguration

enforce_work_group_configuration

If set to “true”, the settings for the workgroup override client-side settings.

If set to “false”, client-side settings are used. For more information, see Workgroup Settings Override Client-Side Settings .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-workgroupconfiguration.html#cfn-athena-workgroup-workgroupconfiguration-enforceworkgroupconfiguration

engine_version

The engine version that all queries running on the workgroup use.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-workgroupconfiguration.html#cfn-athena-workgroup-workgroupconfiguration-engineversion

execution_role

Role used to access user resources in an Athena for Apache Spark session.

This property applies only to Spark-enabled workgroups in Athena.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-workgroupconfiguration.html#cfn-athena-workgroup-workgroupconfiguration-executionrole

publish_cloud_watch_metrics_enabled

Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-workgroupconfiguration.html#cfn-athena-workgroup-workgroupconfiguration-publishcloudwatchmetricsenabled

requester_pays_enabled

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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-workgroupconfiguration.html#cfn-athena-workgroup-workgroupconfiguration-requesterpaysenabled

result_configuration

Specifies the location in Amazon S3 where query results are stored and the encryption option, if any, used for query results.

For more information, see Working with Query Results, Output Files, and Query History .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-workgroupconfiguration.html#cfn-athena-workgroup-workgroupconfiguration-resultconfiguration