{
  "$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-put-report-definition-request-schema.json",
  "title": "PutReportDefinitionRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-billing-and-cost-management-report-definition-api-openapi.yml#/components/schemas/PutReportDefinitionRequest",
  "type": "object",
  "properties": {
    "ReportDefinition": {
      "$ref": "#/$defs/ReportDefinition"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The tags to be assigned to the report definition resource."
    }
  },
  "required": [
    "ReportDefinition"
  ],
  "$defs": {
    "ReportDefinition": {
      "type": "object",
      "properties": {
        "ReportName": {
          "type": "string"
        },
        "TimeUnit": {
          "type": "string",
          "enum": [
            "HOURLY",
            "DAILY",
            "MONTHLY"
          ]
        },
        "Format": {
          "type": "string",
          "enum": [
            "textORcsv",
            "Parquet"
          ]
        },
        "Compression": {
          "type": "string",
          "enum": [
            "ZIP",
            "GZIP",
            "Parquet"
          ]
        },
        "AdditionalSchemaElements": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "RESOURCES",
              "SPLIT_COST_ALLOCATION_DATA",
              "MANUAL_DISCOUNT_COMPATIBILITY"
            ]
          },
          "description": "A list of strings that indicate additional content that Amazon Web Services includes in the report, such as individual resource IDs."
        },
        "S3Bucket": {
          "type": "string"
        },
        "S3Prefix": {
          "type": "string"
        },
        "S3Region": {
          "type": "string",
          "enum": [
            "af-south-1",
            "ap-east-1",
            "ap-south-1",
            "ap-south-2",
            "ap-southeast-1",
            "ap-southeast-2",
            "ap-southeast-3",
            "ap-northeast-1",
            "ap-northeast-2",
            "ap-northeast-3",
            "ca-central-1",
            "eu-central-1",
            "eu-central-2",
            "eu-west-1",
            "eu-west-2",
            "eu-west-3",
            "eu-north-1",
            "eu-south-1",
            "eu-south-2",
            "me-central-1",
            "me-south-1",
            "sa-east-1",
            "us-east-1",
            "us-east-2",
            "us-west-1",
            "us-west-2",
            "cn-north-1",
            "cn-northwest-1"
          ]
        },
        "AdditionalArtifacts": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "REDSHIFT",
              "QUICKSIGHT",
              "ATHENA"
            ]
          },
          "description": "A list of manifests that you want Amazon Web Services to create for this report."
        },
        "RefreshClosedReports": {
          "type": "boolean",
          "description": "Whether you want Amazon Web Services to update your reports after they have been finalized if Amazon Web Services detects charges related to previous months. These charges can include refunds, credits, or support fees."
        },
        "ReportVersioning": {
          "type": "string",
          "enum": [
            "CREATE_NEW_REPORT",
            "OVERWRITE_REPORT"
          ],
          "description": "Whether you want Amazon Web Services to overwrite the previous version of each report or to deliver the report in addition to the previous versions."
        },
        "BillingViewArn": {
          "type": "string",
          "description": "The Amazon resource name of the billing view. The BillingViewArn is needed to create Amazon Web Services Cost and Usage Report for each billing group maintained in the Amazon Web Services Billing Conductor service. The BillingViewArn for a billing group can be constructed as: arn:aws:billing::payer-account-id:billingview/billing-group-primary-account-id"
        },
        "ReportStatus": {
          "$ref": "#/$defs/ReportStatus"
        }
      },
      "required": [
        "ReportName",
        "TimeUnit",
        "Format",
        "Compression",
        "AdditionalSchemaElements",
        "S3Bucket",
        "S3Prefix",
        "S3Region"
      ]
    },
    "ReportStatus": {
      "type": "object",
      "properties": {
        "lastDelivery": {
          "type": "string",
          "description": "A timestamp that gives the date of a report delivery."
        },
        "lastStatus": {
          "type": "string",
          "enum": [
            "SUCCESS",
            "ERROR_PERMISSIONS",
            "ERROR_NO_BUCKET"
          ],
          "description": "An enum that gives the status of a report delivery."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key of the tag. Tag keys are case sensitive. Each report definition can only have up to one tag with the same key. If you try to add an existing tag with the same key, the existing tag value will be updated to the new value."
        },
        "Value": {
          "type": "string",
          "description": "The value of the tag. Tag values are case-sensitive. This can be an empty string."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}