---
openapi: 3.0.3
info:
  version: '2.0'
  title: Certificate Manager Service API
  description: |-
    Using the Certificate Manager Service, you can conveniently provision and manage SSL certificates 
    with IONOS services and your internal connected resources. 
    
    For the [Application Load Balancer](https://api.ionos.com/docs/cloud/v6/#Application-Load-Balancers-get-datacenters-datacenterId-applicationloadbalancers),
    you usually need a certificate to encrypt your HTTPS traffic.
    The service provides the basic functions of uploading and deleting your certificates for this purpose.
servers:
- url: "https://certificate-manager.de-fra.ionos.com"
  description: Frankfurt
tags:
- name: Certificate
  description: |
    TLS/SSL certificates are used to secure network communications and prove
    the identity of websites on the Internet and resources on private networks. The certificates and their associated
    private keys are provided in PEM (Privacy Enhanced Mail) format.
    
    This tag groups all operations for certificate.
- name: AutoCertificate
  description: |
    Auto certificates create new certificates based
    on a certificate provider.
    
    This tag groups all operations for autocertificate.
- name: Provider
  description: |
    Certificate provider used to renew certificates before their expiry.
    
    This tag groups all operations for provider.
paths:
  /certificates:
    get:
      operationId: certificatesGet
      summary: Retrieve all Certificate
      security:
      - tokenAuth: []
      description: |
        This endpoint enables retrieving all Certificate using
        pagination and optional filters.
      parameters:
        - $ref: "#/components/parameters/paginationOffset"
        - $ref: "#/components/parameters/paginationLimit"
        - $ref: "#/components/parameters/commonNameFilter"
        - $ref: "#/components/parameters/autoCertificateFilter"
      tags:
        - Certificate
      responses:
        "200":
          description: |
            Returned all requested Certificate successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CertificateReadList"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
    post:
      operationId: certificatesPost
      summary: Create Certificate
      security:
      - tokenAuth: []
      tags:
        - Certificate
      description: |
        Creates a new Certificate.
        
        The full Certificate needs to be provided to create the object.
        Optional data will be filled with defaults or left empty.
      requestBody:
        description: Certificate to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CertificateCreate"
      responses:
        "201":
          description: Certificate successfully created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CertificateRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "415":
          $ref: '#/components/responses/UnsupportedMediaType'
        "422":
          $ref: '#/components/responses/UnprocessableEntity'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /certificates/{certificateId}:
    get:
      operationId: certificatesFindById
      summary: Retrieve Certificate
      security:
      - tokenAuth: []
      tags:
        - Certificate
      description: Returns the Certificate by ID.
      parameters:
        - name: certificateId
          in: path
          schema:
            type: string
            format: uuid
          example: cbee81a3-9389-57ba-bc50-393adcfca141
          required: true
          description: The ID (UUID) of the Certificate.
      responses:
        "200":
          description: Getting Certificate was successful.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CertificateRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
    patch:
      operationId: certificatesPatch
      summary: Updates Certificate
      security:
      - tokenAuth: []
      tags:
        - Certificate
      description: |
        Changes Certificate with the provided ID.
        Values provides will replace the existing data.
      parameters:
        - name: certificateId
          in: path
          schema:
            type: string
            format: uuid
          example: cbee81a3-9389-57ba-bc50-393adcfca141
          required: true
          description: The ID (UUID) of the Certificate.
      requestBody:
        description: patch Certificate
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CertificatePatch"
      responses:
        "200":
          description: Certificate successfully updated.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CertificateRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "409":
          $ref: '#/components/responses/Conflict'
        "404":
          $ref: '#/components/responses/NotFound'
        "415":
          $ref: '#/components/responses/UnsupportedMediaType'
        "422":
          $ref: '#/components/responses/UnprocessableEntity'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
    delete:
      operationId: certificatesDelete
      summary: Delete Certificate
      security:
      - tokenAuth: []
      tags:
        - Certificate
      description: Deletes the specified Certificate.
      parameters:
        - name: certificateId
          in: path
          schema:
            type: string
            format: uuid
          example: cbee81a3-9389-57ba-bc50-393adcfca141
          required: true
          description: The ID (UUID) of the Certificate.
      responses:
        "202":
          description: Deleting Certificate was successful.
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /auto-certificates:
    get:
      operationId: autoCertificatesGet
      summary: Retrieve all AutoCertificate
      security:
      - tokenAuth: []
      description: |
        This endpoint enables retrieving all AutoCertificate using
        pagination and optional filters.
      parameters:
        - $ref: "#/components/parameters/paginationOffset"
        - $ref: "#/components/parameters/paginationLimit"
        - $ref: "#/components/parameters/commonNameFilter"
      tags:
        - AutoCertificate
      responses:
        "200":
          description: |
            Returned all requested AutoCertificate successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AutoCertificateReadList"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
    post:
      operationId: autoCertificatesPost
      summary: Create AutoCertificate
      security:
      - tokenAuth: []
      tags:
        - AutoCertificate
      description: |
        Creates a new AutoCertificate.
        
        The full AutoCertificate needs to be provided to create the object.
        Optional data will be filled with defaults or left empty.
      requestBody:
        description: AutoCertificate to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AutoCertificateCreate"
      responses:
        "201":
          description: AutoCertificate successfully created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AutoCertificateRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "415":
          $ref: '#/components/responses/UnsupportedMediaType'
        "422":
          $ref: '#/components/responses/UnprocessableEntity'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /auto-certificates/{autoCertificateId}:
    get:
      operationId: autoCertificatesFindById
      summary: Retrieve AutoCertificate
      security:
      - tokenAuth: []
      tags:
        - AutoCertificate
      description: Returns the AutoCertificate by ID.
      parameters:
        - name: autoCertificateId
          in: path
          schema:
            type: string
            format: uuid
          example: f88467f8-a2d6-5871-83b9-e10f23d0a48a
          required: true
          description: The ID (UUID) of the AutoCertificate.
      responses:
        "200":
          description: Getting AutoCertificate was successful.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AutoCertificateRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
    patch:
      operationId: autoCertificatesPatch
      summary: Updates AutoCertificate
      security:
      - tokenAuth: []
      tags:
        - AutoCertificate
      description: |
        Changes AutoCertificate with the provided ID.
        Values provides will replace the existing data.
      parameters:
        - name: autoCertificateId
          in: path
          schema:
            type: string
            format: uuid
          example: f88467f8-a2d6-5871-83b9-e10f23d0a48a
          required: true
          description: The ID (UUID) of the AutoCertificate.
      requestBody:
        description: patch AutoCertificate
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AutoCertificatePatch"
      responses:
        "200":
          description: AutoCertificate successfully updated.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AutoCertificateRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "409":
          $ref: '#/components/responses/Conflict'
        "404":
          $ref: '#/components/responses/NotFound'
        "415":
          $ref: '#/components/responses/UnsupportedMediaType'
        "422":
          $ref: '#/components/responses/UnprocessableEntity'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
    delete:
      operationId: autoCertificatesDelete
      summary: Delete AutoCertificate
      security:
      - tokenAuth: []
      tags:
        - AutoCertificate
      description: Deletes the specified AutoCertificate.
      parameters:
        - name: autoCertificateId
          in: path
          schema:
            type: string
            format: uuid
          example: f88467f8-a2d6-5871-83b9-e10f23d0a48a
          required: true
          description: The ID (UUID) of the AutoCertificate.
      responses:
        "202":
          description: Deleting AutoCertificate was successful.
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /providers:
    get:
      operationId: providersGet
      summary: Retrieve all Provider
      security:
      - tokenAuth: []
      description: |
        This endpoint enables retrieving all Provider using
        pagination and optional filters.
      parameters:
        - $ref: "#/components/parameters/paginationOffset"
        - $ref: "#/components/parameters/paginationLimit"
      tags:
        - Provider
      responses:
        "200":
          description: |
            Returned all requested Provider successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProviderReadList"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
    post:
      operationId: providersPost
      summary: Create Provider
      security:
      - tokenAuth: []
      tags:
        - Provider
      description: |
        Creates a new Provider.
        
        The full Provider needs to be provided to create the object.
        Optional data will be filled with defaults or left empty.
      requestBody:
        description: Provider to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProviderCreate"
      responses:
        "201":
          description: Provider successfully created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProviderRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "415":
          $ref: '#/components/responses/UnsupportedMediaType'
        "422":
          $ref: '#/components/responses/UnprocessableEntity'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /providers/{providerId}:
    get:
      operationId: providersFindById
      summary: Retrieve Provider
      security:
      - tokenAuth: []
      tags:
        - Provider
      description: Returns the Provider by ID.
      parameters:
        - name: providerId
          in: path
          schema:
            type: string
            format: uuid
          example: 74edc770-5cc6-5976-ac99-013ddb4af403
          required: true
          description: The ID (UUID) of the Provider.
      responses:
        "200":
          description: Getting Provider was successful.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProviderRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
    patch:
      operationId: providersPatch
      summary: Updates Provider
      security:
      - tokenAuth: []
      tags:
        - Provider
      description: |
        Changes Provider with the provided ID.
        Values provides will replace the existing data.
      parameters:
        - name: providerId
          in: path
          schema:
            type: string
            format: uuid
          example: 74edc770-5cc6-5976-ac99-013ddb4af403
          required: true
          description: The ID (UUID) of the Provider.
      requestBody:
        description: patch Provider
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProviderPatch"
      responses:
        "200":
          description: Provider successfully updated.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProviderRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "409":
          $ref: '#/components/responses/Conflict'
        "404":
          $ref: '#/components/responses/NotFound'
        "415":
          $ref: '#/components/responses/UnsupportedMediaType'
        "422":
          $ref: '#/components/responses/UnprocessableEntity'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
    delete:
      operationId: providersDelete
      summary: Delete Provider
      security:
      - tokenAuth: []
      tags:
        - Provider
      description: Deletes the specified Provider.
      parameters:
        - name: providerId
          in: path
          schema:
            type: string
            format: uuid
          example: 74edc770-5cc6-5976-ac99-013ddb4af403
          required: true
          description: The ID (UUID) of the Provider.
      responses:
        "202":
          description: Deleting Provider was successful.
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
components:
  parameters:
    paginationOffset:
      name: offset
      in: query
      description: The first element (of the total list of elements) to include in the response. Use together with limit for pagination.
      required: false
      schema:
        type: integer
        format: int32
        default: 0
        minimum: 0
      example: 0
    paginationLimit:
      name: limit
      in: query
      description: The maximum number of elements to return. Use together with offset for pagination.
      required: false
      schema:
        type: integer
        format: int32
        default: 100
        minimum: 1
        maximum: 1000
      example: 100
    commonNameFilter:
      name: "filter.commonName"
      in: query
      description: |
        Filter by the common name (DNS).
      required: false
      example: "www.example.com"
      schema:
        type: string
    autoCertificateFilter:
      name: "filter.autoCertificate"
      in: query
      description: |
        Filter by autoCertificateID.
      required: false
      example: "b471cd03-ef51-52c5-91a5-49195b0a04d4"
      schema: 
        type: string
        format: uuid
  schemas:
    ProviderReadList:
      allOf:
      - type: object
        required:
        - id
        - type
        - href
        properties:
          id:
            description: ID of the list of Provider resources.
            type: string
            format: uuid
            example: 36c38284-7cb0-5d88-8701-636aa547617f
          type:
            description: The type of the resource.
            type: string
            enum:
            - collection
          href:
            description: The URL of the list of Provider resources.
            type: string
            example: /providers
          items:
            description: The list of Provider resources.
            type: array
            items:
              $ref: '#/components/schemas/ProviderRead'
      - $ref: '#/components/schemas/Pagination'
    ProviderRead:
      type: object
      required:
      - id
      - type
      - href
      - metadata
      - properties
      properties:
        id:
          type: string
          description: The ID (UUID) of the Provider.
          format: uuid
          example: 74edc770-5cc6-5976-ac99-013ddb4af403
        type:
          description: The type of the resource.
          type: string
          enum:
          - provider
        href:
          description: The URL of the Provider.
          type: string
          example: /providers/74edc770-5cc6-5976-ac99-013ddb4af403
        metadata:
          $ref: '#/components/schemas/MetadataWithStatus'
        properties:
          $ref: '#/components/schemas/Provider'
    ProviderPatch:
      type: object
      required:
      - properties
      properties:
        metadata:
          description: Metadata
          additionalProperties: true
          example: {}
        properties:
          $ref: '#/components/schemas/PatchName'
    ProviderCreate:
      type: object
      required:
      - properties
      properties:
        metadata:
          description: Metadata
          additionalProperties: true
          example: {}
        properties:
          $ref: '#/components/schemas/Provider'
    Provider:
      description: |
        Certificate provider used to renew certificates before their expiry.
      type: object
      required:
      - name
      - email
      - server
      properties:
        name:
          type: string
          example: "Let's Encrypt"
          description: The name of the certificate provider.
        email: 
          type: string
          example: "user@example.com"
          description: The email address of the certificate requester.
        server:
          type: string
          example: "https://acme-v02.api.letsencrypt.org/directory"
          description: The URL of the certificate provider.
        externalAccountBinding:
          type: object
          properties:
            keyId:
              type: string
              example: "some-key-id"
              description: The key ID of the external account binding.
            keySecret:
              type: string
              example: "secret"
              description: The secret of the external account binding.
              writeOnly: true
    CertificateReadList:
      allOf:
      - type: object
        required:
        - id
        - type
        - href
        properties:
          id:
            description: ID of the list of Certificate resources.
            type: string
            format: uuid
            example: e7057759-25b4-5a26-b2f2-4c41e61f1044
          type:
            description: The type of the resource.
            type: string
            enum:
            - collection
          href:
            description: The URL of the list of Certificate resources.
            type: string
            example: /certificates
          items:
            description: The list of Certificate resources.
            type: array
            items:
              $ref: '#/components/schemas/CertificateRead'
      - $ref: '#/components/schemas/Pagination'
    CertificateRead:
      type: object
      required:
      - id
      - type
      - href
      - metadata
      - properties
      properties:
        id:
          type: string
          description: The ID (UUID) of the Certificate.
          format: uuid
          example: cbee81a3-9389-57ba-bc50-393adcfca141
        type:
          description: The type of the resource.
          type: string
          enum:
          - certificate
        href:
          description: The URL of the Certificate.
          type: string
          example: /certificates/cbee81a3-9389-57ba-bc50-393adcfca141
        metadata:
          $ref: '#/components/schemas/MetadataWithCertificateInformation'
        properties:
          $ref: '#/components/schemas/Certificate'
    CertificatePatch:
      type: object
      required:
      - properties
      properties:
        metadata:
          description: Metadata
          additionalProperties: true
          example: {}
        properties:
          $ref: '#/components/schemas/PatchName'
    CertificateCreate:
      type: object
      required:
      - properties
      properties:
        metadata:
          description: Metadata
          additionalProperties: true
          example: {}
        properties:
          $ref: '#/components/schemas/Certificate'
    Certificate:
      description: |
        TLS/SSL certificates are used to secure network communications and prove
        the identity of websites on the Internet and resources on private networks. The certificates and their associated
        private keys are provided in PEM (Privacy Enhanced Mail) format.
      type: object
      required:
      - name
      - certificate
      - certificateChain
      - privateKey
      properties:
        name:
          type: string
          example: My Certificate
          description: The certificate name.
        certificate:
          type: string
          example: |
            -----BEGIN CERTIFICATE-----
            MIIE5TCCAs2gAwIBAgIBATANBgkqhkiG9w0BAQsFADA2MQswCQYDVQQGEwJSTzEK
            -----END CERTIFICATE-----
          description: The certificate body.
        certificateChain:
          type: string
          example: |
            -----BEGIN CERTIFICATE-----
            MIIDoTCCAokCFDrAUWffdxWJVz2Axl9lp/4xiUteMA0GCSqGSIb3DQEBCwUAMIGG
            -----END CERTIFICATE-----
          description: The certificate chain.
        privateKey:
          type: string
          example: |
            -----BEGIN RSA PRIVATE KEY-----
            MIIJKQIBAAKCAgEAzDehfqWBr+9q0pxwCDDRph7QSPiMbkDGaGKc+Fd2h3doT8Li
            -----END RSA PRIVATE KEY-----
          description: The RSA private key is used for authentication and symmetric
            key exchange when establishing an SSL session. It is a part of the public
            key infrastructure generally used with SSL certificates.
          writeOnly: true
      x-java-class-annotation: "@PemFormatMatch"
    PatchName:
      required:
      - name
      properties:
        name:
          type: string
          example: My name
          description: The new name.
    AutoCertificateReadList:
      allOf:
      - type: object
        required:
        - id
        - type
        - href
        properties:
          id:
            description: ID of the list of AutoCertificate resources.
            type: string
            format: uuid
            example: b57af488-a991-522a-9fea-bbca2e2d097f
          type:
            description: The type of the resource.
            type: string
            enum:
            - collection
          href:
            description: The URL of the list of AutoCertificate resources.
            type: string
            example: /auto-certificates
          items:
            description: The list of AutoCertificate resources.
            type: array
            items:
              $ref: '#/components/schemas/AutoCertificateRead'
      - $ref: '#/components/schemas/Pagination'
    AutoCertificateRead:
      type: object
      required:
      - id
      - type
      - href
      - metadata
      - properties
      properties:
        id:
          type: string
          description: The ID (UUID) of the AutoCertificate.
          format: uuid
          example: f88467f8-a2d6-5871-83b9-e10f23d0a48a
        type:
          description: The type of the resource.
          type: string
          enum:
          - autocertificate
        href:
          description: The URL of the AutoCertificate.
          type: string
          example: /auto-certificates/f88467f8-a2d6-5871-83b9-e10f23d0a48a
        metadata:
          $ref: '#/components/schemas/MetadataWithAutoCertificateInformation'
        properties:
          $ref: '#/components/schemas/AutoCertificate'
    AutoCertificatePatch:
      type: object
      required:
      - properties
      properties:
        metadata:
          description: Metadata
          additionalProperties: true
          example: {}
        properties:
          $ref: '#/components/schemas/PatchName'
    AutoCertificateCreate:
      type: object
      required:
      - properties
      properties:
        metadata:
          description: Metadata
          additionalProperties: true
          example: {}
        properties:
          $ref: '#/components/schemas/AutoCertificate'
    AutoCertificate:
      description: |
        Auto certificates create new certificates based
        on a certificate provider.
      type: object
      required:
      - provider
      - commonName
      - keyAlgorithm
      - name
      properties:
        provider:
          type: string
          format: uuid
          example: b471cd03-ef51-52c5-91a5-49195b0a04d4
          description: The certificate provider used to issue the certificates.
        commonName:
          type: string
          example: "www.example.com"
          description: |
            The common name (DNS) of the certificate to issue.
            The common name needs to be part of a zone in IONOS Cloud DNS.
        keyAlgorithm:
          type: string
          example: rsa4096
          description: The key algorithm used to generate the certificate.
          enum: 
          - rsa2048
          - rsa3072
          - rsa4096
        name:
          type: string
          example: My Auto renewed certificate
          description: A certificate name used for management purposes.
        subjectAlternativeNames:
          type: array
          items:
            type: string
          example:
          - "app.example.com"
          description: |
            Optional additional names to be added to the issued certificate.
            The additional names needs to be part of a zone in IONOS Cloud DNS.
    MetadataWithStatus:
      readOnly: true
      allOf:
        - $ref: '#/components/schemas/Metadata'
        - type: object
          required:
          - state
          - message
          properties:
            state:
              type: string
              example: AVAILABLE
              description: The resource state.
              enum:
                - PROVISIONING
                - AVAILABLE
                - FAILED
            message:
              type: string
              description: |
                A human readable message describing the current state.
                In case of an error, the message will contain a detailed error message.
              example: Issue in progress.
    MetadataWithAutoCertificateInformation:
      allOf:
        - $ref: '#/components/schemas/MetadataWithStatus'
        - type: object
          properties:
            lastIssuedCertificate:
              type: string
              format: uuid
              example: cbee81a3-9389-57ba-bc50-393adcfca141
              description: The ID of the last certificate that was issued.
    MetadataWithCertificateInformation:
      allOf:
        - $ref: '#/components/schemas/MetadataWithStatus'
        - type: object
          required:
          - expired
          - notBefore
          - notAfter
          - serialNumber
          - commonName
          - subjectAlternativeNames
          properties:
            autoCertificate:
              type: string
              format: uuid
              example: b471cd03-ef51-52c5-91a5-49195b0a04d4
              description: The ID of the auto-certificate that caused issuing of the certificate.
            lastIssuedCertificate:
              type: string
              format: uuid
              example: cbee81a3-9389-57ba-bc50-393adcfca141
              description: The ID of the last issued certificate that belongs to the same auto-certificate.
            expired:
              type: boolean
              example: false
              description: Indicates if the certificate is expired.
            notBefore:
              type: string
              format: date-time
              example: "2021-12-31T23:59:59Z"
              description: The start date of the certificate.
            notAfter:
              type: string
              format: date-time
              example: "2022-12-31T23:59:59Z"
              description: The end date of the certificate.
            serialNumber:
              type: string
              example: "33:00:00:04:5F:2B:0D:65:9D:71:72:3E:7D:00:00:00:00:04:5F"
              description: The serial number of the certificate in hex.
            commonName:
              type: string
              example: "www.example.com"
              description: The common name (DNS) of the certificate.
            subjectAlternativeNames:
              type: array
              items:
                type: string
              example:
              - "app.example.com"
              description: |
                Optional additional names added to the issued certificate.
                The additional names needs to be part of a zone in IONOS Cloud DNS.
    Cores:
      type: integer
      description: The number of CPU cores per instance.
      example: 4
      minimum: 1
      maximum: 31
    Ram:
      type: integer
      description: The amount of memory per instance in gigabytes (GB).
      example: 4
      minimum: 4
      maximum: 256
    Connection:
      description: Details about the network connection for your instance.
      properties:
        datacenterId:
          description: The datacenter to connect your instance to.
          type: string
          example: '5a029f4a-72e5-11ec-90d6-0242ac120003'
        lanId:
          description: The numeric LAN ID to connect your instance to.
          type: string
          example: '2'
        cidr:
          type: string
          description: |
            The IP and subnet for your instance.
            Note the following unavailable IP range:
            10.244.0.0/11
          example: 192.168.1.100/24
      required:
        - datacenterId
        - lanId
        - cidr
      type: object
    MaintenanceWindow:
      description: |
        A weekly 4 hour-long window, during which maintenance might occur.
      properties:
        time:
          type: string
          description: Start of the maintenance window in UTC time.
          example: '16:30:59'
        dayOfTheWeek:
          $ref: '#/components/schemas/DayOfTheWeek'
      required:
        - time
        - dayOfTheWeek
      type: object
    DayOfTheWeek:
      description: The name of the week day.
      type: string
      enum:
        - Sunday
        - Monday
        - Tuesday
        - Wednesday
        - Thursday
        - Friday
        - Saturday
      example: Monday
    Error:
      description: |
        The Error object is used to represent an error response from the API.
      type: object
      properties:
        httpStatus:
          type: integer
          description: The HTTP status code of the operation.
          example: 400
        messages:
          type: array
          description: |
            A list of error messages.
          items:
            type: object
            properties:
              errorCode:
                type: string
                description: |
                  Application internal error code
                example: "err-1234"
              message:
                type: string
                description: |
                  A human readable explanation specific to this occurrence of the
                  problem.
                example: "Error message example"
    Metadata:
      type: object
      description: Metadata of the resource.
      properties:
        createdDate:
          type: string
          format: date-time
          description: The ISO 8601 creation timestamp.
          example: "2020-12-10T13:37:50+01:00"
          readOnly: true
        createdBy:
          type: string
          description: Unique name of the identity that created the resource.
          example: "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3"
          readOnly: true
        createdByUserId:
          type: string
          description: Unique id of the identity that created the resource.
          example: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3
          readOnly: true
        lastModifiedDate:
          type: string
          format: date-time
          description: The ISO 8601 modified timestamp.
          example: "2020-12-11T13:37:50+01:00"
          readOnly: true
        lastModifiedBy:
          type: string
          description: Unique name of the identity that last modified the resource.
          example: "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3"
          readOnly: true
        lastModifiedByUserId:
          type: string
          description: Unique id of the identity that last modified the resource.
          example: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3
          readOnly: true
        resourceURN:
          type: string
          description: Unique name of the resource.
          example: "ionos:<product>:<location>:<contract>:<resource-path>"
          readOnly: true
    Pagination:
      required:
      - offset
      - limit
      - _links
      description: |
        Pagination information. The offset and limit parameters are used to
        navigate the list of elements. The _links object contains URLs to
        navigate the different pages.
      type: object
      properties:
        offset:
          $ref: '#/components/schemas/Offset'
        limit:
          $ref: '#/components/schemas/Limit'
        _links:
          $ref: '#/components/schemas/Links'
    
    Offset:
      description: |
        The offset specified in the request (if none was specified, the default
        offset is 0).
      type: integer
      example: 0
      minimum: 0
      readOnly: true
    Limit:
      description: |
        The limit specified in the request (if none was specified, use the
        endpoint's default pagination limit).
      type: integer
      example: 42
      minimum: 0
      readOnly: true
    Links:
      description: |
        URLs to navigate the different pages. As of now we always only return a
        single page.
      type: object
      properties:
        prev:
          description: |
            URL (with offset and limit parameters) of the previous page; only
            present if offset is greater than 0.
          type: string
          format: uri
          example: http://PREVIOUS-PAGE-URI
          readOnly: true
        self:
          description: |
            URL (with offset and limit parameters) of the current page.
          type: string
          format: uri
          example: http://THIS-PAGE-URI
          readOnly: true
        next:
          description: |
            URL (with offset and limit parameters) of the next page; only
            present if offset + limit is less than the total number of elements.
          type: string
          format: uri
          example: http://NEXT-PAGE-URI
          readOnly: true
  securitySchemes:
    tokenAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        The token can be generated using the 
        [Authentication API](https://api.ionos.com/docs/authentication/v1/#tag/tokens/operation/tokensGenerate).
  responses:
    BadRequest:
      description: |
        ### Bad Request
        The request send to the API was malformed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: |
        ### Unauthorized
        The request is missing authorization information or the authorization information provided are expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotAllowed:
      description: |
        ### Not Allowed
        The user issuing the request does not have the needed permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: |
        ### Conflict
        The UUID is already taken by another party, follow the guides to generate UUIDs uniquely.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: |
        ### Not Found
        The resource that was requested could not be found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnexpectedError:
      description: |
        ### Unexpected Internal Server Error
        An unexpected internal error occurred. We apologize for the inconvenience!
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnprocessableEntity:
      description: |
        ### Unprocessable Entity
        The request was well-formed but was unable to be followed due to semantic errors.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: |
        ### Too Many Requests
        The user has sent too many requests in a given amount of time.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnsupportedMediaType:
      description: |
        ### Unsupported Media Type
        The request has an unsupported media type.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: |
        ### Internal Server Error
        An internal error occurred. We apologize for the inconvenience!
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: |
        ### Service Unavailable
        The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
