CfnExport
- class aws_cdk.aws_bcmdataexports.CfnExport(scope, id, *, export, tags=None)
Bases:
CfnResource
Creates a data export and specifies the data query, the delivery preference, and any optional resource tags.
A
DataQuery
consists of both aQueryStatement
andTableConfigurations
.The
QueryStatement
is an SQL statement. Data Exports only supports a limited subset of the SQL syntax. For more information on the SQL syntax that is supported, see Data query . To view the available tables and columns, see the Data Exports table dictionary .The
TableConfigurations
is a collection of specifiedTableProperties
for the table being queried in theQueryStatement
. TableProperties are additional configurations you can provide to change the data and schema of a table. Each table can have different TableProperties. However, tables are not required to have any TableProperties. Each table property has a default value that it assumes if not specified. For more information on table configurations, see Data query . To view the table properties available for each table, see the Data Exports table dictionary or use theListTables
API to get a response of all tables and their available properties.- See:
- CloudformationResource:
AWS::BCMDataExports::Export
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_bcmdataexports as bcmdataexports cfn_export = bcmdataexports.CfnExport(self, "MyCfnExport", export=bcmdataexports.CfnExport.ExportProperty( data_query=bcmdataexports.CfnExport.DataQueryProperty( query_statement="queryStatement", # the properties below are optional table_configurations={ "table_configurations_key": { "table_configurations_key": "tableConfigurations" } } ), destination_configurations=bcmdataexports.CfnExport.DestinationConfigurationsProperty( s3_destination=bcmdataexports.CfnExport.S3DestinationProperty( s3_bucket="s3Bucket", s3_output_configurations=bcmdataexports.CfnExport.S3OutputConfigurationsProperty( compression="compression", format="format", output_type="outputType", overwrite="overwrite" ), s3_prefix="s3Prefix", s3_region="s3Region" ) ), name="name", refresh_cadence=bcmdataexports.CfnExport.RefreshCadenceProperty( frequency="frequency" ), # the properties below are optional description="description", export_arn="exportArn" ), # the properties below are optional tags=[bcmdataexports.CfnExport.ResourceTagProperty( key="key", value="value" )] )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).export (
Union
[IResolvable
,ExportProperty
,Dict
[str
,Any
]]) – The details that are available for an export.tags (
Optional
[Sequence
[Union
[ResourceTagProperty
,Dict
[str
,Any
]]]]) –
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_dependency(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_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- 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 prefixpath
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 toaddOverride
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 intermediate 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
). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT
). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
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 resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
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.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- 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
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- 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
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- 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::BCMDataExports::Export'
- attr_export_arn
The Amazon Resource Name (ARN) for this export.
- CloudformationAttribute:
ExportArn
- cdk_tag_manager
Tag Manager which manages the tags for this resource.
- 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.
- export
The details that are available for an export.
- 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.
- node
The tree node.
- 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).
- tags
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(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
DataQueryProperty
- class CfnExport.DataQueryProperty(*, query_statement, table_configurations=None)
Bases:
object
The SQL query of column selections and row filters from the data table you want.
- Parameters:
query_statement (
str
) – The query statement.table_configurations (
Union
[IResolvable
,Mapping
[str
,Union
[IResolvable
,Mapping
[str
,str
]]],None
]) – The table configuration.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_bcmdataexports as bcmdataexports data_query_property = bcmdataexports.CfnExport.DataQueryProperty( query_statement="queryStatement", # the properties below are optional table_configurations={ "table_configurations_key": { "table_configurations_key": "tableConfigurations" } } )
Attributes
- query_statement
The query statement.
- table_configurations
The table configuration.
DestinationConfigurationsProperty
- class CfnExport.DestinationConfigurationsProperty(*, s3_destination)
Bases:
object
The destinations used for data exports.
- Parameters:
s3_destination (
Union
[IResolvable
,S3DestinationProperty
,Dict
[str
,Any
]]) – An object that describes the destination of the data exports file.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_bcmdataexports as bcmdataexports destination_configurations_property = bcmdataexports.CfnExport.DestinationConfigurationsProperty( s3_destination=bcmdataexports.CfnExport.S3DestinationProperty( s3_bucket="s3Bucket", s3_output_configurations=bcmdataexports.CfnExport.S3OutputConfigurationsProperty( compression="compression", format="format", output_type="outputType", overwrite="overwrite" ), s3_prefix="s3Prefix", s3_region="s3Region" ) )
Attributes
- s3_destination
An object that describes the destination of the data exports file.
ExportProperty
- class CfnExport.ExportProperty(*, data_query, destination_configurations, name, refresh_cadence, description=None, export_arn=None)
Bases:
object
The details that are available for an export.
- Parameters:
data_query (
Union
[IResolvable
,DataQueryProperty
,Dict
[str
,Any
]]) – The data query for this specific data export.destination_configurations (
Union
[IResolvable
,DestinationConfigurationsProperty
,Dict
[str
,Any
]]) – The destination configuration for this specific data export.name (
str
) – The name of this specific data export.refresh_cadence (
Union
[IResolvable
,RefreshCadenceProperty
,Dict
[str
,Any
]]) – The cadence for AWS to update the export in your S3 bucket.description (
Optional
[str
]) – The description for this specific data export.export_arn (
Optional
[str
]) – The Amazon Resource Name (ARN) for this export.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_bcmdataexports as bcmdataexports export_property = bcmdataexports.CfnExport.ExportProperty( data_query=bcmdataexports.CfnExport.DataQueryProperty( query_statement="queryStatement", # the properties below are optional table_configurations={ "table_configurations_key": { "table_configurations_key": "tableConfigurations" } } ), destination_configurations=bcmdataexports.CfnExport.DestinationConfigurationsProperty( s3_destination=bcmdataexports.CfnExport.S3DestinationProperty( s3_bucket="s3Bucket", s3_output_configurations=bcmdataexports.CfnExport.S3OutputConfigurationsProperty( compression="compression", format="format", output_type="outputType", overwrite="overwrite" ), s3_prefix="s3Prefix", s3_region="s3Region" ) ), name="name", refresh_cadence=bcmdataexports.CfnExport.RefreshCadenceProperty( frequency="frequency" ), # the properties below are optional description="description", export_arn="exportArn" )
Attributes
- data_query
The data query for this specific data export.
- description
The description for this specific data export.
- destination_configurations
The destination configuration for this specific data export.
- export_arn
The Amazon Resource Name (ARN) for this export.
- name
The name of this specific data export.
- refresh_cadence
The cadence for AWS to update the export in your S3 bucket.
RefreshCadenceProperty
- class CfnExport.RefreshCadenceProperty(*, frequency)
Bases:
object
The cadence for AWS to update the data export in your S3 bucket.
- Parameters:
frequency (
str
) – The frequency that data exports are updated. The export refreshes each time the source data updates, up to three times daily.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_bcmdataexports as bcmdataexports refresh_cadence_property = bcmdataexports.CfnExport.RefreshCadenceProperty( frequency="frequency" )
Attributes
- frequency
The frequency that data exports are updated.
The export refreshes each time the source data updates, up to three times daily.
ResourceTagProperty
- class CfnExport.ResourceTagProperty(*, key, value)
Bases:
object
The tag structure that contains a tag key and value.
- Parameters:
key (
str
) – The key that’s associated with the tag.value (
str
) – The value that’s associated with the tag.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_bcmdataexports as bcmdataexports resource_tag_property = bcmdataexports.CfnExport.ResourceTagProperty( key="key", value="value" )
Attributes
- key
The key that’s associated with the tag.
- value
The value that’s associated with the tag.
S3DestinationProperty
- class CfnExport.S3DestinationProperty(*, s3_bucket, s3_output_configurations, s3_prefix, s3_region)
Bases:
object
Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and object keys of a data exports file.
- Parameters:
s3_bucket (
str
) – The name of the Amazon S3 bucket used as the destination of a data export file.s3_output_configurations (
Union
[IResolvable
,S3OutputConfigurationsProperty
,Dict
[str
,Any
]]) – The output configuration for the data export.s3_prefix (
str
) – The S3 path prefix you want prepended to the name of your data export.s3_region (
str
) – The S3 bucket Region.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_bcmdataexports as bcmdataexports s3_destination_property = bcmdataexports.CfnExport.S3DestinationProperty( s3_bucket="s3Bucket", s3_output_configurations=bcmdataexports.CfnExport.S3OutputConfigurationsProperty( compression="compression", format="format", output_type="outputType", overwrite="overwrite" ), s3_prefix="s3Prefix", s3_region="s3Region" )
Attributes
- s3_bucket
The name of the Amazon S3 bucket used as the destination of a data export file.
- s3_output_configurations
The output configuration for the data export.
- s3_prefix
The S3 path prefix you want prepended to the name of your data export.
S3OutputConfigurationsProperty
- class CfnExport.S3OutputConfigurationsProperty(*, compression, format, output_type, overwrite)
Bases:
object
The compression type, file format, and overwrite preference for the data export.
- Parameters:
compression (
str
) – The compression type for the data export.format (
str
) – The file format for the data export.output_type (
str
) – The output type for the data export.overwrite (
str
) – The rule to follow when generating a version of the data export file. You have the choice to overwrite the previous version or to be delivered in addition to the previous versions. Overwriting exports can save on Amazon S3 storage costs. Creating new export versions allows you to track the changes in cost and usage data over time.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_bcmdataexports as bcmdataexports s3_output_configurations_property = bcmdataexports.CfnExport.S3OutputConfigurationsProperty( compression="compression", format="format", output_type="outputType", overwrite="overwrite" )
Attributes
- compression
The compression type for the data export.
- format
The file format for the data export.
- output_type
The output type for the data export.
- overwrite
The rule to follow when generating a version of the data export file.
You have the choice to overwrite the previous version or to be delivered in addition to the previous versions. Overwriting exports can save on Amazon S3 storage costs. Creating new export versions allows you to track the changes in cost and usage data over time.