Skip to content

create_export

create_export(
    export: Export,
    *,
    config_overrides: Optional[BCMDataExportsClientConfig] = None,
    resource_tags: Optional[ResourceTagList] = None,
) -> CreateExportResponse

Creates a data export and specifies the data query, the delivery preference, and any optional resource tags.

A DataQuery consists of both a QueryStatement and TableConfigurations.

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 specified TableProperties for the table being queried in the QueryStatement. 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 the ListTables API to get a response of all tables and their available properties.

Parameters:

  • export (Export) –

    The details of the export, including data query, name, description, and destination configuration.

  • resource_tags (Optional[ResourceTagList], default: None ) –

    An optional list of tags to associate with the specified export. Each tag consists of a key and a value, and each key must be unique for the resource.

Raises:

Source code in docs_src/capo_bcm_data_exports/_services/bcm_data_exports.py
def create_export(
    self,
    export: "capo_bcm_data_exports.types.export.Export",
    *,
    config_overrides: Optional[BCMDataExportsClientConfig] = None,
    resource_tags: Optional[
        "capo_bcm_data_exports.types.resource_tag_list.ResourceTagList"
    ] = None,
) -> "capo_bcm_data_exports.types.create_export_response.CreateExportResponse":
    """<p>Creates a data export and specifies the data query, the delivery preference, and any optional resource tags.</p> <p>A <code>DataQuery</code> consists of both a <code>QueryStatement</code> and <code>TableConfigurations</code>.</p> <p>The <code>QueryStatement</code> 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 <a href="https://docs.aws.amazon.com/cur/latest/userguide/de-data-query.html">Data query</a>. To view the available tables and columns, see the <a href="https://docs.aws.amazon.com/cur/latest/userguide/de-table-dictionary.html">Data Exports table dictionary</a>.</p> <p>The <code>TableConfigurations</code> is a collection of specified <code>TableProperties</code> for the table being queried in the <code>QueryStatement</code>. 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 <a href="https://docs.aws.amazon.com/cur/latest/userguide/de-data-query.html">Data query</a>. To view the table properties available for each table, see the <a href="https://docs.aws.amazon.com/cur/latest/userguide/de-table-dictionary.html">Data Exports table dictionary</a> or use the <code>ListTables</code> API to get a response of all tables and their available properties.</p>

    Args:
        export: <p>The details of the export, including data query, name, description, and destination configuration.</p>
        resource_tags: <p>An optional list of tags to associate with the specified export. Each tag consists of a key and a value, and each key must be unique for the resource.</p>

    Raises:
        capo_bcm_data_exports.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_bcm_data_exports.errors.internal_server_exception.InternalServerException: <p>An error on the server occurred during the processing of your request. Try again later.</p>
        capo_bcm_data_exports.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.</p>
        capo_bcm_data_exports.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_bcm_data_exports.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_bcm_data_exports.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_bcm_data_exports.types.create_export_request.CreateExportRequest]",
    ) -> OperationResponse[
        "capo_bcm_data_exports.types.create_export_response.CreateExportResponse"
    ]:
        import capo_bcm_data_exports._operations.aws_billing_and_cost_management_data_exports.create_export

        output, http_response = (
            capo_bcm_data_exports._operations.aws_billing_and_cost_management_data_exports.create_export.create_export(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateExport")
    )
    input_: capo_bcm_data_exports.types.create_export_request.CreateExportRequest = {
        "export": export
    }
    if resource_tags is not None:
        input_["resource_tags"] = resource_tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output