diff --git a/sdk/imagebuilder/arm-imagebuilder/LICENSE.txt b/sdk/imagebuilder/arm-imagebuilder/LICENSE.txt
new file mode 100644
index 000000000000..2d3163745319
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2021 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/sdk/imagebuilder/arm-imagebuilder/README.md b/sdk/imagebuilder/arm-imagebuilder/README.md
new file mode 100644
index 000000000000..52887d897f0a
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/README.md
@@ -0,0 +1,98 @@
+## Azure ImageBuilderClient SDK for JavaScript
+
+This package contains an isomorphic SDK for ImageBuilderClient.
+
+### Currently supported environments
+
+- Node.js version 6.x.x or higher
+- Browser JavaScript
+
+### How to Install
+
+```bash
+npm install @azure/arm-imagebuilder
+```
+
+### How to use
+
+#### nodejs - client creation and list virtualMachineImageTemplates as an example written in TypeScript.
+
+##### Install @azure/ms-rest-nodeauth
+
+- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
+```bash
+npm install @azure/ms-rest-nodeauth@"^3.0.0"
+```
+
+##### Sample code
+
+While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
+```typescript
+const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
+const { ImageBuilderClient } = require("@azure/arm-imagebuilder");
+const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
+
+msRestNodeAuth.interactiveLogin().then((creds) => {
+ const client = new ImageBuilderClient(creds, subscriptionId);
+ client.virtualMachineImageTemplates.list().then((result) => {
+ console.log("The result is:");
+ console.log(result);
+ });
+}).catch((err) => {
+ console.error(err);
+});
+```
+
+#### browser - Authentication, client creation and list virtualMachineImageTemplates as an example written in JavaScript.
+
+##### Install @azure/ms-rest-browserauth
+
+```bash
+npm install @azure/ms-rest-browserauth
+```
+
+##### Sample code
+
+See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
+
+- index.html
+```html
+
+
+
+ @azure/arm-imagebuilder sample
+
+
+
+
+
+
+
+
+```
+
+## Related projects
+
+- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
+
+
diff --git a/sdk/imagebuilder/arm-imagebuilder/package.json b/sdk/imagebuilder/arm-imagebuilder/package.json
new file mode 100644
index 000000000000..5b31fce3bea7
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "@azure/arm-imagebuilder",
+ "author": "Microsoft Corporation",
+ "description": "ImageBuilderClient Library with typescript type definitions for node.js and browser.",
+ "version": "1.0.0",
+ "dependencies": {
+ "@azure/ms-rest-azure-js": "^2.0.1",
+ "@azure/ms-rest-js": "^2.0.4",
+ "tslib": "^1.10.0"
+ },
+ "keywords": [
+ "node",
+ "azure",
+ "typescript",
+ "browser",
+ "isomorphic"
+ ],
+ "license": "MIT",
+ "main": "./dist/arm-imagebuilder.js",
+ "module": "./esm/imageBuilderClient.js",
+ "types": "./esm/imageBuilderClient.d.ts",
+ "devDependencies": {
+ "typescript": "^3.5.3",
+ "rollup": "^1.18.0",
+ "rollup-plugin-node-resolve": "^5.2.0",
+ "rollup-plugin-sourcemaps": "^0.4.2",
+ "uglify-js": "^3.6.0"
+ },
+ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/imagebuilder/arm-imagebuilder",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Azure/azure-sdk-for-js.git"
+ },
+ "bugs": {
+ "url": "https://github.com/Azure/azure-sdk-for-js/issues"
+ },
+ "files": [
+ "dist/**/*.js",
+ "dist/**/*.js.map",
+ "dist/**/*.d.ts",
+ "dist/**/*.d.ts.map",
+ "esm/**/*.js",
+ "esm/**/*.js.map",
+ "esm/**/*.d.ts",
+ "esm/**/*.d.ts.map",
+ "src/**/*.ts",
+ "README.md",
+ "rollup.config.js",
+ "tsconfig.json"
+ ],
+ "scripts": {
+ "build": "tsc && rollup -c rollup.config.js && npm run minify",
+ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-imagebuilder.js.map'\" -o ./dist/arm-imagebuilder.min.js ./dist/arm-imagebuilder.js",
+ "prepack": "npm install && npm run build"
+ },
+ "sideEffects": false,
+ "autoPublish": true
+}
diff --git a/sdk/imagebuilder/arm-imagebuilder/rollup.config.js b/sdk/imagebuilder/arm-imagebuilder/rollup.config.js
new file mode 100644
index 000000000000..0066f60f1244
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/rollup.config.js
@@ -0,0 +1,37 @@
+import rollup from "rollup";
+import nodeResolve from "rollup-plugin-node-resolve";
+import sourcemaps from "rollup-plugin-sourcemaps";
+
+/**
+ * @type {rollup.RollupFileOptions}
+ */
+const config = {
+ input: "./esm/imageBuilderClient.js",
+ external: [
+ "@azure/ms-rest-js",
+ "@azure/ms-rest-azure-js"
+ ],
+ output: {
+ file: "./dist/arm-imagebuilder.js",
+ format: "umd",
+ name: "Azure.ArmImagebuilder",
+ sourcemap: true,
+ globals: {
+ "@azure/ms-rest-js": "msRest",
+ "@azure/ms-rest-azure-js": "msRestAzure"
+ },
+ banner: `/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */`
+ },
+ plugins: [
+ nodeResolve({ mainFields: ['module', 'main'] }),
+ sourcemaps()
+ ]
+};
+
+export default config;
diff --git a/sdk/imagebuilder/arm-imagebuilder/src/imageBuilderClient.ts b/sdk/imagebuilder/arm-imagebuilder/src/imageBuilderClient.ts
new file mode 100644
index 000000000000..513f72251d50
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/src/imageBuilderClient.ts
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "@azure/ms-rest-js";
+import * as Models from "./models";
+import * as Mappers from "./models/mappers";
+import * as operations from "./operations";
+import { ImageBuilderClientContext } from "./imageBuilderClientContext";
+
+
+class ImageBuilderClient extends ImageBuilderClientContext {
+ // Operation groups
+ virtualMachineImageTemplates: operations.VirtualMachineImageTemplates;
+ operations: operations.Operations;
+
+ /**
+ * Initializes a new instance of the ImageBuilderClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure
+ * subscription. The subscription Id forms part of the URI for every service call.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ImageBuilderClientOptions) {
+ super(credentials, subscriptionId, options);
+ this.virtualMachineImageTemplates = new operations.VirtualMachineImageTemplates(this);
+ this.operations = new operations.Operations(this);
+ }
+}
+
+// Operation Specifications
+
+export {
+ ImageBuilderClient,
+ ImageBuilderClientContext,
+ Models as ImageBuilderModels,
+ Mappers as ImageBuilderMappers
+};
+export * from "./operations";
diff --git a/sdk/imagebuilder/arm-imagebuilder/src/imageBuilderClientContext.ts b/sdk/imagebuilder/arm-imagebuilder/src/imageBuilderClientContext.ts
new file mode 100644
index 000000000000..08c5874fab27
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/src/imageBuilderClientContext.ts
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as Models from "./models";
+import * as msRest from "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+
+const packageName = "@azure/arm-imagebuilder";
+const packageVersion = "1.0.0";
+
+export class ImageBuilderClientContext extends msRestAzure.AzureServiceClient {
+ credentials: msRest.ServiceClientCredentials;
+ subscriptionId: string;
+ apiVersion?: string;
+
+ /**
+ * Initializes a new instance of the ImageBuilderClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure
+ * subscription. The subscription Id forms part of the URI for every service call.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ImageBuilderClientOptions) {
+ if (credentials == undefined) {
+ throw new Error('\'credentials\' cannot be null.');
+ }
+ if (subscriptionId == undefined) {
+ throw new Error('\'subscriptionId\' cannot be null.');
+ }
+
+ if (!options) {
+ options = {};
+ }
+ if(!options.userAgent) {
+ const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
+ options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
+ }
+
+ super(credentials, options);
+
+ this.apiVersion = '2020-02-14';
+ this.acceptLanguage = 'en-US';
+ this.longRunningOperationRetryTimeout = 30;
+ this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
+ this.requestContentType = "application/json; charset=utf-8";
+ this.credentials = credentials;
+ this.subscriptionId = subscriptionId;
+
+ if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
+ this.acceptLanguage = options.acceptLanguage;
+ }
+ if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
+ this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
+ }
+ }
+}
diff --git a/sdk/imagebuilder/arm-imagebuilder/src/models/index.ts b/sdk/imagebuilder/arm-imagebuilder/src/models/index.ts
new file mode 100644
index 000000000000..65df2323af48
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/src/models/index.ts
@@ -0,0 +1,1111 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js";
+import * as msRest from "@azure/ms-rest-js";
+
+export { BaseResource, CloudError };
+
+/**
+ * Contains the possible cases for ImageTemplateSource.
+ */
+export type ImageTemplateSourceUnion = ImageTemplateSource | ImageTemplatePlatformImageSource | ImageTemplateManagedImageSource | ImageTemplateSharedImageVersionSource;
+
+/**
+ * Describes a virtual machine image source for building, customizing and distributing
+ */
+export interface ImageTemplateSource {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "ImageTemplateSource";
+}
+
+/**
+ * Contains the possible cases for ImageTemplateCustomizer.
+ */
+export type ImageTemplateCustomizerUnion = ImageTemplateCustomizer | ImageTemplateShellCustomizer | ImageTemplateRestartCustomizer | ImageTemplateWindowsUpdateCustomizer | ImageTemplatePowerShellCustomizer | ImageTemplateFileCustomizer;
+
+/**
+ * Describes a unit of image customization
+ */
+export interface ImageTemplateCustomizer {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "ImageTemplateCustomizer";
+ /**
+ * Friendly Name to provide context on what this customization step does
+ */
+ name?: string;
+}
+
+/**
+ * Contains the possible cases for ImageTemplateDistributor.
+ */
+export type ImageTemplateDistributorUnion = ImageTemplateDistributor | ImageTemplateManagedImageDistributor | ImageTemplateSharedImageDistributor | ImageTemplateVhdDistributor;
+
+/**
+ * Generic distribution object
+ */
+export interface ImageTemplateDistributor {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "ImageTemplateDistributor";
+ /**
+ * The name to be used for the associated RunOutput.
+ */
+ runOutputName: string;
+ /**
+ * Tags that will be applied to the artifact once it has been created/updated by the distributor.
+ */
+ artifactTags?: { [propertyName: string]: string };
+}
+
+/**
+ * Describes the error happened when create or update an image template
+ */
+export interface ProvisioningError {
+ /**
+ * Error code of the provisioning failure. Possible values include: 'BadSourceType',
+ * 'BadPIRSource', 'BadManagedImageSource', 'BadSharedImageVersionSource', 'BadCustomizerType',
+ * 'UnsupportedCustomizerType', 'NoCustomizerScript', 'BadDistributeType',
+ * 'BadSharedImageDistribute', 'ServerError', 'Other'
+ */
+ provisioningErrorCode?: ProvisioningErrorCode;
+ /**
+ * Verbose error message about the provisioning failure
+ */
+ message?: string;
+}
+
+/**
+ * Describes the latest status of running an image template
+ */
+export interface ImageTemplateLastRunStatus {
+ /**
+ * Start time of the last run (UTC)
+ */
+ startTime?: Date;
+ /**
+ * End time of the last run (UTC)
+ */
+ endTime?: Date;
+ /**
+ * State of the last run. Possible values include: 'Running', 'Canceling', 'Succeeded',
+ * 'PartiallySucceeded', 'Failed', 'Canceled'
+ */
+ runState?: RunState;
+ /**
+ * Sub-state of the last run. Possible values include: 'Queued', 'Building', 'Customizing',
+ * 'Distributing'
+ */
+ runSubState?: RunSubState;
+ /**
+ * Verbose information about the last run state
+ */
+ message?: string;
+}
+
+/**
+ * Virtual Network configuration.
+ */
+export interface VirtualNetworkConfig {
+ /**
+ * Resource id of a pre-existing subnet.
+ */
+ subnetId?: string;
+}
+
+/**
+ * Describes the virtual machine used to build, customize and capture images
+ */
+export interface ImageTemplateVmProfile {
+ /**
+ * Size of the virtual machine used to build, customize and capture images. Omit or specify empty
+ * string to use the default (Standard_D1_v2). Default value: ''.
+ */
+ vmSize?: string;
+ /**
+ * Size of the OS disk in GB. Omit or specify 0 to use Azure's default OS disk size. Default
+ * value: 0.
+ */
+ osDiskSizeGB?: number;
+ /**
+ * Optional configuration of the virtual network to use to deploy the build virtual machine in.
+ * Omit if no specific virtual network needs to be used.
+ */
+ vnetConfig?: VirtualNetworkConfig;
+}
+
+/**
+ * An interface representing ImageTemplateIdentityUserAssignedIdentitiesValue.
+ */
+export interface ImageTemplateIdentityUserAssignedIdentitiesValue {
+ /**
+ * The principal id of user assigned identity.
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly principalId?: string;
+ /**
+ * The client id of user assigned identity.
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly clientId?: string;
+}
+
+/**
+ * Identity for the image template.
+ */
+export interface ImageTemplateIdentity {
+ /**
+ * The type of identity used for the image template. The type 'None' will remove any identities
+ * from the image template. Possible values include: 'UserAssigned', 'None'
+ */
+ type?: ResourceIdentityType;
+ /**
+ * The list of user identities associated with the image template. The user identity dictionary
+ * key references will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ */
+ userAssignedIdentities?: { [propertyName: string]: ImageTemplateIdentityUserAssignedIdentitiesValue };
+}
+
+/**
+ * The Resource model definition.
+ */
+export interface Resource extends BaseResource {
+ /**
+ * Resource Id
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly id?: string;
+ /**
+ * Resource name
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly name?: string;
+ /**
+ * Resource type
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly type?: string;
+ /**
+ * Resource location
+ */
+ location: string;
+ /**
+ * Resource tags
+ */
+ tags?: { [propertyName: string]: string };
+}
+
+/**
+ * Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider
+ */
+export interface ImageTemplate extends Resource {
+ /**
+ * Specifies the properties used to describe the source image.
+ */
+ source: ImageTemplateSourceUnion;
+ /**
+ * Specifies the properties used to describe the customization steps of the image, like Image
+ * source etc
+ */
+ customize?: ImageTemplateCustomizerUnion[];
+ /**
+ * The distribution targets where the image output needs to go to.
+ */
+ distribute: ImageTemplateDistributorUnion[];
+ /**
+ * Provisioning state of the resource. Possible values include: 'Creating', 'Updating',
+ * 'Succeeded', 'Failed', 'Deleting'
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly provisioningState?: ProvisioningState;
+ /**
+ * Provisioning error, if any
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly provisioningError?: ProvisioningError;
+ /**
+ * State of 'run' that is currently executing or was last executed.
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly lastRunStatus?: ImageTemplateLastRunStatus;
+ /**
+ * Maximum duration to wait while building the image template. Omit or specify 0 to use the
+ * default (4 hours). Default value: 0.
+ */
+ buildTimeoutInMinutes?: number;
+ /**
+ * Describes how virtual machine is set up to build images
+ */
+ vmProfile?: ImageTemplateVmProfile;
+ /**
+ * The identity of the image template, if configured.
+ */
+ identity: ImageTemplateIdentity;
+}
+
+/**
+ * Purchase plan configuration for platform image.
+ */
+export interface PlatformImagePurchasePlan {
+ /**
+ * Name of the purchase plan.
+ */
+ planName: string;
+ /**
+ * Product of the purchase plan.
+ */
+ planProduct: string;
+ /**
+ * Publisher of the purchase plan.
+ */
+ planPublisher: string;
+}
+
+/**
+ * Describes an image source from [Azure Gallery
+ * Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
+ */
+export interface ImageTemplatePlatformImageSource {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "PlatformImage";
+ /**
+ * Image Publisher in [Azure Gallery
+ * Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
+ */
+ publisher?: string;
+ /**
+ * Image offer from the [Azure Gallery
+ * Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
+ */
+ offer?: string;
+ /**
+ * Image sku from the [Azure Gallery
+ * Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
+ */
+ sku?: string;
+ /**
+ * Image version from the [Azure Gallery
+ * Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). If 'latest'
+ * is specified here, the version is evaluated when the image build takes place, not when the
+ * template is submitted. Specifying 'latest' could cause ROUNDTRIP_INCONSISTENT_PROPERTY issue
+ * which will be fixed.
+ */
+ version?: string;
+ /**
+ * Optional configuration of purchase plan for platform image.
+ */
+ planInfo?: PlatformImagePurchasePlan;
+}
+
+/**
+ * Describes an image source that is a managed image in customer subscription.
+ */
+export interface ImageTemplateManagedImageSource {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "ManagedImage";
+ /**
+ * ARM resource id of the managed image in customer subscription
+ */
+ imageId: string;
+}
+
+/**
+ * Describes an image source that is an image version in a shared image gallery.
+ */
+export interface ImageTemplateSharedImageVersionSource {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "SharedImageVersion";
+ /**
+ * ARM resource id of the image version in the shared image gallery
+ */
+ imageVersionId: string;
+}
+
+/**
+ * Runs a shell script during the customization phase (Linux). Corresponds to Packer shell
+ * provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.
+ */
+export interface ImageTemplateShellCustomizer {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "Shell";
+ /**
+ * Friendly Name to provide context on what this customization step does
+ */
+ name?: string;
+ /**
+ * URI of the shell script to be run for customizing. It can be a github link, SAS URI for Azure
+ * Storage, etc
+ */
+ scriptUri?: string;
+ /**
+ * SHA256 checksum of the shell script provided in the scriptUri field. Default value: ''.
+ */
+ sha256Checksum?: string;
+ /**
+ * Array of shell commands to execute
+ */
+ inline?: string[];
+}
+
+/**
+ * Reboots a VM and waits for it to come back online (Windows). Corresponds to Packer
+ * windows-restart provisioner
+ */
+export interface ImageTemplateRestartCustomizer {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "WindowsRestart";
+ /**
+ * Friendly Name to provide context on what this customization step does
+ */
+ name?: string;
+ /**
+ * Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"']
+ */
+ restartCommand?: string;
+ /**
+ * Command to check if restart succeeded [Default: '']
+ */
+ restartCheckCommand?: string;
+ /**
+ * Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2
+ * hours) [Default: '5m']
+ */
+ restartTimeout?: string;
+}
+
+/**
+ * Installs Windows Updates. Corresponds to Packer Windows Update Provisioner
+ * (https://github.com/rgl/packer-provisioner-windows-update)
+ */
+export interface ImageTemplateWindowsUpdateCustomizer {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "WindowsUpdate";
+ /**
+ * Friendly Name to provide context on what this customization step does
+ */
+ name?: string;
+ /**
+ * Criteria to search updates. Omit or specify empty string to use the default (search all).
+ * Refer to above link for examples and detailed description of this field.
+ */
+ searchCriteria?: string;
+ /**
+ * Array of filters to select updates to apply. Omit or specify empty array to use the default
+ * (no filter). Refer to above link for examples and detailed description of this field.
+ */
+ filters?: string[];
+ /**
+ * Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000)
+ */
+ updateLimit?: number;
+}
+
+/**
+ * Runs the specified PowerShell on the VM (Windows). Corresponds to Packer powershell provisioner.
+ * Exactly one of 'scriptUri' or 'inline' can be specified.
+ */
+export interface ImageTemplatePowerShellCustomizer {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "PowerShell";
+ /**
+ * Friendly Name to provide context on what this customization step does
+ */
+ name?: string;
+ /**
+ * URI of the PowerShell script to be run for customizing. It can be a github link, SAS URI for
+ * Azure Storage, etc
+ */
+ scriptUri?: string;
+ /**
+ * SHA256 checksum of the power shell script provided in the scriptUri field above. Default
+ * value: ''.
+ */
+ sha256Checksum?: string;
+ /**
+ * Array of PowerShell commands to execute
+ */
+ inline?: string[];
+ /**
+ * If specified, the PowerShell script will be run with elevated privileges. Default value:
+ * false.
+ */
+ runElevated?: boolean;
+ /**
+ * If specified, the PowerShell script will be run with elevated privileges using the Local
+ * System user. Can only be true when the runElevated field above is set to true. Default value:
+ * false.
+ */
+ runAsSystem?: boolean;
+ /**
+ * Valid exit codes for the PowerShell script. [Default: 0]
+ */
+ validExitCodes?: number[];
+}
+
+/**
+ * Uploads files to VMs (Linux, Windows). Corresponds to Packer file provisioner
+ */
+export interface ImageTemplateFileCustomizer {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "File";
+ /**
+ * Friendly Name to provide context on what this customization step does
+ */
+ name?: string;
+ /**
+ * The URI of the file to be uploaded for customizing the VM. It can be a github link, SAS URI
+ * for Azure Storage, etc
+ */
+ sourceUri?: string;
+ /**
+ * SHA256 checksum of the file provided in the sourceUri field above. Default value: ''.
+ */
+ sha256Checksum?: string;
+ /**
+ * The absolute path to a file (with nested directory structures already created) where the file
+ * (from sourceUri) will be uploaded to in the VM
+ */
+ destination?: string;
+}
+
+/**
+ * Distribute as a Managed Disk Image.
+ */
+export interface ImageTemplateManagedImageDistributor {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "ManagedImage";
+ /**
+ * The name to be used for the associated RunOutput.
+ */
+ runOutputName: string;
+ /**
+ * Tags that will be applied to the artifact once it has been created/updated by the distributor.
+ */
+ artifactTags?: { [propertyName: string]: string };
+ /**
+ * Resource Id of the Managed Disk Image
+ */
+ imageId: string;
+ /**
+ * Azure location for the image, should match if image already exists
+ */
+ location: string;
+}
+
+/**
+ * Distribute via Shared Image Gallery.
+ */
+export interface ImageTemplateSharedImageDistributor {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "SharedImage";
+ /**
+ * The name to be used for the associated RunOutput.
+ */
+ runOutputName: string;
+ /**
+ * Tags that will be applied to the artifact once it has been created/updated by the distributor.
+ */
+ artifactTags?: { [propertyName: string]: string };
+ /**
+ * Resource Id of the Shared Image Gallery image
+ */
+ galleryImageId: string;
+ /**
+ * A list of regions that the image will be replicated to
+ */
+ replicationRegions: string[];
+ /**
+ * Flag that indicates whether created image version should be excluded from latest. Omit to use
+ * the default (false). Default value: false.
+ */
+ excludeFromLatest?: boolean;
+ /**
+ * Storage account type to be used to store the shared image. Omit to use the default
+ * (Standard_LRS). Possible values include: 'Standard_LRS', 'Standard_ZRS'
+ */
+ storageAccountType?: SharedImageStorageAccountType;
+}
+
+/**
+ * Distribute via VHD in a storage account.
+ */
+export interface ImageTemplateVhdDistributor {
+ /**
+ * Polymorphic Discriminator
+ */
+ type: "VHD";
+ /**
+ * The name to be used for the associated RunOutput.
+ */
+ runOutputName: string;
+ /**
+ * Tags that will be applied to the artifact once it has been created/updated by the distributor.
+ */
+ artifactTags?: { [propertyName: string]: string };
+}
+
+/**
+ * Parameters for updating an image template.
+ */
+export interface ImageTemplateUpdateParameters {
+ /**
+ * The identity of the image template, if configured.
+ */
+ identity?: ImageTemplateIdentity;
+ /**
+ * The user-specified tags associated with the image template.
+ */
+ tags?: { [propertyName: string]: string };
+}
+
+/**
+ * The Sub Resource model definition.
+ */
+export interface SubResource {
+ /**
+ * Resource Id
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly id?: string;
+ /**
+ * Resource name
+ */
+ name: string;
+ /**
+ * Resource type
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly type?: string;
+}
+
+/**
+ * Represents an output that was created by running an image template.
+ */
+export interface RunOutput extends SubResource {
+ /**
+ * The resource id of the artifact.
+ */
+ artifactId?: string;
+ /**
+ * The location URI of the artifact.
+ */
+ artifactUri?: string;
+ /**
+ * Provisioning state of the resource. Possible values include: 'Creating', 'Updating',
+ * 'Succeeded', 'Failed', 'Deleting'
+ * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ */
+ readonly provisioningState?: ProvisioningState;
+}
+
+/**
+ * An interface representing OperationDisplay.
+ * @summary The object that describes the operation.
+ */
+export interface OperationDisplay {
+ /**
+ * Friendly name of the resource provider.
+ */
+ provider?: string;
+ /**
+ * The operation type. For example: read, write, delete, or listKeys/action
+ */
+ operation?: string;
+ /**
+ * The resource type on which the operation is performed.
+ */
+ resource?: string;
+ /**
+ * The friendly name of the operation.
+ */
+ description?: string;
+}
+
+/**
+ * An interface representing Operation.
+ * @summary A REST API operation
+ */
+export interface Operation {
+ /**
+ * The operation name. This is of the format {provider}/{resource}/{operation}
+ */
+ name?: string;
+ /**
+ * The object that describes the operation.
+ */
+ display?: OperationDisplay;
+ /**
+ * The intended executor of the operation.
+ */
+ origin?: string;
+ /**
+ * Properties of the operation.
+ */
+ properties?: any;
+ /**
+ * The flag that indicates whether the operation applies to data plane.
+ */
+ isDataAction?: boolean;
+}
+
+/**
+ * Api error base.
+ */
+export interface ApiErrorBase {
+ /**
+ * The error code.
+ */
+ code?: string;
+ /**
+ * The target of the particular error.
+ */
+ target?: string;
+ /**
+ * The error message.
+ */
+ message?: string;
+}
+
+/**
+ * Inner error details.
+ */
+export interface InnerError {
+ /**
+ * The exception type.
+ */
+ exceptionType?: string;
+ /**
+ * The internal error message or exception dump.
+ */
+ errorDetail?: string;
+}
+
+/**
+ * Api error.
+ */
+export interface ApiError {
+ /**
+ * The Api error details
+ */
+ details?: ApiErrorBase[];
+ /**
+ * The Api inner error
+ */
+ innerError?: InnerError;
+ /**
+ * The error code.
+ */
+ code?: string;
+ /**
+ * The target of the particular error.
+ */
+ target?: string;
+ /**
+ * The error message.
+ */
+ message?: string;
+}
+
+/**
+ * An interface representing ImageBuilderClientOptions.
+ */
+export interface ImageBuilderClientOptions extends AzureServiceClientOptions {
+ baseUri?: string;
+}
+
+/**
+ * @interface
+ * The result of List image templates operation
+ * @extends Array
+ */
+export interface ImageTemplateListResult extends Array {
+ /**
+ * The continuation token.
+ */
+ nextLink?: string;
+}
+
+/**
+ * @interface
+ * The result of List run outputs operation
+ * @extends Array
+ */
+export interface RunOutputCollection extends Array {
+ /**
+ * The continuation token.
+ */
+ nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the OperationListResult.
+ * @summary 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.
+ * @extends Array
+ */
+export interface OperationListResult extends Array {
+ nextLink?: string;
+}
+
+/**
+ * Defines values for ProvisioningState.
+ * Possible values include: 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting'
+ * @readonly
+ * @enum {string}
+ */
+export type ProvisioningState = 'Creating' | 'Updating' | 'Succeeded' | 'Failed' | 'Deleting';
+
+/**
+ * Defines values for ProvisioningErrorCode.
+ * Possible values include: 'BadSourceType', 'BadPIRSource', 'BadManagedImageSource',
+ * 'BadSharedImageVersionSource', 'BadCustomizerType', 'UnsupportedCustomizerType',
+ * 'NoCustomizerScript', 'BadDistributeType', 'BadSharedImageDistribute', 'ServerError', 'Other'
+ * @readonly
+ * @enum {string}
+ */
+export type ProvisioningErrorCode = 'BadSourceType' | 'BadPIRSource' | 'BadManagedImageSource' | 'BadSharedImageVersionSource' | 'BadCustomizerType' | 'UnsupportedCustomizerType' | 'NoCustomizerScript' | 'BadDistributeType' | 'BadSharedImageDistribute' | 'ServerError' | 'Other';
+
+/**
+ * Defines values for RunState.
+ * Possible values include: 'Running', 'Canceling', 'Succeeded', 'PartiallySucceeded', 'Failed',
+ * 'Canceled'
+ * @readonly
+ * @enum {string}
+ */
+export type RunState = 'Running' | 'Canceling' | 'Succeeded' | 'PartiallySucceeded' | 'Failed' | 'Canceled';
+
+/**
+ * Defines values for RunSubState.
+ * Possible values include: 'Queued', 'Building', 'Customizing', 'Distributing'
+ * @readonly
+ * @enum {string}
+ */
+export type RunSubState = 'Queued' | 'Building' | 'Customizing' | 'Distributing';
+
+/**
+ * Defines values for ResourceIdentityType.
+ * Possible values include: 'UserAssigned', 'None'
+ * @readonly
+ * @enum {string}
+ */
+export type ResourceIdentityType = 'UserAssigned' | 'None';
+
+/**
+ * Defines values for SharedImageStorageAccountType.
+ * Possible values include: 'Standard_LRS', 'Standard_ZRS'
+ * @readonly
+ * @enum {string}
+ */
+export type SharedImageStorageAccountType = 'Standard_LRS' | 'Standard_ZRS';
+
+/**
+ * Contains response data for the list operation.
+ */
+export type VirtualMachineImageTemplatesListResponse = ImageTemplateListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ImageTemplateListResult;
+ };
+};
+
+/**
+ * Contains response data for the listByResourceGroup operation.
+ */
+export type VirtualMachineImageTemplatesListByResourceGroupResponse = ImageTemplateListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ImageTemplateListResult;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdate operation.
+ */
+export type VirtualMachineImageTemplatesCreateOrUpdateResponse = ImageTemplate & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ImageTemplate;
+ };
+};
+
+/**
+ * Contains response data for the update operation.
+ */
+export type VirtualMachineImageTemplatesUpdateResponse = ImageTemplate & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ImageTemplate;
+ };
+};
+
+/**
+ * Contains response data for the get operation.
+ */
+export type VirtualMachineImageTemplatesGetResponse = ImageTemplate & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ImageTemplate;
+ };
+};
+
+/**
+ * Contains response data for the listRunOutputs operation.
+ */
+export type VirtualMachineImageTemplatesListRunOutputsResponse = RunOutputCollection & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: RunOutputCollection;
+ };
+};
+
+/**
+ * Contains response data for the getRunOutput operation.
+ */
+export type VirtualMachineImageTemplatesGetRunOutputResponse = RunOutput & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: RunOutput;
+ };
+};
+
+/**
+ * Contains response data for the beginCreateOrUpdate operation.
+ */
+export type VirtualMachineImageTemplatesBeginCreateOrUpdateResponse = ImageTemplate & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ImageTemplate;
+ };
+};
+
+/**
+ * Contains response data for the beginUpdate operation.
+ */
+export type VirtualMachineImageTemplatesBeginUpdateResponse = ImageTemplate & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ImageTemplate;
+ };
+};
+
+/**
+ * Contains response data for the listNext operation.
+ */
+export type VirtualMachineImageTemplatesListNextResponse = ImageTemplateListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ImageTemplateListResult;
+ };
+};
+
+/**
+ * Contains response data for the listByResourceGroupNext operation.
+ */
+export type VirtualMachineImageTemplatesListByResourceGroupNextResponse = ImageTemplateListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ImageTemplateListResult;
+ };
+};
+
+/**
+ * Contains response data for the listRunOutputsNext operation.
+ */
+export type VirtualMachineImageTemplatesListRunOutputsNextResponse = RunOutputCollection & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: RunOutputCollection;
+ };
+};
+
+/**
+ * Contains response data for the list operation.
+ */
+export type OperationsListResponse = OperationListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: OperationListResult;
+ };
+};
+
+/**
+ * Contains response data for the listNext operation.
+ */
+export type OperationsListNextResponse = OperationListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: OperationListResult;
+ };
+};
diff --git a/sdk/imagebuilder/arm-imagebuilder/src/models/mappers.ts b/sdk/imagebuilder/arm-imagebuilder/src/models/mappers.ts
new file mode 100644
index 000000000000..d7b5ad39ae26
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/src/models/mappers.ts
@@ -0,0 +1,1208 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js";
+import * as msRest from "@azure/ms-rest-js";
+
+export const CloudError = CloudErrorMapper;
+export const BaseResource = BaseResourceMapper;
+
+export const ImageTemplateSource: msRest.CompositeMapper = {
+ serializedName: "ImageTemplateSource",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: {
+ serializedName: "type",
+ clientName: "type"
+ },
+ uberParent: "ImageTemplateSource",
+ className: "ImageTemplateSource",
+ modelProperties: {
+ type: {
+ required: true,
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateCustomizer: msRest.CompositeMapper = {
+ serializedName: "ImageTemplateCustomizer",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: {
+ serializedName: "type",
+ clientName: "type"
+ },
+ uberParent: "ImageTemplateCustomizer",
+ className: "ImageTemplateCustomizer",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ required: true,
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateDistributor: msRest.CompositeMapper = {
+ serializedName: "ImageTemplateDistributor",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: {
+ serializedName: "type",
+ clientName: "type"
+ },
+ uberParent: "ImageTemplateDistributor",
+ className: "ImageTemplateDistributor",
+ modelProperties: {
+ runOutputName: {
+ required: true,
+ serializedName: "runOutputName",
+ constraints: {
+ Pattern: /^[A-Za-z0-9-_.]{1,64}$/
+ },
+ type: {
+ name: "String"
+ }
+ },
+ artifactTags: {
+ serializedName: "artifactTags",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ },
+ type: {
+ required: true,
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ProvisioningError: msRest.CompositeMapper = {
+ serializedName: "ProvisioningError",
+ type: {
+ name: "Composite",
+ className: "ProvisioningError",
+ modelProperties: {
+ provisioningErrorCode: {
+ serializedName: "provisioningErrorCode",
+ type: {
+ name: "String"
+ }
+ },
+ message: {
+ serializedName: "message",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateLastRunStatus: msRest.CompositeMapper = {
+ serializedName: "ImageTemplateLastRunStatus",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateLastRunStatus",
+ modelProperties: {
+ startTime: {
+ serializedName: "startTime",
+ type: {
+ name: "DateTime"
+ }
+ },
+ endTime: {
+ serializedName: "endTime",
+ type: {
+ name: "DateTime"
+ }
+ },
+ runState: {
+ serializedName: "runState",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Running",
+ "Canceling",
+ "Succeeded",
+ "PartiallySucceeded",
+ "Failed",
+ "Canceled"
+ ]
+ }
+ },
+ runSubState: {
+ serializedName: "runSubState",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Queued",
+ "Building",
+ "Customizing",
+ "Distributing"
+ ]
+ }
+ },
+ message: {
+ serializedName: "message",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const VirtualNetworkConfig: msRest.CompositeMapper = {
+ serializedName: "VirtualNetworkConfig",
+ type: {
+ name: "Composite",
+ className: "VirtualNetworkConfig",
+ modelProperties: {
+ subnetId: {
+ serializedName: "subnetId",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateVmProfile: msRest.CompositeMapper = {
+ serializedName: "ImageTemplateVmProfile",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateVmProfile",
+ modelProperties: {
+ vmSize: {
+ serializedName: "vmSize",
+ defaultValue: '',
+ type: {
+ name: "String"
+ }
+ },
+ osDiskSizeGB: {
+ serializedName: "osDiskSizeGB",
+ defaultValue: 0,
+ constraints: {
+ InclusiveMinimum: 0
+ },
+ type: {
+ name: "Number"
+ }
+ },
+ vnetConfig: {
+ serializedName: "vnetConfig",
+ type: {
+ name: "Composite",
+ className: "VirtualNetworkConfig"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateIdentityUserAssignedIdentitiesValue: msRest.CompositeMapper = {
+ serializedName: "ImageTemplateIdentity_userAssignedIdentitiesValue",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateIdentityUserAssignedIdentitiesValue",
+ modelProperties: {
+ principalId: {
+ readOnly: true,
+ serializedName: "principalId",
+ type: {
+ name: "String"
+ }
+ },
+ clientId: {
+ readOnly: true,
+ serializedName: "clientId",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateIdentity: msRest.CompositeMapper = {
+ serializedName: "ImageTemplateIdentity",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateIdentity",
+ modelProperties: {
+ type: {
+ serializedName: "type",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "UserAssigned",
+ "None"
+ ]
+ }
+ },
+ userAssignedIdentities: {
+ serializedName: "userAssignedIdentities",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "Composite",
+ className: "ImageTemplateIdentityUserAssignedIdentitiesValue"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const Resource: msRest.CompositeMapper = {
+ serializedName: "Resource",
+ type: {
+ name: "Composite",
+ className: "Resource",
+ modelProperties: {
+ id: {
+ readOnly: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ readOnly: true,
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ },
+ location: {
+ required: true,
+ serializedName: "location",
+ type: {
+ name: "String"
+ }
+ },
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplate: msRest.CompositeMapper = {
+ serializedName: "ImageTemplate",
+ type: {
+ name: "Composite",
+ className: "ImageTemplate",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ source: {
+ required: true,
+ serializedName: "properties.source",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateSource"
+ }
+ },
+ customize: {
+ serializedName: "properties.customize",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ImageTemplateCustomizer"
+ }
+ }
+ }
+ },
+ distribute: {
+ required: true,
+ serializedName: "properties.distribute",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ImageTemplateDistributor"
+ }
+ }
+ }
+ },
+ provisioningState: {
+ readOnly: true,
+ serializedName: "properties.provisioningState",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Creating",
+ "Updating",
+ "Succeeded",
+ "Failed",
+ "Deleting"
+ ]
+ }
+ },
+ provisioningError: {
+ readOnly: true,
+ serializedName: "properties.provisioningError",
+ type: {
+ name: "Composite",
+ className: "ProvisioningError"
+ }
+ },
+ lastRunStatus: {
+ readOnly: true,
+ serializedName: "properties.lastRunStatus",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateLastRunStatus"
+ }
+ },
+ buildTimeoutInMinutes: {
+ serializedName: "properties.buildTimeoutInMinutes",
+ defaultValue: 0,
+ constraints: {
+ InclusiveMaximum: 960,
+ InclusiveMinimum: 0
+ },
+ type: {
+ name: "Number"
+ }
+ },
+ vmProfile: {
+ serializedName: "properties.vmProfile",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateVmProfile"
+ }
+ },
+ identity: {
+ required: true,
+ serializedName: "identity",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateIdentity"
+ }
+ }
+ }
+ }
+};
+
+export const PlatformImagePurchasePlan: msRest.CompositeMapper = {
+ serializedName: "PlatformImagePurchasePlan",
+ type: {
+ name: "Composite",
+ className: "PlatformImagePurchasePlan",
+ modelProperties: {
+ planName: {
+ required: true,
+ serializedName: "planName",
+ type: {
+ name: "String"
+ }
+ },
+ planProduct: {
+ required: true,
+ serializedName: "planProduct",
+ type: {
+ name: "String"
+ }
+ },
+ planPublisher: {
+ required: true,
+ serializedName: "planPublisher",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplatePlatformImageSource: msRest.CompositeMapper = {
+ serializedName: "PlatformImage",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateSource.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateSource",
+ className: "ImageTemplatePlatformImageSource",
+ modelProperties: {
+ ...ImageTemplateSource.type.modelProperties,
+ publisher: {
+ serializedName: "publisher",
+ type: {
+ name: "String"
+ }
+ },
+ offer: {
+ serializedName: "offer",
+ type: {
+ name: "String"
+ }
+ },
+ sku: {
+ serializedName: "sku",
+ type: {
+ name: "String"
+ }
+ },
+ version: {
+ serializedName: "version",
+ type: {
+ name: "String"
+ }
+ },
+ planInfo: {
+ serializedName: "planInfo",
+ type: {
+ name: "Composite",
+ className: "PlatformImagePurchasePlan"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateManagedImageSource: msRest.CompositeMapper = {
+ serializedName: "ManagedImage",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateSource.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateSource",
+ className: "ImageTemplateManagedImageSource",
+ modelProperties: {
+ ...ImageTemplateSource.type.modelProperties,
+ imageId: {
+ required: true,
+ serializedName: "imageId",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateSharedImageVersionSource: msRest.CompositeMapper = {
+ serializedName: "SharedImageVersion",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateSource.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateSource",
+ className: "ImageTemplateSharedImageVersionSource",
+ modelProperties: {
+ ...ImageTemplateSource.type.modelProperties,
+ imageVersionId: {
+ required: true,
+ serializedName: "imageVersionId",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateShellCustomizer: msRest.CompositeMapper = {
+ serializedName: "Shell",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateCustomizer.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateCustomizer",
+ className: "ImageTemplateShellCustomizer",
+ modelProperties: {
+ ...ImageTemplateCustomizer.type.modelProperties,
+ scriptUri: {
+ serializedName: "scriptUri",
+ type: {
+ name: "String"
+ }
+ },
+ sha256Checksum: {
+ serializedName: "sha256Checksum",
+ defaultValue: '',
+ type: {
+ name: "String"
+ }
+ },
+ inline: {
+ serializedName: "inline",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateRestartCustomizer: msRest.CompositeMapper = {
+ serializedName: "WindowsRestart",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateCustomizer.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateCustomizer",
+ className: "ImageTemplateRestartCustomizer",
+ modelProperties: {
+ ...ImageTemplateCustomizer.type.modelProperties,
+ restartCommand: {
+ serializedName: "restartCommand",
+ type: {
+ name: "String"
+ }
+ },
+ restartCheckCommand: {
+ serializedName: "restartCheckCommand",
+ type: {
+ name: "String"
+ }
+ },
+ restartTimeout: {
+ serializedName: "restartTimeout",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateWindowsUpdateCustomizer: msRest.CompositeMapper = {
+ serializedName: "WindowsUpdate",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateCustomizer.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateCustomizer",
+ className: "ImageTemplateWindowsUpdateCustomizer",
+ modelProperties: {
+ ...ImageTemplateCustomizer.type.modelProperties,
+ searchCriteria: {
+ serializedName: "searchCriteria",
+ type: {
+ name: "String"
+ }
+ },
+ filters: {
+ serializedName: "filters",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ },
+ updateLimit: {
+ serializedName: "updateLimit",
+ constraints: {
+ InclusiveMinimum: 0
+ },
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplatePowerShellCustomizer: msRest.CompositeMapper = {
+ serializedName: "PowerShell",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateCustomizer.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateCustomizer",
+ className: "ImageTemplatePowerShellCustomizer",
+ modelProperties: {
+ ...ImageTemplateCustomizer.type.modelProperties,
+ scriptUri: {
+ serializedName: "scriptUri",
+ type: {
+ name: "String"
+ }
+ },
+ sha256Checksum: {
+ serializedName: "sha256Checksum",
+ defaultValue: '',
+ type: {
+ name: "String"
+ }
+ },
+ inline: {
+ serializedName: "inline",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ },
+ runElevated: {
+ serializedName: "runElevated",
+ defaultValue: false,
+ type: {
+ name: "Boolean"
+ }
+ },
+ runAsSystem: {
+ serializedName: "runAsSystem",
+ defaultValue: false,
+ type: {
+ name: "Boolean"
+ }
+ },
+ validExitCodes: {
+ serializedName: "validExitCodes",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateFileCustomizer: msRest.CompositeMapper = {
+ serializedName: "File",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateCustomizer.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateCustomizer",
+ className: "ImageTemplateFileCustomizer",
+ modelProperties: {
+ ...ImageTemplateCustomizer.type.modelProperties,
+ sourceUri: {
+ serializedName: "sourceUri",
+ type: {
+ name: "String"
+ }
+ },
+ sha256Checksum: {
+ serializedName: "sha256Checksum",
+ defaultValue: '',
+ type: {
+ name: "String"
+ }
+ },
+ destination: {
+ serializedName: "destination",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateManagedImageDistributor: msRest.CompositeMapper = {
+ serializedName: "ManagedImage",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateDistributor.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateDistributor",
+ className: "ImageTemplateManagedImageDistributor",
+ modelProperties: {
+ ...ImageTemplateDistributor.type.modelProperties,
+ imageId: {
+ required: true,
+ serializedName: "imageId",
+ type: {
+ name: "String"
+ }
+ },
+ location: {
+ required: true,
+ serializedName: "location",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateSharedImageDistributor: msRest.CompositeMapper = {
+ serializedName: "SharedImage",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateDistributor.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateDistributor",
+ className: "ImageTemplateSharedImageDistributor",
+ modelProperties: {
+ ...ImageTemplateDistributor.type.modelProperties,
+ galleryImageId: {
+ required: true,
+ serializedName: "galleryImageId",
+ type: {
+ name: "String"
+ }
+ },
+ replicationRegions: {
+ required: true,
+ serializedName: "replicationRegions",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ },
+ excludeFromLatest: {
+ serializedName: "excludeFromLatest",
+ defaultValue: false,
+ type: {
+ name: "Boolean"
+ }
+ },
+ storageAccountType: {
+ serializedName: "storageAccountType",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateVhdDistributor: msRest.CompositeMapper = {
+ serializedName: "VHD",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ImageTemplateDistributor.type.polymorphicDiscriminator,
+ uberParent: "ImageTemplateDistributor",
+ className: "ImageTemplateVhdDistributor",
+ modelProperties: {
+ ...ImageTemplateDistributor.type.modelProperties
+ }
+ }
+};
+
+export const ImageTemplateUpdateParameters: msRest.CompositeMapper = {
+ serializedName: "ImageTemplateUpdateParameters",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateUpdateParameters",
+ modelProperties: {
+ identity: {
+ serializedName: "identity",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateIdentity"
+ }
+ },
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const SubResource: msRest.CompositeMapper = {
+ serializedName: "SubResource",
+ type: {
+ name: "Composite",
+ className: "SubResource",
+ modelProperties: {
+ id: {
+ readOnly: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ required: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ readOnly: true,
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const RunOutput: msRest.CompositeMapper = {
+ serializedName: "RunOutput",
+ type: {
+ name: "Composite",
+ className: "RunOutput",
+ modelProperties: {
+ ...SubResource.type.modelProperties,
+ artifactId: {
+ serializedName: "properties.artifactId",
+ type: {
+ name: "String"
+ }
+ },
+ artifactUri: {
+ serializedName: "properties.artifactUri",
+ type: {
+ name: "String"
+ }
+ },
+ provisioningState: {
+ readOnly: true,
+ serializedName: "properties.provisioningState",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Creating",
+ "Updating",
+ "Succeeded",
+ "Failed",
+ "Deleting"
+ ]
+ }
+ }
+ }
+ }
+};
+
+export const OperationDisplay: msRest.CompositeMapper = {
+ serializedName: "Operation_display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay",
+ modelProperties: {
+ provider: {
+ serializedName: "provider",
+ type: {
+ name: "String"
+ }
+ },
+ operation: {
+ serializedName: "operation",
+ type: {
+ name: "String"
+ }
+ },
+ resource: {
+ serializedName: "resource",
+ type: {
+ name: "String"
+ }
+ },
+ description: {
+ serializedName: "description",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Operation: msRest.CompositeMapper = {
+ serializedName: "Operation",
+ type: {
+ name: "Composite",
+ className: "Operation",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ display: {
+ serializedName: "display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay"
+ }
+ },
+ origin: {
+ serializedName: "origin",
+ type: {
+ name: "String"
+ }
+ },
+ properties: {
+ serializedName: "properties",
+ type: {
+ name: "Object"
+ }
+ },
+ isDataAction: {
+ serializedName: "isDataAction",
+ type: {
+ name: "Boolean"
+ }
+ }
+ }
+ }
+};
+
+export const ApiErrorBase: msRest.CompositeMapper = {
+ serializedName: "ApiErrorBase",
+ type: {
+ name: "Composite",
+ className: "ApiErrorBase",
+ modelProperties: {
+ code: {
+ serializedName: "code",
+ type: {
+ name: "String"
+ }
+ },
+ target: {
+ serializedName: "target",
+ type: {
+ name: "String"
+ }
+ },
+ message: {
+ serializedName: "message",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const InnerError: msRest.CompositeMapper = {
+ serializedName: "InnerError",
+ type: {
+ name: "Composite",
+ className: "InnerError",
+ modelProperties: {
+ exceptionType: {
+ serializedName: "exceptionType",
+ type: {
+ name: "String"
+ }
+ },
+ errorDetail: {
+ serializedName: "errorDetail",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ApiError: msRest.CompositeMapper = {
+ serializedName: "ApiError",
+ type: {
+ name: "Composite",
+ className: "ApiError",
+ modelProperties: {
+ details: {
+ serializedName: "details",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ApiErrorBase"
+ }
+ }
+ }
+ },
+ innerError: {
+ serializedName: "innerError",
+ type: {
+ name: "Composite",
+ className: "InnerError"
+ }
+ },
+ code: {
+ serializedName: "code",
+ type: {
+ name: "String"
+ }
+ },
+ target: {
+ serializedName: "target",
+ type: {
+ name: "String"
+ }
+ },
+ message: {
+ serializedName: "message",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTemplateListResult: msRest.CompositeMapper = {
+ serializedName: "ImageTemplateListResult",
+ type: {
+ name: "Composite",
+ className: "ImageTemplateListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ImageTemplate"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const RunOutputCollection: msRest.CompositeMapper = {
+ serializedName: "RunOutputCollection",
+ type: {
+ name: "Composite",
+ className: "RunOutputCollection",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "RunOutput"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const OperationListResult: msRest.CompositeMapper = {
+ serializedName: "OperationListResult",
+ type: {
+ name: "Composite",
+ className: "OperationListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Operation"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const discriminators = {
+ 'ImageTemplateSource' : ImageTemplateSource,
+ 'ImageTemplateCustomizer' : ImageTemplateCustomizer,
+ 'ImageTemplateDistributor' : ImageTemplateDistributor,
+ 'ImageTemplateSource.PlatformImage' : ImageTemplatePlatformImageSource,
+ 'ImageTemplateSource.ManagedImage' : ImageTemplateManagedImageSource,
+ 'ImageTemplateSource.SharedImageVersion' : ImageTemplateSharedImageVersionSource,
+ 'ImageTemplateCustomizer.Shell' : ImageTemplateShellCustomizer,
+ 'ImageTemplateCustomizer.WindowsRestart' : ImageTemplateRestartCustomizer,
+ 'ImageTemplateCustomizer.WindowsUpdate' : ImageTemplateWindowsUpdateCustomizer,
+ 'ImageTemplateCustomizer.PowerShell' : ImageTemplatePowerShellCustomizer,
+ 'ImageTemplateCustomizer.File' : ImageTemplateFileCustomizer,
+ 'ImageTemplateDistributor.ManagedImage' : ImageTemplateManagedImageDistributor,
+ 'ImageTemplateDistributor.SharedImage' : ImageTemplateSharedImageDistributor,
+ 'ImageTemplateDistributor.VHD' : ImageTemplateVhdDistributor
+
+};
diff --git a/sdk/imagebuilder/arm-imagebuilder/src/models/operationsMappers.ts b/sdk/imagebuilder/arm-imagebuilder/src/models/operationsMappers.ts
new file mode 100644
index 000000000000..8130b2f5e3f1
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/src/models/operationsMappers.ts
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+export {
+ discriminators,
+ ApiError,
+ ApiErrorBase,
+ InnerError,
+ Operation,
+ OperationDisplay,
+ OperationListResult
+} from "../models/mappers";
diff --git a/sdk/imagebuilder/arm-imagebuilder/src/models/parameters.ts b/sdk/imagebuilder/arm-imagebuilder/src/models/parameters.ts
new file mode 100644
index 000000000000..c8027a01e67e
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/src/models/parameters.ts
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "@azure/ms-rest-js";
+
+export const acceptLanguage: msRest.OperationParameter = {
+ parameterPath: "acceptLanguage",
+ mapper: {
+ serializedName: "accept-language",
+ defaultValue: 'en-US',
+ type: {
+ name: "String"
+ }
+ }
+};
+export const apiVersion: msRest.OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ required: true,
+ serializedName: "api-version",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const imageTemplateName: msRest.OperationURLParameter = {
+ parameterPath: "imageTemplateName",
+ mapper: {
+ required: true,
+ serializedName: "imageTemplateName",
+ constraints: {
+ Pattern: /^[A-Za-z0-9-_.]{1,64}$/
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const nextPageLink: msRest.OperationURLParameter = {
+ parameterPath: "nextPageLink",
+ mapper: {
+ required: true,
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+export const resourceGroupName: msRest.OperationURLParameter = {
+ parameterPath: "resourceGroupName",
+ mapper: {
+ required: true,
+ serializedName: "resourceGroupName",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const runOutputName: msRest.OperationURLParameter = {
+ parameterPath: "runOutputName",
+ mapper: {
+ required: true,
+ serializedName: "runOutputName",
+ constraints: {
+ Pattern: /^[A-Za-z0-9-_.]{1,64}$/
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const subscriptionId: msRest.OperationURLParameter = {
+ parameterPath: "subscriptionId",
+ mapper: {
+ required: true,
+ serializedName: "subscriptionId",
+ type: {
+ name: "String"
+ }
+ }
+};
diff --git a/sdk/imagebuilder/arm-imagebuilder/src/models/virtualMachineImageTemplatesMappers.ts b/sdk/imagebuilder/arm-imagebuilder/src/models/virtualMachineImageTemplatesMappers.ts
new file mode 100644
index 000000000000..2c0b479a27d1
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/src/models/virtualMachineImageTemplatesMappers.ts
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+export {
+ discriminators,
+ ApiError,
+ ApiErrorBase,
+ BaseResource,
+ ImageTemplate,
+ ImageTemplateCustomizer,
+ ImageTemplateDistributor,
+ ImageTemplateFileCustomizer,
+ ImageTemplateIdentity,
+ ImageTemplateIdentityUserAssignedIdentitiesValue,
+ ImageTemplateLastRunStatus,
+ ImageTemplateListResult,
+ ImageTemplateManagedImageDistributor,
+ ImageTemplateManagedImageSource,
+ ImageTemplatePlatformImageSource,
+ ImageTemplatePowerShellCustomizer,
+ ImageTemplateRestartCustomizer,
+ ImageTemplateSharedImageDistributor,
+ ImageTemplateSharedImageVersionSource,
+ ImageTemplateShellCustomizer,
+ ImageTemplateSource,
+ ImageTemplateUpdateParameters,
+ ImageTemplateVhdDistributor,
+ ImageTemplateVmProfile,
+ ImageTemplateWindowsUpdateCustomizer,
+ InnerError,
+ PlatformImagePurchasePlan,
+ ProvisioningError,
+ Resource,
+ RunOutput,
+ RunOutputCollection,
+ SubResource,
+ VirtualNetworkConfig
+} from "../models/mappers";
diff --git a/sdk/imagebuilder/arm-imagebuilder/src/operations/index.ts b/sdk/imagebuilder/arm-imagebuilder/src/operations/index.ts
new file mode 100644
index 000000000000..69426bc9f739
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/src/operations/index.ts
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export * from "./virtualMachineImageTemplates";
+export * from "./operations";
diff --git a/sdk/imagebuilder/arm-imagebuilder/src/operations/operations.ts b/sdk/imagebuilder/arm-imagebuilder/src/operations/operations.ts
new file mode 100644
index 000000000000..452568c61f41
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/src/operations/operations.ts
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/operationsMappers";
+import * as Parameters from "../models/parameters";
+import { ImageBuilderClientContext } from "../imageBuilderClientContext";
+
+/** Class representing a Operations. */
+export class Operations {
+ private readonly client: ImageBuilderClientContext;
+
+ /**
+ * Create a Operations.
+ * @param {ImageBuilderClientContext} client Reference to the service client.
+ */
+ constructor(client: ImageBuilderClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Lists available operations for the Microsoft.VirtualMachineImages provider
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ list(options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param callback The callback
+ */
+ list(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ options
+ },
+ listOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Lists available operations for the Microsoft.VirtualMachineImages provider
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listNextOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "providers/Microsoft.VirtualMachineImages/operations",
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.OperationListResult
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const listNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.OperationListResult
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
diff --git a/sdk/imagebuilder/arm-imagebuilder/src/operations/virtualMachineImageTemplates.ts b/sdk/imagebuilder/arm-imagebuilder/src/operations/virtualMachineImageTemplates.ts
new file mode 100644
index 000000000000..b3ed61b4d304
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/src/operations/virtualMachineImageTemplates.ts
@@ -0,0 +1,760 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+import * as Models from "../models";
+import * as Mappers from "../models/virtualMachineImageTemplatesMappers";
+import * as Parameters from "../models/parameters";
+import { ImageBuilderClientContext } from "../imageBuilderClientContext";
+
+/** Class representing a VirtualMachineImageTemplates. */
+export class VirtualMachineImageTemplates {
+ private readonly client: ImageBuilderClientContext;
+
+ /**
+ * Create a VirtualMachineImageTemplates.
+ * @param {ImageBuilderClientContext} client Reference to the service client.
+ */
+ constructor(client: ImageBuilderClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Gets information about the VM image templates associated with the subscription.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ list(options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param callback The callback
+ */
+ list(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ options
+ },
+ listOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets information about the VM image templates associated with the specified resource group.
+ * @param resourceGroupName The name of the resource group.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group.
+ * @param callback The callback
+ */
+ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ options
+ },
+ listByResourceGroupOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Create or update a virtual machine image template
+ * @param parameters Parameters supplied to the CreateImageTemplate operation
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdate(parameters: Models.ImageTemplate, resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginCreateOrUpdate(parameters,resourceGroupName,imageTemplateName,options)
+ .then(lroPoller => lroPoller.pollUntilFinished()) as Promise;
+ }
+
+ /**
+ * Update the tags for this Virtual Machine Image Template
+ * @param parameters Additional parameters for Image Template update.
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ update(parameters: Models.ImageTemplateUpdateParameters, resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginUpdate(parameters,resourceGroupName,imageTemplateName,options)
+ .then(lroPoller => lroPoller.pollUntilFinished()) as Promise;
+ }
+
+ /**
+ * Get information about a virtual machine image template
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ get(resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param callback The callback
+ */
+ get(resourceGroupName: string, imageTemplateName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ get(resourceGroupName: string, imageTemplateName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ get(resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ imageTemplateName,
+ options
+ },
+ getOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Delete a virtual machine image template
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteMethod(resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginDeleteMethod(resourceGroupName,imageTemplateName,options)
+ .then(lroPoller => lroPoller.pollUntilFinished());
+ }
+
+ /**
+ * Create artifacts from a existing image template
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ run(resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginRun(resourceGroupName,imageTemplateName,options)
+ .then(lroPoller => lroPoller.pollUntilFinished());
+ }
+
+ /**
+ * Cancel the long running image build based on the image template
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ cancel(resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginCancel(resourceGroupName,imageTemplateName,options)
+ .then(lroPoller => lroPoller.pollUntilFinished());
+ }
+
+ /**
+ * List all run outputs for the specified Image Template resource
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listRunOutputs(resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param callback The callback
+ */
+ listRunOutputs(resourceGroupName: string, imageTemplateName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listRunOutputs(resourceGroupName: string, imageTemplateName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listRunOutputs(resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ imageTemplateName,
+ options
+ },
+ listRunOutputsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Get the specified run output for the specified image template resource
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param runOutputName The name of the run output
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getRunOutput(resourceGroupName: string, imageTemplateName: string, runOutputName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param runOutputName The name of the run output
+ * @param callback The callback
+ */
+ getRunOutput(resourceGroupName: string, imageTemplateName: string, runOutputName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param runOutputName The name of the run output
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getRunOutput(resourceGroupName: string, imageTemplateName: string, runOutputName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getRunOutput(resourceGroupName: string, imageTemplateName: string, runOutputName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ imageTemplateName,
+ runOutputName,
+ options
+ },
+ getRunOutputOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Create or update a virtual machine image template
+ * @param parameters Parameters supplied to the CreateImageTemplate operation
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ beginCreateOrUpdate(parameters: Models.ImageTemplate, resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.client.sendLRORequest(
+ {
+ parameters,
+ resourceGroupName,
+ imageTemplateName,
+ options
+ },
+ beginCreateOrUpdateOperationSpec,
+ options);
+ }
+
+ /**
+ * Update the tags for this Virtual Machine Image Template
+ * @param parameters Additional parameters for Image Template update.
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ beginUpdate(parameters: Models.ImageTemplateUpdateParameters, resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.client.sendLRORequest(
+ {
+ parameters,
+ resourceGroupName,
+ imageTemplateName,
+ options
+ },
+ beginUpdateOperationSpec,
+ options);
+ }
+
+ /**
+ * Delete a virtual machine image template
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ beginDeleteMethod(resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.client.sendLRORequest(
+ {
+ resourceGroupName,
+ imageTemplateName,
+ options
+ },
+ beginDeleteMethodOperationSpec,
+ options);
+ }
+
+ /**
+ * Create artifacts from a existing image template
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ beginRun(resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.client.sendLRORequest(
+ {
+ resourceGroupName,
+ imageTemplateName,
+ options
+ },
+ beginRunOperationSpec,
+ options);
+ }
+
+ /**
+ * Cancel the long running image build based on the image template
+ * @param resourceGroupName The name of the resource group.
+ * @param imageTemplateName The name of the image Template
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ beginCancel(resourceGroupName: string, imageTemplateName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.client.sendLRORequest(
+ {
+ resourceGroupName,
+ imageTemplateName,
+ options
+ },
+ beginCancelOperationSpec,
+ options);
+ }
+
+ /**
+ * Gets information about the VM image templates associated with the subscription.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listNextOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets information about the VM image templates associated with the specified resource group.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listByResourceGroupNextOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * List all run outputs for the specified Image Template resource
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listRunOutputsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listRunOutputsNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listRunOutputsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listRunOutputsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listRunOutputsNextOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/providers/Microsoft.VirtualMachineImages/imageTemplates",
+ urlParameters: [
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ImageTemplateListResult
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const listByResourceGroupOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates",
+ urlParameters: [
+ Parameters.resourceGroupName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ImageTemplateListResult
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const getOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.imageTemplateName
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ImageTemplate
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const listRunOutputsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.imageTemplateName
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.RunOutputCollection
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const getRunOutputOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs/{runOutputName}",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.imageTemplateName,
+ Parameters.runOutputName
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.RunOutput
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
+ httpMethod: "PUT",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.imageTemplateName
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ requestBody: {
+ parameterPath: "parameters",
+ mapper: {
+ ...Mappers.ImageTemplate,
+ required: true
+ }
+ },
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ImageTemplate
+ },
+ 201: {
+ bodyMapper: Mappers.ImageTemplate
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const beginUpdateOperationSpec: msRest.OperationSpec = {
+ httpMethod: "PATCH",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.imageTemplateName
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ requestBody: {
+ parameterPath: "parameters",
+ mapper: {
+ ...Mappers.ImageTemplateUpdateParameters,
+ required: true
+ }
+ },
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ImageTemplate
+ },
+ 202: {},
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
+ httpMethod: "DELETE",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.imageTemplateName
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {},
+ 202: {},
+ 204: {},
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const beginRunOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/run",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.imageTemplateName
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {},
+ 202: {},
+ 204: {},
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const beginCancelOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/cancel",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.imageTemplateName
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {},
+ 202: {},
+ 204: {},
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const listNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ImageTemplateListResult
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ImageTemplateListResult
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
+
+const listRunOutputsNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.RunOutputCollection
+ },
+ default: {
+ bodyMapper: Mappers.ApiError
+ }
+ },
+ serializer
+};
diff --git a/sdk/imagebuilder/arm-imagebuilder/tsconfig.json b/sdk/imagebuilder/arm-imagebuilder/tsconfig.json
new file mode 100644
index 000000000000..422b584abd5e
--- /dev/null
+++ b/sdk/imagebuilder/arm-imagebuilder/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "es6",
+ "moduleResolution": "node",
+ "strict": true,
+ "target": "es5",
+ "sourceMap": true,
+ "declarationMap": true,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true,
+ "forceConsistentCasingInFileNames": true,
+ "lib": ["es6", "dom"],
+ "declaration": true,
+ "outDir": "./esm",
+ "importHelpers": true
+ },
+ "include": ["./src/**/*.ts"],
+ "exclude": ["node_modules"]
+}