{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-s3/json-schema/amazon-s3-put-bucket-inventory-configuration-request-schema.json",
  "title": "PutBucketInventoryConfigurationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-s3-inventory-api-openapi.yml#/components/schemas/PutBucketInventoryConfigurationRequest",
  "type": "object",
  "properties": {
    "Bucket": {
      "type": "string",
      "description": "The name of the bucket where the inventory configuration will be stored. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format bucket-base-name--zone-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming"
    },
    "Id": {
      "type": "string",
      "description": "The ID used to identify the inventory configuration."
    },
    "InventoryConfiguration": {
      "$ref": "#/$defs/InventoryConfiguration"
    },
    "ExpectedBucketOwner": {
      "type": "string",
      "description": "The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied). For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code 501 Not Implemented."
    }
  },
  "required": [
    "Bucket",
    "Id",
    "InventoryConfiguration"
  ],
  "$defs": {
    "InventoryConfiguration": {
      "type": "object",
      "properties": {
        "Destination": {
          "$ref": "#/$defs/InventoryDestination"
        },
        "IsEnabled": {
          "type": "boolean",
          "description": "Specifies whether the inventory is enabled or disabled. If set to True, an inventory list is generated. If set to False, no inventory list is generated."
        },
        "Filter": {
          "$ref": "#/$defs/InventoryFilter"
        },
        "Id": {
          "type": "string",
          "description": "The ID used to identify the inventory configuration."
        },
        "IncludedObjectVersions": {
          "type": "string",
          "enum": [
            "All",
            "Current"
          ],
          "description": "Object versions to include in the inventory list. If set to All, the list includes all the object versions, which adds the version-related fields VersionId, IsLatest, and DeleteMarker to the list. If set to Current, the list does not contain these version-related fields."
        },
        "OptionalFields": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "Size",
              "LastModifiedDate",
              "StorageClass",
              "ETag",
              "IsMultipartUploaded",
              "ReplicationStatus",
              "EncryptionStatus",
              "ObjectLockRetainUntilDate",
              "ObjectLockMode",
              "ObjectLockLegalHoldStatus",
              "ObjectLockEventHoldStatus",
              "ObjectLockEventHoldDuration",
              "IntelligentTieringAccessTier",
              "BucketKeyStatus",
              "ChecksumAlgorithm",
              "ObjectAccessControlList",
              "ObjectOwner",
              "LifecycleExpirationDate",
              "IntelligentTieringReferenceDate"
            ]
          },
          "description": "Contains the optional fields that are included in the inventory results. The following optional fields are supported for directory buckets Size | LastModifiedDate | StorageClass | ETag | IsMultipartUploaded | EncryptionStatus | BucketKeyStatus | ChecksumAlgorithm | LifecycleExpirationDate. Throws MalformedXML error if unsupported optional field is provided."
        },
        "Schedule": {
          "$ref": "#/$defs/InventorySchedule"
        }
      },
      "required": [
        "Destination",
        "IsEnabled",
        "Id",
        "IncludedObjectVersions",
        "Schedule"
      ]
    },
    "InventoryDestination": {
      "type": "object",
      "properties": {
        "S3BucketDestination": {
          "$ref": "#/$defs/InventoryS3BucketDestination"
        }
      },
      "required": [
        "S3BucketDestination"
      ]
    },
    "InventoryEncryption": {
      "type": "object",
      "properties": {
        "SSES3": {
          "$ref": "#/$defs/SSES3"
        },
        "SSEKMS": {
          "$ref": "#/$defs/SSEKMS"
        }
      }
    },
    "InventoryFilter": {
      "type": "object",
      "properties": {
        "Prefix": {
          "type": "string",
          "description": "The prefix that an object must have to be included in the inventory results."
        }
      },
      "required": [
        "Prefix"
      ]
    },
    "InventoryS3BucketDestination": {
      "type": "object",
      "properties": {
        "AccountId": {
          "type": "string",
          "description": "The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data. Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes."
        },
        "Bucket": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the bucket where inventory results will be published."
        },
        "Format": {
          "type": "string",
          "enum": [
            "CSV",
            "ORC",
            "Parquet"
          ],
          "description": "Specifies the output format of the inventory results."
        },
        "Prefix": {
          "type": "string",
          "description": "The prefix that is prepended to all inventory results."
        },
        "Encryption": {
          "$ref": "#/$defs/InventoryEncryption"
        }
      },
      "required": [
        "Bucket",
        "Format"
      ]
    },
    "InventorySchedule": {
      "type": "object",
      "properties": {
        "Frequency": {
          "type": "string",
          "enum": [
            "Daily",
            "Weekly"
          ],
          "description": "Specifies how frequently inventory results are produced."
        }
      },
      "required": [
        "Frequency"
      ]
    },
    "SSEKMS": {
      "type": "object",
      "properties": {
        "KeyId": {
          "type": "string",
          "description": "Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for encrypting inventory reports."
        }
      },
      "required": [
        "KeyId"
      ]
    },
    "SSES3": {
      "type": "object",
      "properties": {}
    }
  }
}