swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Virtual Machine Image Template
  title: VirtualMachineImageTemplate
  version: 2018-02-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/preview/2018-02-01-preview/imagebuilder.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: imagebuilder
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  ApiVersionParameter:
    description: Client Api Version.
    in: query
    name: api-version
    required: true
    type: string
  ImageTemplateNameParameter:
    description: The name of the image Template
    in: path
    name: imageTemplateName
    pattern: ^[A-Za-z0-9-_]{1,64}$
    required: true
    type: string
    x-ms-parameter-location: method
  LocationParameter:
    description: Location of the service.
    in: path
    name: location
    required: true
    type: string
    x-ms-parameter-location: method
  ResourceGroupNameParameter:
    description: The name of the resource group.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  RunOutputNameParameter:
    description: The name of the run output
    in: path
    name: runOutputName
    pattern: ^[A-Za-z0-9-_]{1,64}$
    required: true
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    in: path
    name: subscriptionId
    required: true
    type: string
paths:
  /providers/Microsoft.VirtualMachineImages/operations:
    get:
      description: Lists available operations for the Microsoft.VirtualMachineImages provider
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: The operation was successful. The response contains the list of available operations.
          schema:
            $ref: "#/definitions/OperationListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ApiError"
      tags:
        - Operations
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/providers/Microsoft.VirtualMachineImages/imageTemplates":
    get:
      description: Gets information about the VM image templates associated with the subscription.
      operationId: VirtualMachineImageTemplate_List
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ImageTemplateListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ApiError"
      tags:
        - VirtualMachineImageTemplate
      x-ms-examples:
        List images by subscription.:
          parameters:
            api-version: 2018-02-01-preview
            subscriptionId: "{subscription-id}"
          responses:
            "202":
              body:
                nextLink: /subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2018-02-01-preview&skip-token=2
                value:
                  - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate
                    location: westus
                    name: myImageTemplate
                    properties:
                      customize:
                        - name: Shell customization example
                          script: https://example.com/path/to/script.sh
                          type: shell
                      distribute:
                        - imageId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1
                          location: 1_location
                          runOutputName: image_it_pir_1
                          tags:
                            tagName: value
                          type: managedImage
                      source:
                        sha256Checksum: 120acbca7b3d55465eb9f8ef53ad7365f2997d42d4f83d7cc285bf5c71e1131f
                        sourceURI: http://redhat.com/path/to/installation.iso
                        type: ISO
                    type: Microsoft.VirtualMachineImages/imageTemplate
                  - id: /subscriptions/{subscription-id}/resourceGroups/myOtherResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/mySecondImageTemplate
                    location: westus
                    name: mySecondImageTemplate
                    properties:
                      customize:
                        - name: Shell customization example
                          script: https://example.com/path/to/script.sh
                          type: shell
                      distribute:
                        - imageId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/mySecondImage-eus
                          location: eastus
                          runOutputName: eus
                          tags:
                            stage: development
                          type: managedImage
                      source:
                        offer: UbuntuServer
                        publisher: Canonical
                        sku: 18.04-LTS
                        type: PlatformImage
                        version: 18.04.201902121
                    type: Microsoft.VirtualMachineImages/imageTemplate
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates":
    get:
      description: Gets information about the VM image templates associated with the specified resource group.
      operationId: VirtualMachineImageTemplate_ListByResourceGroup
      parameters:
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ImageTemplateListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ApiError"
      tags:
        - VirtualMachineImageTemplate
      x-ms-examples:
        List images by resource group:
          parameters:
            api-version: 2018-02-01-preview
            resourceGroupName: myResourceGroup
            subscriptionId: "{subscription-id}"
          responses:
            "202":
              body:
                nextLink: /subscriptions/{subscription-id}/resourceGroup/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2018-02-01-preview&skip-token=2
                value:
                  - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate
                    location: westus
                    name: myImageTemplate
                    properties:
                      customize:
                        - name: Shell customization example
                          script: https://example.com/path/to/script.sh
                          type: shell
                      distribute:
                        - imageId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1
                          location: 1_location
                          runOutputName: image_it_pir_1
                          tags:
                            tagName: value
                          type: managedImage
                      source:
                        sha256Checksum: 120acbca7b3d55465eb9f8ef53ad7365f2997d42d4f83d7cc285bf5c71e1131f
                        sourceURI: http://redhat.com/path/to/installation.iso
                        type: ISO
                    type: Microsoft.VirtualMachineImages/imageTemplate
                  - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myOtherImageTemplate
                    location: eastus
                    name: myOtherImageTemplate
                    properties:
                      customize:
                        - name: Shell customization example
                          script: https://example.com/path/to/script.sh
                          type: shell
                      distribute:
                        - imageId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/baseimage-cus
                          location: centralus
                          runOutputName: singleImage
                          type: managedImage
                        - galleryImageId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/gallery/baseimages/images/baseimage
                          imageId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/baseimage-eus
                          replicationRegions:
                            - eastus
                            - westus
                          runOutputName: gallery
                          type: sharedImage
                      source:
                        offer: UbuntuServer
                        publisher: Canonical
                        sku: 18.04-LTS
                        type: PlatformImage
                        version: 18.04.201902121
                    type: Microsoft.VirtualMachineImages/imageTemplate
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}":
    delete:
      description: Delete Virtual Machine Image Template
      operationId: VirtualMachineImageTemplate_Delete
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ImageTemplateNameParameter"
      responses:
        "200":
          description: The operation was successful.
        "202":
          description: The operation will be completed asynchronously.
        "204":
          description: NoContent -- VM image template does not exist in the subscription.
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ApiError"
      tags:
        - VirtualMachineImageTemplate
      x-ms-examples:
        Delete an Image Template.:
          parameters:
            api-version: 2018-02-01-preview
            imageTemplateName: myImageTemplate
            resourceGroupName: myResourceGroup
            subscriptionId: "{subscription-id}"
          responses:
            "202":
              headers:
                Azure-AsyncOperation: https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/westus/operations/85506efc-36f7-11e9-a0c2-000d3afd16e3?api-version=2018-02-01-preview
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
    get:
      description: Get Information about Virtual Machine Image Template
      operationId: VirtualMachineImageTemplate_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ImageTemplateNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ImageTemplate"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ApiError"
      tags:
        - VirtualMachineImageTemplate
      x-ms-examples:
        Retrieve an Image Template.:
          parameters:
            api-version: 2018-02-01-preview
            imageTemplateName: myImageTemplate
            resourceGroupName: myResourceGroup
            subscriptionId: "{subscription-id}"
          responses:
            "202":
              body:
                id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate
                location: westus
                name: myImageTemplate
                properties:
                  customize:
                    - name: Shell Customizer Example
                      script: https://example.com/path/to/script.sh
                      type: shell
                  distribute:
                    - imageId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1
                      location: 1_location
                      runOutputName: image_it_pir_1
                      tags:
                        tagName: value
                      type: managedImage
                  source:
                    sha256Checksum: 120acbca7b3d55465eb9f8ef53ad7365f2997d42d4f83d7cc285bf5c71e1131f
                    sourceURI: http://redhat.com/path/to/installation.iso
                    type: ISO
                type: Microsoft.VirtualMachineImages/imageTemplate
    patch:
      description: Update the tags for this Virtual Machine Image Template
      operationId: VirtualMachineImageTemplate_Update
      parameters:
        - description: Additional parameters for Image Template update.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ImageTemplateUpdateParameters"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ImageTemplateNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ImageTemplate"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ApiError"
      tags:
        - VirtualMachineImageTemplate
      x-ms-examples:
        Update the tags for an Image Template.:
          parameters:
            api-version: 2018-02-01-preview
            imageTemplateName: myImageTemplate
            parameters:
              tags:
                new-tag: new-value
            resourceGroupName: myResourceGroup
            subscriptionId: "{subscription-id}"
          responses:
            "200":
              body:
                id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate
                location: westus
                name: myImageTemplate
                properties:
                  customize:
                    - name: Shell customization example
                      script: https://example.com/path/to/script.sh
                      type: shell
                  distribute:
                    - imageId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1
                      location: 1_location
                      runOutputName: image_it_pir_1
                      tags:
                        tagName: value
                      type: managedImage
                  source:
                    sha256Checksum: 120acbca7b3d55465eb9f8ef53ad7365f2997d42d4f83d7cc285bf5c71e1131f
                    sourceURI: http://redhat.com/path/to/installation.iso
                    type: ISO
                tags:
                  new-tag: new-value
                type: Microsoft.VirtualMachineImages/imageTemplate
    put:
      description: Create or Update a Virtual Machine Image Template
      operationId: VirtualMachineImageTemplate_CreateOrUpdate
      parameters:
        - description: Parameters supplied to the Create Image Template
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ImageTemplate"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ImageTemplateNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ImageTemplate"
        "201":
          description: Created
          schema:
            $ref: "#/definitions/ImageTemplate"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ApiError"
      tags:
        - VirtualMachineImageTemplate
      x-ms-examples:
        Create an Image Template.:
          parameters:
            api-version: 2018-02-01-preview
            imageTemplateName: myImageTemplate
            parameters:
              location: westus
              properties:
                customize:
                  - name: Shell Customizer Example
                    script: https://example.com/path/to/script.sh
                    type: shell
                distribute:
                  - imageId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1
                    location: 1_location
                    runOutputName: image_it_pir_1
                    tags:
                      tagName: value
                    type: managedImage
                source:
                  sha256Checksum: 120acbca7b3d55465eb9f8ef53ad7365f2997d42d4f83d7cc285bf5c71e1131f
                  sourceURI: http://redhat.com/path/to/installation.iso
                  type: ISO
              tags:
                imagetemplate_tag1: IT_T1
                imagetemplate_tag2: IT_T2
            resourceGroupName: myResourceGroup
            subscriptionId: "{subscription-id}"
          responses:
            "201":
              body:
                id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate
                location: westus
                name: myImageTemplate
                properties:
                  customize:
                    - name: Shell Customizer Example
                      script: https://example.com/path/to/script.sh
                      type: shell
                  distribute:
                    - imageId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1
                      location: 1_location
                      runOutputName: image_it_pir_1
                      tags:
                        tagName: value
                      type: managedImage
                  source:
                    sha256Checksum: 120acbca7b3d55465eb9f8ef53ad7365f2997d42d4f83d7cc285bf5c71e1131f
                    sourceURI: http://redhat.com/path/to/installation.iso
                    type: ISO
                type: Microsoft.VirtualMachineImages/imageTemplate
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/run":
    post:
      description: Create artifacts from a existing Image Template
      operationId: VirtualMachineImageTemplate_run
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ImageTemplateNameParameter"
      responses:
        "202":
          description: The operation will be completed asynchronously.
        "204":
          description: The operation was successful.
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ApiError"
      tags:
        - VirtualMachineImageTemplate
      x-ms-examples:
        Create image(s) from existing imageTemplate.:
          parameters:
            api-version: 2018-02-01-preview
            imageTemplateName: myImageTemplate
            resourceGroupName: myResourceGroup
            subscriptionId: "{subscription-id}"
          responses:
            "202":
              headers:
                Azure-AsyncOperation: https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/westus/operations/777b2050-36f8-11e9-b8fa-000d3afd16e3?api-version=2018-02-01-preview
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs":
    get:
      description: List all run outputs for the specified Image Template resource
      operationId: VirtualMachineImageTemplate_ListRunOutputs
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ImageTemplateNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/RunOutputCollection"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ApiError"
      tags:
        - VirtualMachineImageTemplate
      x-ms-examples:
        Retrieve a list of all outputs created by the last run of an Image Template:
          parameters:
            api-version: 2018-02-01-preview
            imageTemplateName: myImageTemplate
            resourceGroupName: myResourceGroup
            subscriptionId: "{subscription-id}"
          responses:
            "200":
              body:
                nextLink: /subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs?api-version=2018-02-01-preview&$skipToken=3
                value:
                  - id: /subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/myManagedImageOutput
                    name: myManagedImageOutput
                    properties:
                      artifactId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/output_managed_image
                      provisioningState: Succeeded
                    type: Microsoft.VirtualMachineImages/imageTemplates/runOutputs
                  - id: /subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/mySharedImageOutput
                    name: mySharedImageOutput
                    properties:
                      artifactId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/galleries/Gallery1/images/SharedImageOutput/imageversions/1.2.3
                      provisioningState: Succeeded
                    type: Microsoft.VirtualMachineImages/imageTemplates/runOutputs
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs/{runOutputName}":
    get:
      description: Get the specified run output for the specified Template resource
      operationId: VirtualMachineImageTemplate_GetRunOutput
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupNameParameter"
        - $ref: "#/parameters/ImageTemplateNameParameter"
        - $ref: "#/parameters/RunOutputNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/RunOutput"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ApiError"
      tags:
        - VirtualMachineImageTemplate
      x-ms-examples:
        Retrieve single runOutput:
          parameters:
            api-version: 2018-02-01-preview
            imageTemplateName: myImageTemplate
            resourceGroupName: myResourceGroup
            runOutputName: myManagedImageOutput
            subscriptionId: "{subscription-id}"
          responses:
            "200":
              body:
                id: /subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/myManagedImageOutput
                name: myManagedImageOutput
                properties:
                  artifactId: /subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/output_managed_image
                  provisioningState: Succeeded
                type: Microsoft.VirtualMachineImages/imageTemplates/runOutputs
