{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-billing-and-cost-management/json-schema/amazon-billing-and-cost-management-create-export-request-schema.json",
  "title": "CreateExportRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-billing-and-cost-management-export-api-openapi.yml#/components/schemas/CreateExportRequest",
  "type": "object",
  "properties": {
    "Export": {
      "$ref": "#/$defs/Export"
    },
    "ResourceTags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResourceTag"
      },
      "description": "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."
    }
  },
  "required": [
    "Export"
  ],
  "$defs": {
    "DataQuery": {
      "type": "object",
      "properties": {
        "QueryStatement": {
          "type": "string",
          "description": "The query statement."
        },
        "TableConfigurations": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description": "The table configuration."
        }
      },
      "required": [
        "QueryStatement"
      ]
    },
    "DestinationConfigurations": {
      "type": "object",
      "properties": {
        "S3Destination": {
          "$ref": "#/$defs/S3Destination"
        }
      },
      "required": [
        "S3Destination"
      ]
    },
    "Export": {
      "type": "object",
      "properties": {
        "ExportArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) for this export."
        },
        "Name": {
          "type": "string",
          "description": "The name of this specific data export."
        },
        "Description": {
          "type": "string",
          "description": "The description for this specific data export."
        },
        "DataQuery": {
          "$ref": "#/$defs/DataQuery"
        },
        "DestinationConfigurations": {
          "$ref": "#/$defs/DestinationConfigurations"
        },
        "RefreshCadence": {
          "$ref": "#/$defs/RefreshCadence"
        }
      },
      "required": [
        "Name",
        "DataQuery",
        "DestinationConfigurations",
        "RefreshCadence"
      ]
    },
    "RefreshCadence": {
      "type": "object",
      "properties": {
        "Frequency": {
          "type": "string",
          "enum": [
            "SYNCHRONOUS"
          ],
          "description": "The frequency that data exports are updated. The export refreshes each time the source data updates, up to three times daily."
        }
      },
      "required": [
        "Frequency"
      ]
    },
    "ResourceTag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key that's associated with the tag."
        },
        "Value": {
          "type": "string",
          "description": "The value that's associated with the tag."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    },
    "S3Destination": {
      "type": "object",
      "properties": {
        "S3Bucket": {
          "type": "string",
          "description": "The name of the Amazon S3 bucket used as the destination of a data export file."
        },
        "S3BucketOwner": {
          "type": "string",
          "description": "The Amazon Web Services account ID that owns the S3 bucket used as the destination for the data export."
        },
        "S3Prefix": {
          "type": "string",
          "description": "The S3 path prefix you want prepended to the name of your data export."
        },
        "S3Region": {
          "type": "string",
          "description": "The S3 bucket Region."
        },
        "S3OutputConfigurations": {
          "$ref": "#/$defs/S3OutputConfigurations"
        }
      },
      "required": [
        "S3Bucket",
        "S3Prefix",
        "S3Region",
        "S3OutputConfigurations"
      ]
    },
    "S3OutputConfigurations": {
      "type": "object",
      "properties": {
        "OutputType": {
          "type": "string",
          "enum": [
            "CUSTOM",
            "ATHENA",
            "REDSHIFT"
          ],
          "description": "The output type for the data export."
        },
        "Format": {
          "type": "string",
          "enum": [
            "TEXT_OR_CSV",
            "PARQUET"
          ],
          "description": "The file format for the data export."
        },
        "Compression": {
          "type": "string",
          "enum": [
            "GZIP",
            "PARQUET",
            "ZIP"
          ],
          "description": "The compression type for the data export."
        },
        "Overwrite": {
          "type": "string",
          "enum": [
            "CREATE_NEW_REPORT",
            "OVERWRITE_REPORT"
          ],
          "description": "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."
        }
      },
      "required": [
        "OutputType",
        "Format",
        "Compression",
        "Overwrite"
      ]
    }
  }
}