Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class ImageBuilderClient extends AzureServiceClient {
* @class
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {string} subscriptionId - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
* @param {string} subscriptionId - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of the URI for every service call.
*
* @param {string} [baseUri] - The base URI of the service.
*
Expand Down
4 changes: 2 additions & 2 deletions lib/services/imagebuilderManagement/lib/imageBuilderClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ImageBuilderClient extends ServiceClient {
/**
* Create a ImageBuilderClient.
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
* @param {string} subscriptionId - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
* @param {string} subscriptionId - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of the URI for every service call.
* @param {string} [baseUri] - The base URI of the service.
* @param {object} [options] - The parameter options
* @param {Array} [options.filters] - Filters to be added to the request pipeline
Expand All @@ -50,7 +50,7 @@ class ImageBuilderClient extends ServiceClient {

super(credentials, options);

this.apiVersion = '2018-02-01-preview';
this.apiVersion = '2019-02-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand Down
10 changes: 5 additions & 5 deletions lib/services/imagebuilderManagement/lib/models/apiError.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class ApiError {
/**
* Create a ApiError.
* @property {array} [details] The Api error details
* @property {object} [innererror] The Api inner error
* @property {string} [innererror.exceptiontype] The exception type.
* @property {string} [innererror.errordetail] The internal error message or
* @property {object} [innerError] The Api inner error
* @property {string} [innerError.exceptionType] The exception type.
* @property {string} [innerError.errorDetail] The internal error message or
* exception dump.
* @property {string} [code] The error code.
* @property {string} [target] The target of the particular error.
Expand Down Expand Up @@ -58,9 +58,9 @@ class ApiError {
}
}
},
innererror: {
innerError: {
required: false,
serializedName: 'innererror',
serializedName: 'innerError',
type: {
name: 'Composite',
className: 'InnerError'
Expand Down
15 changes: 8 additions & 7 deletions lib/services/imagebuilderManagement/lib/models/imageTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ class ImageTemplate extends models['Resource'] {
* @property {object} [provisioningError] Provisioning error, if any
* @property {string} [provisioningError.provisioningErrorCode] Error code of
* the provisioning failure. Possible values include: 'BadSourceType',
* 'BadPIRSource', 'BadISOSource', 'BadCustomizerType',
* 'NoCustomizerShellScript', 'ServerError', 'Other'
* 'BadPIRSource', 'BadISOSource', 'BadManagedImageSource',
* 'BadCustomizerType', 'UnsupportedCustomizerType', 'NoCustomizerScript',
* 'BadDistributeType', 'BadSharedImageDistribute', 'ServerError', 'Other'
* @property {string} [provisioningError.message] Verbose error message about
* the provisioning failure
* @property {object} [lastRunStatus] State of 'run' that is currently
Expand All @@ -41,11 +42,11 @@ class ImageTemplate extends models['Resource'] {
* (UTC)
* @property {date} [lastRunStatus.endTime] End time of the last run (UTC)
* @property {string} [lastRunStatus.runState] State of the last run.
* Possible values include: 'ready', 'running', 'succeeded',
* 'partiallySucceeded', 'failed'
* @property {string} [lastRunStatus.runSubState] Sub state of the last run.
* Possible values include: 'queued', 'building', 'customizing',
* 'distributing'
* Possible values include: 'Running', 'Succeeded', 'PartiallySucceeded',
* 'Failed'
* @property {string} [lastRunStatus.runSubState] Sub-state of the last run.
* Possible values include: 'Queued', 'Building', 'Customizing',
* 'Distributing'
* @property {string} [lastRunStatus.message] Verbose information about the
* last run state
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const models = require('./index');
class ImageTemplateIsoSource extends models['ImageTemplateSource'] {
/**
* Create a ImageTemplateIsoSource.
* @property {string} sourceURI URL to get the ISO image. This URL has to be
* accessible to the resource provider at the time of the imageTemplate
* @property {string} sourceURI URI to get the ISO image. This URI has to be
* accessible to the resource provider at the time of the image template
* creation.
* @property {string} sha256Checksum SHA256 Checksum of the ISO image.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class ImageTemplateLastRunStatus {
* @property {date} [startTime] Start time of the last run (UTC)
* @property {date} [endTime] End time of the last run (UTC)
* @property {string} [runState] State of the last run. Possible values
* include: 'ready', 'running', 'succeeded', 'partiallySucceeded', 'failed'
* @property {string} [runSubState] Sub state of the last run. Possible
* values include: 'queued', 'building', 'customizing', 'distributing'
* include: 'Running', 'Succeeded', 'PartiallySucceeded', 'Failed'
* @property {string} [runSubState] Sub-state of the last run. Possible
* values include: 'Queued', 'Building', 'Customizing', 'Distributing'
* @property {string} [message] Verbose information about the last run state
*/
constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ImageTemplateManagedImageDistributor extends models['ImageTemplateDistribu
mapper() {
return {
required: false,
serializedName: 'managedImage',
serializedName: 'ManagedImage',
type: {
name: 'Composite',
polymorphicDiscriminator: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

const models = require('./index');

/**
* Describes an image source that is a managed image in customer subscription.
*
* @extends models['ImageTemplateSource']
*/
class ImageTemplateManagedImageSource extends models['ImageTemplateSource'] {
/**
* Create a ImageTemplateManagedImageSource.
* @property {string} imageId ARM resource id of the managed image in
* customer subscription
*/
constructor() {
super();
}

/**
* Defines the metadata of ImageTemplateManagedImageSource
*
* @returns {object} metadata of ImageTemplateManagedImageSource
*
*/
mapper() {
return {
required: false,
serializedName: 'ManagedImage',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'type',
clientName: 'type'
},
uberParent: 'ImageTemplateSource',
className: 'ImageTemplateManagedImageSource',
modelProperties: {
type: {
required: true,
serializedName: 'type',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
},
imageId: {
required: true,
serializedName: 'imageId',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = ImageTemplateManagedImageSource;
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

const models = require('./index');

/**
* Runs the specified PowerSehll on the VM (Windows). Corresponds to Packer
* powershell provisioner
*
* @extends models['ImageTemplateCustomizer']
*/
class ImageTemplatePowerShellCustomizer extends models['ImageTemplateCustomizer'] {
/**
* Create a ImageTemplatePowerShellCustomizer.
* @property {string} [script] The PowerShell script to be run for
* customizing. It can be a github link, SAS URI for Azure Storage, etc
* @property {array} [validExitCodes]
*/
constructor() {
super();
}

/**
* Defines the metadata of ImageTemplatePowerShellCustomizer
*
* @returns {object} metadata of ImageTemplatePowerShellCustomizer
*
*/
mapper() {
return {
required: false,
serializedName: 'PowerShell',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'type',
clientName: 'type'
},
uberParent: 'ImageTemplateCustomizer',
className: 'ImageTemplatePowerShellCustomizer',
modelProperties: {
name: {
required: false,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: true,
serializedName: 'type',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
},
script: {
required: false,
serializedName: 'script',
type: {
name: 'String'
}
},
validExitCodes: {
required: false,
serializedName: 'validExitCodes',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'NumberElementType',
type: {
name: 'Number'
}
}
}
}
}
}
};
}
}

module.exports = ImageTemplatePowerShellCustomizer;
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

const models = require('./index');

/**
* Reboots a VM and waits for it to come back online (Windows). Corresponds to
* Packer windows-restart provisioner
*
* @extends models['ImageTemplateCustomizer']
*/
class ImageTemplateRestartCustomizer extends models['ImageTemplateCustomizer'] {
/**
* Create a ImageTemplateRestartCustomizer.
* @property {string} [restartCommand] Command to execute the restart
* [Default: 'shutdown /r /f /t 0 /c "packer restart"']
* @property {string} [restartCheckCommand] Command to check if restart
* succeeded [Default: '']
* @property {string} [restartTimeout] Restart timeout specified as a string
* of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default:
* '5m']
*/
constructor() {
super();
}

/**
* Defines the metadata of ImageTemplateRestartCustomizer
*
* @returns {object} metadata of ImageTemplateRestartCustomizer
*
*/
mapper() {
return {
required: false,
serializedName: 'WindowsRestart',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'type',
clientName: 'type'
},
uberParent: 'ImageTemplateCustomizer',
className: 'ImageTemplateRestartCustomizer',
modelProperties: {
name: {
required: false,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: true,
serializedName: 'type',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
},
restartCommand: {
required: false,
serializedName: 'restartCommand',
type: {
name: 'String'
}
},
restartCheckCommand: {
required: false,
serializedName: 'restartCheckCommand',
type: {
name: 'String'
}
},
restartTimeout: {
required: false,
serializedName: 'restartTimeout',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = ImageTemplateRestartCustomizer;
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ImageTemplateSharedImageDistributor extends models['ImageTemplateDistribut
mapper() {
return {
required: false,
serializedName: 'sharedImage',
serializedName: 'SharedImage',
type: {
name: 'Composite',
polymorphicDiscriminator: {
Expand Down
Loading