diff --git a/components/schemas/dns/records/DnsRecordTypes.yml b/components/schemas/dns/records/DnsRecordTypes.yml index d8b4e0c5..be018140 100644 --- a/components/schemas/dns/records/DnsRecordTypes.yml +++ b/components/schemas/dns/records/DnsRecordTypes.yml @@ -3,216 +3,22 @@ type: object description: DNS record types the platform supports. properties: a: - type: object - description: A DNS A record - required: - - ip - properties: - ip: - type: string - description: The IPv4 address that the A record should map to. + $ref: types/DnsRecordA.yml aaaa: - type: object - description: A DNS AAAA record - required: - - ip - properties: - ip: - type: string - description: The IPv6 address that the AAAA record should map to. + $ref: types/DnsRecordAaaa.yml cname: - type: object - description: A DNS CNAME record - required: - - domain - properties: - domain: - type: string - description: The domain string the record resolves to. + $ref: types/DnsRecordCname.yml ns: - type: object - description: A DNS NS record - required: - - domain - properties: - domain: - type: string - description: The domain of the nameserver for this record. + $ref: types/DnsRecordNs.yml mx: - type: object - description: A DNS MX record - required: - - priority - - domain - properties: - priority: - type: integer - description: The priority setting for this mx record. - domain: - type: string - description: The domain this mx record points to. + $ref: types/DnsRecordMx.yml txt: - type: object - description: A DNS TXT record. - required: - - value - properties: - value: - type: string - description: The value for this TXT record. + $ref: types/DnsRecordTxt.yml alias: - type: object - description: A DNS ALIAS record. - required: - - domain - properties: - domain: - type: string - description: The domain string returned from the DNS server when this alias record is requested. + $ref: types/DnsRecordAlias.yml srv: - type: object - description: A DNS SRV record. - required: - - weight - - priority - - port - - domain - properties: - weight: - type: integer - description: Teh weight configured for this record - breaks ties for priority. - priority: - type: integer - description: The priority for the record. - port: - type: integer - description: The port number for the service. - domain: - type: string - description: The domain for the record. + $ref: types/DnsRecordSrv.yml caa: - type: object - description: A DNS CAA record. - required: - - tag - - value - properties: - tag: - type: string - description: The ASCII string that represents the identifier of the property represented by the record. - value: - type: string - description: The value associated with the tag. + $ref: types/DnsRecordCaa.yml linked: - type: object - description: A LINKED record is a record special to Cycle. It represents a URL that points to a specific container or deployment of a container, however the IP address mapping in handled automatically by the platform. - allOf: - - type: object - required: - - features - - routing - properties: - routing: - type: object - description: Rules for routing traffic at the load balancer for this linked record. - properties: - http: - type: - - object - - "null" - properties: - match_path: - type: - - string - - "null" - description: > - If set, this record will configure the load balancer to only match for paths of this domain matching this string. - - If the string starts with a /, it will be a literal prefix match (/test matches /test*). Otherwise, regex is used. - features: - type: object - description: Features associated with this record. - required: - - tls - - geodns - properties: - tls: - type: object - description: TLS properties of the record. - required: - - enable - properties: - enable: - type: boolean - description: A boolean, where true represents this record will be paired with a TLS certificate automatically maintained by the platform. - geodns: - type: object - description: Options for the GeoDNS LINKED record feature. - required: - - enable - properties: - enable: - type: boolean - description: If enabled, Cycle will attempt to match inbound requests to the closest load balancer geographically. - wildcard: - type: - - object - - "null" - required: - - resolve_sub_domains - properties: - resolve_sub_domains: - description: If enabled, subdomains will resolve for wildcard records. If disabled, only the primary domain will resolve. - default: false - type: boolean - - oneOf: - - type: object - properties: - container_id: - type: string - description: The ID of the container this record is related to. - - - type: object - required: - - virtual_machine - properties: - virtual_machine: - type: object - required: - - id - - dmz - properties: - id: - $ref: ../../ID.yml - dmz: - type: boolean - description: | - If true, traffic to this domain will skip the load balancer and go directly to the virtual machine - via the gateway service. - - - type: object - properties: - deployment: - type: object - description: Information about the deployment this record points to. - required: - - environment_id - - match - properties: - environment_id: - $ref: ../../ID.yml - description: The ID of the environment with the deployment tag mapping we want to reference. - match: - type: object - description: Describes which container and which tagged deployment this record should target. - required: - - container - properties: - container: - $ref: ../../Identifier.yml - description: The identifier of the container in the environment this record should point to. - tag: - description: The deployment tag that this record should point to. The tags are set on the root of an environment and map to a deployment version. - anyOf: - - $ref: ../../Identifier.yml - - type: "null" + $ref: types/DnsRecordLinked.yml diff --git a/components/schemas/dns/records/types/DnsRecordA.yml b/components/schemas/dns/records/types/DnsRecordA.yml new file mode 100644 index 00000000..1a4f9419 --- /dev/null +++ b/components/schemas/dns/records/types/DnsRecordA.yml @@ -0,0 +1,9 @@ +title: DnsRecordA +type: object +description: A DNS A record. +required: + - ip +properties: + ip: + type: string + description: The IPv4 address that the A record should map to. diff --git a/components/schemas/dns/records/types/DnsRecordAaaa.yml b/components/schemas/dns/records/types/DnsRecordAaaa.yml new file mode 100644 index 00000000..f6f965c2 --- /dev/null +++ b/components/schemas/dns/records/types/DnsRecordAaaa.yml @@ -0,0 +1,9 @@ +title: DnsRecordAaaa +type: object +description: A DNS AAAA record. +required: + - ip +properties: + ip: + type: string + description: The IPv6 address that the AAAA record should map to. diff --git a/components/schemas/dns/records/types/DnsRecordAlias.yml b/components/schemas/dns/records/types/DnsRecordAlias.yml new file mode 100644 index 00000000..a9f161ee --- /dev/null +++ b/components/schemas/dns/records/types/DnsRecordAlias.yml @@ -0,0 +1,9 @@ +title: DnsRecordAlias +type: object +description: A DNS ALIAS record. +required: + - domain +properties: + domain: + type: string + description: The domain string returned from the DNS server when this alias record is requested. diff --git a/components/schemas/dns/records/types/DnsRecordCaa.yml b/components/schemas/dns/records/types/DnsRecordCaa.yml new file mode 100644 index 00000000..b36f6843 --- /dev/null +++ b/components/schemas/dns/records/types/DnsRecordCaa.yml @@ -0,0 +1,13 @@ +title: DnsRecordCaa +type: object +description: A DNS CAA record. +required: + - tag + - value +properties: + tag: + type: string + description: The ASCII string that represents the identifier of the property represented by the record. + value: + type: string + description: The value associated with the tag. diff --git a/components/schemas/dns/records/types/DnsRecordCname.yml b/components/schemas/dns/records/types/DnsRecordCname.yml new file mode 100644 index 00000000..43e764cf --- /dev/null +++ b/components/schemas/dns/records/types/DnsRecordCname.yml @@ -0,0 +1,9 @@ +title: DnsRecordCname +type: object +description: A DNS CNAME record. +required: + - domain +properties: + domain: + type: string + description: The domain string the record resolves to. diff --git a/components/schemas/dns/records/types/DnsRecordLinked.yml b/components/schemas/dns/records/types/DnsRecordLinked.yml new file mode 100644 index 00000000..7cd500e0 --- /dev/null +++ b/components/schemas/dns/records/types/DnsRecordLinked.yml @@ -0,0 +1,55 @@ +title: DnsRecordLINKED +type: object +description: A LINKED record is a record special to Cycle. It represents a URL that points to a specific container or deployment of a container, however the IP address mapping is handled automatically by the platform. +allOf: + - type: object + required: + - features + - routing + properties: + routing: + $ref: linked/DnsRecordLinkedRouting.yml + features: + type: object + description: Features associated with this record. + required: + - tls + - geodns + properties: + tls: + type: object + description: TLS properties of the record. + required: + - enable + properties: + enable: + type: boolean + description: A boolean, where true represents this record will be paired with a TLS certificate automatically maintained by the platform. + geodns: + type: object + description: Options for the GeoDNS LINKED record feature. + required: + - enable + properties: + enable: + type: boolean + description: If enabled, Cycle will attempt to match inbound requests to the closest load balancer geographically. + wildcard: + type: + - object + - "null" + required: + - resolve_sub_domains + properties: + resolve_sub_domains: + description: If enabled, subdomains will resolve for wildcard records. If disabled, only the primary domain will resolve. + default: false + type: boolean + - oneOf: + - type: object + properties: + container_id: + type: string + description: The ID of the container this record is related to. + - $ref: linked/DnsRecordLinkedVirtualMachine.yml + - $ref: linked/DnsRecordLinkedDeployment.yml diff --git a/components/schemas/dns/records/types/DnsRecordMx.yml b/components/schemas/dns/records/types/DnsRecordMx.yml new file mode 100644 index 00000000..9d0f2317 --- /dev/null +++ b/components/schemas/dns/records/types/DnsRecordMx.yml @@ -0,0 +1,13 @@ +title: DnsRecordMx +type: object +description: A DNS MX record. +required: + - priority + - domain +properties: + priority: + type: integer + description: The priority setting for this mx record. + domain: + type: string + description: The domain this mx record points to. diff --git a/components/schemas/dns/records/types/DnsRecordNs.yml b/components/schemas/dns/records/types/DnsRecordNs.yml new file mode 100644 index 00000000..efc97df3 --- /dev/null +++ b/components/schemas/dns/records/types/DnsRecordNs.yml @@ -0,0 +1,9 @@ +title: DnsRecordNs +type: object +description: A DNS NS record. +required: + - domain +properties: + domain: + type: string + description: The domain of the nameserver for this record. diff --git a/components/schemas/dns/records/types/DnsRecordSrv.yml b/components/schemas/dns/records/types/DnsRecordSrv.yml new file mode 100644 index 00000000..de00e1ef --- /dev/null +++ b/components/schemas/dns/records/types/DnsRecordSrv.yml @@ -0,0 +1,21 @@ +title: DnsRecordSrv +type: object +description: A DNS SRV record. +required: + - weight + - priority + - port + - domain +properties: + weight: + type: integer + description: The weight configured for this record - breaks ties for priority. + priority: + type: integer + description: The priority for the record. + port: + type: integer + description: The port number for the service. + domain: + type: string + description: The domain for the record. diff --git a/components/schemas/dns/records/types/DnsRecordTxt.yml b/components/schemas/dns/records/types/DnsRecordTxt.yml new file mode 100644 index 00000000..acfd76e9 --- /dev/null +++ b/components/schemas/dns/records/types/DnsRecordTxt.yml @@ -0,0 +1,9 @@ +title: DnsRecordTxt +type: object +description: A DNS TXT record. +required: + - value +properties: + value: + type: string + description: The value for this TXT record. diff --git a/components/schemas/dns/records/types/linked/DnsRecordLinkedDeployment.yml b/components/schemas/dns/records/types/linked/DnsRecordLinkedDeployment.yml new file mode 100644 index 00000000..2b3cb162 --- /dev/null +++ b/components/schemas/dns/records/types/linked/DnsRecordLinkedDeployment.yml @@ -0,0 +1,27 @@ +title: DnsRecordLinkedDeployment +type: object +properties: + deployment: + type: object + description: Information about the deployment this record points to. + required: + - environment_id + - match + properties: + environment_id: + $ref: ../../../../ID.yml + description: The ID of the environment with the deployment tag mapping we want to reference. + match: + type: object + description: Describes which container and which tagged deployment this record should target. + required: + - container + properties: + container: + $ref: ../../../../Identifier.yml + description: The identifier of the container in the environment this record should point to. + tag: + description: The deployment tag that this record should point to. The tags are set on the root of an environment and map to a deployment version. + anyOf: + - $ref: ../../../../Identifier.yml + - type: "null" diff --git a/components/schemas/dns/records/types/linked/DnsRecordLinkedHttpRouting.yml b/components/schemas/dns/records/types/linked/DnsRecordLinkedHttpRouting.yml new file mode 100644 index 00000000..57e1eb88 --- /dev/null +++ b/components/schemas/dns/records/types/linked/DnsRecordLinkedHttpRouting.yml @@ -0,0 +1,13 @@ +title: DnsRecordLinkedHttpRouting +type: object +required: + - match_path +properties: + match_path: + type: + - string + - "null" + description: > + If set, this record will configure the load balancer to only match for paths of this domain matching this string. + + If the string starts with a /, it will be a literal prefix match (/test matches /test*). Otherwise, regex is used. diff --git a/components/schemas/dns/records/types/linked/DnsRecordLinkedRouting.yml b/components/schemas/dns/records/types/linked/DnsRecordLinkedRouting.yml new file mode 100644 index 00000000..17649320 --- /dev/null +++ b/components/schemas/dns/records/types/linked/DnsRecordLinkedRouting.yml @@ -0,0 +1,15 @@ +title: DnsRecordLinkedRouting +type: object +description: Rules for routing traffic at the load balancer for this linked record. +properties: + http: + oneOf: + - $ref: DnsRecordLinkedHttpRouting.yml + - type: "null" + variants: + type: + - array + - "null" + description: A set of weighted destinations that traffic to this record is distributed across. + items: + $ref: DnsRecordLinkedVariant.yml diff --git a/components/schemas/dns/records/types/linked/DnsRecordLinkedVariant.yml b/components/schemas/dns/records/types/linked/DnsRecordLinkedVariant.yml new file mode 100644 index 00000000..78aef3ef --- /dev/null +++ b/components/schemas/dns/records/types/linked/DnsRecordLinkedVariant.yml @@ -0,0 +1,14 @@ +title: DnsRecordLinkedVariant +type: object +description: A weighted routing variant. Traffic is distributed across variants according to their weights. +required: + - destination + - weight +properties: + destination: + $ref: DnsRecordLinkedVariantDestination.yml + weight: + type: integer + minimum: 0 + maximum: 1000 + description: The weight of this variant relative to the other variants, used to distribute traffic across destinations. Valid range is 0 to 1000. diff --git a/components/schemas/dns/records/types/linked/DnsRecordLinkedVariantDestination.yml b/components/schemas/dns/records/types/linked/DnsRecordLinkedVariantDestination.yml new file mode 100644 index 00000000..392dcc6a --- /dev/null +++ b/components/schemas/dns/records/types/linked/DnsRecordLinkedVariantDestination.yml @@ -0,0 +1,10 @@ +title: DnsRecordLinkedVariantDestination +description: The destination a variant routes traffic to. +oneOf: + - type: object + properties: + container_id: + type: string + description: The ID of the container this record is related to. + - $ref: DnsRecordLinkedVirtualMachine.yml + - $ref: DnsRecordLinkedDeployment.yml diff --git a/components/schemas/dns/records/types/linked/DnsRecordLinkedVirtualMachine.yml b/components/schemas/dns/records/types/linked/DnsRecordLinkedVirtualMachine.yml new file mode 100644 index 00000000..289e9e65 --- /dev/null +++ b/components/schemas/dns/records/types/linked/DnsRecordLinkedVirtualMachine.yml @@ -0,0 +1,18 @@ +title: DnsRecordLinkedVirtualMachine +type: object +required: + - virtual_machine +properties: + virtual_machine: + type: object + required: + - id + - dmz + properties: + id: + $ref: ../../../../ID.yml + dmz: + type: boolean + description: | + If true, traffic to this domain will skip the load balancer and go directly to the virtual machine + via the gateway service.