---
openapi: 3.0.0
info:
  title: Image Portability Service API
  description: The API for the Citrix Image Portability Service.
  version: 0.0.1
servers:
  - url: https://api-us.cloud.com/ips
    description: for US customers
  - url: https://api-eu.cloud.com/ips
    description: for EU customers
tags:
  - name: Credentials Management
    description: Manage credentials that can be used via Citrix Connector Appliances to perform on-premises operations.
  - name: Image Management
    description: Export images from a virtual platform or prepare them for a different virtual platform.
  - name: Job Management
    description: View, cancel or delete asynchronous jobs.
  - name: Configuration Management
    description: Create, view, update, delete and verify configuration items.
paths:
  /configuration:
    x-summary: Configuration Collection
    post:
      tags:
        - Configuration Management
      summary: Add Configuration
      description: Use this route to add a configuration entry.
      operationId: addConfiguration
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
      requestBody:
        description: Configuration data.
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/CreateSmbConfigurationRequest'
                - $ref: '#/components/schemas/CreateSmbConfigurationRequestWithCredentialCreation'
            examples:
              Add a SmbConfiguration with an existing credential:
                value:
                  type: "SmbConfiguration"
                  hostname: "server.acme.com"
                  sharename: "DeptShare"
                  credentialId: "test_credential_id"
                  resourceLocationId: "cba15d66-6584-4008-b112-a6741a2ed51e"
              Add a SmbConfiguration which creates a UsernamePassword Credential:
                value:
                  type: "SmbConfiguration"
                  hostname: "server.acme.com"
                  sharename: "DeptShare"
                  credentialId: "my-usernamepassword-example"
                  credentialName: "My user credential"
                  credentialType: "UsernamePassword"
                  credentialValues:
                    username: "user1"
                    password: "pass"
                  resourceLocationId: "cba15d66-6584-4008-b112-a6741a2ed51e"
              Add a SmbConfiguration which creates a Simple Credential:
                value:
                  type: "SmbConfiguration"
                  hostname: "server.acme.com"
                  sharename: "DeptShare"
                  credentialId: "my-simple-example"
                  credentialName: "My simple credential"
                  credentialType: "Simple"
                  credentialValues:
                    value: "S3cretV@lu3#"
                  resourceLocationId: "cba15d66-6584-4008-b112-a6741a2ed51e"
              Add a SmbConfiguration which creates an Azure Credential:
                value:
                  type: "SmbConfiguration"
                  hostname: "server.acme.com"
                  sharename: "DeptShare"
                  credentialId: "my-azure-example"
                  credentialName: "My azure credential"
                  credentialType: "Azure"
                  credentialValues:
                    tenantId: bd499e37-6156-4d6b-96f2-5d46be29a935
                    clientId: 816a9584-5f4b-4be1-9bd0-72114f8825bf  # gitleaks:allow
                    clientSecret: az-2w623wa#=
                  resourceLocationId: "cba15d66-6584-4008-b112-a6741a2ed51e"
              Add a SmbConfiguration which creates a Gcp Credential:
                value:
                  type: "SmbConfiguration"
                  hostname: "server.acme.com"
                  sharename: "DeptShare"
                  credentialId: "my-gcp-example"
                  credentialName: "My gcp credential"
                  credentialType: "Gcp"
                  credentialValues:
                    serviceAccountKey:
                      type: "service_account"
                      project_id: "example"
                      private_key_id: "3da8841f2f2c551e1e39b8f7b8910876a4a93951"
                      private_key: "------BEGIN PRIVATE KEY-----\nMIIEpAIBAAKCAQEA6cdZ3R+JWZYQgXiYZ2nL+lqmEVbnVs/TJ6eeWi8UcCw45Ud+\n9Y8ef/RvQ0Dq4R8DRCNoSviLj2ur2imWvMf32OAjkN1C76Aq7pFXY/lx2ZSZuu8o\n9zLi36rVV0nge2FM3W+KNM+DXFXfUFZ56FwVvalsNv0GITaOs6ewEFhElGQpdGMl\nNr440w45XNGbmanBmnMo3a18PU9OOW0OWSj3P0lCE6/HAa7UXHd05WReXUM8W/y2\nrgPSnncRgT1jIIsm0eqnhuYelZkGqOfllG1nFXOBlI9piNDSi/YTxRKn6Fz07T3x\n8tLZPBqI5JGzqir95Mpuy1CJKUVJ+MKRv5YEnwIDAQABAoIBAQCJjUt5yRGGzb4+\nf9ekmWJ0lxu5fhm2QagrX/vTcnojGlILzgqMr74xaYCB4NOSzC2ezPqTijSLmb3P\nKsNPppVVXWRv21CEMAiywH/cCiyL6lyd2hSPhrhpBFps9sIHtpOEgxmdwy+2h6xS\n19748h20r9hFbpFJv5EtchAtPdJ0QG7yLuif7FIaRHuav4XVwOTYNwrTlC8OzcrY\nrdI1kmHKJPvQdI72gtKInfpkTJ0lK7/g5rnAk+pun6AOAWQiF/d1HfkRt0y23ZBd\nVX76+p+u+IXRBjKC2ZgxSYoPrVQZ3Zy4zwPREvjEbeIvhZNcb6tYRUQYF0qgvNlT\nFhuZ0KrRAoGBAP3jse8sr8n4RWEbWhtc1aWLuvIIP248IX4OnWzn5A2MrVP8p05Q\n7+bQ83YEFz7ucutoO/vAh4l4Bu9rIBDdNc4K2VSxCCbDxQfBbVAglUk9ighb7cNL\n8+rzepRm+u1yXCXb+4n+Lf3SrNebLuKksRGhlyKdotw6nQhp8+7J9luXAoGBAOu4\n265UU0pzM5x9zmmjHxkOV4hZCbzbtdvBaJVbb9E3gboSYijHQLyYDY8NwvBubev4\noN24Q6FAIUJjAljK25tbnziCBCNy7kiyDOozYIv7/G3FsXkIm6NWAL/2Qj6y1H2h\n+XKjDdufId97zYlXgxlme1Hg+jkeHXbZIfZuFWA5AoGAOGm5ha1mOfhiYhtTwDS2\nfBw6I8FVZscRohLZQ/OaprAVa03+VtaBF8Zh8l0iVSdifZAhk+TJuO/kippA+75L\nUEb0126mowZo5zpBccZrpWR5ITZb9EMSJaiIGiVvqAb7FqZ0k8rYqUeAhD/FATMa\n7RH8pQJlx412iwIP44UYqm0CgYEAtSUDFO3ScAUlpV38kKt9S2j9FVevJwYEtBLm\nRtjUjgfE1nQoIMQ2WHfU+5kMtG14ZX1USe6/chxxMq4ZcJi7uKDpM6iee4tn2E+T\noyrGR+zmaIkiwCtAR33g56Pb9ojAyKb/pfvtu1eH1VEzexbYNV3O6PYl9FzTMbDc\n655fKOkCgYAPEoNcAGKAFyLT5u+f0fTBdVdT+lHf2oy1d8x6ciMVq9jCpSLBl/Ox\nr7Fv/IHoVoOoLITi/UWlys9qjeA0uivb2y1jRC6pV3pWzXg+t22yS0dG/1wGa3el\nzDKO5HZRQmgybC4q8DCD0ww4d7yBCKOjN8Cuppna/1vyXwG7/0ZYIA==\n-----END PRIVATE KEY-----"  # gitleaks:allow
                      client_email: "example@example.iam.gserviceaccount.com"
                      client_id: "536607742788781180419"
                      auth_uri: "https://accounts.google.com/o/oauth2/auth"
                      token_uri: "https://oauth2.googleapis.com/token"
                      auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs"
                      client_x509_cert_url: "https://www.googleapis.com/robot/v1/metadata/x509/example%40example.iam.gserviceaccount.com"
                  resourceLocationId: "cba15d66-6584-4008-b112-a6741a2ed51e"
      responses:
        '201':
          description: Success. The configuration was added.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Location:
              $ref: '#/components/headers/NewObjectLocation'
            Content-Type:
              $ref: '#/components/headers/ContentType'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
          content:
            application/json:
              schema:
                type: object
                oneOf:
                  - $ref: '#/components/schemas/ConfigurationResponse'
                  - $ref: '#/components/schemas/SmbConfigurationResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
    get:
      tags:
        - Configuration Management
      summary: Get All Configurations
      description: Use this route to return all configurations.
      operationId: getAllConfigurations
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - in: query
          name: orderBy
          description: "Use to order the results. Must be in the form <b><i><property-name> <asc|desc></i></b> where <i>property-name</i> can be either 'name' or 'createdAt'."
          schema:
            type: string
          examples:
            none:
              value: ''
              summary: No ordering
            nameDesc:
              value: name desc
              summary: Sort by name in descending order
        - in: query
          name: type
          description: "Filter results to only return configurations of the given type"
          schema:
            type: string
          examples:
            none:
              value: ''
              summary: No filtering
            SmbConfiguration:
              value: SmbConfiguration
              summary: "Return configurations of type 'SmbConfiguration'"
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/ContinuationToken'
      responses:
        '200':
          description: Success. The configurations have been returned.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Content-Type:
              $ref: '#/components/headers/ContentType'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
            Expires:
              $ref: '#/components/headers/Expires'
            Vary:
              $ref: '#/components/headers/Vary'
          content:
            application/json:
              schema:
                type: object
                oneOf:
                  - $ref: '#/components/schemas/ConfigurationsPagedResult'
                  - $ref: '#/components/schemas/SmbConfigurationsPagedResult'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '406':
          $ref: '#/components/responses/406'
      security:
        - citrix_auth: []
  /configuration/{id}:
    x-summary: Configuration Object
    get:
      tags:
        - Configuration Management
      summary: Get a configuration
      description: Use this route to get information about a configuration given its id.
      operationId: getConfiguration
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - name: id
          in: path
          description: The Id of the configuration.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success. The configuration has been returned.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Content-Type:
              $ref: '#/components/headers/ContentType'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
            Expires:
              $ref: '#/components/headers/Expires'
            Vary:
              $ref: '#/components/headers/Vary'
          content:
            application/json:
              schema:
                type: object
                oneOf:
                  - $ref: '#/components/schemas/ConfigurationResponse'
                  - $ref: '#/components/schemas/SmbConfigurationResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Configuration'
        '406':
          $ref: '#/components/responses/406'
      security:
        - citrix_auth: []
    put:
      tags:
        - Configuration Management
      summary: Update Configuration
      description: Use this route to update the values for a specified configuration.
      operationId: updateConfiguration
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - name: id
          in: path
          description: The Id of the configuration.
          required: true
          schema:
            type: string
      requestBody:
        description: Configuration values.
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/CreateSmbConfigurationRequest'
            examples:
              Update a SmbConfiguration:
                value:
                  hostname: "server.acme.com"
                  sharename: "DeptShareUpdated"
                  credentialId: "updated_credential_id"
                  resourceLocationId: "cba15d66-6584-4008-b112-a6741a2ed51e"
      responses:
        '204':
          description: Success. The configuration values have been updated.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Content-Type:
              $ref: '#/components/headers/ContentType'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Configuration'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
    delete:
      tags:
        - Configuration Management
      summary: Delete Configuration
      description: Use this route to remove a configuration.
      operationId: deleteConfiguration
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - name: id
          in: path
          description: Id of the configuration to delete.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success. The credential has been deleted.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Configuration'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
      security:
        - citrix_auth: []
  /configuration/{id}/$validate:
        x-summary: Configuration Validation
        post:
            tags:
                - Configuration Management
            summary: Validate Configuration
            description: Use this route to determine whether the configuration provided is valid.
            operationId: validateConfiguration
            parameters:
                - $ref: '#/components/parameters/AcceptHeader'
                - $ref: '#/components/parameters/AcceptCharsetHeader'
                - $ref: '#/components/parameters/ContentHeader'
                - $ref: '#/components/parameters/CitrixCustomerId'
                - $ref: '#/components/parameters/CitrixTransactionId'
                - name: id
                  in: path
                  description: The id of the configuration
                  required: true
                  schema:
                    type: string
            responses:
                '200':
                    description: success- returns a boolean containing validation status
                    headers:
                        Citrix-TransactionId:
                            $ref: '#/components/headers/CitrixTransactionId'
                        Content-Type:
                            $ref: '#/components/headers/ContentType'
                        X-Content-Type-Options:
                            $ref: '#/components/headers/XContentTypeOptions'
                        Cache-Control:
                            $ref: '#/components/headers/CacheControl'
                        Vary:
                            $ref: '#/components/headers/Vary'
                    content:
                        application/json:
                            schema:
                                type: boolean
                '400':
                    $ref: '#/components/responses/400'
                '401':
                    $ref: '#/components/responses/401'
                '403':
                    $ref: '#/components/responses/403'
                '406':
                    $ref: '#/components/responses/406'
            security:
                - citrix_auth: []
  /credentials:
    x-summary: Credentials Collection
    post:
      tags:
        - Credentials Management
      summary: Add Credential
      description: Use this route to add a credential to the Citrix Cloud Credentials Wallet for use with the Image Portability Service.
      operationId: addCredential
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
      requestBody:
        description: Credential data.
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/CreateUsernamePasswordCredentialRequest'
                - $ref: '#/components/schemas/CreateAzureCredentialRequest'
                - $ref: '#/components/schemas/CreateGcpCredentialRequest'
                - $ref: '#/components/schemas/CreateAwsCredentialRequest'
                - $ref: '#/components/schemas/CreateSimpleCredentialRequest'
            examples:
              Add a username/password credential:
                value:
                  id: my-usernamepassword-example
                  name: My user credential
                  type: UsernamePassword
                  username: myname@mycompany.com
                  password: MyP@ssw0rd
              Add a username/password credential with a domain:
                value:
                  id: my-usernamepassword-example
                  name: My user credential with domain
                  type: UsernamePassword
                  domain: mydomain
                  username: myname
                  password: MyP@ssw0rd
              Add an Azure service principal credential:
                value:
                  id: my-azure-example
                  name: My Azure credential
                  type: Azure
                  tenantId: bd499e37-6156-4d6b-96f2-5d46be29a935
                  clientId: 816a9584-5f4b-4be1-9bd0-72114f8825bf
                  clientSecret: az-2w623wa#=
              Add an AWS service principal credential:
                value:
                  id: my-aws-example
                  name: My AWS credential
                  type: Aws
                  keyId: YourKeyId
                  key: YourKey
              Add a Google Cloud service account credential:
                value:
                  id: my-gcp-example
                  name: My Google Cloud credential
                  type: Gcp
                  serviceAccountKey:
                    type: service_account
                    project_id: example
                    private_key_id: 3da8841f2f2c551e1e39b8f7b8910876a4a93951
                    private_key: "------BEGIN PRIVATE KEY-----\nMIIEpAIBAAKCAQEA6cdZ3R+JWZYQgXiYZ2nL+lqmEVbnVs/TJ6eeWi8UcCw45Ud+\n9Y8ef/RvQ0Dq4R8DRCNoSviLj2ur2imWvMf32OAjkN1C76Aq7pFXY/lx2ZSZuu8o\n9zLi36rVV0nge2FM3W+KNM+DXFXfUFZ56FwVvalsNv0GITaOs6ewEFhElGQpdGMl\nNr440w45XNGbmanBmnMo3a18PU9OOW0OWSj3P0lCE6/HAa7UXHd05WReXUM8W/y2\nrgPSnncRgT1jIIsm0eqnhuYelZkGqOfllG1nFXOBlI9piNDSi/YTxRKn6Fz07T3x\n8tLZPBqI5JGzqir95Mpuy1CJKUVJ+MKRv5YEnwIDAQABAoIBAQCJjUt5yRGGzb4+\nf9ekmWJ0lxu5fhm2QagrX/vTcnojGlILzgqMr74xaYCB4NOSzC2ezPqTijSLmb3P\nKsNPppVVXWRv21CEMAiywH/cCiyL6lyd2hSPhrhpBFps9sIHtpOEgxmdwy+2h6xS\n19748h20r9hFbpFJv5EtchAtPdJ0QG7yLuif7FIaRHuav4XVwOTYNwrTlC8OzcrY\nrdI1kmHKJPvQdI72gtKInfpkTJ0lK7/g5rnAk+pun6AOAWQiF/d1HfkRt0y23ZBd\nVX76+p+u+IXRBjKC2ZgxSYoPrVQZ3Zy4zwPREvjEbeIvhZNcb6tYRUQYF0qgvNlT\nFhuZ0KrRAoGBAP3jse8sr8n4RWEbWhtc1aWLuvIIP248IX4OnWzn5A2MrVP8p05Q\n7+bQ83YEFz7ucutoO/vAh4l4Bu9rIBDdNc4K2VSxCCbDxQfBbVAglUk9ighb7cNL\n8+rzepRm+u1yXCXb+4n+Lf3SrNebLuKksRGhlyKdotw6nQhp8+7J9luXAoGBAOu4\n265UU0pzM5x9zmmjHxkOV4hZCbzbtdvBaJVbb9E3gboSYijHQLyYDY8NwvBubev4\noN24Q6FAIUJjAljK25tbnziCBCNy7kiyDOozYIv7/G3FsXkIm6NWAL/2Qj6y1H2h\n+XKjDdufId97zYlXgxlme1Hg+jkeHXbZIfZuFWA5AoGAOGm5ha1mOfhiYhtTwDS2\nfBw6I8FVZscRohLZQ/OaprAVa03+VtaBF8Zh8l0iVSdifZAhk+TJuO/kippA+75L\nUEb0126mowZo5zpBccZrpWR5ITZb9EMSJaiIGiVvqAb7FqZ0k8rYqUeAhD/FATMa\n7RH8pQJlx412iwIP44UYqm0CgYEAtSUDFO3ScAUlpV38kKt9S2j9FVevJwYEtBLm\nRtjUjgfE1nQoIMQ2WHfU+5kMtG14ZX1USe6/chxxMq4ZcJi7uKDpM6iee4tn2E+T\noyrGR+zmaIkiwCtAR33g56Pb9ojAyKb/pfvtu1eH1VEzexbYNV3O6PYl9FzTMbDc\n655fKOkCgYAPEoNcAGKAFyLT5u+f0fTBdVdT+lHf2oy1d8x6ciMVq9jCpSLBl/Ox\nr7Fv/IHoVoOoLITi/UWlys9qjeA0uivb2y1jRC6pV3pWzXg+t22yS0dG/1wGa3el\nzDKO5HZRQmgybC4q8DCD0ww4d7yBCKOjN8Cuppna/1vyXwG7/0ZYIA==\n-----END PRIVATE KEY-----"  # gitleaks:allow
                    client_email: example@example.iam.gserviceaccount.com
                    client_id: '536607742788781180419'
                    auth_uri: https://accounts.google.com/o/oauth2/auth
                    token_uri: https://oauth2.googleapis.com/token
                    auth_provider_x509_cert_url: https://www.googleapis.com/oauth2/v1/certs
                    client_x509_cert_url: https://www.googleapis.com/robot/v1/metadata/x509/example%40example.iam.gserviceaccount.com
              Add a simple credential:
                value:
                  id: my-simple-example
                  type: Simple
                  value: S3cretV@lu3#
      responses:
        '201':
          description: Success. The credential was added.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Location:
              $ref: '#/components/headers/NewObjectLocation'
            Content-Type:
              $ref: '#/components/headers/ContentType'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
    get:
      tags:
        - Credentials Management
      summary: Get Credentials
      description: Use this route to get information for stored credentials. ACTUAL CREDENTIAL VALUES ARE NOT RETURNED.
      operationId: getCredentials
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - in: query
          name: orderBy
          description: >
            Use to order the results. Must be in the form <b><i><property-name> [asc|desc]</i></b> where <i>property-name</i> can be
            either 'name' or 'createdAt'.
          schema:
            type: string
          examples:
            none:
              value: ''
              summary: No ordering
            nameAsc:
              value: name asc
              summary: Sort by name in ascending order
        - in: query
          name: name
          description:
            "Use to filter the results by credential name."
          schema:
            type: string
          examples:
            none:
              value: ''
              summary: No filtering
            name:
              summary: "Filter by name 'myCredentialName'"
              value: myCredentialName
        - in: query
          name: type
          description:
            "Use to filter the results by credential type. Must be in the form <b><i><credential-type></i></b>. where <b><i><credential-type></i></b> is a type retrieved from the 'credentials/filters' endpoint."
          schema:
            type: string
          examples:
            none:
              value: ''
              summary: No filtering
            azure:
              summary: "Filter by credential type 'Azure'"
              value: Azure
            aws:
              summary: "Filter by credential type 'Aws'"
              value: Aws
            gcp:
              summary: "Filter by credential type 'Gcp'"
              value: Gcp
            usernamePassword:
              summary: "Filter by credential type 'UsernamePassword'"
              value: UsernamePassword
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/ContinuationToken'
      responses:
        '200':
          description: Success. The requested credentials have been returned.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Content-Type:
              $ref: '#/components/headers/ContentType'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
            Expires:
              $ref: '#/components/headers/Expires'
            Vary:
              $ref: '#/components/headers/Vary'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialsPagedResult'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '406':
          $ref: '#/components/responses/406'
      security:
        - citrix_auth: []
  /credentials/filters:
    x-summary: Get possible filter values
    get:
      tags:
        - Credentials Management
      summary: Get filters options
      description: Use this route to get possible values to filter get all results by.
      operationId: credentialFilters
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
      responses:
        '200':
          description: Success. The requested filter values have been retrieved.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Content-Type:
              $ref: '#/components/headers/ContentType'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
            Vary:
              $ref: '#/components/headers/Vary'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Filters'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '406':
          $ref: '#/components/responses/406'
      security:
        - citrix_auth: []
  /credentials/{id}:
    x-summary: Credential Object
    put:
      tags:
        - Credentials Management
      summary: Update Credential
      description: Use this route to update the values for a specified credential.
      operationId: updateCredential
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - name: id
          in: path
          description: The Id of the credential.
          required: true
          schema:
            type: string
      requestBody:
        description: Credential values.
        required: true
        content:
          application/json:
            schema:
              type: object
              allOf:
                - type: object
                  properties:
                    name:
                      type: string
                      description: The display name of the credential.
                - oneOf:
                    - $ref: '#/components/schemas/UsernamePasswordCredentialFields'
                    - $ref: '#/components/schemas/AzureCredentialFields'
                    - $ref: '#/components/schemas/AwsCredentialFields'
                    - $ref: '#/components/schemas/GcpCredentialFields'
                    - $ref: '#/components/schemas/SimpleCredentialFields'
            examples:
              Update a username/password credential:
                value:
                  name: A new display name
                  username: myname@mycompany.com
                  password: MyP@ssw0rd
              Update a username/password credential with a domain:
                value:
                  name: A new display name
                  domain: my-domain
                  username: myname
                  password: MyP@ssw0rd
              Update an Azure credential:
                value:
                  tenantId: bd499e37-6156-4d6b-96f2-5d46be29a935
                  clientId: 816a9584-5f4b-4be1-9bd0-72114f8825bf
                  clientSecret: az-2w623wa#=
              Update an AWS credential:
                value:
                  keyId: YourKeyId
                  key: YourKey
              Update a GCP credential:
                value:
                  serviceAccountKey:
                    type: service_account
                    project_id: example
                    private_key_id: 3da8841f2f2c551e1e39b8f7b8910876a4a93951
                    private_key: "------BEGIN PRIVATE KEY-----\nMIIEpAIBAAKCAQEA6cdZ3R+JWZYQgXiYZ2nL+lqmEVbnVs/TJ6eeWi8UcCw45Ud+\n9Y8ef/RvQ0Dq4R8DRCNoSviLj2ur2imWvMf32OAjkN1C76Aq7pFXY/lx2ZSZuu8o\n9zLi36rVV0nge2FM3W+KNM+DXFXfUFZ56FwVvalsNv0GITaOs6ewEFhElGQpdGMl\nNr440w45XNGbmanBmnMo3a18PU9OOW0OWSj3P0lCE6/HAa7UXHd05WReXUM8W/y2\nrgPSnncRgT1jIIsm0eqnhuYelZkGqOfllG1nFXOBlI9piNDSi/YTxRKn6Fz07T3x\n8tLZPBqI5JGzqir95Mpuy1CJKUVJ+MKRv5YEnwIDAQABAoIBAQCJjUt5yRGGzb4+\nf9ekmWJ0lxu5fhm2QagrX/vTcnojGlILzgqMr74xaYCB4NOSzC2ezPqTijSLmb3P\nKsNPppVVXWRv21CEMAiywH/cCiyL6lyd2hSPhrhpBFps9sIHtpOEgxmdwy+2h6xS\n19748h20r9hFbpFJv5EtchAtPdJ0QG7yLuif7FIaRHuav4XVwOTYNwrTlC8OzcrY\nrdI1kmHKJPvQdI72gtKInfpkTJ0lK7/g5rnAk+pun6AOAWQiF/d1HfkRt0y23ZBd\nVX76+p+u+IXRBjKC2ZgxSYoPrVQZ3Zy4zwPREvjEbeIvhZNcb6tYRUQYF0qgvNlT\nFhuZ0KrRAoGBAP3jse8sr8n4RWEbWhtc1aWLuvIIP248IX4OnWzn5A2MrVP8p05Q\n7+bQ83YEFz7ucutoO/vAh4l4Bu9rIBDdNc4K2VSxCCbDxQfBbVAglUk9ighb7cNL\n8+rzepRm+u1yXCXb+4n+Lf3SrNebLuKksRGhlyKdotw6nQhp8+7J9luXAoGBAOu4\n265UU0pzM5x9zmmjHxkOV4hZCbzbtdvBaJVbb9E3gboSYijHQLyYDY8NwvBubev4\noN24Q6FAIUJjAljK25tbnziCBCNy7kiyDOozYIv7/G3FsXkIm6NWAL/2Qj6y1H2h\n+XKjDdufId97zYlXgxlme1Hg+jkeHXbZIfZuFWA5AoGAOGm5ha1mOfhiYhtTwDS2\nfBw6I8FVZscRohLZQ/OaprAVa03+VtaBF8Zh8l0iVSdifZAhk+TJuO/kippA+75L\nUEb0126mowZo5zpBccZrpWR5ITZb9EMSJaiIGiVvqAb7FqZ0k8rYqUeAhD/FATMa\n7RH8pQJlx412iwIP44UYqm0CgYEAtSUDFO3ScAUlpV38kKt9S2j9FVevJwYEtBLm\nRtjUjgfE1nQoIMQ2WHfU+5kMtG14ZX1USe6/chxxMq4ZcJi7uKDpM6iee4tn2E+T\noyrGR+zmaIkiwCtAR33g56Pb9ojAyKb/pfvtu1eH1VEzexbYNV3O6PYl9FzTMbDc\n655fKOkCgYAPEoNcAGKAFyLT5u+f0fTBdVdT+lHf2oy1d8x6ciMVq9jCpSLBl/Ox\nr7Fv/IHoVoOoLITi/UWlys9qjeA0uivb2y1jRC6pV3pWzXg+t22yS0dG/1wGa3el\nzDKO5HZRQmgybC4q8DCD0ww4d7yBCKOjN8Cuppna/1vyXwG7/0ZYIA==\n-----END PRIVATE KEY-----"  # gitleaks:allow
                    client_email: example@example.iam.gserviceaccount.com
                    client_id: '536607742788781180419'
                    auth_uri: https://accounts.google.com/o/oauth2/auth
                    token_uri: https://oauth2.googleapis.com/token
                    auth_provider_x509_cert_url: https://www.googleapis.com/oauth2/v1/certs
                    client_x509_cert_url: https://www.googleapis.com/robot/v1/metadata/x509/example%40example.iam.gserviceaccount.com
              Update a Simple credential:
                value:
                  name: A new display name
                  value: S3cretV@lu3#
      responses:
        '204':
          description: Success. The credential values have been updated.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Content-Type:
              $ref: '#/components/headers/ContentType'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Credential'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
    delete:
      tags:
        - Credentials Management
      summary: Delete Credential
      description: Use this route to remove a credential from the Citrix Credentials Wallet.
      operationId: deleteCredential
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - name: id
          in: path
          description: Id of the credential to delete.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success. The credential has been deleted.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Credential'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
      security:
        - citrix_auth: []
  /images/$convertToUefi:
    x-summary: Image Tasks
    post:
      tags:
        - Image Management
      summary: Convert Image Virtual Disk To UEFI Format
      description: >
        Use this route to initiate a job to convert a virtual disk from MBR/BIOS format to UEFI/GPT format.
        Use the route specified in the 'location' header in the response to track the progress of the job.
      operationId: ConvertImageToUefi
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - $ref: '#/components/parameters/AsyncOnly'
        - $ref: '#/components/parameters/DryRun'
      requestBody:
        description: Convert Image To UEFI Settings
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/ConvertImageToUefiOnAzureRequest'
                - $ref: '#/components/schemas/ConvertImageToUefiOnGcpRequest'
                - $ref: '#/components/schemas/ConvertImageToUefiOnVSphereRequest'
                - $ref: '#/components/schemas/ConvertImageToUefiOnXenRequest'
            examples:
              Convert an image to UEFI format on Azure:
                value:
                  platform: Azure
                  platformCredentialId: my-azure-credential
                  subscriptionId: 79df0fda-9612-46c8-9aea-dac44a3a7cf9
                  azureRegion: eastus
                  virtualNetworkResourceGroupName: my-ce-resource-group
                  virtualNetworkName: my-ce-virtual-network
                  virtualNetworkSubnetName: my-ce-subnet
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  inputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  inputImageFilename: win10-gold-image
                  inputImageFormat: VhdxDiskFormat
                  outputImageFilename: win10-gold-image-efi
              Convert an image to UEFI format on Google Cloud:
                value:
                  platform: Gcp
                  platformCredentialId: my-gcp-credential
                  prefix: test
                  vmName: citrix
                  zone: us-east4-a
                  vpcNetworkName: my-ce-virtual-network
                  vpcNetworkSubnetName: regions/us-east4/subnetworks/my-ce-subnet
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  inputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  inputImageFilename: win10-gold-image
                  inputImageFormat: VhdxDiskFormat
                  outputImageFilename: win10-gold-image-efi
              Convert an image to UEFI format on vSphere:
                value:
                  platform: vSphere
                  platformCredentialId: my-vsphere-credential-id
                  vCenterHost: my-vsphere-hostname.domain.net
                  vCenterPort: 443
                  vCenterSslFingerprint: 035F78412C62ED55206B7D424A78D2C4BD582DF6
                  datacenter: my-datacenter
                  datastore: my-datastore
                  cluster: my-cluster
                  network: my-ce-network
                  prefix: my-cejob
                  resourceLocationId: 09815329-ebcb-43b0-8b20-ba39a1ae7aa8
                  inputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  inputImageFilename: win10-gold-image
                  inputImageFormat: VhdxDiskFormat
                  outputImageFilename: win10-gold-image-efi
              Convert an image to UEFI format on Xen:
                value:
                  platform: Xen
                  platformCredentialId: my-xen-credential
                  prefix: test
                  host: xenserver.mycompany.com
                  xenSslFingerprint: 035F78412C62ED55206B7D424A78D2C4BD582DF6
                  storageRepositoryUuid: 93acfe81-acdc-38b1-9945-acef945663
                  network: test-network
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  inputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  inputImageFilename: win10-gold-image
                  inputImageFormat: VhdxDiskFormat
                  outputImageFilename: win10-gold-image-efi
      responses:
        '202':
          $ref: '#/components/responses/202_Job'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Credential'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
  /images/$export:
    x-summary: Image Tasks
    post:
      tags:
        - Image Management
      summary: Export Virtual Disk
      description: >
        Use this route to initiate the job to export a virtual disk image from the specified virtual platform.
        Use the route specified in the 'location' header in the response to track the progress of the job.
      operationId: exportImage
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - $ref: '#/components/parameters/AsyncOnly'
        - $ref: '#/components/parameters/DryRun'
      requestBody:
        description: Export Image Settings
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/ExportImageFromAhvRequest'
                - $ref: '#/components/schemas/ExportImageFromAwsRequest'
                - $ref: '#/components/schemas/ExportImageFromAzureRequest'
                - $ref: '#/components/schemas/ExportImageFromGcpRequest'
                - $ref: '#/components/schemas/ExportImageFromVSphereRequest'
                - $ref: '#/components/schemas/ExportImageFromXenRequest'
            examples:
              Export an image from vSphere:
                value:
                  platform: vSphere
                  platformCredentialId: my-vsphere-credential-id
                  vCenterHost: my-vsphere-hostname.domain.net
                  vCenterPort: 443
                  vCenterSslFingerprint: 035F78412C62ED55206B7D424A78D2C4BD582DF6
                  datacenter: my-datacenter
                  datastore: my-datastore
                  cluster: my-cluster
                  network: my-ce-network
                  prefix: my-cejob
                  resourceLocationId: 09815329-ebcb-43b0-8b20-ba39a1ae7aa8
                  outputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  outputImageFilename: my-exported-image
                  timeoutInSeconds: 3600
                  sourceDiskName: ds://vmfs/volumes/a4197f84-c7c46258/w10-gold-image.vmdk
              Export an image from Nutanix AHV:
                value:
                  platform: Ahv
                  platformCredentialId: my-ahv-credential-id
                  host: my-ahv-hostname.domain.net
                  port: 443
                  prismSslFingerprint: 035F78412C62ED55206B7D424A78D2C4BD582DF6
                  clusterUuid: 880fe4bc-e9c9-47ad-b972-466260f22dca
                  subnetUuid: 7c0f0b8a-f9e4-4a17-9057-5d85d9d20bdf
                  prefix: my-cejob
                  resourceLocationId: 09815329-ebcb-43b0-8b20-ba39a1ae7aa8
                  outputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  outputImageFilename: my-exported-image
                  timeoutInSeconds: 3600
                  sourceImageUuid: 20ff89bb-8af7-4d80-90c3-735051e2b6ab
              Export an image from Azure:
                value:
                  platform: Azure
                  platformCredentialId: my-azure-credential
                  subscriptionId: 79DF0FDA-9612-46C8-9AEA-DAC44A3A7CF9
                  azureRegion: eastus
                  virtualNetworkResourceGroupName: my-ce-resource-group
                  virtualNetworkName: my-ce-virtual-network
                  virtualNetworkSubnetName: my-ce-subnet
                  targetDiskResourceGroupName: my-targetdisk-resource-group
                  targetDiskName: engineering-gold-image
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  outputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  outputImageFilename: my-exported-image
                  outputImageFormat: VhdxDiskFormat
                  timeoutInSeconds: 3600
                  tags:
                    Tag1: Tag1
                    Tag2: Tag2
              Export an image from AWS:
                value:
                  platform: Aws
                  platformCredentialId: my-aws-credential-id
                  prefix: my-cejob
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  region: east-us-1
                  subnetId: subnet-6f78a3d19d90424fb
                  securityGroupIds: [sg-674bf731369d4d61a, sg-9e872fc8131e43298]
                  outputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  outputImageFilename: my-exported-image
                  volumeId: vol-0aa1d07ceb4c41301
                  tags:
                    Tag1: Tag1
                    Tag2: Tag2
              Export an image from Gcp:
                value:
                  platform: Gcp
                  platformCredentialId: my-gcp-credential
                  prefix: test
                  vmName: citrix
                  zone: us-east4-a
                  vpcNetworkName: my-ce-virtual-network
                  vpcNetworkSubnetName: regions/us-east4/subnetworks/my-ce-subnet
                  targetDiskName: engineering-gold-image
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  outputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  outputImageFilename: my-exported-image
                  outputImageFormat: VhdxDiskFormat
                  timeoutInSeconds: 3600
                  tags:
                    Tag1: Tag1
                    Tag2: Tag2
              Export an image from Xen:
                value:
                  platform: Xen
                  platformCredentialId: my-xen-credential
                  prefix: test
                  host: xenserver.mycompany.com
                  xenSslFingerprint: 035F78412C62ED55206B7D424A78D2C4BD582DF6
                  storageRepositoryUuid: 93acfe81-acdc-38b1-9945-acef945663
                  network: test-network
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  outputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  outputImageFilename: my-exported-image
                  outputImageFormat: VhdxDiskFormat
                  timeoutInSeconds: 3600
                  tags:
                    Tag1: Tag1
                    Tag2: Tag2
      responses:
        '202':
          $ref: '#/components/responses/202_Job'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
  /images/$publish:
    $ref: '#/paths/~1images~1%24export'
  /images/$prepare:
    x-summary: Image Tasks
    post:
      tags:
        - Image Management
      summary: Prepare Virtual Disk
      description: >
        Use this route to initiate the job to prepare a virtual disk image for use in the specified virtual platform.
        Use the route specified in the 'location' header in the response to track the progress of the job.
      operationId: prepareImage
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - $ref: '#/components/parameters/AsyncOnly'
        - $ref: '#/components/parameters/DryRun'
      requestBody:
        description: Prepare Image settings.
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/PrepareImageForAhvRequest'
                - $ref: '#/components/schemas/PrepareImageForAzureRequest'
                - $ref: '#/components/schemas/PrepareImageForAwsRequest'
                - $ref: '#/components/schemas/PrepareImageForGcpRequest'
                - $ref: '#/components/schemas/PrepareImageForVsphereRequest'
                - $ref: '#/components/schemas/PrepareImageForXenRequest'
            examples:
              Prepare an image for Azure:
                value:
                  platform: Azure
                  platformCredentialId: my-azure-credential
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  subscriptionId: 79df0fda-9612-46c8-9aea-dac44a3a7cf9
                  azureRegion: eastus
                  virtualNetworkResourceGroupName: my-ce-resource-group
                  virtualNetworkName: my-ce-virtual-network
                  virtualNetworkSubnetName: my-ce-subnet
                  provisioningType: Pvs
                  domainUnjoin: false
                  installMisa: false
                  forceMisa: false
                  installPvs: "2303"
                  installUpl: false
                  defrag: false
                  chkdsk: false
                  xdReconfigure:
                    - ParameterName: controllers
                      ParameterValue: ddc-controller-1-address.domain.net ddc-controller-2-address.domain.net
                  timeoutInSeconds: 3600
                  targetDiskResourceGroupName: my-targetdisk-resource-group
                  targetDiskName: engineering-gold-image
                  tags:
                    Tag1: Tag1
                    Tag2: Tag2
              Prepare an image for AWS:
                value:
                  platform: Aws
                  platformCredentialId: my-aws-credential
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  region: east-us-1
                  subnetId: subnet-6f78a3d19d90424fb
                  securityGroupIds: [sg-674bf731369d4d61a, sg-9e872fc8131e43298]
                  targetSnapshotId: snap-47f8e86d514548189
                  provisioningType: Mcs
                  createAMI: true
                  licenseType: BYOL
                  domainUnjoin: false
                  installMisa: true
                  forceMisa: false
                  installPvs: null
                  installUpl: false
                  defrag: false
                  chkdsk: false
                  xdReconfigure:
                    - ParameterName: controllers
                      ParameterValue: ddc-controller-1-address.domain.net ddc-controller-2-address.domain.net
                  tags:
                    Tag1: Tag1
                    Tag2: Tag2
              Prepare an image for Gcp:
                value:
                  platform: Gcp
                  platformCredentialId: my-gcp-credential
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  prefix: test
                  vmName: citrix
                  zone: us-east4-a
                  vpcNetworkName: my-ce-virtual-network
                  vpcNetworkSubnetName: regions/us-east4/subnetworks/my-ce-subnet
                  targetImageName: nov-20-test-image
                  provisioningType: Pvs
                  domainUnjoin: false
                  installMisa: false
                  forceMisa: false
                  installPvs: "2303"
                  installUpl: false
                  defrag: true
                  chkdsk: true
                  xdReconfigure:
                    - ParameterName: controllers
                      ParameterValue: ddc-controller-1-address.domain.net ddc-controller-2-address.domain.net
                  tags:
                    Tag1: Tag1
                    Tag2: Tag2
              Prepare an image for Nutanix AHV:
                value:
                  platform: Ahv
                  platformCredentialId: my-ahv-credential-id
                  host: my-ahv-hostname.domain.net
                  port: 443
                  prismSslFingerprint: 035F78412C62ED55206B7D424A78D2C4BD582DF6
                  clusterUuid: 880fe4bc-e9c9-47ad-b972-466260f22dca
                  subnetUuid: 7c0f0b8a-f9e4-4a17-9057-5d85d9d20bdf
                  prefix: my-cejob
                  sourceImageUuid: 20ff89bb-8af7-4d80-90c3-735051e2b6ab
                  outputImageName: prepared-image
                  resourceLocationId: 09815329-ebcb-43b0-8b20-ba39a1ae7aa8
                  provisioningType: Mcs
                  domainUnjoin: false
                  installMisa: false
                  forceMisa: true
                  installPvs: null
                  installUpl: false
                  defrag: false
                  chkdsk: false
                  xdReconfigure:
                    - ParameterName: controllers
                      ParameterValue: ddc-controller-1-address.domain.net ddc-controller-2-address.domain.net
              Prepare an image for VSphere:
                value:
                  platform: vSphere
                  platformCredentialId: my-vsphere-credential-id
                  vCenterHost: my-vsphere-hostname.domain.net
                  vCenterPort: 443
                  vCenterSslFingerprint: 035F78412C62ED55206B7D424A78D2C4BD582DF6
                  datacenter: my-datacenter
                  datastore: my-datastore
                  cluster: my-cluster
                  network: my-ce-network
                  prefix: my-cejob
                  resourceLocationId: 09815329-ebcb-43b0-8b20-ba39a1ae7aa8
                  targetImageName: nov-20-test-image
                  provisioningType: Mcs
                  domainUnjoin: false
                  installMisa: false
                  forceMisa: true
                  installPvs: null
                  installUpl: false
                  defrag: false
                  chkdsk: false
                  xdReconfigure:
                    - ParameterName: controllers
                      ParameterValue: ddc-controller-1-address.domain.net ddc-controller-2-address.domain.net
              Prepare an image for Xen:
                value:
                  platform: Xen
                  platformCredentialId: my-xen-credential
                  host: xenserver.mycompany.com
                  xenSslFingerprint: 035F78412C62ED55206B7D424A78D2C4BD582DF6
                  storageRepositoryUuid: 93acfe81-acdc-38b1-9945-acef945663
                  network: my-ce-network
                  prefix: my-cejob
                  resourceLocationId: 09815329-ebcb-43b0-8b20-ba39a1ae7aa8
                  targetDiskUuid: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  provisioningType: Mcs
                  domainUnjoin: false
                  installMisa: false
                  forceMisa: true
                  installPvs: null
                  installUpl: false
                  defrag: false
                  chkdsk: false
                  xdReconfigure:
                    - ParameterName: controllers
                      ParameterValue: ddc-controller-1-address.domain.net ddc-controller-2-address.domain.net
      responses:
        '202':
          $ref: '#/components/responses/202_Job'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
  /images/$prepareAndPublish:
    x-summary: Image Tasks
    post:
      tags:
        - Image Management
      summary: Prepare and Publish Virtual Disk
      description: >
        Use this route to initiate the job to prepare and publish a virtual disk image from the specified virtual platform.
        Use the route specified in the 'location' header in the response to track the progress of the job.
      operationId: prepareAndPublishImage
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - $ref: '#/components/parameters/AsyncOnly'
        - $ref: '#/components/parameters/DryRun'
      requestBody:
        description: Prepare and Publish Image settings.
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/PrepareAndPublishImageForAzureRequest'
                - $ref: '#/components/schemas/PrepareAndPublishImageForGcpRequest'
            examples:
              Prepare and Publish an image for Azure:
                value:
                  platform: Azure
                  platformCredentialId: my-azure-credential
                  subscriptionId: 79DF0FDA-9612-46C8-9AEA-DAC44A3A7CF9
                  azureRegion: eastus
                  virtualNetworkResourceGroupName: my-ce-resource-group
                  virtualNetworkName: my-ce-virtual-network
                  virtualNetworkSubnetName: my-ce-subnet
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  provisioningType: Pvs
                  domainUnjoin: false
                  installMisa: false
                  forceMisa: false
                  installPvs: "2303"
                  installUpl: false
                  defrag: false
                  chkdsk: false
                  xdReconfigure:
                    - ParameterName: controllers
                      ParameterValue: ddc-controller-1-address.domain.net ddc-controller-2-address.domain.net
                  outputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  outputImageFilename: my-exported-image
                  outputImageFormat: VhdxDiskFormat
                  timeoutInSeconds: 3600
                  targetDiskResourceGroupName: my-targetdisk-resource-group
                  targetDiskName: engineering-gold-image
                  tags:
                    Tag1: Tag1
                    Tag2: Tag2
              Prepare and Publish an image for Gcp:
                value:
                  platform: Gcp
                  platformCredentialId: my-gcp-credential
                  prefix: test
                  vmName: citrix
                  zone: us-east4-a
                  vpcNetworkName: my-ce-virtual-network
                  vpcNetworkSubnetName: regions/us-east4/subnetworks/my-ce-subnet
                  targetImageName: nov-20-test-image
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  provisioningType: Pvs
                  domainUnjoin: false
                  installMisa: false
                  forceMisa: false
                  installPvs: "2303"
                  installUpl: false
                  defrag: true
                  chkdsk: true
                  outputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  outputImageFilename: my-exported-image
                  outputImageFormat: VhdxDiskFormat
                  timeoutInSeconds: 3600
                  tags:
                    Tag1: Tag1
                    Tag2: Tag2
      responses:
        '202':
          $ref: '#/components/responses/202_Job'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
  /images/$reverseImage:
    x-summary: Image Tasks
    post:
      tags:
        - Image Management
      summary: Reverse Image Virtual Disk
      description: >
        Use this route to initiate a job to reverse image a virtual disk to the specified virtual platform.
        Use the route specified in the 'location' header in the response to track the progress of the job.
      operationId: reverseImage
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - $ref: '#/components/parameters/AsyncOnly'
        - $ref: '#/components/parameters/DryRun'
      requestBody:
        description: Reverse Image Settings
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/ReverseImageToVSphereRequest'
            examples:
              Reverse an image to vSphere:
                value:
                  platform: vSphere
                  platformCredentialId: my-vsphere-credential-id
                  vCenterHost: my-vsphere-hostname.domain.net
                  vCenterPort: 443
                  vCenterSslFingerprint: 035F78412C62ED55206B7D424A78D2C4BD582DF6
                  datacenter: my-datacenter
                  datastore: my-datastore
                  cluster: my-cluster
                  network: my-ce-network
                  prefix: my-cejob
                  resourceLocationId: 09815329-ebcb-43b0-8b20-ba39a1ae7aa8
                  inputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  inputImageFilename: win10-gold-image
                  inputImageFormat: VhdxDiskFormat
                  outputDiskName: "[datastore] w10-gold-image.vmdk"
                  outputSizeMb: 24576
      responses:
        '202':
          $ref: '#/components/responses/202_Job'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Credential'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
  /images/$upgradePvs:
    x-summary: Image Tasks
    post:
      tags:
        - Image Management
      summary: Upgrade PVS On Image Virtual Disk
      description: >
        Use this route to upgrade PVS on a virtual disk.
        Use the route specified in the 'location' header in the response to track the progress of the job.
      operationId: UpgradePvs
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - $ref: '#/components/parameters/AsyncOnly'
        - $ref: '#/components/parameters/DryRun'
      requestBody:
        description: Upgrade PVS Settings
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/UpgradePvsForVSphereRequest'
            examples:
              Upgrade PVS for vSphere:
                value:
                  platform: vSphere
                  platformCredentialId: my-vsphere-credential-id
                  vCenterHost: my-vsphere-hostname.domain.net
                  vCenterPort: 443
                  vCenterSslFingerprint: 035F78412C62ED55206B7D424A78D2C4BD582DF6
                  datacenter: my-datacenter
                  datastore: my-datastore
                  cluster: my-cluster
                  network: my-ce-network
                  prefix: my-cejob
                  resourceLocationId: 09815329-ebcb-43b0-8b20-ba39a1ae7aa8
                  inputStorageLocation:
                    location: smb://my-smbserver-hostname.domain.net/my-share-for-exporting-images/folder-name
                    credentialId: my-smb-credential-id
                  inputImageFilename: win10-gold-image
                  inputImageFormat: VhdxDiskFormat
                  outputImageFilename: win10-gold-image-efi
                  overwriteOutput: true
                  upgradeOptions:
                    installPvs: "7.39"
      responses:
        '202':
          $ref: '#/components/responses/202_Job'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Credential'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
  /images/$verify:
    x-summary: Image Tasks
    post:
      tags:
        - Image Management
      summary: Verify Virtual Disk
      description: >
        Use this route to initiate the job to verify a virtual disk image in the specified virtual platform. Use the
        route specified in the 'location' header in the response to track the progress of the job.
      operationId: verifyImage
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/ContentHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
      requestBody:
        description: Verify image settings.
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - $ref: '#/components/schemas/VerifyImageOnAzureRequest'
            examples:
              Verify an image on Azure:
                value:
                  platform: Azure
                  platformCredentialId: my-azure-credential
                  resourceLocationId: 74bbca93-d8b5-49a0-87c4-bfcd0f259fd7
                  version: '1.0'
                  data:
                    imageUri: /subscriptions/a874f769-0000-0000-0000-07e2452f83b8/resourceGroups/my-resource-group-name/providers/Microsoft.Compute/disks/my-virtual-disk-name.vhd
      responses:
        '202':
          $ref: '#/components/responses/202_Job'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
        '415':
          $ref: '#/components/responses/415'
      security:
        - citrix_auth: []
  /jobs:
    x-summary: Jobs Collection
    get:
      tags:
        - Job Management
      summary: Get Jobs
      description: Use this route to get a summary of all asynchronous jobs.
      operationId: getJobs
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - in: query
          name: orderBy
          description: "Use to order the results. Must be in the form <b><i><property-name> [asc|desc]</i></b> where <i>property-name</i> is one of 'status', 'type', 'overallProgressPercent', 'isCancellable', 'resultLocation', 'createdAt', 'updatedAt', 'startedAt' or 'endedAt'"
          schema:
            type: string
          examples:
            none:
              value: ''
              summary: No ordering
            startedAt:
              value: startedAt
              summary: Sort by the time the job was started
            endedAt:
              value: endedAt desc
              summary: Sort by the time the job ended with most recently ended first
        - in: query
          name: status
          description: "Filter results to only return jobs with the given status"
          schema:
            type: string
          examples:
            none:
              value: ''
              summary: No filtering
            inProgress:
              summary: Return jobs with status 'inProgress'
              value: inProgress
        - in: query
          name: type
          description: "Filter results to only return jobs of the given type"
          schema:
            type: string
          examples:
            none:
              value: ''
              summary: No filtering
            export:
              value: '?type=exportImage'
              summary: Return export jobs
        - in: query
          name: contextId
          description: "Filter results to only return jobs started with the given contextId"
          schema:
            type: string
          examples:
            none:
              value: ''
              summary: No filtering
            context:
              summary: Return jobs with contextId 'example-context-id'
              value: example-context-id
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/ContinuationToken'
      responses:
        '200':
          description: Success. The requested jobs have been retrieved.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Content-Type:
              $ref: '#/components/headers/ContentType'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
            Expires:
              $ref: '#/components/headers/Expires'
            Vary:
              $ref: '#/components/headers/Vary'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobsPagedResult'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '406':
          $ref: '#/components/responses/406'
      security:
        - citrix_auth: []
  /jobs/{jobId}:
    x-summary: Job Object
    get:
      tags:
        - Job Management
      summary: Get Job
      description: Use this route to get information about an asynchronous job.
      operationId: getJob
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - in: path
          name: jobId
          description: The Id of the job
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success. The requested job has been retrieved.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Content-Type:
              $ref: '#/components/headers/ContentType'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
            Vary:
              $ref: '#/components/headers/Vary'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Job'
        '406':
          $ref: '#/components/responses/406'
      security:
        - citrix_auth: []
    delete:
      tags:
        - Job Management
      summary: Delete Job
      description: Use this route to delete a job.
      operationId: deleteJob
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - in: path
          name: jobId
          description: The Id of the job
          required: true
          schema:
            type: string
        - in: query
          name: force
          description: Delete the job even if it is not in a terminal state.
          required: false
          schema:
            type: boolean
      responses:
        '204':
          description: Success. The job has been deleted.
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Job'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
      security:
        - citrix_auth: []
  /jobs/{jobId}/$cancel:
    x-summary: Cancel Job
    post:
      tags:
        - Job Management
      summary: Cancel Job
      description: Use this route to cancel an asynchronous job.
      operationId: cancelJob
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
        - $ref: '#/components/parameters/AcceptCharsetHeader'
        - $ref: '#/components/parameters/CitrixCustomerId'
        - $ref: '#/components/parameters/CitrixTransactionId'
        - $ref: '#/components/parameters/AsyncOnly'
        - in: path
          name: jobId
          description: The Id of the job.
          required: true
          schema:
            type: string
        - in: query
          name: force
          description: Use this to request forceful termination of a job in the cancelling state. It should only be used as a last resort when a job is hung cancelling. It has no effect on a job which is not in the cancelling state.
          required: false
          schema:
            type: boolean
      responses:
        '202':
          description: The job is being cancelled
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
            Location:
              $ref: '#/components/headers/JobUrl'
        '204':
          description: The job is cancelled
          headers:
            Citrix-TransactionId:
              $ref: '#/components/headers/CitrixTransactionId'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404Job'
        '406':
          $ref: '#/components/responses/406'
        '409':
          $ref: '#/components/responses/409'
      security:
        - citrix_auth: []
