> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Change origin group



## OpenAPI

````yaml /api-reference/services_documented/cdn_api.yaml patch /cdn/origin_groups/{origin_group_id}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – CDN API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-14T07:00:22.640261+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: CDN service
    description: Information about the current state of the CDN service in your account.
    x-displayName: CDN service
  - name: CDN resources
    x-displayName: CDN resources
  - name: Origins
    x-displayName: Origins
  - name: Rules
    description: >-
      Rules allow to set up custom settings for certain file types or paths.

      By default, the rule inherits all options values from the related CDN
      resource.


      Each option in rule settings can be in one of the following states:

      - **Inherit** - Option is not added to the rule. Option inherits its value
      from the CDN resource settings. In this case, the option value is
      **null**.

      - **ON** - Option is added to the rule and enabled. Option values
      configured in the rule will override values from the CDN resource
      settings.

      - **OFF** - Option is added to the rule and disabled. Option will be
      turned off.
    x-displayName: Rules
  - name: Rule templates
    x-displayName: Rule templates
  - name: SSL certificates
    x-displayName: SSL certificates
  - name: Let's Encrypt certificates
    x-displayName: Let's Encrypt certificates
  - name: CA certificates
    x-displayName: CA certificates
  - name: CDN activity logs
    description: |-
      Get the history of users requests to CDN.
      It contains requests made both via the API and via the control panel.

      The following methods are not tracked in the activity logs:
      - HEAD
      - OPTIONS
    x-displayName: CDN activity logs
  - name: Log viewer
    description: >-
      Log viewer provides you with general information about CDN operation. This
      information does not contain all possible

      sets of fields and restricted by time. To receive full data, use Logs
      Uploader.
    x-displayName: Log viewer
  - name: Logs uploader
    description: >-
      Logs uploader allows you to upload logs with desired format to desired
      storages.


      Consists of three main parts:

      - **Policies** - rules that define which logs are uploaded and how they
      are uploaded.

      - **Targets** - destinations where logs are uploaded.

      - **Configs** - combinations of logs uploader policies, targets and
      resources to which they are applied.
    x-displayName: Logs uploader
  - name: Tools
    x-displayName: Tools
  - name: CDN Statistics
    description: >-
      Consumption statistics is updated in near real-time as a standard
      practice.

      However, the frequency of updates can vary, but they are typically
      available within a 24-hour period.

      Exceptions, such as maintenance periods, may delay data beyond 24 hours
      until servers resume and fill in the missing statistics.
    x-displayName: Statistics
  - name: Advanced analytics
    description: >-
      Advanced analytics allows to get statistics about unique visitors,
      traffic, and requests for countries, directories, browsers, devices, and
      operation systems for up to 90 days starting from today.


      Advanced analytics API is based on the [GraphQL
      framework](https://graphql.org/).


      Advanced analytics API has one single endpoint:

       https://api.gcore.com/cdn/advanced/v2/query

      You can pass the query parameters as a JSON object in the payload of a
      POST request to this endpoint.

      You can use curl to make requests to the Advanced analytics API.
      Alternatively, you can use a GraphQL client

      to construct queries and pass requests to the Advanced analytics API.


      You can write queries in GraphQL much like in SQL: specify the data set
      (CDN resource), the metrics

      to retrieve (such as unique visitors and traffic), and filter or group by
      dimensions (for example, a country).
    x-displayName: Advanced analytics
  - name: Origin shielding
    x-displayName: Origin shielding
  - name: IP addresses list
    x-displayName: IP addresses list
  - name: Purge history
    x-displayName: Purge history
paths:
  /cdn/origin_groups/{origin_group_id}:
    patch:
      tags:
        - Origins
      summary: Change origin group
      operationId: patch-origin-group
      parameters:
        - in: path
          name: origin_group_id
          description: Origin group ID.
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeOriginGroup'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OriginGroupsResponse'
        '400':
          description: Failed to change the origin group.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/OriginGroupNameNotUniqueError'
                  - $ref: '#/components/schemas/OriginGroupNameMore255Error'
                  - $ref: '#/components/schemas/OriginGroupIsEmptyError'
                  - $ref: '#/components/schemas/OriginSourceIsRequiredError'
                  - $ref: '#/components/schemas/OriginGroupSourcesLimitEditError'
                  - $ref: '#/components/schemas/OriginSourceWithoutSchemaError'
                  - $ref: '#/components/schemas/OriginSourceWithoutPathError'
                  - $ref: '#/components/schemas/OriginSourceMustBeUniqueError'
                  - $ref: '#/components/schemas/OriginSourceForbiddenError'
                  - $ref: '#/components/schemas/OriginSourceEqualResourceCnameError'
                  - $ref: '#/components/schemas/OriginSourceShouldNotHavePortError'
                  - $ref: '#/components/schemas/OriginLastSourceNotBackupError'
                  - $ref: '#/components/schemas/SourcesShouldBeEnabledError'
                  - $ref: '#/components/schemas/OriginSourceNotResolvedError'
                  - $ref: '#/components/schemas/OriginSourceWrongPortError'
                  - $ref: '#/components/schemas/OriginSourcePrivateNetworkError'
                  - $ref: '#/components/schemas/OriginSourceForbiddenNetworkError'
                  - $ref: '#/components/schemas/OriginSourceBadIPError'
                  - $ref: '#/components/schemas/OriginSourceInvalidError'
                  - $ref: '#/components/schemas/OriginSourceIPv4Error'
                  - $ref: '#/components/schemas/AuthTypeInvalidValueError'
                  - $ref: '#/components/schemas/AuthInvalidWithNoneAuthTypeValueError'
                  - $ref: >-
                      #/components/schemas/OriginGroupOriginsForbiddenForPrivateOriginError
                  - $ref: >-
                      #/components/schemas/AuthRequiredWithAwsSignatureV4ValueError
                  - $ref: '#/components/schemas/AuthInvalidValueError'
                  - $ref: '#/components/schemas/AuthS3TypeIsRequiredError'
                  - $ref: '#/components/schemas/AuthS3BucketNameIsRequiredError'
                  - $ref: '#/components/schemas/AuthS3AccessKeyIdIsRequiredError'
                  - $ref: '#/components/schemas/AuthS3AccessKeyIdIsInvalidError'
                  - $ref: '#/components/schemas/AuthS3SecretAccessKeyIsRequiredError'
                  - $ref: >-
                      #/components/schemas/AuthS3AmazonSecretAccessKeyIsInvalidError
                  - $ref: >-
                      #/components/schemas/AuthS3OtherSecretAccessKeyIsInvalidError
                  - $ref: '#/components/schemas/AuthS3RegionIsRequiredError'
                  - $ref: '#/components/schemas/AuthS3RegionIsInvalidError'
                  - $ref: '#/components/schemas/AuthS3StorageHostnameIsRequiredError'
                  - $ref: '#/components/schemas/S3ConfigRequiredError'
                  - $ref: '#/components/schemas/S3BucketNameDuplicateError'
                  - $ref: '#/components/schemas/OriginTypeRequiredForNewS3Error'
        '403':
          $ref: '#/components/responses/NoPermissions'
        '404':
          $ref: '#/components/responses/OriginGroupNotFound'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            origin_groups = client.cdn.origin_groups.update(
                origin_group_id=0,
                name="YourOriginGroup",
            )
            print(origin_groups)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/cdn\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\toriginGroups, err := client.CDN.OriginGroups.Update(\n\t\tcontext.TODO(),\n\t\t0,\n\t\tcdn.OriginGroupUpdateParams{\n\t\t\tOfNoneAuth: &cdn.OriginGroupUpdateParamsBodyNoneAuth{\n\t\t\t\tName: \"YourOriginGroup\",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", originGroups)\n}\n"
components:
  schemas:
    ChangeOriginGroup:
      oneOf:
        - type: object
          title: None Auth
          properties:
            name:
              $ref: '#/components/schemas/name'
            use_next:
              $ref: '#/components/schemas/use_next'
            proxy_next_upstream:
              $ref: '#/components/schemas/proxy_next_upstream'
            auth_type:
              $ref: '#/components/schemas/auth_type_none'
            sources:
              type: array
              items:
                $ref: '#/components/schemas/ChangeSource'
              example:
                - enabled: true
                  source: yourdomain.com
                  backup: false
            path:
              $ref: '#/components/schemas/path'
          required:
            - name
        - type: object
          title: AWS Signature V4
          deprecated: true
          description: >-
            **Deprecated.** To create S3 origins, configure them directly in
            sources with `origin_type` and `config` instead.
          properties:
            name:
              $ref: '#/components/schemas/name'
            use_next:
              $ref: '#/components/schemas/use_next'
            proxy_next_upstream:
              $ref: '#/components/schemas/proxy_next_upstream'
            auth_type:
              $ref: '#/components/schemas/auth_type_aws'
            auth:
              $ref: '#/components/schemas/auth'
            path:
              $ref: '#/components/schemas/path'
    OriginGroupsResponse:
      oneOf:
        - type: object
          title: None Auth
          description: >-
            Origin group with host origins, or mixed host and S3 origins using
            inline `origin_type` and `config` in sources.
          properties:
            id:
              $ref: '#/components/schemas/id'
            name:
              $ref: '#/components/schemas/name'
            use_next:
              $ref: '#/components/schemas/use_next'
            proxy_next_upstream:
              $ref: '#/components/schemas/proxy_next_upstream'
            auth_type:
              $ref: '#/components/schemas/auth_type_none'
            sources:
              $ref: '#/components/schemas/sources'
            path:
              $ref: '#/components/schemas/path'
            has_related_resources:
              $ref: '#/components/schemas/has_related_resources'
          required:
            - id
            - name
            - sources
        - type: object
          title: AWS Signature V4
          deprecated: true
          description: >-
            **Deprecated.** To create S3 origins, configure them directly in
            sources with `origin_type` and `config` instead.
          properties:
            id:
              $ref: '#/components/schemas/id'
            name:
              $ref: '#/components/schemas/name'
            use_next:
              $ref: '#/components/schemas/use_next'
            proxy_next_upstream:
              $ref: '#/components/schemas/proxy_next_upstream'
            auth_type:
              $ref: '#/components/schemas/auth_type_aws'
            auth:
              $ref: '#/components/schemas/auth'
            path:
              $ref: '#/components/schemas/path'
            has_related_resources:
              $ref: '#/components/schemas/has_related_resources'
          required:
            - id
            - name
            - auth_type
            - auth
    OriginGroupNameNotUniqueError:
      title: Origin group name must be unique
      type: object
      properties:
        errors:
          type: object
          properties:
            name:
              type: array
              items:
                type: string
              description: >-
                The specified origin group name is already used by another
                origin group. Try another name.
              example:
                - Origin Group name should be unique.
    OriginGroupNameMore255Error:
      title: Origin group name is too long
      type: object
      properties:
        errors:
          type: object
          properties:
            name:
              type: array
              items:
                type: string
              description: >-
                The specified origin group name is longer than 255 characters.
                Please shorten the name and try again.
              example:
                - Ensure this field has no more than 255 characters.
    OriginGroupIsEmptyError:
      title: Origin group must contain origins
      type: object
      properties:
        errors:
          type: object
          properties:
            source:
              type: array
              items:
                type: string
              description: >-
                Origin group cannot be created without origins. Please add at
                least one origin to create the origin group.
              example:
                - Origin Group has to have at least one origin source.
    OriginSourceIsRequiredError:
      title: Origin must have a source
      type: object
      properties:
        errors:
          type: object
          properties:
            source:
              type: array
              items:
                type: string
              description: Source is a mandatory field. Please specify it.
              example:
                - This field is required.
    OriginGroupSourcesLimitEditError:
      title: Number of allowed sources has been exceeded
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                type: string
              description: >-
                You have exceeded the number of allowed sources in the origin
                group. Please reduce the number of sources or contact support.
              example:
                - >-
                  Impossible to edit origin group with more than {origins_limit}
                  origins and add more origins on your tariff plan.
    OriginSourceWithoutSchemaError:
      title: Origin source contains schema
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                https://yourwebsite.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin source contains a schema (https://
                        or http://). Specify the source without schema and try
                        again.
                      example:
                        - Source should be specified without schema
    OriginSourceWithoutPathError:
      title: Origin source contains slash
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                yourwebsite.com/path:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin source contains a slash ('/').
                        Specify the source without slashes and try again.
                      example:
                        - Source should be specified without path
    OriginSourceMustBeUniqueError:
      title: Origin source must be unique
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                yourwebsite.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin source is already used in this
                        origin group. Make sure that all specified origins have
                        different sources.
                      example:
                        - >-
                          The field origin source must be unique inside group of
                          origins.
    OriginSourceForbiddenError:
      title: Origin source is forbidden
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                forbiddenwebsite.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin source is blacklisted. It cannot be
                        used to create an origin. Please specify another origin
                        source.
                      example:
                        - That origin source is forbidden
    OriginSourceEqualResourceCnameError:
      title: Origin source is equal to resource's CNAME
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                yourwebsite.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin source is equal to the linked
                        resource's CNAME. Please use origin sources that are
                        different from the linked resource's CNAME.
                      example:
                        - Origin source is equal to attached resource`s CNAME.
    OriginSourceShouldNotHavePortError:
      title: Origin source cannot have port
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                yourwebsite.com:8000:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        Resource linked to the origin group uses 'MATCH' as the
                        originProtocol field value. So the origin source cannot
                        have a port. Please specify the origin source without
                        the port.
                      example:
                        - >-
                          Origin source shouldn`t have specified port, some
                          resources that linked to origin group {resource_id}
                          have an origin protocol = 'MATCH'.
    OriginLastSourceNotBackupError:
      title: The single origin cannot be backup
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                yourwebsite.com:
                  type: object
                  properties:
                    backup:
                      type: array
                      items:
                        type: string
                      description: >-
                        This origin is the single in the specified origin group
                        and cannot be used as a backup. Please add another
                        origin before setting this one as a backup.
                      example:
                        - >-
                          You cannot specify all origin sources as reserve
                          (backup). Add non-reserve origins.
    SourcesShouldBeEnabledError:
      title: Enable at least one origin source
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                yourwebsite.com:
                  type: object
                  properties:
                    enabled:
                      type: array
                      items:
                        type: string
                      description: >-
                        This active origin group should have one enabled origin
                        source. Please enable one origin source.
                      example:
                        - >-
                          Origin Group must have at least one active origin
                          sources.
    OriginSourceNotResolvedError:
      title: Origin source must be registered domain
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                your website.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin source cannot be resolved. Please
                        use a registered domain as the origin source.
                      example:
                        - >-
                          The domain name cannot be resolved. Please specify a
                          valid domain name.
    OriginSourceWrongPortError:
      title: Port value is incorrect
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                1.2.3.4:99999:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The port value specified after ':' is incorrect. It must
                        be a number within the range 1 and 65535. Please specify
                        valid port value.
                      example:
                        - >-
                          The port value must be a number within the range 1 and
                          65535
    OriginSourcePrivateNetworkError:
      title: Origin source belongs to private network
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                192.168.0.1:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin source belongs to a private
                        network. Please specify the origin source that belongs
                        to a public network.
                      example:
                        - >-
                          The domain name's IP belongs to a private network.
                          Please use another domain name.
    OriginSourceForbiddenNetworkError:
      title: Origin source belongs to forbidden network
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                forbiddenwebsite.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin source belongs to a forbidden
                        network. Please specify the origin source that belongs
                        to a public network.
                      example:
                        - >-
                          The domain name's IP belongs to a forbidden network.
                          Please use another domain name.
    OriginSourceBadIPError:
      title: Origin IP cannot be reserved IP address
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                100.64.0.0:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin source is a reserved IP address.
                        Please specify the origin source that belongs to a
                        public network.
                      example:
                        - >-
                          The IP address cannot be used as an origin source.
                          Please try another IP.
    OriginSourceInvalidError:
      title: Port origin source value is incorrect
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                ':yourwebsite.com:':
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin source value is incorrect. Origin
                        source must be a valid IP address or valid domain name.
                        Please specify valid source value.
                      example:
                        - >-
                          The origin source value is invalid. Please specify an
                          IP address or valid domain name.
    OriginSourceIPv4Error:
      title: Origin domain IP is not IPv4
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                ipv6domain.com:
                  type: object
                  properties:
                    source:
                      type: array
                      items:
                        type: string
                      description: >-
                        The specified origin domain IP is not IPv4. Please
                        specify a domain that has an IPv4 address.
                      example:
                        - >-
                          The domain name's IP is not IPv4. Please use another
                          domain name.
    AuthTypeInvalidValueError:
      title: Auth type must be "none" or "awsSignatureV4"
      type: object
      properties:
        errors:
          type: object
          properties:
            auth_type:
              type: array
              items:
                type: string
              description: Auth type must be "none" or "awsSignatureV4".
              example:
                - 'Invalid value, should be in: [''none'', ''awsSignatureV4'']'
    AuthInvalidWithNoneAuthTypeValueError:
      title: Origin Group has not to auth with "none" auth type
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: array
              items:
                type: string
              description: Origin Group has not to auth with "none" auth type.
              example:
                - 'Origin Group hasn`t to auth with auth type: `none`.'
    OriginGroupOriginsForbiddenForPrivateOriginError:
      title: Origin group with private origin must be sole
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: array
              items:
                type: string
              description: Origin group with private origin must be sole.
              example:
                - >-
                  You can`t add another origin to a group. Private origin can
                  only be used as the sole origin in the group.
    AuthRequiredWithAwsSignatureV4ValueError:
      title: Origin Group has to have auth with "awsSignatureV4" auth type
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: array
              items:
                type: string
              description: Origin Group has to have auth with "awsSignatureV4" auth type.
              example:
                - Origin Group has to have auth with `awsSignatureV4` auth type.
    AuthInvalidValueError:
      title: Auth must be a dictionary
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: array
              items:
                type: string
              description: Auth must be a dictionary.
              example:
                - Invalid data. Expected a dictionary, but got list.
    AuthS3TypeIsRequiredError:
      title: Auth must have a s3 type
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_type:
                  type: array
                  items:
                    type: string
                  description: S3 type is a mandatory field. Please specify it.
                  example:
                    - This field is required.
    AuthS3BucketNameIsRequiredError:
      title: Auth must have a s3 bucket name
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_bucket_name:
                  type: array
                  items:
                    type: string
                  description: S3 bucket name is a mandatory field. Please specify it.
                  example:
                    - This field is required.
    AuthS3AccessKeyIdIsRequiredError:
      title: Auth must have a s3 access key id
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_access_key_id:
                  type: array
                  items:
                    type: string
                  description: S3 access key id is a mandatory field. Please specify it.
                  example:
                    - This field is required.
    AuthS3AccessKeyIdIsInvalidError:
      title: Auth must have a s3 access key id with 20-25 alpha-numeric characters
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_access_key_id:
                  type: array
                  items:
                    type: string
                  description: >-
                    The specified s3 access key id is less than 20 characters.
                    Please lengthen the name and try again.
                  example:
                    - Only 20-25 alpha-numeric characters are allowed.
    AuthS3SecretAccessKeyIsRequiredError:
      title: Auth must have a s3 secret access key
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_secret_access_key:
                  type: array
                  items:
                    type: string
                  description: >-
                    S3 secret access key is a mandatory field. Please specify
                    it.
                  example:
                    - This field is required.
    AuthS3AmazonSecretAccessKeyIsInvalidError:
      title: >-
        Auth must have a s3 secret access key with 40 alpha-numeric-plus-slash
        characters
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_secret_access_key:
                  type: array
                  items:
                    type: string
                  description: >-
                    The specified s3 access key id is not equal 40 characters.
                    Please lengthen the name and try again.
                  example:
                    - Only 40 alpha-numeric-plus-slash characters are allowed.
    AuthS3OtherSecretAccessKeyIsInvalidError:
      title: >-
        Auth must have a s3 secret access key with 20-50
        alpha-numeric-plus-slash characters
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_secret_access_key:
                  type: array
                  items:
                    type: string
                  description: >-
                    The specified s3 access key id is less 20-50 characters.
                    Please lengthen the name and try again.
                  example:
                    - >-
                      Only 20-50 alpha-numeric-plus-slash characters are
                      allowed.
    AuthS3RegionIsRequiredError:
      title: Auth must have a s3 region
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_region:
                  type: array
                  items:
                    type: string
                  description: >-
                    S3 secret access key is a mandatory field. Please specify
                    it.
                  example:
                    - This field is required.
    AuthS3RegionIsInvalidError:
      title: Auth must have a known s3 region
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_region:
                  type: array
                  items:
                    type: string
                  description: >-
                    The specified s3 region is not supported. Please use other
                    region and try again.
                  example:
                    - Not support {s3 region}
    AuthS3StorageHostnameIsRequiredError:
      title: Auth must have a s3 storage hostname
      type: object
      properties:
        errors:
          type: object
          properties:
            auth:
              type: object
              properties:
                s3_storage_hostname:
                  type: array
                  items:
                    type: string
                  description: S3 storage hostname is a mandatory field. Please specify it.
                  example:
                    - This field is required.
    S3ConfigRequiredError:
      title: S3 config is required when origin_type is s3
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                s3_entry_0:
                  type: object
                  properties:
                    config:
                      type: array
                      items:
                        type: string
                      description: The config field is required when `origin_type` is s3.
                      example:
                        - This field is required.
    S3BucketNameDuplicateError:
      title: S3 bucket names must be unique within origin group
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                my-bucket:
                  type: object
                  properties:
                    config:
                      type: array
                      items:
                        type: string
                      description: >-
                        The S3 bucket name must be unique within the origin
                        group.
                      example:
                        - >-
                          The S3 bucket name must be unique inside group of
                          origins.
    OriginTypeRequiredForNewS3Error:
      title: origin_type is required for new S3 sources on update
      type: object
      properties:
        errors:
          type: object
          properties:
            sources:
              type: object
              properties:
                my-bucket:
                  type: object
                  properties:
                    origin_type:
                      type: array
                      items:
                        type: string
                      description: >-
                        Provide `origin_type` explicitly when adding new S3
                        sources to an existing origin group.
                      example:
                        - >-
                          No existing S3 source with bucket "my-bucket". Provide
                          origin_type explicitly for new S3 sources.
    name:
      type: string
      description: Origin group name.
      example: YourOriginGroup
    use_next:
      type: boolean
      description: >-
        Defines whether to use the next origin from the origin group if origin
        responds with the cases specified in `proxy_next_upstream`.

        If you enable it, you must specify cases in `proxy_next_upstream`.


        Possible values:

        - **true** - Option is enabled.

        - **false** - Option is disabled.
      example: true
    proxy_next_upstream:
      description: >-
        Defines cases when the request should be passed on to the next origin.


        Possible values:

        - **error** - an error occurred while establishing a connection with the
        origin, passing a request to it, or reading the response header

        - **timeout** - a timeout has occurred while establishing a connection
        with the origin, passing a request to it, or reading the response header

        - **`invalid_header`** - a origin returned an empty or invalid response

        - **`http_403`** - a origin returned a response with the code 403

        - **`http_404`** - a origin returned a response with the code 404

        - **`http_429`** - a origin returned a response with the code 429

        - **`http_500`** - a origin returned a response with the code 500

        - **`http_502`** - a origin returned a response with the code 502

        - **`http_503`** - a origin returned a response with the code 503

        - **`http_504`** - a origin returned a response with the code 504
      type: array
      default:
        - error
        - timeout
      items:
        type: string
      example:
        - error
        - timeout
        - invalid_header
        - http_500
        - http_502
        - http_503
        - http_504
    auth_type_none:
      type: string
      deprecated: true
      default: none
      description: |-
        **Deprecated.** No longer necessary. Defaults to `none`.

        Origin authentication type.

        Possible values:
        - **none** - Used for public origins.
        - **awsSignatureV4** - Used for S3 storage.
      example: none
    ChangeSource:
      oneOf:
        - $ref: '#/components/schemas/ChangeHostSource'
        - $ref: '#/components/schemas/ChangeS3Source'
        - $ref: '#/components/schemas/ChangeFastedgeSource'
    path:
      type: string
      deprecated: true
      description: >-
        **Deprecated.** No longer necessary. Omit this field and the default
        origin path behavior will be used.


        Origin path prefix.
      example: ''
    auth_type_aws:
      type: string
      deprecated: true
      description: >-
        **Deprecated.** To create S3 origins, configure them directly in sources
        with `origin_type` and `config` instead.


        Authentication type.


        **awsSignatureV4** value is used for S3 storage.
      example: awsSignatureV4
    auth:
      deprecated: true
      description: >-
        **Deprecated.** To create S3 origins, configure them directly in sources
        with `origin_type` and `config` instead.


        Credentials to access the private bucket.
      type: object
      properties:
        s3_type:
          type: string
          description: |-
            Storage type compatible with S3.

            Possible values:
            - **amazon** – AWS S3 storage.
            - **other** – Other (not AWS) S3 compatible storage.
        s3_access_key_id:
          type: string
          description: >-
            Access key ID for the S3 account.


            Restrictions:

            - Latin letters (A-Z, a-z), numbers (0-9), colon, dash, and
            underscore.

            - From 3 to 512 characters.
        s3_secret_access_key:
          type: string
          description: >-
            Secret access key for the S3 account.


            Restrictions:

            - Latin letters (A-Z, a-z), numbers (0-9), pluses, slashes, dashes,
            colons and underscores.

            - If "s3_type": amazon, length should be 40 characters.

            - If "s3_type": other, length should be from 16 to 255 characters.
        s3_bucket_name:
          type: string
          maxLength: 256
          description: S3 bucket name.
        s3_storage_hostname:
          type: string
          description: |-
            S3 storage hostname.

            The parameter is required, if "s3_type": other.
        s3_region:
          type: string
          description: |-
            S3 storage region.

            The parameter is required, if "s3_type": amazon.
      required:
        - s3_type
        - s3_access_key_id
        - s3_secret_access_key
        - s3_bucket_name
      example:
        s3_type: amazon
        s3_access_key_id: EXAMPLEFODNN7EXAMPLE
        s3_secret_access_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
        s3_bucket_name: bucket_name
        s3_region: us-east-2
    id:
      type: integer
      description: Origin group ID.
      example: 1
    sources:
      description: >-
        List of origin sources in the origin group. Each entry can be a host
        origin or an S3 origin.


        Host origins have a `source` field with the hostname or IP. S3 origins
        have `origin_type: s3`

        and a `config` object with S3 credentials. Both types can be mixed in
        the same origin group.
      type: array
      items:
        $ref: '#/components/schemas/SourceResponse'
      example:
        - source: yourwebsite.com
          backup: false
          enabled: true
          tag: default
          host_header_override: null
        - source: 1.2.3.4:5500
          backup: true
          enabled: true
          tag: default
          host_header_override: null
        - origin_type: s3
          config:
            s3_type: amazon
            s3_bucket_name: my-bucket
            s3_region: eu-west-1
            s3_access_key_id: SECRET_VALUE
            s3_secret_access_key: SECRET_VALUE
            s3_auth_type: awsSignatureV4
          backup: true
          enabled: true
          tag: default
          host_header_override: null
      x-stainless-collection-type: set
    has_related_resources:
      type: boolean
      description: |-
        Defines whether the origin group has related CDN resources.

        Possible values:
        - **true** - Origin group has related CDN resources.
        - **false** - Origin group does not have related CDN resources.
      example: true
    ChangeHostSource:
      type: object
      title: Host Source
      properties:
        source:
          $ref: '#/components/schemas/source'
        backup:
          $ref: '#/components/schemas/backup'
          x-stainless-terraform-configurability: computed_optional
        enabled:
          $ref: '#/components/schemas/enabled'
          x-stainless-terraform-configurability: computed_optional
        tag:
          $ref: '#/components/schemas/tag'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
      required:
        - source
    ChangeS3Source:
      type: object
      title: S3 Source
      properties:
        origin_type:
          $ref: '#/components/schemas/origin_type'
        config:
          $ref: '#/components/schemas/S3Config'
        backup:
          $ref: '#/components/schemas/backup'
          x-stainless-terraform-configurability: computed_optional
        enabled:
          $ref: '#/components/schemas/enabled'
          x-stainless-terraform-configurability: computed_optional
        tag:
          $ref: '#/components/schemas/tag'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
      required:
        - config
    ChangeFastedgeSource:
      type: object
      title: FastEdge Source
      properties:
        origin_type:
          $ref: '#/components/schemas/origin_type'
        config:
          $ref: '#/components/schemas/FastedgeConfig'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        tag:
          $ref: '#/components/schemas/tag'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
      required:
        - origin_type
        - config
    SourceResponse:
      oneOf:
        - $ref: '#/components/schemas/HostSourceResponse'
        - $ref: '#/components/schemas/S3SourceResponse'
        - $ref: '#/components/schemas/FastedgeSourceResponse'
    source:
      type: string
      maxLength: 255
      description: >-
        IP address or domain name of the origin and the port, if custom port is
        used.
      example: yourwebsite.com
    backup:
      type: boolean
      description: >-
        Defines whether the origin is a backup, meaning that it will not be used
        until one of active origins become unavailable.


        Possible values:

        - **true** - Origin is a backup.

        - **false** - Origin is not a backup.
      example: false
    enabled:
      type: boolean
      description: >-
        Enables or disables an origin source in the origin group.


        Possible values:

        - **true** - Origin is enabled and the CDN uses it to pull content.

        - **false** - Origin is disabled and the CDN does not use it to pull
        content.


        Origin group must contain at least one enabled origin.
      example: true
    tag:
      type: string
      maxLength: 256
      description: Tag for the origin source.
      default: default
      example: default
    host_header_override:
      type: string
      nullable: true
      maxLength: 255
      description: >-
        Per-origin Host header override. When set, the CDN sends this value as
        the Host header when

        requesting content from this origin instead of the default.
      example: null
    origin_type:
      type: string
      enum:
        - host
        - s3
        - fastedge
      description: >-
        Origin type. Present in responses for S3 and FastEdge sources.


        Possible values:

        - **host** - A source server or endpoint from which content is fetched.

        - **s3** - S3 storage with either AWS v4 authentication or public
        access.

        - **fastedge** - A FastEdge application served directly from the local
        FastEdge runtime on the edge node, identified by `app_id`.
      example: s3
    S3Config:
      type: object
      description: S3 storage configuration. Required when `origin_type` is `s3`.
      properties:
        s3_type:
          type: string
          enum:
            - amazon
            - other
          description: |-
            Storage type compatible with S3.

            Possible values:
            - **amazon** - AWS S3 storage.
            - **other** - Other (not AWS) S3 compatible storage.
        s3_bucket_name:
          type: string
          maxLength: 256
          description: S3 bucket name.
        s3_region:
          type: string
          nullable: true
          description: |-
            S3 storage region.

            The parameter is required if `s3_type` is `amazon`.
        s3_storage_hostname:
          type: string
          nullable: true
          description: |-
            S3 storage hostname.

            The parameter is required if `s3_type` is `other`.
        s3_access_key_id:
          type: string
          maxLength: 255
          description: >-
            Access key ID for the S3 account. Masked as `SECRET_VALUE` in
            responses.


            Restrictions:

            - Latin letters (A-Z, a-z), numbers (0-9), colon, dash, and
            underscore.

            - From 4 to 255 characters.
        s3_secret_access_key:
          type: string
          maxLength: 255
          description: >-
            Secret access key for the S3 account. Masked as `SECRET_VALUE` in
            responses.


            Restrictions:

            - Latin letters (A-Z, a-z), numbers (0-9), pluses, slashes, dashes,
            colons and underscores.

            - From 16 to 255 characters.
        s3_auth_type:
          type: string
          description: S3 authentication type.
          default: awsSignatureV4
          example: awsSignatureV4
      required:
        - s3_type
        - s3_bucket_name
        - s3_access_key_id
        - s3_secret_access_key
      example:
        s3_type: amazon
        s3_bucket_name: bucket_name
        s3_region: eu-west-1
        s3_access_key_id: EXAMPLEFODNN7EXAMPLE
        s3_secret_access_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
        s3_auth_type: awsSignatureV4
    FastedgeConfig:
      type: object
      description: >-
        FastEdge application configuration. Required when `origin_type` is
        `fastedge`.
      properties:
        app_id:
          type: string
          description: >-
            ID of the FastEdge application served as origin (string, matching
            the existing

            fastedge option's convention). The CDN dispatches requests to the
            local FastEdge runtime

            on the edge node using this identifier. The application must belong
            to the requesting

            client, be enabled, and have `wasi-http` API type.
      required:
        - app_id
      example:
        app_id: '12345'
    HostSourceResponse:
      type: object
      title: Host Source
      description: A host origin source.
      additionalProperties: false
      required:
        - source
      properties:
        source:
          $ref: '#/components/schemas/source'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        tag:
          $ref: '#/components/schemas/tag'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
    S3SourceResponse:
      type: object
      title: S3 Source
      description: An S3 origin source.
      additionalProperties: false
      required:
        - origin_type
        - config
      properties:
        origin_type:
          $ref: '#/components/schemas/origin_type'
        config:
          $ref: '#/components/schemas/S3Config'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        tag:
          $ref: '#/components/schemas/tag'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
    FastedgeSourceResponse:
      type: object
      title: FastEdge Source
      description: A FastEdge application origin source.
      additionalProperties: false
      required:
        - origin_type
        - config
      properties:
        origin_type:
          $ref: '#/components/schemas/origin_type'
        config:
          $ref: '#/components/schemas/FastedgeConfig'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        tag:
          $ref: '#/components/schemas/tag'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
  responses:
    NoPermissions:
      description: You do not have permission to perform this action.
    OriginGroupNotFound:
      description: Origin group is not found in the current account.
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````