{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-s3-glacier/json-schema/amazon-s3-glacier-set-data-retrieval-policy-input-schema.json",
  "title": "SetDataRetrievalPolicyInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-s3-glacier-operations-api-openapi.yml#/components/schemas/SetDataRetrievalPolicyInput",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "description": "The AccountId value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '-' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID."
    },
    "Policy": {
      "$ref": "#/$defs/DataRetrievalPolicy"
    }
  },
  "required": [
    "accountId"
  ],
  "$defs": {
    "DataRetrievalPolicy": {
      "type": "object",
      "properties": {
        "Rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DataRetrievalRule"
          },
          "description": "The policy rule. Although this is a list type, currently there must be only one rule, which contains a Strategy field and optionally a BytesPerHour field."
        }
      }
    },
    "DataRetrievalRule": {
      "type": "object",
      "properties": {
        "Strategy": {
          "type": "string",
          "description": "The type of data retrieval policy to set. Valid values: BytesPerHour|FreeTier|None"
        },
        "BytesPerHour": {
          "type": "integer",
          "description": "The maximum number of bytes that can be retrieved in an hour. This field is required only if the value of the Strategy field is BytesPerHour. Your PUT operation will be rejected if the Strategy field is not set to BytesPerHour and you set this field."
        }
      }
    }
  }
}