{
  "description": "GlobalAccelerator is the Schema for the GlobalAccelerator API",
  "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": "GlobalAcceleratorSpec defines the desired state of GlobalAccelerator",
      "properties": {
        "ipAddressType": {
          "default": "IPV4",
          "description": "IPAddressType is the value for the address type.",
          "enum": [
            "IPV4",
            "DUAL_STACK"
          ],
          "type": "string"
        },
        "ipAddresses": {
          "description": "IpAddresses optionally specifies the IP addresses from your own IP address pool (BYOIP) to use for the accelerator's static IP addresses.\nYou can specify one or two addresses. Do not include the /32 suffix.\nIf you bring your own IP address pool to Global Accelerator (BYOIP), you can choose an IPv4 address from your own pool to use for the accelerator's static IPv4 address.\nAfter you bring an address range to AWS, it appears in your account as an address pool. When you create an accelerator, you can assign one IPv4 address from your range to it.\nGlobal Accelerator assigns you a second static IPv4 address from an Amazon IP address range. If you bring two IPv4 address ranges to AWS, you can assign one IPv4 address from each range to your accelerator.\nNote that you can't update IP addresses for an existing accelerator. To change them, you must create a new accelerator with the new addresses.\nFor more information, see Bring your own IP addresses (BYOIP) in the AWS Global Accelerator Developer Guide.\nhttps://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html",
          "items": {
            "type": "string"
          },
          "maxItems": 2,
          "minItems": 1,
          "type": "array"
        },
        "listeners": {
          "description": "Listeners defines the listeners for the Global Accelerator.",
          "items": {
            "description": "GlobalAcceleratorListener defines a listener for the Global Accelerator.",
            "properties": {
              "clientAffinity": {
                "default": "NONE",
                "description": "ClientAffinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request.\nClient affinity gives you control over whether to always route each client to the same specific endpoint.\nAWS Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection.\nIf client affinity is NONE, Global Accelerator uses the \"five-tuple\" (5-tuple) properties\u2014source IP address, source port, destination IP address, destination port, and protocol\u2014to select the hash value, and then chooses the best endpoint.\nHowever, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes.\nIf you want a given client to always be routed to the same endpoint, set client affinity to SOURCE_IP instead.\nWhen you use the SOURCE_IP setting, Global Accelerator uses the \"two-tuple\" (2-tuple) properties\u2014 source (client) IP address and destination IP address\u2014to select the hash value.\nThe default value is NONE.",
                "enum": [
                  "SOURCE_IP",
                  "NONE"
                ],
                "type": "string"
              },
              "endpointGroups": {
                "description": "EndpointGroups defines a list of endpoint groups for a Global Accelerator listener.",
                "items": {
                  "description": "GlobalAcceleratorEndpointGroup defines an endpoint group for a Global Accelerator listener.",
                  "properties": {
                    "endpoints": {
                      "description": "Endpoints is the list of endpoint configurations for this endpoint group.",
                      "items": {
                        "description": "GlobalAcceleratorEndpoint defines an endpoint for a Global Accelerator endpoint group.",
                        "properties": {
                          "clientIPPreservationEnabled": {
                            "default": true,
                            "description": "ClientIPPreservationEnabled indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.\nThe value is true or false. The default value is true for new accelerators.\nIf the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator.\nFor more information, see Preserve Client IP Addresses in the AWS Global Accelerator Developer Guide:\nhttps://docs.aws.amazon.com/global-accelerator/latest/dg/preserve-client-ip-address.html",
                            "type": "boolean"
                          },
                          "endpointID": {
                            "description": "EndpointID is the ID of the endpoint when type is EndpointID.\nIf the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon Resource Name (ARN) of the resource.\nA resource must be valid and active when you add it as an endpoint.\nMandatory for remote regions.",
                            "maxLength": 255,
                            "type": "string"
                          },
                          "name": {
                            "description": "Name is the name of the Kubernetes resource when type is Service, Ingress, or Gateway.",
                            "type": "string"
                          },
                          "namespace": {
                            "description": "Namespace is the namespace of the Kubernetes resource when type is Service, Ingress, or Gateway.\nIf not specified, defaults to the same namespace as the GlobalAccelerator resource.",
                            "type": "string"
                          },
                          "type": {
                            "description": "Type specifies the type of endpoint reference.",
                            "enum": [
                              "EndpointID",
                              "Service",
                              "Ingress",
                              "Gateway"
                            ],
                            "type": "string"
                          },
                          "weight": {
                            "default": 128,
                            "description": "Weight is the weight associated with the endpoint. When you add weights to endpoints, you configure Global Accelerator to route traffic based on proportions that you specify.\nFor example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is routed to the first endpoint,\n5/20 is routed both to the second and third endpoints, and 6/20 is routed to the last endpoint.\nFor more information, see Endpoint Weights in the AWS Global Accelerator Developer Guide:\nhttps://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html",
                            "format": "int32",
                            "maximum": 255,
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object",
                        "x-kubernetes-validations": [
                          {
                            "message": "endpointID is required and name must not be set when type is EndpointID",
                            "rule": "self.type != 'EndpointID' || (has(self.endpointID) && !has(self.name))"
                          },
                          {
                            "message": "name is required and endpointID must not be set when type is Service/Ingress/Gateway",
                            "rule": "self.type == 'EndpointID' || (has(self.name) && !has(self.endpointID))"
                          }
                        ],
                        "additionalProperties": false
                      },
                      "type": "array"
                    },
                    "portOverrides": {
                      "description": "PortOverrides is a list of endpoint port overrides. Allows you to override the destination ports used to route traffic to an endpoint. Using a port override lets you map a list of external destination ports (that your users send traffic to) to a list of internal destination ports that you want an application endpoint to receive traffic on.",
                      "items": {
                        "description": "PortOverride defines a port override for an endpoint group.\nOverride specific listener ports used to route traffic to endpoints that are part of an endpoint group.\nFor example, you can create a port override in which the listener receives user traffic on ports 80 and 443,\nbut your accelerator routes that traffic to ports 1080 and 1443, respectively, on the endpoints.\n\nFor more information, see Port overrides in the AWS Global Accelerator Developer Guide:\nhttps://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoint-groups-port-override.html",
                        "properties": {
                          "endpointPort": {
                            "description": "EndpointPort is the endpoint port that you want traffic to be routed to.\nThis is the port on the endpoint, such as the Application Load Balancer or Amazon EC2 instance.",
                            "format": "int32",
                            "maximum": 65535,
                            "minimum": 1,
                            "type": "integer"
                          },
                          "listenerPort": {
                            "description": "ListenerPort is the listener port that you want to map to a specific endpoint port.\nThis is the port that user traffic arrives to the Global Accelerator on.",
                            "format": "int32",
                            "maximum": 65535,
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "endpointPort",
                          "listenerPort"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": "array"
                    },
                    "region": {
                      "description": "Region is the AWS Region where the endpoint group is located.\nIf unspecified, defaults to the current cluster region.",
                      "maxLength": 255,
                      "type": "string"
                    },
                    "trafficDialPercentage": {
                      "default": 100,
                      "description": "TrafficDialPercentage is the percentage of traffic to send to an AWS Regions. Additional traffic is distributed to other endpoint groups for this listener\nUse this action to increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is applied to the traffic that would otherwise have been routed to the Region based on optimal routing.",
                      "format": "int32",
                      "maximum": 100,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "portRanges": {
                "description": "PortRanges is the list of port ranges for the connections from clients to the accelerator.\nWhen not specified, the controller will automatically determine the port ranges by inspecting\nthe referenced Kubernetes resources (Service, Ingress, or Gateway) in the endpoint groups.",
                "items": {
                  "description": "PortRange defines the port range for Global Accelerator listeners.",
                  "properties": {
                    "fromPort": {
                      "description": "FromPort is the first port in the range of ports, inclusive.",
                      "format": "int32",
                      "maximum": 65535,
                      "minimum": 1,
                      "type": "integer"
                    },
                    "toPort": {
                      "description": "ToPort is the last port in the range of ports, inclusive.",
                      "format": "int32",
                      "maximum": 65535,
                      "minimum": 1,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "fromPort",
                    "toPort"
                  ],
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "FromPort must be less than or equal to ToPort",
                      "rule": "self.fromPort <= self.toPort"
                    }
                  ],
                  "additionalProperties": false
                },
                "maxItems": 10,
                "minItems": 1,
                "type": "array"
              },
              "protocol": {
                "description": "Protocol is the protocol for the connections from clients to the accelerator.\nWhen not specified, the controller will automatically determine the protocol by inspecting\nthe referenced Kubernetes resources (Service, Ingress, or Gateway) in the endpoint groups.",
                "enum": [
                  "TCP",
                  "UDP"
                ],
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "name": {
          "description": "Name is the name of the Global Accelerator.\nThe name must contain only alphanumeric characters or hyphens (-), and must not begin or end with a hyphen.",
          "maxLength": 64,
          "minLength": 1,
          "pattern": "^[a-zA-Z0-9_-]{1,64}$",
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Tags defines list of Tags on the Global Accelerator.",
          "type": "object"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "GlobalAcceleratorStatus defines the observed state of GlobalAccelerator",
      "properties": {
        "acceleratorARN": {
          "description": "AcceleratorARN is the Amazon Resource Name (ARN) of the accelerator.",
          "type": "string"
        },
        "conditions": {
          "description": "Conditions represent the current conditions of the GlobalAccelerator.",
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "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",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "dnsName": {
          "description": "DNSName The Domain Name System (DNS) name that Global Accelerator creates that points to an accelerator's static IPv4 addresses.",
          "type": "string"
        },
        "dualStackDnsName": {
          "description": "DualStackDnsName is the Domain Name System (DNS) name that Global Accelerator creates that points to a dual-stack accelerator's four static IP addresses: two IPv4 addresses and two IPv6 addresses.",
          "type": "string"
        },
        "ipSets": {
          "description": "IPSets is the static IP addresses that Global Accelerator associates with the accelerator.",
          "items": {
            "description": "IPSet is the static IP addresses that Global Accelerator associates with the accelerator.",
            "properties": {
              "ipAddressFamily": {
                "description": "IpAddressFamily is the types of IP addresses included in this IP set.",
                "type": "string"
              },
              "ipAddresses": {
                "description": "IpAddresses is the array of IP addresses in the IP address set.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "observedGeneration": {
          "description": "The generation observed by the GlobalAccelerator controller.",
          "format": "int64",
          "type": "integer"
        },
        "status": {
          "description": "Status is the current status of the accelerator.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