definitions:
  ApiError:
    description: Api error.
    properties:
      code:
        description: The error code.
        type: string
      details:
        description: The Api error details
        items:
          $ref: "#/definitions/ApiErrorBase"
        type: array
      innererror:
        $ref: "#/definitions/InnerError"
        description: The Api inner error
      message:
        description: The error message.
        type: string
      target:
        description: The target of the particular error.
        type: string
  ApiErrorBase:
    description: Api error base.
    properties:
      code:
        description: The error code.
        type: string
      message:
        description: The error message.
        type: string
      target:
        description: The target of the particular error.
        type: string
  ImageTemplate:
    allOf:
      - $ref: "#/definitions/Resource"
    properties:
      properties:
        $ref: "#/definitions/ImageTemplateProperties"
        x-ms-client-flatten: true
  ImageTemplateCustomizer:
    discriminator: type
    properties:
      name:
        description: Friendly Name to provide context on what this customization step does
        type: string
      type:
        description: The type of customization tool you want to use on the Image. For example, "shell" can be shellCustomizer
        type: string
    required:
      - type
  ImageTemplateDistributor:
    description: Generic distribution object
    discriminator: type
    properties:
      artifactTags:
        additionalProperties:
          type: string
        description: Tags that will be applied to the artifact once it has been created/updated by the distributor.
        type: object
      runOutputName:
        description: The name to be used for the associated RunOutput.
        pattern: ^[A-Za-z0-9-_]{1,64}$
        type: string
      type:
        description: Type of distribution.
        type: string
    required:
      - type
      - runOutputName
    type: object
  ImageTemplateIsoSource:
    allOf:
      - $ref: "#/definitions/ImageTemplateSource"
    description: Describes an image source that is an installation ISO. Currently only supports Red Hat Enterprise Linux 7.2-7.5 ISO's.
    properties:
      sha256Checksum:
        description: SHA256 Checksum of the ISO image.
        type: string
      sourceURI:
        description: URL to get the ISO image. This URL has to be accessible to the resource provider at the time of the imageTemplate creation.
        type: string
    required:
      - sourceURI
      - sha256Checksum
    x-ms-discriminator-value: ISO
  ImageTemplateLastRunStatus:
    properties:
      endTime:
        description: End time of the last run (UTC)
        format: date-time
        type: string
      message:
        description: Verbose information about the last run state
        type: string
      runState:
        description: State of the last run
        enum:
          - ready
          - running
          - succeeded
          - partiallySucceeded
          - failed
        type: string
      runSubState:
        description: Sub state of the last run
        enum:
          - queued
          - building
          - customizing
          - distributing
        type: string
      startTime:
        description: Start time of the last run (UTC)
        format: date-time
        type: string
  ImageTemplateListResult:
    properties:
      nextLink:
        description: The continuation token.
        type: string
      value:
        items:
          $ref: "#/definitions/ImageTemplate"
        type: array
  ImageTemplateManagedImageDistributor:
    allOf:
      - $ref: "#/definitions/ImageTemplateDistributor"
    description: Distribute as a Managed Disk Image.
    properties:
      imageId:
        description: Resource Id of the Managed Disk Image
        type: string
      location:
        description: Azure location for the image, should match if image already exists
        type: string
    required:
      - imageId
      - location
    type: object
    x-ms-discriminator-value: managedImage
  ImageTemplatePlatformImageSource:
    allOf:
      - $ref: "#/definitions/ImageTemplateSource"
    description: Describes an image source from [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
    properties:
      offer:
        description: Image offer from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
        type: string
      publisher:
        description: Image Publisher in [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
        type: string
      sku:
        description: Image sku from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
        type: string
      version:
        description: Image version from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
        type: string
    x-ms-discriminator-value: PlatformImage
  ImageTemplateProperties:
    properties:
      customize:
        description: Specifies the properties used to describe the customization steps of the image, like Image source etc
        items:
          $ref: "#/definitions/ImageTemplateCustomizer"
        type: array
      distribute:
        description: The distribution targets where the image output needs to go to.
        items:
          $ref: "#/definitions/ImageTemplateDistributor"
        type: array
      lastRunStatus:
        $ref: "#/definitions/ImageTemplateLastRunStatus"
        description: State of 'run' that is currently executing or was last executed.
        readOnly: true
      provisioningError:
        $ref: "#/definitions/ProvisioningError"
        description: Provisioning error, if any
        readOnly: true
      provisioningState:
        $ref: "#/definitions/ProvisioningState"
        description: Provisioning state of the resource
        readOnly: true
      source:
        $ref: "#/definitions/ImageTemplateSource"
        description: Specifies the properties used to describe the source image.
    required:
      - source
      - distribute
  ImageTemplateSharedImageDistributor:
    allOf:
      - $ref: "#/definitions/ImageTemplateDistributor"
    description: Distribute via Shared Image Gallery.
    properties:
      galleryImageId:
        description: Resource Id of the Shared Image Gallery image
        type: string
      replicationRegions:
        items:
          type: string
        type: array
    required:
      - galleryImageId
      - replicationRegions
    type: object
    x-ms-discriminator-value: sharedImage
  ImageTemplateShellCustomizer:
    allOf:
      - $ref: "#/definitions/ImageTemplateCustomizer"
    description: Runs a shell script during the customization phase
    properties:
      script:
        description: The shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc
        type: string
    x-ms-discriminator-value: shell
  ImageTemplateSource:
    discriminator: type
    properties:
      type:
        description: Specifies the type of source image you want to start with.
        type: string
    required:
      - type
  ImageTemplateUpdateParameters:
    description: Parameters for updating an image template.
    properties:
      tags:
        additionalProperties:
          type: string
        description: The user-specified tags associated with the image template.
        type: object
  InnerError:
    description: Inner error details.
    properties:
      errordetail:
        description: The internal error message or exception dump.
        type: string
      exceptiontype:
        description: The exception type.
        type: string
  Operation:
    properties:
      display:
        properties:
          description:
            title: The friendly name of the operation
            type: string
          operation:
            description: "For example: read, write, delete, or listKeys/action"
            title: The operation type.
            type: string
          provider:
            title: Friendly name of the resource provider.
            type: string
          resource:
            title: The resource type on which the operation is performed.
            type: string
        title: The object that describes the operation.
      name:
        description: This is of the format {provider}/{resource}/{operation}
        title: The operation name.
        type: string
      origin:
        title: The intended executor of the operation.
        type: string
      properties:
        title: Properties of the operation.
        type: object
    title: A REST API operation
    type: object
  OperationListResult:
    properties:
      nextLink:
        title: The URL to get the next set of operation list results if there are any.
        type: string
      value:
        items:
          $ref: "#/definitions/Operation"
        title: The list of operations supported by the resource provider.
        type: array
    title: Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results.
  ProvisioningError:
    properties:
      message:
        description: Verbose error message about the provisioning failure
        type: string
      provisioningErrorCode:
        description: Error code of the provisioning failure
        enum:
          - BadSourceType
          - BadPIRSource
          - BadISOSource
          - BadCustomizerType
          - NoCustomizerShellScript
          - ServerError
          - Other
        type: string
  ProvisioningState:
    description: Provisioning state of the resource
    enum:
      - Creating
      - Succeeded
      - Failed
      - Deleting
    type: string
  Resource:
    description: The Resource model definition.
    properties:
      id:
        description: Resource Id
        readOnly: true
        type: string
      location:
        description: Resource location
        type: string
        x-ms-mutability:
          - create
          - read
      name:
        description: Resource name
        readOnly: true
        type: string
      tags:
        additionalProperties:
          type: string
        description: Resource tags
        type: object
      type:
        description: Resource type
        readOnly: true
        type: string
    required:
      - location
    x-ms-azure-resource: true
  RunOutput:
    allOf:
      - $ref: "#/definitions/SubResource"
    description: Represents an output that was created by running an image template.
    properties:
      properties:
        $ref: "#/definitions/RunOutputProperties"
        x-ms-client-flatten: true
  RunOutputCollection:
    properties:
      nextLink:
        description: The continuation token.
        type: string
      value:
        items:
          $ref: "#/definitions/RunOutput"
        type: array
  RunOutputProperties:
    properties:
      artifactId:
        description: The resource id of the artifact.
        type: string
      provisioningState:
        $ref: "#/definitions/ProvisioningState"
        description: Provisioning state of the resource
        readOnly: true
  SubResource:
    description: The Sub Resource model definition.
    properties:
      id:
        description: Resource Id
        readOnly: true
        type: string
      name:
        description: Resource name
        type: string
      type:
        description: Resource type
        readOnly: true
        type: string
    required:
      - name
