{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-systems-manager/json-schema/amazon-systems-manager-create-resource-data-sync-request-schema.json",
  "title": "CreateResourceDataSyncRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-systems-manager-resource-data-sync-api-openapi.yml#/components/schemas/CreateResourceDataSyncRequest",
  "type": "object",
  "properties": {
    "SyncName": {
      "type": "string",
      "description": "A name for the configuration."
    },
    "S3Destination": {
      "$ref": "#/$defs/ResourceDataSyncS3Destination"
    },
    "SyncType": {
      "type": "string",
      "description": "Specify SyncToDestination to create a resource data sync that synchronizes data to an S3 bucket for Inventory. If you specify SyncToDestination, you must provide a value for S3Destination. Specify SyncFromSource to synchronize data from a single account and multiple Regions, or multiple Amazon Web Services accounts and Amazon Web Services Regions, as listed in Organizations for Explorer. If you specify SyncFromSource, you must provide a value for SyncSource. The default value is SyncToDestination."
    },
    "SyncSource": {
      "$ref": "#/$defs/ResourceDataSyncSource"
    }
  },
  "required": [
    "SyncName"
  ],
  "$defs": {
    "ResourceDataSyncAwsOrganizationsSource": {
      "type": "object",
      "properties": {
        "OrganizationSourceType": {
          "type": "string",
          "description": "If an Amazon Web Services organization is present, this is either OrganizationalUnits or EntireOrganization. For OrganizationalUnits, the data is aggregated from a set of organization units. For EntireOrganization, the data is aggregated from the entire Amazon Web Services organization."
        },
        "OrganizationalUnits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ResourceDataSyncOrganizationalUnit"
          },
          "description": "The Organizations organization units included in the sync."
        }
      },
      "required": [
        "OrganizationSourceType"
      ]
    },
    "ResourceDataSyncDestinationDataSharing": {
      "type": "object",
      "properties": {
        "DestinationDataSharingType": {
          "type": "string",
          "description": "The sharing data type. Only Organization is supported."
        }
      }
    },
    "ResourceDataSyncOrganizationalUnit": {
      "type": "object",
      "properties": {
        "OrganizationalUnitId": {
          "type": "string",
          "description": "The Organizations unit ID data source for the sync."
        }
      }
    },
    "ResourceDataSyncS3Destination": {
      "type": "object",
      "properties": {
        "BucketName": {
          "type": "string",
          "description": "The name of the S3 bucket where the aggregated data is stored."
        },
        "Prefix": {
          "type": "string",
          "description": "An Amazon S3 prefix for the bucket."
        },
        "SyncFormat": {
          "type": "string",
          "enum": [
            "JsonSerDe"
          ],
          "description": "A supported sync format. The following format is currently supported: JsonSerDe"
        },
        "Region": {
          "type": "string",
          "description": "The Amazon Web Services Region with the S3 bucket targeted by the resource data sync."
        },
        "AWSKMSKeyARN": {
          "type": "string",
          "description": "The ARN of an encryption key for a destination in Amazon S3. Must belong to the same Region as the destination S3 bucket."
        },
        "DestinationDataSharing": {
          "$ref": "#/$defs/ResourceDataSyncDestinationDataSharing"
        }
      },
      "required": [
        "BucketName",
        "SyncFormat",
        "Region"
      ]
    },
    "ResourceDataSyncSource": {
      "type": "object",
      "properties": {
        "SourceType": {
          "type": "string",
          "description": "The type of data source for the resource data sync. SourceType is either AwsOrganizations (if an organization is present in Organizations) or SingleAccountMultiRegions."
        },
        "AwsOrganizationsSource": {
          "$ref": "#/$defs/ResourceDataSyncAwsOrganizationsSource"
        },
        "SourceRegions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The SyncSource Amazon Web Services Regions included in the resource data sync."
        },
        "IncludeFutureRegions": {
          "type": "boolean",
          "description": "Whether to automatically synchronize and aggregate data from new Amazon Web Services Regions when those Regions come online."
        },
        "EnableAllOpsDataSources": {
          "type": "boolean",
          "description": "When you create a resource data sync, if you choose one of the Organizations options, then Systems Manager automatically enables all OpsData sources in the selected Amazon Web Services Regions for all Amazon Web Services accounts in your organization (or in the selected organization units). For more information, see Setting up Systems Manager Explorer to display data from multiple accounts and Regions in the Amazon Web Services Systems Manager User Guide."
        }
      },
      "required": [
        "SourceType",
        "SourceRegions"
      ]
    }
  }
}