x-generated: Automatically generated by CDP protoc plugin. Do not edit manually.
swagger: '2.0'
x-endpoint-name: publicendpointmanagement
x-products: CDP
x-form-factors: public
x-cdp-releases: BETA
info:
  version: 0.9.164 (BETA)
  title: PublicEndpointManagement Public Service
  license:
    name: Apache 2.0
  description: PublicEndpointManagement Public Service is a web service for CDP applications to manage public DNS entries and TLS certificates.
  termsOfService: https://www.cloudera.com/legal/commercial-terms-and-conditions.html
schemes:
  - https
consumes:
  - application/json
produces:
  - application/json
paths:
  /api/v1/publicendpointmanagement/createDnsEntry:
    post:
      summary: Create or update a DNS entry.
      description: Create or update a DNS entry.
      operationId: createDnsEntry
      x-right: publicendpointmanagement/createDnsEntry
      parameters:
        - name: input
          in: body
          required: true
          schema:
            $ref: '#/definitions/CreateDnsEntryRequest'
      responses:
        200:
          description: Expected response to a valid request.
          schema:
            $ref: '#/definitions/CreateDnsEntryResponse'
        default:
          description: The default response on an error.
          schema:
            $ref: '#/definitions/Error'
      x-mutating: true
  /api/v1/publicendpointmanagement/deleteDnsEntry:
    post:
      summary: Delete a DNS entry.
      description: Delete a DNS entry.
      operationId: deleteDnsEntry
      x-right: publicendpointmanagement/deleteDnsEntry
      parameters:
        - name: input
          in: body
          required: true
          schema:
            $ref: '#/definitions/DeleteDnsEntryRequest'
      responses:
        200:
          description: Expected response to a valid request.
          schema:
            $ref: '#/definitions/DeleteDnsEntryResponse'
        default:
          description: The default response on an error.
          schema:
            $ref: '#/definitions/Error'
      x-mutating: true
  /api/v1/publicendpointmanagement/listDnsEntries:
    post:
      summary: List all DNS entries.
      description: List all DNS entries for an accountId.
      operationId: listDnsEntries
      x-right: publicendpointmanagement/listDnsEntries
      x-paging-default-max-items: 100
      parameters:
        - name: input
          in: body
          required: true
          schema:
            $ref: '#/definitions/ListDnsEntriesRequest'
      responses:
        200:
          description: Expected response to a valid request.
          schema:
            $ref: '#/definitions/ListDnsEntriesResponse'
        default:
          description: The default response on an error.
          schema:
            $ref: '#/definitions/Error'
      x-mutating: false
definitions:
  Error:
    type: object
    description: An object returned on an error.
    properties:
      code:
        type: string
        description: The error code.
      message:
        type: string
        description: The error message.
  IPs:
    type: object
    description: IPs holds a list of IP addresses for a DNS entry.
    properties:
      ips:
        type: array
        items:
          type: string
        description: IP addresses for a DNS entry.
  DnsTarget:
    type: object
    description: DnsTarget represents the target of a DNS entry, which can be a set of IPs, a CNAME, or an AWS ELB DNS target.
    properties:
      targetIPs:
        description: IP addresses for the DNS entry, e.g. ["192.168.1.1", "10.0.0.1"].
        $ref: '#/definitions/IPs'
      targetCname:
        type: string
        description: CNAME target for the DNS entry, e.g. "example.com".
  CreateDnsEntryRequest:
    type: object
    description: Request object for the CreateDnsEntry method.
    required:
      - environmentCrn
      - dnsTarget
    properties:
      environmentCrn:
        type: string
        description: The CRN of the environment for which the DNS entry is to be created.
      dnsTarget:
        description: The DNS target set for this domain name
        $ref: '#/definitions/DnsTarget'
      endpoint:
        type: string
        description: The endpoint for this cluster.
      addWildcard:
        type: boolean
        description: Adds the wildcard entry if TRUE.
  CreateDnsEntryResponse:
    type: object
    description: Response object for the CreateDnsEntry method.
  DeleteDnsEntryRequest:
    type: object
    description: Request object for the DeleteDnsEntry method.
    required:
      - environmentCrn
      - dnsTarget
    properties:
      environmentCrn:
        type: string
        description: The CRN of the environment, for which the DNS entry is to be deleted.
      dnsTarget:
        description: The DNS target set for this domain name.
        $ref: '#/definitions/DnsTarget'
      endpoint:
        type: string
        description: The endpoint for this cluster.
      removeWildcard:
        type: boolean
        description: Removes the wildcard entry if TRUE.
  DeleteDnsEntryResponse:
    type: object
    description: Response object for the DeleteDnsEntry method.
  ListDnsEntriesRequest:
    type: object
    description: Request object for the ListDnsEntries method.
    required:
      - environmentCrn
    properties:
      environmentCrn:
        type: string
        description: The CRN of the environment, for which the DNS entries are being listed.
      recordType:
        description: The record type to filter on, e.g. A, CNAME, etc.
        $ref: '#/definitions/DnsRecordType'
      pageSize:
        type: integer
        format: int32
        minimum: 20
        maximum: 100
        x-paging-page-size: true
        description: The page size.
      pageToken:
        type: string
        x-paging-input-token: true
        description: The page token.
  ListDnsEntriesResponse:
    type: object
    description: Response object for the ListDnsEntries method.
    properties:
      dnsEntries:
        type: array
        x-paging-result: true
        items:
          $ref: '#/definitions/DnsEntryResponse'
        description: List of DNS entries for the specified environment.
      nextPageToken:
        type: string
        x-paging-output-token: true
        description: The page token for requesting the next page of results.
  DnsEntryResponse:
    type: object
    description: DnsEntryResponse represents a DNS entry with its name, type, target records, and optional TTL.
    properties:
      dnsRecordName:
        type: string
        description: The DNS name for this entry, e.g. example.com.
      dnsRecordType:
        description: The record type of the DNS entry, e.g. A, CNAME, etc.
        $ref: '#/definitions/DnsRecordType'
      dnsTargetRecords:
        description: The target for this DNS entry, which can be an IP address, CNAME, or AWS ELB DNS.
        $ref: '#/definitions/DnsTargetRecord'
      dnsTTL:
        type: string
        description: Time to live for the DNS entry, in seconds.
  DnsTargetRecord:
    type: object
    description: DnsTargetRecord represents the target of a DNS entry.
    properties:
      resourceRecords:
        description: Resource records for the DNS entry, such as IP addresses or CNAMEs.
        $ref: '#/definitions/ResourceRecords'
  ResourceRecords:
    type: object
    description: ResourceRecords holds a list of values for DNS resource records, such as IP addresses or CNAMEs.
    properties:
      values:
        type: array
        items:
          type: string
        description: Values can be IP addresses or CNAMEs.
  DnsRecordType:
    type: string
    description: "The type of DNS record.\n `A` - A record type (IPv4 address). `TXT` - TXT record type (text record). `CNAME` - CNAME record type (canonical name)."
    enum:
      - A
      - TXT
      - CNAME
x-audit: true