components:
  parameters:
    CitrixCustomerId:
      in: header
      name: Citrix-CustomerId
      description: The Citrix Cloud customer Id of the client.
      required: true
      schema:
        type: string
    CitrixCustomerId-Optional:
      in: header
      name: Citrix-CustomerId
      description: The Citrix Cloud customer Id of the client.
      required: false
      schema:
        type: string
    CitrixTransactionId:
      in: header
      name: Citrix-TransactionId
      description: A transaction Id to use throughout the processing of the request and any dependent requests.
      required: false
      schema:
        type: string
    AcceptHeader:
      in: header
      name: Accept
      description: This header is required, and must be set to 'application/json'.
      required: true
      schema:
        type: string
        enum:
          - application/json
    AcceptCharsetHeader:
      in: header
      name: Accept-Charset
      description: If this header is present, it must be set to 'utf-8'.
      required: false
      schema:
        type: string
    ContentHeader:
      in: header
      name: Content-Type
      description: This header is required, and must be set to 'application/json'.
      required: true
      schema:
        type: string
        enum:
          - application/json
    Limit:
      in: query
      name: limit
      description: Limit on the number of items to return. If not specified, the default of 100 is used.
      schema:
        type: integer
    ContinuationToken:
      in: query
      name: continuationToken
      description: Opaque value returned from a previous call. If specified, the request will return the next page of items. If omitted, the request will return the first page of items.
      schema:
        type: string
    AsyncOrSync:
      name: async
      in: query
      description: Use this to request asynchronous (true) or synchronous (false) operation.
      schema:
        type: boolean
      example:
        value: '?async=true'
    AsyncOnly:
      name: async
      in: query
      description: Use this to request asynchronous (true) or synchronous (false) operation. Currently only asynchronous operation is supported.
      schema:
        type: boolean
      example:
        value: '?async=true'
    DryRun:
      name: dryRun
      in: query
      description: Use this to request a dry run of the operation.
      schema:
        type: boolean
      example:
        value: '?dryRun=true'
  headers:
    NewObjectLocation:
      description: The relative URL of the resulting object.
      schema:
        type: string
    JobUrl:
      description: The URL of the resulting job that can be used to track its progress.
      schema:
        type: string
    CitrixTransactionId:
      description: A unique identifier which identifies the completed request. If this header was present on the request, then the response header will match. If this header was not specified on the request, then this will contain the identifier that was generated to track the request.
      schema:
        type: string
    ContentType:
      description: Will be set to 'application/json; charset=utf-8'.
      schema:
        type: string
    XContentTypeOptions:
      description: Will be set to 'nosniff'.
      schema:
        type: string
    CacheControl:
      schema:
        type: string
    Vary:
      schema:
        type: string
    ETag:
      schema:
        type: string
    LastModified:
      schema:
        type: string
    Expires:
      schema:
        type: string
  responses:
    '400':
      description: One or more of the properties are invalid.
      headers:
        Citrix-TransactionId:
          $ref: '#/components/headers/CitrixTransactionId'
        Content-Type:
          $ref: '#/components/headers/ContentType'
        X-Content-Type-Options:
          $ref: '#/components/headers/XContentTypeOptions'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: outOfRange
            detail: The value specified is not in the valid range
            parameters:
              - name: fieldName
                value: count
              - name: validRangeLow
                value: '0'
              - name: validRangeHigh
                value: '10'
    '401':
      description: Unauthorized. The bearer token passed is either invalid or expired.
      headers:
        Citrix-TransactionId:
          $ref: '#/components/headers/CitrixTransactionId'
        Content-Type:
          $ref: '#/components/headers/ContentType'
        X-Content-Type-Options:
          $ref: '#/components/headers/XContentTypeOptions'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: authentication
            detail: Missing or invalid authentication information.
            parameters:
              - name: reason
                value: invalid
    '403':
      description: The current user is not permitted to make this call.
      headers:
        Citrix-TransactionId:
          $ref: '#/components/headers/CitrixTransactionId'
        Content-Type:
          $ref: '#/components/headers/ContentType'
        X-Content-Type-Options:
          $ref: '#/components/headers/XContentTypeOptions'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: forbidden
            detail: Access denied
            parameters: []
    '404Configuration':
      description: The requested configuration was not found.
      headers:
        Citrix-TransactionId:
          $ref: '#/components/headers/CitrixTransactionId'
        Content-Type:
          $ref: '#/components/headers/ContentType'
        X-Content-Type-Options:
          $ref: '#/components/headers/XContentTypeOptions'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
        Vary:
          $ref: '#/components/headers/Vary'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: notFound
            detail: The resource was not found.
            parameters:
              - name: entityType
                value: configurationEntity
              - name: id
                value: 3f9772b4-11af-484d-99f0-972740ab1b63
    '404Credential':
      description: The requested credential was not found.
      headers:
        Citrix-TransactionId:
          $ref: '#/components/headers/CitrixTransactionId'
        Content-Type:
          $ref: '#/components/headers/ContentType'
        X-Content-Type-Options:
          $ref: '#/components/headers/XContentTypeOptions'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
        Vary:
          $ref: '#/components/headers/Vary'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: notFound
            detail: The resource was not found.
            parameters:
              - name: entityType
                value: credentialsReference
              - name: id
                value: my-credential-id
    '404Job':
      description: The requested job was not found.
      headers:
        Citrix-TransactionId:
          $ref: '#/components/headers/CitrixTransactionId'
        Content-Type:
          $ref: '#/components/headers/ContentType'
        X-Content-Type-Options:
          $ref: '#/components/headers/XContentTypeOptions'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
        Vary:
          $ref: '#/components/headers/Vary'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: notFound
            detail: The resource was not found.
            parameters:
              - name: entityType
                value: job
              - name: id
                value: 4a36ee5c-81bf-40de-bca2-5cac397a6635
    '406':
      description: Invalid 'Accept' or 'Accept-Charset' value.
      headers:
        Citrix-TransactionId:
          $ref: '#/components/headers/CitrixTransactionId'
        Content-Type:
          $ref: '#/components/headers/ContentType'
        X-Content-Type-Options:
          $ref: '#/components/headers/XContentTypeOptions'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: notAcceptable
            detail: The 'Accept' header must be specified and must be set to a valid
              media type and version, e.g. application/json
            parameters:
              - name: validMediaTypes
                value: application/json, application/*, */*
    '409':
      description: The operation cannot be performed due to a conflict in the state of the object or with other objects (i.e. uniqueness constraint, optimistic lock failure).
      headers:
        Citrix-TransactionId:
          $ref: '#/components/headers/CitrixTransactionId'
        Content-Type:
          $ref: '#/components/headers/ContentType'
        X-Content-Type-Options:
          $ref: '#/components/headers/XContentTypeOptions'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: optimisticConcurrency
            detail: The object was modified, please try your changes again
    '415':
      description: The content type must be 'application/json; charset=utf-8'
      headers:
        Citrix-TransactionId:
          $ref: '#/components/headers/CitrixTransactionId'
        Content-Type:
          $ref: '#/components/headers/ContentType'
        X-Content-Type-Options:
          $ref: '#/components/headers/XContentTypeOptions'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: unsupportedMediaType
            detail: "The 'ContentType' header must be specified and must indicate a valid media type and charset. For example: application/json;charset=utf-8"
            parameters:
              - name: validMediaTypes
                value: application/json
              - name: validCharsets
                value: utf-8
    202_Job:
      description: "The request has been accepted and is being handled. The 'location' header provides a URL for tracking the progress of this request."
      headers:
        Location:
          $ref: '#/components/headers/JobUrl'
        Citrix-TransactionId:
          $ref: '#/components/headers/CitrixTransactionId'
  schemas:
    ContinuationToken:
      description: "If there are more items to retrieve, this field will contain an opaque value that can be used to query the next page of items. If it is not present, then this is the last page of items."
      type: string
    NameValuePair:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
        value:
          type: string
    Filters:
      type: object
      properties:
        filterOne:
          type: array
          items:
            type: string
        filterTwo:
          type: array
          items:
            type: string
    xdReconfigureParameter:
      type: object
      required:
        - parameterName
      properties:
        parameterName:
          type: string
        parameterValue:
          type: string
    ErrorResponse:
      type: object
      required:
        - type
        - detail
      properties:
        type:
          type: string
        detail:
          type: string
        parameters:
          type: array
          items:
            $ref: '#/components/schemas/NameValuePair'
    SimpleCredentialFields:
      type: object
      properties:
        value:
          type: string
      required:
        - value
    UsernamePasswordCredentialFields:
      type: object
      properties:
        domain:
          type: string
        username:
          type: string
        password:
          type: string
      required:
        - username
        - password
    AzureCredentialFields:
      type: object
      properties:
        tenantId:
          type: string
        clientId:
          type: string
        clientSecret:
          type: string
      required:
        - tenantId
        - clientId
        - clientSecret
    AwsCredentialFields:
      type: object
      properties:
        keyId:
          type: string
          description: AWS access key id
        key:
          type: string
          description: AWS secret access key
        sessionToken:
          type: string
          description: AWS temporary credential session token
      required:
        - keyId
        - key
    GcpCredentialFields:
      type: object
      properties:
        serviceAccountKey:
          type: object
      required:
        - serviceAccountKey
    CreateSmbConfigurationRequest:
      type: object
      properties:
        type:
          type: string
          description: The type of configuration. Must be set to SmbConfiguration
        description:
          type: string
        hostname:
          type: string
        sharename:
          type: string
        resourceLocationId:
          type: object
        credentialId:
          type: string
      required:
        - type
        - hostname
        - sharename
        - credentialId
        - resourceLocationId
    CreateSmbConfigurationRequestWithCredentialCreation:
      type: object
      allOf:
        - $ref: '#/components/schemas/CreateSmbConfigurationRequest'
      properties:
        CredentialName:
          type: string
        CredentialType:
          type: string
        CredentialValues:
          type: object
    CreateSimpleCredentialRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/CreateCredentialCommonFields'
        - $ref: '#/components/schemas/SimpleCredentialFields'
      properties:
        type:
          description: The type of credential. Must be set to 'Simple'.
    CreateUsernamePasswordCredentialRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/CreateCredentialCommonFields'
        - $ref: '#/components/schemas/UsernamePasswordCredentialFields'
      properties:
        type:
          description: The type of credential. Must be set to 'UsernamePassword'.
    CreateAzureCredentialRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/CreateCredentialCommonFields'
        - $ref: '#/components/schemas/AzureCredentialFields'
      properties:
        type:
          description: The type of credential. Must be set to 'Azure'.
    CreateAwsCredentialRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/CreateCredentialCommonFields'
        - $ref: '#/components/schemas/AwsCredentialFields'
      properties:
        type:
          description: The type of credential. Must be set to 'Aws'.
    CreateGcpCredentialRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/CreateCredentialCommonFields'
        - $ref: '#/components/schemas/GcpCredentialFields'
      properties:
        type:
          description: The type of credential. Must be set to 'Gcp'.
    CredentialResponse:
      type: object
      properties:
        id:
          type: string
          description: The Id to use when referencing this credential in other API calls.
        name:
          type: string
        type:
          type: string
          description: Set to the type of credential stored.
        state:
          type: string
          description: Set to 'Ok' if the values are present in the Citrix Credentials Wallet. Set to 'Missing' if the values are no longer present in the Citrix Credentials Wallet.
        createdAt:
          type: string
          format: dateTime
          pattern: /^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})Z$/
          description: This field will indicate when the credential was created.
        updatedAt:
          type: string
          format: dateTime
          pattern: /^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})Z$/
          description: This field will indicate when the last update to the credential occurred.
    ConfigurationResponse:
      type: object
      properties:
        id:
          type: string
          description: The Id to use when referencing this configuration in other API calls.
        description:
          type: string
        createdAt:
          type: string
          format: dateTime
          pattern: /^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})Z$/
          description: This field will indicate when the configuration was created.
        updatedAt:
          type: string
          format: dateTime
          pattern: /^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})Z$/
          description: This field will indicate when the last update to the configuration occurred.
    SmbConfigurationResponse:
      type: object
      allOf:
        - $ref: '#/components/schemas/ConfigurationResponse'
      properties:
        ResourceLocationId:
          type: string
        Hostname:
          type: string
        Sharename:
          type: string
        CredentialId:
          type: string
        DeleteCredential:
          type: boolean
    CredentialsPagedResult:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/CredentialResponse'
        pageSize:
          type: integer
        continuationToken:
          $ref: '#/components/schemas/ContinuationToken'
    ConfigurationsPagedResult:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ConfigurationResponse'
        pageSize:
          type: integer
        continuationToken:
          $ref: '#/components/schemas/ContinuationToken'
    SmbConfigurationsPagedResult:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/SmbConfigurationResponse'
        pageSize:
          type: integer
        continuationToken:
          $ref: '#/components/schemas/ContinuationToken'
    CreateCredentialCommonFields:
      type: object
      properties:
        id:
          type: string
          pattern: /^[A-Za-z]+[\w-_]*[\w]+$/
          description: The id will be used to generate the credential.
        name:
          type: string
          description: The display name of the generated credential.
        type:
          type: string
          description: The type of credentials to store. Must be one of 'Simple', 'UsernamePassword', 'Azure', 'Aws' or 'Gcp'.
      required:
        - id
        - type
    SmbStorageIn:
      type: object
      properties:
        location:
          type: string
          description: The uri of the SMB storage server where the input image file is stored.
        credentialId:
          type: string
          description: The credential Id for the storage. For 'Smb', the credential must be a 'UsernamePassword' type.
      required:
        - location
        - credentialId
    SmbStorageOut:
      type: object
      properties:
        location:
          type: string
          description: The uri of the SMB storage server where the output image file will be stored.
        credentialId:
          type: string
          description: The credential Id for the storage. For 'Smb', the credential must be a 'UsernamePassword' type.
      required:
        - location
        - credentialId
    SmbStorageInOut:
      type: object
      properties:
        location:
          type: string
          description: The uri of the SMB storage server where the input image file is stored, and where the output image file will be stored.
        credentialId:
          type: string
          description: The credential Id for the storage. For 'Smb', the credential must be a 'UsernamePassword' type.
      required:
        - location
        - credentialId
    VSpherePlatform:
      type: object
      properties:
        platform:
          type: string
          description: The virtual infrastructure platform. This must be set to 'vSphere'.
        platformCredentialId:
          type: string
          description: The credential Id returned from the 'credentials' API for the credentials needed to access the virtual platform. These credentials must be of type 'UsernamePassword'. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        hypervisorConnectionId:
          type: string
          description: The ID of a hypervisor connection object to obtain connection details from - intended for Citrix internal use. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        vCenterHost:
          type: string
          description: The host address where the vSphere APIs can be called.
        vCenterPort:
          type: integer
          description: The port to use for vSphere API calls. Defaults to port 443.
        vCenterSslCaCertificate:
          type: string
          description: A SSL root CA certificate to use in verifying the vCenter host certificate in vSphere API calls. This is only necessary when the VCenter host certificate isn't signed by a recognized authority. This may be the case for example when it was issued by a VMware Certificate Authority (VMCA). The certificate value must be in PEM format as a single-line string with newlines escaped.
        vCenterSslFingerprint:
          type: string
          description: The fingerprint/thumbprint of the vCenter host certificate in vSphere API calls. This is used as an alternative method of host verification and if supplied will be done instead of certicicate validation.
        vCenterSslNoCheckHostname:
          type: boolean
          description: Use this to disable SSL certificate hostname checking in vSphere API calls.
      required:
        - platform
        - vCenterHost
    VSphereCeSpec:
      type: object
      properties:
        datacenter:
          type: string
          description: The datacenter where all resources for the job reside.
        datastore:
          type: string
          description: The datastore to use for all storage requirements for the compositing engine VM.
        cluster:
          type: string
          description: The cluster to use for the compositing engine VM compute resources. One of 'cluster' or 'hostSystem' should be specified.
        hostSystem:
          type: string
          description: The host system to use for the compositing engine VM compute resources. One of 'cluster' or 'hostSystem' should be specified.
        resourcePoolName:
          type: string
          description: The resource pool to use for the compositing engine VM compute resources. If unspecified and a cluster or host system is supplied the root resource pool for the cluster or host system will be used. If unspecified and no cluster or host system is supplied the first resource pool named 'Resources' found in the datacenter will be used.
        network:
          type: string
          description: The name of the virtual network or distributed port group to attach the compositing engine VM to. This network must enable connectivity between the compositing engine VM and the connector appliances.
        memoryMb:
          type: integer
          description: The amount of memory, in megabytes, to assign to the compositing engine VM. The default is 2048.
        cpus:
          type: integer
          description: The number of CPUs to assign to the compositing engine VM. The default is 2.
        prefix:
          type: string
          description: A prefix for the name of the virtual machine created during the job. The default is 'ce'.
      required:
        - datacenter
        - datastore
        - network
    AzurePlatform:
      type: object
      properties:
        platform:
          type: string
          description: The virtual infrastructure platform. This must be set to 'Azure'.
        platformCredentialId:
          type: string
          description: The credential Id returned from the 'credentials' API for the credentials needed to access the virtual platform. These credentials must be of type 'Azure'. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        hypervisorConnectionId:
          type: string
          description: The ID of a hypervisor connection object to obtain connection details from - intended for Citrix internal use. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        subscriptionId:
          type: string
          description: The Azure subscription Id to use for all operations.
        networkIsolation:
          type: boolean
          description: Controls the network isolation of the compositing engine VM. If not set, the Image Portability Service (IPS) will network isolate the compositing engine VM if the user has the Azure permissions required for creating network security groups. If set to false, IPS won't network isolate the compositing engine VM. If set to true, IPS will network isolate the compositing engine VM and the job will fail if the user doesn't have the required permissions.
        prefix:
          type: string
          description: A prefix for the name of the virtual machine created during the job. The default is 'ce'.
      required:
        - platform
        - subscriptionId
    AzureRequestFields:
      type: object
      properties:
        targetDiskResourceGroupName:
          type: string
          description: The name of the Azure resource group containing the managed disk.
        targetDiskName:
          type: string
          description: The name of the managed disk in Azure. The request must include either 'targetDiskName' or 'targetSnapshotName', but cannot contain both.
        targetSnapshotName:
          type: string
          description: The name of the snapshot in Azure. The request must include either 'targetDiskName' or 'targetSnapshotName', but cannot contain both.
        tags:
          type: object
          description: A dictionary of tags to apply to resources that are created by the job.
      required:
        - targetDiskResourceGroupName
    AzureRegion:
      type: object
      properties:
        azureRegion:
          type: string
          description: The Azure region to place the compositing engine VM in.
      required:
        - azureRegion
    AzureResourceGroup:
      type: object
      properties:
        resourceGroup:
          type: string
          description: The Azure resource group to place the compositing engine VM in.
      required:
        - resourceGroup
    AzureCeSpec:
      type: object
      oneOf:
        - $ref: '#/components/schemas/AzureRegion'
        - $ref: '#/components/schemas/AzureResourceGroup'
      properties:
        virtualNetworkResourceGroupName:
          type: string
          description: The name of the resource group containing the virtual network that the compositing engine VM will be attached to.
        virtualNetworkName:
          type: string
          description: The name of the virtual network that the compositing engine VM will be attached to.
        virtualNetworkSubnetName:
          type: string
          description: The name of the virtual network subnet that the compositing engine VM will be attached to.
      required:
        - virtualNetworkResourceGroupName
        - virtualNetworkName
        - virtualNetworkSubnetName
    AwsPlatform:
      type: object
      properties:
        platform:
          type: string
          description: The virtual infrastructure platform. This must be set to 'Aws'.
        platformCredentialId:
          type: string
          description: The credential Id returned from the 'credentials' API for the credentials needed to access the virtual platform. These credentials must be of type 'Aws'. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        hypervisorConnectionId:
          type: string
          description: The ID of a hypervisor connection object to obtain connection details from - intended for Citrix internal use. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
      required:
        - platform
    AwsRequestFields:
      type: object
      properties:
        tags:
          type: object
          description: A dictionary of tags to apply to resources that are created by the job.
    AwsCeSpec:
      type: object
      properties:
        region:
          type: string
          description: The region that the compositing engine instance will be created in.
        subnetId:
          type: string
          description: The id of the subnet that the compositing engine instance will be attached to.
        securityGroupIds:
          type: array
          description: List of the ids of the security groups to attach to the compositing engine instance.
          items:
            type: string
      required:
        - region
        - subnetId
    ResourceLocationId:
      type: object
      properties:
        resourceLocationId:
          type: string
          description: The resource location Id of the resources used for the job. This must be the resource location Id of the Citrix Connector Appliances that will be used to communicate with the resources.
      required:
        - resourceLocationId
    OverwriteTargetFile:
      type: object
      properties:
        overwriteTargetFile:
          type: boolean
          description: If this is set to true then the target file will be overwritten if it exists. If it is false then the job will fail if the file exists. Defaults to false.
    BaseImageFields:
      type: object
      allOf:
        - $ref: '#/components/schemas/ResourceLocationId'
      properties:
        timeoutInSeconds:
          type: integer
          description: This will default to 7200 (2 hours).
    ConvertImageToUefiFields:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseImageFields'
      properties:
        inputStorageLocation:
          $ref: '#/components/schemas/SmbStorageInOut'
        inputImageFilename:
          type: string
          description: The filename of the virtual disk to be converted.
        inputImageFormat:
          type: string
          description: >
            The disk format of the virtual disk to be converted. Must be one of 'VhdDiskFormat' or 'VhdxDiskFormat'. Defaults
            to 'VhdDiskFormat'.
        outputImageFilename:
          type: string
          description: The filename to use for the virtual differencing disk that will be written to the storage location.
        overwriteOutput:
          type: boolean
          description: >
            If this is set to true then the output disk will be overwritten if it exists. If it is false then the job will
            fail if the output disk exists. Defaults to false.
      required:
        - inputStorageLocation
        - inputImageFilename
        - outputImageFilename
    ConvertImageToUefiOnAzureRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/AzurePlatform'
        - $ref: '#/components/schemas/AzureCeSpec'
        - $ref: '#/components/schemas/ConvertImageToUefiFields'
    ConvertImageToUefiOnGcpRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/GcpPlatform'
        - $ref: '#/components/schemas/GcpCeSpec'
        - $ref: '#/components/schemas/ConvertImageToUefiFields'
    ConvertImageToUefiOnVSphereRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/VSpherePlatform'
        - $ref: '#/components/schemas/VSphereCeSpec'
        - $ref: '#/components/schemas/ConvertImageToUefiFields'
    ConvertImageToUefiOnXenRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/XenPlatform'
        - $ref: '#/components/schemas/XenCeSpec'
        - $ref: '#/components/schemas/ConvertImageToUefiFields'
    ExportImageUniqueFields:
      type: object
      properties:
        outputStorageLocation:
          $ref: '#/components/schemas/SmbStorageOut'
        outputImageFilename:
          type: string
          description: The filename to use for the virtual disk that will be written to the storage location.
        outputImageFormat:
          type: string
          description: The disk format to write the virtual disk in. Must be one of 'VhdDiskFormat' or 'VhdxDiskFormat'. Defaults to 'VhdDiskFormat'.
        provisionType:
          type: string
          description: Specifies whether to write the virtual disk in fixed or dynamic form. Must be one of 'Thick' (fixed) or 'Thin' (dynamic). Defaults to 'Thick'.
        hashDisk:
          type: boolean
          description: If true, the image will be hashed before exporting and the hash will be returned in the job results.
      required:
        - outputStorageLocation
        - outputImageFilename
    ExportImageFields:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseImageFields'
        - $ref: '#/components/schemas/ExportImageUniqueFields'
        - $ref: '#/components/schemas/OverwriteTargetFile'
    ExportImageFromAhvRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/AhvPlatform'
        - $ref: '#/components/schemas/AhvCeSpec'
        - $ref: '#/components/schemas/ExportImageFields'
        - $ref: '#/components/schemas/AhvExportAndPrepareRequestFields'
    ExportImageFromAwsRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/AwsPlatform'
        - $ref: '#/components/schemas/AwsCeSpec'
        - $ref: '#/components/schemas/ExportImageFields'
        - $ref: '#/components/schemas/AwsRequestFields'
      properties:
        volumeId:
          type: string
          description: The id of the EC2 EBS volume to export.
      required:
        - volumeId
    ExportImageFromAzureRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/AzurePlatform'
        - $ref: '#/components/schemas/AzureCeSpec'
        - $ref: '#/components/schemas/ExportImageFields'
        - $ref: '#/components/schemas/AzureRequestFields'
    ExportImageFromGcpRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/GcpPlatform'
        - $ref: '#/components/schemas/GcpCeSpec'
        - $ref: '#/components/schemas/ExportImageFields'
        - $ref: '#/components/schemas/GcpExportRequestFields'
    ExportImageFromVSphereRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/VSpherePlatform'
        - $ref: '#/components/schemas/VSphereCeSpec'
        - $ref: '#/components/schemas/ExportImageFields'
      properties:
        sourceDiskName:
          type: string
          description: The datastore path to the virtual disk that is to be exported (e.g.
            ds://vmfs/volumes/a4197f84-c7c46258/w10-gold-image.vmdk).
      required:
        - sourceDiskName
    ExportImageFromXenRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/XenPlatform'
        - $ref: '#/components/schemas/XenCeSpec'
        - $ref: '#/components/schemas/ExportImageFields'
        - $ref: '#/components/schemas/XenExportRequestFields'
    ReverseImageToVSphereRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/VSpherePlatform'
        - $ref: '#/components/schemas/VSphereCeSpec'
        - $ref: '#/components/schemas/ReverseImageFields'
      properties:
        outputDiskName:
          type: string
          description: The datastore path to the virtual disk that the reverse image is to be written to (e.g.
            'ds://vmfs/volumes/a4197f84-c7c46258/w10-gold-image.vmdk' or '[datastore] w10-gold-image.vmdk').
      required:
        - outputDiskName
    ReverseImageFields:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseImageFields'
        - $ref: '#/components/schemas/ReverseImageUniqueFields'
    ReverseImageUniqueFields:
      type: object
      properties:
        inputStorageLocation:
          $ref: '#/components/schemas/SmbStorageIn'
        inputImageFilename:
          type: string
          description: The filename, in the input storage location, of the virtual disk that is to be reverse imaged.
        inputImageFormat:
          type: string
          description: The disk format of the input image virtual disk. Must be one of 'VhdDiskFormat' or 'VhdxDiskFormat'.
        outputSizeInMb:
          type: integer
          description: The size to use for the output disk in MiB. Must be equal to or larger than the virtual size of the input image.
        overwriteOutput:
          type: boolean
          description: If this is set to true then the output disk will be overwritten if it exists. If it is false then the job will fail if the output disk exists. Defaults to false.
      required:
        - inputStorageLocation
        - inputImageFilename
        - inputImageFormat
        - outputSizeInMb
    PrepareImageUniqueFields:
      type: object
      properties:
        provisioningType:
          type: string
          description: Specifies the type of provisioning service to prepare the image for. Must be one of 'Mcs' (Machine Catalog Services) or 'Pvs' (Provisioning Services). Defaults to 'Mcs'.
        xdReconfigure:
          description: Specifies options for reconfiguring the VDA during prepare. If provided, 'XenDesktopVdaSetup.exe /reconfigure' will be run with the specified options. Acceptable options are 'controllers', 'portnumber', and 'enable_hdx_ports'.
          type: array
          items:
            $ref: '#/components/schemas/xdReconfigureParameter'
        domainUnjoin:
          type: boolean
          description: If this is set to true, then the image will be unjoined from any domain it is joined to.
        installMisa:
          type: boolean
          description: If this is set to true, then prepare operation will install the Machine Identity Service Agent of the installed VDA version.
        forceMisa:
          type: boolean
          description: If this is set to true, then prepare operation will ignore the installed VDA version and always install the latest Machine Identity Service Agent.
        installPvs:
          type: string
          description: If set with a PVS version, the PVS device driver from that version will be installed into the target image.
        updateLayerRepo:
          type: string
          description: If set with a URL, the AppLayering layer repository URL in the image will be updated.
        installUpl:
          type: boolean
          description: If this is set to true, then the prepare operation will install the latest version of the User Personalization Layer.
        defrag:
          type: boolean
          description: If this is set to true, then the prepare operation will run the Windows utility Defrag against the target disk.
        chkdsk:
          type: boolean
          description: If this is set to true, then the prepare operation will run the Windows utility chkdsk against the target disk.
        md5Hash:
          type: string
          description: If set with a md5Hash, then the prepare operation will compute the md5 hash of the target disk before operating on it and compare to the supplied hash. The job will fail if the hashes do not match.
    PrepareImageFields:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseImageFields'
        - $ref: '#/components/schemas/PrepareImageUniqueFields'
    PrepareImageForAhvRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/AhvPlatform'
        - $ref: '#/components/schemas/AhvCeSpec'
        - $ref: '#/components/schemas/PrepareImageFields'
        - $ref: '#/components/schemas/AhvExportAndPrepareRequestFields'
      properties:
        outputImageName:
            type: string
            description: If set, then this name will be given to the prepared image otherwise the image is created with a name chosen by the system.
    PrepareImageForAzureRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/AzurePlatform'
        - $ref: '#/components/schemas/AzureCeSpec'
        - $ref: '#/components/schemas/PrepareImageFields'
        - $ref: '#/components/schemas/OverwriteTargetFile'
        - $ref: '#/components/schemas/AzureRequestFields'
      properties:
        outputDiskName:
            type: string
            description: If set, then a managed disk will be created with this name. The request can include either 'outputDiskName' or 'outputSnapshotName', but cannot contain both. If neither is specified, a managed disk is created with a name chosen by the system.
        outputSnapshotName:
            type: string
            description: If set, then a snapshot will be created with this name. The request can include either 'outputDiskName' or 'outputSnapshotName', but cannot contain both. If neither is specified, a managed disk is created with a name chosen by the system.
    PrepareImageForAwsRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/AwsPlatform'
        - $ref: '#/components/schemas/AwsCeSpec'
        - $ref: '#/components/schemas/PrepareImageFields'
        - $ref: '#/components/schemas/AwsRequestFields'
      properties:
        targetSnapshotId:
          type: string
          description: The id of the target EC2 snapshot.
        createAMI:
          type: boolean
          description: If this is set to true, then the job output will be an AMI created by importing the prepared image, otherwise the job output will be an EC2 EBS volume containing the prepared image. See the AWS [VM Import/Export User Guide](https://docs.aws.amazon.com/vm-import/latest/userguide/what-is-vmimport.html) for the AWS requirements for image import.
        licenseType:
          type: string
          description: The type of license to use for the AMI when `createAMI` is set to true. Must be one of 'BYOL' or 'AMI'. If unspecified then AWS import will deduce the license type. See [Licensing options](https://docs.aws.amazon.com/vm-import/latest/userguide/licensing.html) in the AWS _VM Import/Export User Guide_.
        roleName:
          type: string
          description: The role to use for VM import when `createAMI` is set to true. If unspecified then AWS import will use the role 'vmimport'. See [Required service role](https://docs.aws.amazon.com/vm-import/latest/userguide/required-permissions.html#vmimport-role) in the AWS _VM Import/Export User Guide_.
      required:
        - targetSnapshotId
    PrepareImageForGcpRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/GcpPlatform'
        - $ref: '#/components/schemas/GcpCeSpec'
        - $ref: '#/components/schemas/PrepareImageFields'
        - $ref: '#/components/schemas/OverwriteTargetFile'
        - $ref: '#/components/schemas/GcpRequestFields'
      properties:
        outputDiskName:
            type: string
            description: If set, then the disk will be created under this name.
    PrepareImageForVsphereRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/VSpherePlatform'
        - $ref: '#/components/schemas/VSphereCeSpec'
        - $ref: '#/components/schemas/OverwriteTargetFile'
        - $ref: '#/components/schemas/PrepareImageFields'
      properties:
        targetDiskName:
          type: string
          description: The datastore path to the virtual disk that is to be prepared (e.g.
            ds://vmfs/volumes/a4197f84-c7c46258/w10-gold-image.vmdk).
      required:
        - targetDiskName
    PrepareImageForXenRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/XenPlatform'
        - $ref: '#/components/schemas/XenCeSpec'
        - $ref: '#/components/schemas/PrepareImageFields'
        - $ref: '#/components/schemas/XenPrepareRequestFields'
    PrepareAndPublishImageFields:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseImageFields'
        - $ref: '#/components/schemas/PrepareImageUniqueFields'
        - $ref: '#/components/schemas/ExportImageUniqueFields'
        - $ref: '#/components/schemas/OverwriteTargetFile'
    PrepareAndPublishImageForAzureRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/AzurePlatform'
        - $ref: '#/components/schemas/AzureCeSpec'
        - $ref: '#/components/schemas/PrepareAndPublishImageFields'
        - $ref: '#/components/schemas/AzureRequestFields'
    PrepareAndPublishImageForGcpRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/GcpPlatform'
        - $ref: '#/components/schemas/GcpCeSpec'
        - $ref: '#/components/schemas/PrepareAndPublishImageFields'
        - $ref: '#/components/schemas/GcpRequestFields'
    UpgradePvsUniqueFields:
      type: object
      properties:
        inputStorageLocation:
          $ref: '#/components/schemas/SmbStorageInOut'
        inputImageFilename:
          type: string
          description: The filename, in the input storage location, of the virtual disk that is to be upgraded.
        inputImageFormat:
          type: string
          description: The disk format of the input image virtual disk. Must be one of 'VhdDiskFormat' or 'VhdxDiskFormat'.
        outputImageFilename:
          type: string
          description: The filename to use for the virtual differencing disk that will be written to the storage location.
        outputSizeInMb:
          type: integer
          description: The size to use for the output disk in MiB. Must be equal to or larger than the virtual size of the input image.
        overwriteOutput:
          type: boolean
          description: >
            If this is set to true then the output disk will be overwritten if it exists. If it is false then the job
            will fail if the output disk exists. Defaults to false.
      required:
        - inputStorageLocation
        - inputImageFilename
        - inputImageFormat
        - outputImageFilename
        - outputSizeInMb
    UpgradePvsFields:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseImageFields'
        - $ref: '#/components/schemas/UpgradePvsUniqueFields'
    UpgradePvsForVSphereRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/VSpherePlatform'
        - $ref: '#/components/schemas/VSphereCeSpec'
        - $ref: '#/components/schemas/UpgradePvsFields'
    VerifyImageOnAzureRequest:
      type: object
      properties:
        platform:
          type: string
          description: The virtual infrastructure platform. This must be set to 'Azure'.
        platformCredentialId:
          type: string
          description: The credential Id returned from the 'credentials' API for the credentials needed to access the virtual platform. These credentials must be of type 'Azure'.
        resourceLocationId:
          $ref: '#/components/schemas/ResourceLocationId'
        version:
          type: string
          description: The compatibility version. Now '1.0' is the only supported version.
        data:
          type: object
          description: The dictionary (object) of key-value pairs describing what is to be verified.
          properties:
            imageUri:
              type: string
              description: The image resource URI on Azure
          required:
            - imageUri
      required:
        - platform
        - platformCredentialId
        - resourceLocationId
        - version
        - data
    GcpPlatform:
      type: object
      properties:
        platform:
          type: string
          description: The virtual infrastructure platform. This must be set to 'Gcp'.
        platformCredentialId:
          type: string
          description: The credential Id returned from the 'credentials' API for the credentials needed to access the virtual platform. These credentials must be of type 'Gcp'. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        hypervisorConnectionId:
          type: string
          description: The ID of a hypervisor connection object to obtain connection details from - intended for Citrix internal use. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        prefix:
          type: string
          description: A prefix for the name of the virtual machine created during the job. The default is 'ce'.
      required:
        - platform
    GcpRequestFields:
      type: object
      properties:
        targetImageName:
          type: string
          description: The name of the image in Gcp.
        tags:
          type: object
          description: A dictionary of tags to apply to resources that are created by the job.
      required:
        - targetImageName
    GcpExportRequestFields:
      type: object
      properties:
        targetDiskName:
          type: string
          description: The name of the disk in Gcp.
        tags:
          type: object
          description: A dictionary of tags to apply to resources that are created by the job.
      required:
        - targetDiskName
    GcpCeSpec:
      type: object
      properties:
        zone:
          type: string
          description: The Google Cloud zone to place the compositing engine VM in.
        vpcNetworkName:
          type: string
          description: The name of the VPC Network to attach the Compositing Engine to.
        vpcNetworkSubnetName:
          type: string
          description: The name of the VPC Subnet within the VPC Network to attach the Compositing Engine to. Not required for Auto Mode VPC networks.
        networkTags:
          description: The names of network tags to add to the compositing engine VM instance. Note that IPS always adds the tag "compositing-engine" to the instance. This can be used as an aid in applying firewall rules to the instance.
          type: array
          items:
            type: string
      required:
        - zone
        - vpcNetworkName
    AhvPlatform:
      type: object
      properties:
        platform:
          type: string
          description: The virtual infrastructure platform. This must be set to 'Ahv'.
        platformCredentialId:
          type: string
          description: The credential Id returned from the 'credentials' API for the credentials needed to access the virtual platform. These credentials must be of type 'UsernamePassword'. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        hypervisorConnectionId:
          type: string
          description: The ID of a hypervisor connection object to obtain connection details from - intended for Citrix internal use. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        prefix:
          type: string
          description: A prefix for the name of the virtual machine created during the job. The default is 'ce'.
      required:
        - platform
    AhvExportAndPrepareRequestFields:
      type: object
      properties:
        sourceImageName:
          type: string
          description: Specifies the name of the image on the Prism server that will be exported. Either sourceImageName, SourceImageUuid, or SourceVmUuid must be specified.
        sourceVmUuid:
          type: string
          description: Specifies the UUID of the virtual machine on the Prism server that will be exported. Either sourceImageName, SourceImageUuid, or SourceVmUuid must be specified.
        sourceImageUuid:
          type: string
          description: Specifies the UUID of the image on the Prism server that will be exported. Either sourceImageName, SourceImageUuid, or SourceVmUuid must be specified.
    AhvCeSpec:
      type: object
      properties:
        host:
          type: string
          description: Specifies the host name or IP address of the Prism server.
        port:
          type: integer
          description: Specifies the network port number of the Prism server. The default value is 9440.
        prismSslCaCertificate:
          type: string
          description: A Prism SSL root CA certificate to use in verifying the Prism host certificate in AHV API calls. Specifies the Prism SSL certificate as a single string.
        prismSslFingerprint:
          type: string
          description: The fingerprint/thumbprint of the AHV host certificate in AHV API calls. This is used as an alternative method of host verification and if supplied will be done instead of certicicate validation.
        prismSslNoCheckHostname:
          type: boolean
          description: Use this to disable SSL certificate hostname checking in AHV API calls.
        clusterUuid:
          type: string
          description: Specifies the UUID of cluster of the Nutanix system where the source image or virtual machine resides.
        subnetUuid:
          type: string
          description: Specifies the UUID of subnet of the Nutanix system to use for the export.
        memoryMb:
          type: integer
          description: The amount of memory, in megabytes, to assign to the compositing engine VM. The default is 2048.
        cpus:
          type: integer
          description: The number of CPUs to assign to the compositing engine VM. The default is 2.
      required:
        - host
        - clusterUuid
        - subnetUuid
    XenPlatform:
      type: object
      properties:
        platform:
          type: string
          description: The virtual infrastructure platform. This must be set to 'Xen'.
        platformCredentialId:
          type: string
          description: The credential Id returned from the 'credentials' API for the credentials needed to access the virtual platform. These credentials must be of type 'UsernamePassword'. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        hypervisorConnectionId:
          type: string
          description: The ID of a hypervisor connection object to obtain connection details from - intended for Citrix internal use. One of `platformCredentialId` or `hypervisorConnectionId` must be provided.
        prefix:
          type: string
          description: A prefix for the name of the virtual machine created during the job. The default is 'ce'.
      required:
        - platform
    XenExportRequestFields:
      type: object
      properties:
        sourceDiskUuid:
          type: string
          description: Specifies the UUID of the image on the XenServer that will be exported. SourceImageUuid must be specified.
        tags:
          type: object
          description: A dictionary of tags to apply to resources that are created by the job.
    XenPrepareRequestFields:
      type: object
      properties:
        targetDiskUuid:
          type: string
          description: Specifies the UUID of the image on the XenServer that will be prepared. TargetDiskUuid must be specified.
        tags:
          type: object
          description: A dictionary of tags to apply to resources that are created by the job.
      required:
        - targetDiskUuid
    XenCeSpec:
      type: object
      properties:
        host:
          type: string
          description: Specifies the host name or IP address of the XenServer.
        port:
          type: integer
          description: Specifies the network port number of the api server. The default value is 443.
        xenSslFingerprint:
          type: string
          description: The fingerprint/thumbprint of the XenServer host certificate in XenServer API calls.
        xenSslNoCheckHostname:
          type: boolean
          description: Use this to disable SSL certificate hostname checking in XenServer API calls.
        storageRepositoryUuid:
          type: string
          description: >
            Specifies the UUID of the XenServer storage repository to use for all storage requirements for the compositing
            engine VM.
        network:
          type: string
          description: Specifies the name of the virtual network to use for the export.
      required:
        - host
        - storageRepositoryUuid
        - network
    JobsPagedResult:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Job'
        pageSize:
          type: integer
        continuationToken:
          $ref: '#/components/schemas/ContinuationToken'
    Job:
      type: object
      description: A job is used to track the progress of any asynchronous API operation. Once a job has completed, the results will be saved for 24 hours.
      required:
        - id
        - type
        - overallProgressPercent
        - createdAt
        - isCancellable
        - parameters
        - status
      properties:
        id:
          type: string
          description: The unique identifier for the job.
        type:
          type: string
          description: A unique tag that identifies the type of asynchronous operation that this job is performing.
        overallProgressPercent:
          type: number
          format: integer
          description: The percentage towards completion of the job. This value may not be present for all jobs.
        isCancellable:
          type: boolean
          description: If this is set to true, then the job can be cancelled. If it is false, then the job may not be cancelled.
        parameters:
          type: array
          items:
            $ref: '#/components/schemas/NameValuePair'
          description: Parameters that provide more details about the job and/or its current state. The contents of this field vary depending upon the job type.
        status:
          type: string
          description: This field contains the current status of the job, either 'notStarted', 'inProgress', 'complete', 'failed', 'cancelling', 'cancelled' or 'aborted'.
        resultLocation:
          type: string
          pattern: /^\//
          description: If an object was created or modified by this operation or there are additional results available, then this field will contain the URL to obtain the object or the results.
        warnings:
          type: array
          description: This field will contain information about any non-fatal problems that occurred during execution of the job.
          items:
            type: object
            properties:
              type:
                type: string
              message:
                type: string
              parameters:
                type: array
                items:
                  $ref: '#/components/schemas/NameValuePair'
        telemetry:
          type: array
          items:
            $ref: '#/components/schemas/NameValuePair'
          description: Information about images and platforms seen during a job.
        error:
          description: If the job is terminated due to any failures, this field will contain more details about the failure.
          type: object
          required:
            - type
            - detail
          properties:
            type:
              type: string
            detail:
              type: string
            parameters:
              type: array
              items:
                $ref: '#/components/schemas/NameValuePair'
        additionalInfo:
          type: object
          description: This field is used to pass information about a job, such as external resources created or modified during job execution. The contents of this field are specific to the job type.
        createdAt:
          type: string
          format: dateTime
          pattern: /^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})Z$/
          description: This field will indicate when the job was created. It should coincide with when an asynchronous was performed. Processing of the job may not have started immediately at this time.
        updatedAt:
          type: string
          format: dateTime
          pattern: /^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})Z$/
          description: This field will indicate when the last update to the job occurred. This may indicate any change in the status of the job, or changes to information like errors and warnings.
        startedAt:
          type: string
          format: dateTime
          pattern: /^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})Z$/
          description: This fields indicates when processing of the job began.
        endedAt:
          type: string
          format: dateTime
          pattern: /^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})Z$/
          description: This field indicates when the job was completed.
  securitySchemes:
    citrix_auth:
      description: The value must be a Citrix Cloud authentication token of the form 'CWSAuth bearer=<bearer-token>'. See [Citrix Cloud API overview](https://developer.cloud.com/citrix-cloud/citrix-cloud-api-overview) for further information.
      type: apiKey
      name: Authorization
      in: header
