{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-elasticache-globalreplicationgroup.json",
  "title": "AWSElastiCacheGlobalReplicationGroupProperties",
  "description": "The AWS::ElastiCache::GlobalReplicationGroup resource creates an Amazon ElastiCache Global Replication Group.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-elasticache>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-elasticache-globalreplicationgroup.json",
    "sourceSha256": "a39105c8bb66f6bb7437fbb804b4d29e20ea51f989d1203c7dceeac218639f12"
  },
  "type": "object",
  "properties": {
    "GlobalReplicationGroupIdSuffix": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The suffix name of a Global Datastore. Amazon ElastiCache automatically applies a prefix to the Global Datastore ID when it is created. Each AWS Region has its own prefix. "
    },
    "AutomaticFailoverEnabled": {
      "description": "AutomaticFailoverEnabled",
      "type": "boolean"
    },
    "CacheNodeType": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The cache node type of the Global Datastore"
    },
    "EngineVersion": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The engine version of the Global Datastore."
    },
    "CacheParameterGroupName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Cache parameter group name to use for the new engine version. This parameter cannot be modified independently."
    },
    "GlobalNodeGroupCount": {
      "description": "Indicates the number of node groups in the Global Datastore.",
      "type": "integer"
    },
    "GlobalReplicationGroupDescription": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The optional description of the Global Datastore"
    },
    "Members": {
      "description": "The replication groups that comprise the Global Datastore.",
      "type": "array",
      "uniqueItems": true,
      "items": {
        "$ref": "#/$defs/GlobalReplicationGroupMember"
      },
      "minItems": 1
    },
    "RegionalConfigurations": {
      "description": "Describes the replication group IDs, the AWS regions where they are stored and the shard configuration for each that comprise the Global Datastore ",
      "type": "array",
      "uniqueItems": true,
      "items": {
        "$ref": "#/$defs/RegionalConfiguration"
      }
    }
  },
  "typeName": "AWS::ElastiCache::GlobalReplicationGroup",
  "primaryIdentifier": [
    "/properties/GlobalReplicationGroupId"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-elasticache",
  "additionalProperties": false,
  "required": [
    "Members"
  ],
  "$defs": {
    "GlobalReplicationGroupMember": {
      "type": "object",
      "title": "AWSElastiCacheGlobalReplicationGroupGlobalReplicationGroupMemberDefinition",
      "properties": {
        "ReplicationGroupId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Regionally unique identifier for the member i.e. ReplicationGroupId."
        },
        "ReplicationGroupRegion": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The AWS region of the Global Datastore member."
        },
        "Role": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "PRIMARY",
                "SECONDARY"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Indicates the role of the member, primary or secondary."
        }
      },
      "additionalProperties": false
    },
    "ReshardingConfiguration": {
      "type": "object",
      "title": "AWSElastiCacheGlobalReplicationGroupReshardingConfigurationDefinition",
      "properties": {
        "NodeGroupId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Unique identifier for the Node Group. This is either auto-generated by ElastiCache (4-digit id) or a user supplied id."
        },
        "PreferredAvailabilityZones": {
          "description": "A list of preferred availability zones for the nodes of new node groups.",
          "type": "array",
          "uniqueItems": false,
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "RegionalConfiguration": {
      "type": "object",
      "title": "AWSElastiCacheGlobalReplicationGroupRegionalConfigurationDefinition",
      "properties": {
        "ReplicationGroupId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The replication group id of the Global Datastore member."
        },
        "ReplicationGroupRegion": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The AWS region of the Global Datastore member."
        },
        "ReshardingConfigurations": {
          "description": "A list of PreferredAvailabilityZones objects that specifies the configuration of a node group in the resharded cluster. ",
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/ReshardingConfiguration"
          }
        }
      },
      "additionalProperties": false
    }
  },
  "readOnlyProperties": [
    "/properties/GlobalReplicationGroupId",
    "/properties/Status"
  ],
  "writeOnlyProperties": [
    "/properties/GlobalReplicationGroupIdSuffix",
    "/properties/AutomaticFailoverEnabled",
    "/properties/CacheNodeType",
    "/properties/EngineVersion",
    "/properties/GlobalNodeGroupCount",
    "/properties/GlobalReplicationGroupDescription",
    "/properties/RegionalConfigurations"
  ]
}
