{
  "description": "GlobalReplicationGroup is the Schema for the GlobalReplicationGroups API. Provides an ElastiCache Global Replication Group resource.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "GlobalReplicationGroupSpec defines the desired state of GlobalReplicationGroup",
      "properties": {
        "forProvider": {
          "properties": {
            "automaticFailoverEnabled": {
              "description": "Specifies whether read-only replicas will be automatically promoted to read/write primary if the existing primary fails.\nWhen creating, by default the Global Replication Group inherits the automatic failover setting of the primary replication group.",
              "type": "boolean"
            },
            "cacheNodeType": {
              "description": "The instance class used.\nSee AWS documentation for information on supported node types\nand guidance on selecting node types.\nWhen creating, by default the Global Replication Group inherits the node type of the primary replication group.",
              "type": "string"
            },
            "engine": {
              "description": "The name of the cache engine to be used for the clusters in this global replication group.\nWhen creating, by default the Global Replication Group inherits the engine of the primary replication group.\nIf an engine is specified, the Global Replication Group and all member replication groups will be upgraded to this engine.\nValid values are redis or valkey.\nDefault is redis if engine_version is specified.",
              "type": "string"
            },
            "engineVersion": {
              "description": "Engine version to use for the Global Replication Group.\nWhen creating, by default the Global Replication Group inherits the version of the primary replication group.\nIf a version is specified, the Global Replication Group and all member replication groups will be upgraded to this version.\nCannot be downgraded without replacing the Global Replication Group and all member replication groups.\nWhen the version is 7 or higher, the major and minor version should be set, e.g., 7.2.\nWhen the version is 6, the major and minor version can be set, e.g., 6.2,\nor the minor version can be unspecified which will use the latest version at creation time, e.g., 6.x.\nThe actual engine version used is returned in the attribute engine_version_actual, see Attribute Reference below.",
              "type": "string"
            },
            "globalReplicationGroupDescription": {
              "description": "A user-created description for the global replication group.",
              "type": "string"
            },
            "globalReplicationGroupIdSuffix": {
              "description": "The suffix name of a Global Datastore. If global_replication_group_id_suffix is changed, creates a new resource.",
              "type": "string"
            },
            "numNodeGroups": {
              "description": "The number of node groups (shards) on the global replication group.",
              "type": "number"
            },
            "parameterGroupName": {
              "description": "An ElastiCache Parameter Group to use for the Global Replication Group.\nRequired when upgrading an engine or major engine version, but will be ignored if left configured after the upgrade is complete.\nSpecifying without a major version upgrade will fail.\nNote that ElastiCache creates a copy of this parameter group for each member replication group.",
              "type": "string"
            },
            "primaryReplicationGroupId": {
              "description": "The ID of the primary cluster that accepts writes and will replicate updates to the secondary cluster. If primary_replication_group_id is changed, creates a new resource.",
              "type": "string"
            },
            "primaryReplicationGroupIdRef": {
              "description": "Reference to a ReplicationGroup in elasticache to populate primaryReplicationGroupId.",
              "properties": {
                "name": {
                  "description": "Name of the referenced object.",
                  "type": "string"
                },
                "namespace": {
                  "description": "Namespace of the referenced object",
                  "type": "string"
                },
                "policy": {
                  "description": "Policies for referencing.",
                  "properties": {
                    "resolution": {
                      "default": "Required",
                      "description": "Resolution specifies whether resolution of this reference is required.\nThe default is 'Required', which means the reconcile will fail if the\nreference cannot be resolved. 'Optional' means this reference will be\na no-op if it cannot be resolved.",
                      "enum": [
                        "Required",
                        "Optional"
                      ],
                      "type": "string"
                    },
                    "resolve": {
                      "description": "Resolve specifies when this reference should be resolved. The default\nis 'IfNotPresent', which will attempt to resolve the reference only when\nthe corresponding field is not present. Use 'Always' to resolve the\nreference on every reconcile.",
                      "enum": [
                        "Always",
                        "IfNotPresent"
                      ],
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "required": [
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "primaryReplicationGroupIdSelector": {
              "description": "Selector for a ReplicationGroup in elasticache to populate primaryReplicationGroupId.",
              "properties": {
                "matchControllerRef": {
                  "description": "MatchControllerRef ensures an object with the same controller reference\nas the selecting object is selected.",
                  "type": "boolean"
                },
                "matchLabels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "MatchLabels ensures an object with matching labels is selected.",
                  "type": "object"
                },
                "namespace": {
                  "description": "Namespace for the selector",
                  "type": "string"
                },
                "policy": {
                  "description": "Policies for selection.",
                  "properties": {
                    "resolution": {
                      "default": "Required",
                      "description": "Resolution specifies whether resolution of this reference is required.\nThe default is 'Required', which means the reconcile will fail if the\nreference cannot be resolved. 'Optional' means this reference will be\na no-op if it cannot be resolved.",
                      "enum": [
                        "Required",
                        "Optional"
                      ],
                      "type": "string"
                    },
                    "resolve": {
                      "description": "Resolve specifies when this reference should be resolved. The default\nis 'IfNotPresent', which will attempt to resolve the reference only when\nthe corresponding field is not present. Use 'Always' to resolve the\nreference on every reconcile.",
                      "enum": [
                        "Always",
                        "IfNotPresent"
                      ],
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "region": {
              "description": "Region where this resource will be managed. Defaults to the Region set in the provider configuration.\nRegion is the region you'd like your resource to be created in.",
              "type": "string"
            }
          },
          "required": [
            "region"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "initProvider": {
          "description": "THIS IS A BETA FIELD. It will be honored\nunless the Management Policies feature flag is disabled.\nInitProvider holds the same fields as ForProvider, with the exception\nof Identifier and other resource reference fields. The fields that are\nin InitProvider are merged into ForProvider when the resource is created.\nThe same fields are also added to the terraform ignore_changes hook, to\navoid updating them after creation. This is useful for fields that are\nrequired on creation, but we do not desire to update them after creation,\nfor example because of an external controller is managing them, like an\nautoscaler.",
          "properties": {
            "automaticFailoverEnabled": {
              "description": "Specifies whether read-only replicas will be automatically promoted to read/write primary if the existing primary fails.\nWhen creating, by default the Global Replication Group inherits the automatic failover setting of the primary replication group.",
              "type": "boolean"
            },
            "cacheNodeType": {
              "description": "The instance class used.\nSee AWS documentation for information on supported node types\nand guidance on selecting node types.\nWhen creating, by default the Global Replication Group inherits the node type of the primary replication group.",
              "type": "string"
            },
            "engine": {
              "description": "The name of the cache engine to be used for the clusters in this global replication group.\nWhen creating, by default the Global Replication Group inherits the engine of the primary replication group.\nIf an engine is specified, the Global Replication Group and all member replication groups will be upgraded to this engine.\nValid values are redis or valkey.\nDefault is redis if engine_version is specified.",
              "type": "string"
            },
            "engineVersion": {
              "description": "Engine version to use for the Global Replication Group.\nWhen creating, by default the Global Replication Group inherits the version of the primary replication group.\nIf a version is specified, the Global Replication Group and all member replication groups will be upgraded to this version.\nCannot be downgraded without replacing the Global Replication Group and all member replication groups.\nWhen the version is 7 or higher, the major and minor version should be set, e.g., 7.2.\nWhen the version is 6, the major and minor version can be set, e.g., 6.2,\nor the minor version can be unspecified which will use the latest version at creation time, e.g., 6.x.\nThe actual engine version used is returned in the attribute engine_version_actual, see Attribute Reference below.",
              "type": "string"
            },
            "globalReplicationGroupDescription": {
              "description": "A user-created description for the global replication group.",
              "type": "string"
            },
            "globalReplicationGroupIdSuffix": {
              "description": "The suffix name of a Global Datastore. If global_replication_group_id_suffix is changed, creates a new resource.",
              "type": "string"
            },
            "numNodeGroups": {
              "description": "The number of node groups (shards) on the global replication group.",
              "type": "number"
            },
            "parameterGroupName": {
              "description": "An ElastiCache Parameter Group to use for the Global Replication Group.\nRequired when upgrading an engine or major engine version, but will be ignored if left configured after the upgrade is complete.\nSpecifying without a major version upgrade will fail.\nNote that ElastiCache creates a copy of this parameter group for each member replication group.",
              "type": "string"
            },
            "primaryReplicationGroupId": {
              "description": "The ID of the primary cluster that accepts writes and will replicate updates to the secondary cluster. If primary_replication_group_id is changed, creates a new resource.",
              "type": "string"
            },
            "primaryReplicationGroupIdRef": {
              "description": "Reference to a ReplicationGroup in elasticache to populate primaryReplicationGroupId.",
              "properties": {
                "name": {
                  "description": "Name of the referenced object.",
                  "type": "string"
                },
                "namespace": {
                  "description": "Namespace of the referenced object",
                  "type": "string"
                },
                "policy": {
                  "description": "Policies for referencing.",
                  "properties": {
                    "resolution": {
                      "default": "Required",
                      "description": "Resolution specifies whether resolution of this reference is required.\nThe default is 'Required', which means the reconcile will fail if the\nreference cannot be resolved. 'Optional' means this reference will be\na no-op if it cannot be resolved.",
                      "enum": [
                        "Required",
                        "Optional"
                      ],
                      "type": "string"
                    },
                    "resolve": {
                      "description": "Resolve specifies when this reference should be resolved. The default\nis 'IfNotPresent', which will attempt to resolve the reference only when\nthe corresponding field is not present. Use 'Always' to resolve the\nreference on every reconcile.",
                      "enum": [
                        "Always",
                        "IfNotPresent"
                      ],
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "required": [
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "primaryReplicationGroupIdSelector": {
              "description": "Selector for a ReplicationGroup in elasticache to populate primaryReplicationGroupId.",
              "properties": {
                "matchControllerRef": {
                  "description": "MatchControllerRef ensures an object with the same controller reference\nas the selecting object is selected.",
                  "type": "boolean"
                },
                "matchLabels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "MatchLabels ensures an object with matching labels is selected.",
                  "type": "object"
                },
                "namespace": {
                  "description": "Namespace for the selector",
                  "type": "string"
                },
                "policy": {
                  "description": "Policies for selection.",
                  "properties": {
                    "resolution": {
                      "default": "Required",
                      "description": "Resolution specifies whether resolution of this reference is required.\nThe default is 'Required', which means the reconcile will fail if the\nreference cannot be resolved. 'Optional' means this reference will be\na no-op if it cannot be resolved.",
                      "enum": [
                        "Required",
                        "Optional"
                      ],
                      "type": "string"
                    },
                    "resolve": {
                      "description": "Resolve specifies when this reference should be resolved. The default\nis 'IfNotPresent', which will attempt to resolve the reference only when\nthe corresponding field is not present. Use 'Always' to resolve the\nreference on every reconcile.",
                      "enum": [
                        "Always",
                        "IfNotPresent"
                      ],
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "managementPolicies": {
          "default": [
            "*"
          ],
          "description": "THIS IS A BETA FIELD. It is on by default but can be opted out\nthrough a Crossplane feature flag.\nManagementPolicies specify the array of actions Crossplane is allowed to\ntake on the managed and external resources.\nSee the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223\nand this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md",
          "items": {
            "description": "A ManagementAction represents an action that the Crossplane controllers\ncan take on an external resource.",
            "enum": [
              "Observe",
              "Create",
              "Update",
              "Delete",
              "LateInitialize",
              "*"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "providerConfigRef": {
          "default": {
            "kind": "ClusterProviderConfig",
            "name": "default"
          },
          "description": "ProviderConfigReference specifies how the provider that will be used to\ncreate, observe, update, and delete this managed resource should be\nconfigured.",
          "properties": {
            "kind": {
              "description": "Kind of the referenced object.",
              "type": "string"
            },
            "name": {
              "description": "Name of the referenced object.",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "writeConnectionSecretToRef": {
          "description": "WriteConnectionSecretToReference specifies the namespace and name of a\nSecret to which any connection details for this managed resource should\nbe written. Connection details frequently include the endpoint, username,\nand password required to connect to the managed resource.",
          "properties": {
            "name": {
              "description": "Name of the secret.",
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "forProvider"
      ],
      "type": "object",
      "x-kubernetes-validations": [
        {
          "message": "spec.forProvider.globalReplicationGroupIdSuffix is a required parameter",
          "rule": "!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.globalReplicationGroupIdSuffix) || (has(self.initProvider) && has(self.initProvider.globalReplicationGroupIdSuffix))"
        }
      ],
      "additionalProperties": false
    },
    "status": {
      "description": "GlobalReplicationGroupStatus defines the observed state of GlobalReplicationGroup.",
      "properties": {
        "atProvider": {
          "properties": {
            "arn": {
              "description": "The ARN of the ElastiCache Global Replication Group.",
              "type": "string"
            },
            "atRestEncryptionEnabled": {
              "description": "A flag that indicate whether the encryption at rest is enabled.",
              "type": "boolean"
            },
            "authTokenEnabled": {
              "description": "A flag that indicate whether AuthToken (password) is enabled.",
              "type": "boolean"
            },
            "automaticFailoverEnabled": {
              "description": "Specifies whether read-only replicas will be automatically promoted to read/write primary if the existing primary fails.\nWhen creating, by default the Global Replication Group inherits the automatic failover setting of the primary replication group.",
              "type": "boolean"
            },
            "cacheNodeType": {
              "description": "The instance class used.\nSee AWS documentation for information on supported node types\nand guidance on selecting node types.\nWhen creating, by default the Global Replication Group inherits the node type of the primary replication group.",
              "type": "string"
            },
            "clusterEnabled": {
              "description": "Indicates whether the Global Datastore is cluster enabled.",
              "type": "boolean"
            },
            "engine": {
              "description": "The name of the cache engine to be used for the clusters in this global replication group.\nWhen creating, by default the Global Replication Group inherits the engine of the primary replication group.\nIf an engine is specified, the Global Replication Group and all member replication groups will be upgraded to this engine.\nValid values are redis or valkey.\nDefault is redis if engine_version is specified.",
              "type": "string"
            },
            "engineVersion": {
              "description": "Engine version to use for the Global Replication Group.\nWhen creating, by default the Global Replication Group inherits the version of the primary replication group.\nIf a version is specified, the Global Replication Group and all member replication groups will be upgraded to this version.\nCannot be downgraded without replacing the Global Replication Group and all member replication groups.\nWhen the version is 7 or higher, the major and minor version should be set, e.g., 7.2.\nWhen the version is 6, the major and minor version can be set, e.g., 6.2,\nor the minor version can be unspecified which will use the latest version at creation time, e.g., 6.x.\nThe actual engine version used is returned in the attribute engine_version_actual, see Attribute Reference below.",
              "type": "string"
            },
            "engineVersionActual": {
              "description": "The full version number of the cache engine running on the members of this global replication group.",
              "type": "string"
            },
            "globalNodeGroups": {
              "description": "Set of node groups (shards) on the global replication group.\nHas the values:",
              "items": {
                "properties": {
                  "globalNodeGroupId": {
                    "description": "The ID of the global node group.",
                    "type": "string"
                  },
                  "slots": {
                    "description": "The keyspace for this node group.",
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            },
            "globalReplicationGroupDescription": {
              "description": "A user-created description for the global replication group.",
              "type": "string"
            },
            "globalReplicationGroupId": {
              "description": "The full ID of the global replication group.",
              "type": "string"
            },
            "globalReplicationGroupIdSuffix": {
              "description": "The suffix name of a Global Datastore. If global_replication_group_id_suffix is changed, creates a new resource.",
              "type": "string"
            },
            "id": {
              "description": "The ID of the ElastiCache Global Replication Group.",
              "type": "string"
            },
            "numNodeGroups": {
              "description": "The number of node groups (shards) on the global replication group.",
              "type": "number"
            },
            "parameterGroupName": {
              "description": "An ElastiCache Parameter Group to use for the Global Replication Group.\nRequired when upgrading an engine or major engine version, but will be ignored if left configured after the upgrade is complete.\nSpecifying without a major version upgrade will fail.\nNote that ElastiCache creates a copy of this parameter group for each member replication group.",
              "type": "string"
            },
            "primaryReplicationGroupId": {
              "description": "The ID of the primary cluster that accepts writes and will replicate updates to the secondary cluster. If primary_replication_group_id is changed, creates a new resource.",
              "type": "string"
            },
            "region": {
              "description": "Region where this resource will be managed. Defaults to the Region set in the provider configuration.\nRegion is the region you'd like your resource to be created in.",
              "type": "string"
            },
            "transitEncryptionEnabled": {
              "description": "A flag that indicates whether the encryption in transit is enabled.",
              "type": "boolean"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "conditions": {
          "description": "Conditions of the resource.",
          "items": {
            "description": "A Condition that may apply to a resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "LastTransitionTime is the last time this condition transitioned from one\nstatus to another.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A Message containing details about this condition's last transition from\none status to another, if any.",
                "type": "string"
              },
              "observedGeneration": {
                "description": "ObservedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "description": "A Reason for this condition's last transition from one status to another.",
                "type": "string"
              },
              "status": {
                "description": "Status of this condition; is it currently True, False, or Unknown?",
                "type": "string"
              },
              "type": {
                "description": "Type of this condition. At most one of each condition type may apply to\na resource at any point in time.",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the latest metadata.generation\nwhich resulted in either a ready state, or stalled due to error\nit can not recover from without human intervention.",
          "format": "int64",
          "type": "integer"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
