diff --git a/sdk/compute/arm-compute/src/computeManagementClient.ts b/sdk/compute/arm-compute/src/computeManagementClient.ts index 4617fee5e9c3..c59b37fbe18f 100644 --- a/sdk/compute/arm-compute/src/computeManagementClient.ts +++ b/sdk/compute/arm-compute/src/computeManagementClient.ts @@ -37,6 +37,7 @@ class ComputeManagementClient extends ComputeManagementClientContext { virtualMachineScaleSetVMs: operations.VirtualMachineScaleSetVMs; logAnalytics: operations.LogAnalytics; virtualMachineRunCommands: operations.VirtualMachineRunCommands; + virtualMachineScaleSetVMRunCommands: operations.VirtualMachineScaleSetVMRunCommands; resourceSkus: operations.ResourceSkus; disks: operations.Disks; snapshots: operations.Snapshots; @@ -78,6 +79,7 @@ class ComputeManagementClient extends ComputeManagementClientContext { this.virtualMachineScaleSetVMs = new operations.VirtualMachineScaleSetVMs(this); this.logAnalytics = new operations.LogAnalytics(this); this.virtualMachineRunCommands = new operations.VirtualMachineRunCommands(this); + this.virtualMachineScaleSetVMRunCommands = new operations.VirtualMachineScaleSetVMRunCommands(this); this.resourceSkus = new operations.ResourceSkus(this); this.disks = new operations.Disks(this); this.snapshots = new operations.Snapshots(this); diff --git a/sdk/compute/arm-compute/src/models/availabilitySetsMappers.ts b/sdk/compute/arm-compute/src/models/availabilitySetsMappers.ts index 81c92f5c003c..b6087615d40c 100644 --- a/sdk/compute/arm-compute/src/models/availabilitySetsMappers.ts +++ b/sdk/compute/arm-compute/src/models/availabilitySetsMappers.ts @@ -129,6 +129,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -169,6 +170,10 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/containerServicesMappers.ts b/sdk/compute/arm-compute/src/models/containerServicesMappers.ts index f51c43681cb0..6b3d96a35f1b 100644 --- a/sdk/compute/arm-compute/src/models/containerServicesMappers.ts +++ b/sdk/compute/arm-compute/src/models/containerServicesMappers.ts @@ -124,6 +124,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -161,6 +162,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/dedicatedHostGroupsMappers.ts b/sdk/compute/arm-compute/src/models/dedicatedHostGroupsMappers.ts index d6492a5ccb31..d1b68765c263 100644 --- a/sdk/compute/arm-compute/src/models/dedicatedHostGroupsMappers.ts +++ b/sdk/compute/arm-compute/src/models/dedicatedHostGroupsMappers.ts @@ -129,6 +129,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -169,6 +170,10 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/dedicatedHostsMappers.ts b/sdk/compute/arm-compute/src/models/dedicatedHostsMappers.ts index e13ef3198917..e571a624a45b 100644 --- a/sdk/compute/arm-compute/src/models/dedicatedHostsMappers.ts +++ b/sdk/compute/arm-compute/src/models/dedicatedHostsMappers.ts @@ -129,6 +129,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -169,6 +170,10 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/diskAccessesMappers.ts b/sdk/compute/arm-compute/src/models/diskAccessesMappers.ts index 04693ac9ce02..ebee27dd247c 100644 --- a/sdk/compute/arm-compute/src/models/diskAccessesMappers.ts +++ b/sdk/compute/arm-compute/src/models/diskAccessesMappers.ts @@ -127,6 +127,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -164,6 +165,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/diskEncryptionSetsMappers.ts b/sdk/compute/arm-compute/src/models/diskEncryptionSetsMappers.ts index 1fb77b62ea0b..329bbc4fbf0f 100644 --- a/sdk/compute/arm-compute/src/models/diskEncryptionSetsMappers.ts +++ b/sdk/compute/arm-compute/src/models/diskEncryptionSetsMappers.ts @@ -126,6 +126,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -163,6 +164,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/disksMappers.ts b/sdk/compute/arm-compute/src/models/disksMappers.ts index f4b1367453d6..7aeb255cb8f6 100644 --- a/sdk/compute/arm-compute/src/models/disksMappers.ts +++ b/sdk/compute/arm-compute/src/models/disksMappers.ts @@ -127,6 +127,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -164,6 +165,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/galleriesMappers.ts b/sdk/compute/arm-compute/src/models/galleriesMappers.ts index e8848382bd37..2546940bde55 100644 --- a/sdk/compute/arm-compute/src/models/galleriesMappers.ts +++ b/sdk/compute/arm-compute/src/models/galleriesMappers.ts @@ -124,6 +124,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -161,6 +162,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/galleryApplicationVersionsMappers.ts b/sdk/compute/arm-compute/src/models/galleryApplicationVersionsMappers.ts index 08917ccbf34c..a1126391a9dd 100644 --- a/sdk/compute/arm-compute/src/models/galleryApplicationVersionsMappers.ts +++ b/sdk/compute/arm-compute/src/models/galleryApplicationVersionsMappers.ts @@ -124,6 +124,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -161,6 +162,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/galleryApplicationsMappers.ts b/sdk/compute/arm-compute/src/models/galleryApplicationsMappers.ts index 23e299c473a6..5d6d03e4c1c5 100644 --- a/sdk/compute/arm-compute/src/models/galleryApplicationsMappers.ts +++ b/sdk/compute/arm-compute/src/models/galleryApplicationsMappers.ts @@ -124,6 +124,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -161,6 +162,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/galleryImageVersionsMappers.ts b/sdk/compute/arm-compute/src/models/galleryImageVersionsMappers.ts index f793a9a603e8..d4d8b2dea84f 100644 --- a/sdk/compute/arm-compute/src/models/galleryImageVersionsMappers.ts +++ b/sdk/compute/arm-compute/src/models/galleryImageVersionsMappers.ts @@ -124,6 +124,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -161,6 +162,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/galleryImagesMappers.ts b/sdk/compute/arm-compute/src/models/galleryImagesMappers.ts index 578486eff4ca..014a453f6d7e 100644 --- a/sdk/compute/arm-compute/src/models/galleryImagesMappers.ts +++ b/sdk/compute/arm-compute/src/models/galleryImagesMappers.ts @@ -124,6 +124,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -161,6 +162,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/imagesMappers.ts b/sdk/compute/arm-compute/src/models/imagesMappers.ts index 69e44f43cd84..032b360f1b9e 100644 --- a/sdk/compute/arm-compute/src/models/imagesMappers.ts +++ b/sdk/compute/arm-compute/src/models/imagesMappers.ts @@ -129,6 +129,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -169,6 +170,10 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/index.ts b/sdk/compute/arm-compute/src/models/index.ts index cc59586f553f..b2893571cacf 100644 --- a/sdk/compute/arm-compute/src/models/index.ts +++ b/sdk/compute/arm-compute/src/models/index.ts @@ -4683,6 +4683,169 @@ export interface RunCommandResult { value?: InstanceViewStatus[]; } +/** + * The instance view of a virtual machine run command. + */ +export interface VirtualMachineRunCommandInstanceView { + /** + * Script execution status. Possible values include: 'Unknown', 'Pending', 'Running', 'Failed', + * 'Succeeded', 'TimedOut', 'Canceled' + */ + executionState?: ExecutionState; + /** + * Communicate script configuration errors or execution messages. + */ + executionMessage?: string; + /** + * Exit code returned from script execution. + */ + exitCode?: number; + /** + * Script output stream. + */ + output?: string; + /** + * Script error stream. + */ + error?: string; + /** + * Script start time. + */ + startTime?: Date; + /** + * Script end time. + */ + endTime?: Date; + /** + * The resource status information. + */ + statuses?: InstanceViewStatus[]; +} + +/** + * Describes the script sources for run command. + */ +export interface VirtualMachineRunCommandScriptSource { + /** + * Specifies the script content to be executed on the VM. + */ + script?: string; + /** + * Specifies the script download location. + */ + scriptUri?: string; + /** + * Specifies a commandId of predefined built-in script. + */ + commandId?: string; +} + +/** + * Describes a Virtual Machine run command. + */ +export interface VirtualMachineRunCommand extends Resource { + /** + * The source of the run command script. + */ + source?: VirtualMachineRunCommandScriptSource; + /** + * The parameters used by the script. + */ + parameters?: RunCommandInputParameter[]; + /** + * The parameters used by the script. + */ + protectedParameters?: RunCommandInputParameter[]; + /** + * Optional. If set to true, provisioning will complete as soon as the script starts and will not + * wait for script to complete. Default value: false. + */ + asyncExecution?: boolean; + /** + * Specifies the user account on the VM when executing the run command. + */ + runAsUser?: string; + /** + * Specifies the user account password on the VM when executing the run command. + */ + runAsPassword?: string; + /** + * The timeout in seconds to execute the run command. + */ + timeoutInSeconds?: number; + /** + * Specifies the Azure storage blob where script output stream will be uploaded. + */ + outputBlobUri?: string; + /** + * Specifies the Azure storage blob where script error stream will be uploaded. + */ + errorBlobUri?: string; + /** + * The provisioning state, which only appears in the response. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * The virtual machine run command instance view. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly instanceView?: VirtualMachineRunCommandInstanceView; +} + +/** + * Describes a Virtual Machine run command. + */ +export interface VirtualMachineRunCommandUpdate extends UpdateResource { + /** + * The source of the run command script. + */ + source?: VirtualMachineRunCommandScriptSource; + /** + * The parameters used by the script. + */ + parameters?: RunCommandInputParameter[]; + /** + * The parameters used by the script. + */ + protectedParameters?: RunCommandInputParameter[]; + /** + * Optional. If set to true, provisioning will complete as soon as the script starts and will not + * wait for script to complete. Default value: false. + */ + asyncExecution?: boolean; + /** + * Specifies the user account on the VM when executing the run command. + */ + runAsUser?: string; + /** + * Specifies the user account password on the VM when executing the run command. + */ + runAsPassword?: string; + /** + * The timeout in seconds to execute the run command. + */ + timeoutInSeconds?: number; + /** + * Specifies the Azure storage blob where script output stream will be uploaded. + */ + outputBlobUri?: string; + /** + * Specifies the Azure storage blob where script error stream will be uploaded. + */ + errorBlobUri?: string; + /** + * The provisioning state, which only appears in the response. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * The virtual machine run command instance view. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly instanceView?: VirtualMachineRunCommandInstanceView; +} + /** * Describes scaling information of a SKU. */ @@ -6590,6 +6753,16 @@ export interface VirtualMachineImagesListOptionalParams extends msRest.RequestOp orderby?: string; } +/** + * Optional Parameters. + */ +export interface VirtualMachinesDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Optional parameter to force delete virtual machines. + */ + forceDeletion?: boolean; +} + /** * Optional Parameters. */ @@ -6644,6 +6817,16 @@ export interface VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams extend sasUriExpirationTimeInMinutes?: number; } +/** + * Optional Parameters. + */ +export interface VirtualMachinesBeginDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Optional parameter to force delete virtual machines. + */ + forceDeletion?: boolean; +} + /** * Optional Parameters. */ @@ -6964,6 +7147,46 @@ export interface VirtualMachineScaleSetVMsBeginPowerOffOptionalParams extends ms skipShutdown?: boolean; } +/** + * Optional Parameters. + */ +export interface VirtualMachineRunCommandsGetByVirtualMachineOptionalParams extends msRest.RequestOptionsBase { + /** + * The expand expression to apply on the operation. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface VirtualMachineRunCommandsListByVirtualMachineOptionalParams extends msRest.RequestOptionsBase { + /** + * The expand expression to apply on the operation. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface VirtualMachineScaleSetVMRunCommandsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * The expand expression to apply on the operation. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface VirtualMachineScaleSetVMRunCommandsListOptionalParams extends msRest.RequestOptionsBase { + /** + * The expand expression to apply on the operation. + */ + expand?: string; +} + /** * Optional Parameters. */ @@ -7211,6 +7434,18 @@ export interface RunCommandListResult extends Array { nextLink?: string; } +/** + * @interface + * The List run command operation response + * @extends Array + */ +export interface VirtualMachineRunCommandsListResult extends Array { + /** + * The uri to fetch the next page of run commands. + */ + nextLink?: string; +} + /** * @interface * The List Resource Skus operation response. @@ -7721,6 +7956,15 @@ export type IntervalInMins = 'ThreeMins' | 'FiveMins' | 'ThirtyMins' | 'SixtyMin */ export type OrchestrationServiceStateAction = 'Resume' | 'Suspend'; +/** + * Defines values for ExecutionState. + * Possible values include: 'Unknown', 'Pending', 'Running', 'Failed', 'Succeeded', 'TimedOut', + * 'Canceled' + * @readonly + * @enum {string} + */ +export type ExecutionState = 'Unknown' | 'Pending' | 'Running' | 'Failed' | 'Succeeded' | 'TimedOut' | 'Canceled'; + /** * Defines values for ResourceSkuCapacityScaleType. * Possible values include: 'Automatic', 'Manual', 'None' @@ -10508,6 +10752,126 @@ export type VirtualMachineRunCommandsGetResponse = RunCommandDocument & { }; }; +/** + * Contains response data for the createOrUpdate operation. + */ +export type VirtualMachineRunCommandsCreateOrUpdateResponse = VirtualMachineRunCommand & { + /** + * 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: VirtualMachineRunCommand; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type VirtualMachineRunCommandsUpdateResponse = VirtualMachineRunCommand & { + /** + * 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: VirtualMachineRunCommand; + }; +}; + +/** + * Contains response data for the getByVirtualMachine operation. + */ +export type VirtualMachineRunCommandsGetByVirtualMachineResponse = VirtualMachineRunCommand & { + /** + * 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: VirtualMachineRunCommand; + }; +}; + +/** + * Contains response data for the listByVirtualMachine operation. + */ +export type VirtualMachineRunCommandsListByVirtualMachineResponse = VirtualMachineRunCommandsListResult & { + /** + * 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: VirtualMachineRunCommandsListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type VirtualMachineRunCommandsBeginCreateOrUpdateResponse = VirtualMachineRunCommand & { + /** + * 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: VirtualMachineRunCommand; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type VirtualMachineRunCommandsBeginUpdateResponse = VirtualMachineRunCommand & { + /** + * 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: VirtualMachineRunCommand; + }; +}; + /** * Contains response data for the listNext operation. */ @@ -10528,6 +10892,166 @@ export type VirtualMachineRunCommandsListNextResponse = RunCommandListResult & { }; }; +/** + * Contains response data for the listByVirtualMachineNext operation. + */ +export type VirtualMachineRunCommandsListByVirtualMachineNextResponse = VirtualMachineRunCommandsListResult & { + /** + * 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: VirtualMachineRunCommandsListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse = VirtualMachineRunCommand & { + /** + * 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: VirtualMachineRunCommand; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type VirtualMachineScaleSetVMRunCommandsUpdateResponse = VirtualMachineRunCommand & { + /** + * 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: VirtualMachineRunCommand; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VirtualMachineScaleSetVMRunCommandsGetResponse = VirtualMachineRunCommand & { + /** + * 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: VirtualMachineRunCommand; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type VirtualMachineScaleSetVMRunCommandsListResponse = VirtualMachineRunCommandsListResult & { + /** + * 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: VirtualMachineRunCommandsListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type VirtualMachineScaleSetVMRunCommandsBeginCreateOrUpdateResponse = VirtualMachineRunCommand & { + /** + * 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: VirtualMachineRunCommand; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type VirtualMachineScaleSetVMRunCommandsBeginUpdateResponse = VirtualMachineRunCommand & { + /** + * 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: VirtualMachineRunCommand; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type VirtualMachineScaleSetVMRunCommandsListNextResponse = VirtualMachineRunCommandsListResult & { + /** + * 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: VirtualMachineRunCommandsListResult; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/sdk/compute/arm-compute/src/models/mappers.ts b/sdk/compute/arm-compute/src/models/mappers.ts index 0f992c30506b..1d89141ec7d4 100644 --- a/sdk/compute/arm-compute/src/models/mappers.ts +++ b/sdk/compute/arm-compute/src/models/mappers.ts @@ -7093,6 +7093,286 @@ export const RunCommandResult: msRest.CompositeMapper = { } }; +export const VirtualMachineRunCommandInstanceView: msRest.CompositeMapper = { + serializedName: "VirtualMachineRunCommandInstanceView", + type: { + name: "Composite", + className: "VirtualMachineRunCommandInstanceView", + modelProperties: { + executionState: { + serializedName: "executionState", + type: { + name: "String" + } + }, + executionMessage: { + serializedName: "executionMessage", + type: { + name: "String" + } + }, + exitCode: { + serializedName: "exitCode", + type: { + name: "Number" + } + }, + output: { + serializedName: "output", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + statuses: { + serializedName: "statuses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } + } + } + } + } +}; + +export const VirtualMachineRunCommandScriptSource: msRest.CompositeMapper = { + serializedName: "VirtualMachineRunCommandScriptSource", + type: { + name: "Composite", + className: "VirtualMachineRunCommandScriptSource", + modelProperties: { + script: { + serializedName: "script", + type: { + name: "String" + } + }, + scriptUri: { + serializedName: "scriptUri", + type: { + name: "String" + } + }, + commandId: { + serializedName: "commandId", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineRunCommand: msRest.CompositeMapper = { + serializedName: "VirtualMachineRunCommand", + type: { + name: "Composite", + className: "VirtualMachineRunCommand", + modelProperties: { + ...Resource.type.modelProperties, + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "VirtualMachineRunCommandScriptSource" + } + }, + parameters: { + serializedName: "properties.parameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter" + } + } + } + }, + protectedParameters: { + serializedName: "properties.protectedParameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter" + } + } + } + }, + asyncExecution: { + serializedName: "properties.asyncExecution", + defaultValue: false, + type: { + name: "Boolean" + } + }, + runAsUser: { + serializedName: "properties.runAsUser", + type: { + name: "String" + } + }, + runAsPassword: { + serializedName: "properties.runAsPassword", + type: { + name: "String" + } + }, + timeoutInSeconds: { + serializedName: "properties.timeoutInSeconds", + type: { + name: "Number" + } + }, + outputBlobUri: { + serializedName: "properties.outputBlobUri", + type: { + name: "String" + } + }, + errorBlobUri: { + serializedName: "properties.errorBlobUri", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + instanceView: { + readOnly: true, + serializedName: "properties.instanceView", + type: { + name: "Composite", + className: "VirtualMachineRunCommandInstanceView" + } + } + } + } +}; + +export const VirtualMachineRunCommandUpdate: msRest.CompositeMapper = { + serializedName: "VirtualMachineRunCommandUpdate", + type: { + name: "Composite", + className: "VirtualMachineRunCommandUpdate", + modelProperties: { + ...UpdateResource.type.modelProperties, + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "VirtualMachineRunCommandScriptSource" + } + }, + parameters: { + serializedName: "properties.parameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter" + } + } + } + }, + protectedParameters: { + serializedName: "properties.protectedParameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter" + } + } + } + }, + asyncExecution: { + serializedName: "properties.asyncExecution", + defaultValue: false, + type: { + name: "Boolean" + } + }, + runAsUser: { + serializedName: "properties.runAsUser", + type: { + name: "String" + } + }, + runAsPassword: { + serializedName: "properties.runAsPassword", + type: { + name: "String" + } + }, + timeoutInSeconds: { + serializedName: "properties.timeoutInSeconds", + type: { + name: "Number" + } + }, + outputBlobUri: { + serializedName: "properties.outputBlobUri", + type: { + name: "String" + } + }, + errorBlobUri: { + serializedName: "properties.errorBlobUri", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + instanceView: { + readOnly: true, + serializedName: "properties.instanceView", + type: { + name: "Composite", + className: "VirtualMachineRunCommandInstanceView" + } + } + } + } +}; + export const ResourceSkuCapacity: msRest.CompositeMapper = { serializedName: "ResourceSkuCapacity", type: { @@ -10676,6 +10956,35 @@ export const RunCommandListResult: msRest.CompositeMapper = { } }; +export const VirtualMachineRunCommandsListResult: msRest.CompositeMapper = { + serializedName: "VirtualMachineRunCommandsListResult", + type: { + name: "Composite", + className: "VirtualMachineRunCommandsListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineRunCommand" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ResourceSkusResult: msRest.CompositeMapper = { serializedName: "ResourceSkusResult", type: { diff --git a/sdk/compute/arm-compute/src/models/parameters.ts b/sdk/compute/arm-compute/src/models/parameters.ts index 30115323b65c..ec008b543895 100644 --- a/sdk/compute/arm-compute/src/models/parameters.ts +++ b/sdk/compute/arm-compute/src/models/parameters.ts @@ -179,6 +179,18 @@ export const filter: msRest.OperationQueryParameter = { } } }; +export const forceDeletion: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "forceDeletion" + ], + mapper: { + serializedName: "forceDeletion", + type: { + name: "Boolean" + } + } +}; export const galleryApplicationName: msRest.OperationURLParameter = { parameterPath: "galleryApplicationName", mapper: { @@ -377,6 +389,16 @@ export const resourceGroupName: msRest.OperationURLParameter = { } } }; +export const runCommandName: msRest.OperationURLParameter = { + parameterPath: "runCommandName", + mapper: { + required: true, + serializedName: "runCommandName", + type: { + name: "String" + } + } +}; export const sasUriExpirationTimeInMinutes: msRest.OperationQueryParameter = { parameterPath: [ "options", diff --git a/sdk/compute/arm-compute/src/models/proximityPlacementGroupsMappers.ts b/sdk/compute/arm-compute/src/models/proximityPlacementGroupsMappers.ts index c95b98da90af..b8958479316a 100644 --- a/sdk/compute/arm-compute/src/models/proximityPlacementGroupsMappers.ts +++ b/sdk/compute/arm-compute/src/models/proximityPlacementGroupsMappers.ts @@ -129,6 +129,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -169,6 +170,10 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/snapshotsMappers.ts b/sdk/compute/arm-compute/src/models/snapshotsMappers.ts index b3701a644ec9..3da548e99889 100644 --- a/sdk/compute/arm-compute/src/models/snapshotsMappers.ts +++ b/sdk/compute/arm-compute/src/models/snapshotsMappers.ts @@ -125,6 +125,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -164,6 +165,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/sshPublicKeysMappers.ts b/sdk/compute/arm-compute/src/models/sshPublicKeysMappers.ts index 634c39bf3870..1785d5ec72c8 100644 --- a/sdk/compute/arm-compute/src/models/sshPublicKeysMappers.ts +++ b/sdk/compute/arm-compute/src/models/sshPublicKeysMappers.ts @@ -128,6 +128,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -170,6 +171,10 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/virtualMachineExtensionImagesMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineExtensionImagesMappers.ts index 94265b583cca..868fda8ab233 100644 --- a/sdk/compute/arm-compute/src/models/virtualMachineExtensionImagesMappers.ts +++ b/sdk/compute/arm-compute/src/models/virtualMachineExtensionImagesMappers.ts @@ -123,6 +123,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -160,6 +161,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/virtualMachineExtensionsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineExtensionsMappers.ts index 6299932f5dcc..1c7bc6b8f3b9 100644 --- a/sdk/compute/arm-compute/src/models/virtualMachineExtensionsMappers.ts +++ b/sdk/compute/arm-compute/src/models/virtualMachineExtensionsMappers.ts @@ -128,6 +128,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -169,6 +170,10 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/virtualMachineImagesMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineImagesMappers.ts index 94265b583cca..868fda8ab233 100644 --- a/sdk/compute/arm-compute/src/models/virtualMachineImagesMappers.ts +++ b/sdk/compute/arm-compute/src/models/virtualMachineImagesMappers.ts @@ -123,6 +123,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -160,6 +161,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/virtualMachineRunCommandsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineRunCommandsMappers.ts index 2bcbd6209547..f129b22bcc60 100644 --- a/sdk/compute/arm-compute/src/models/virtualMachineRunCommandsMappers.ts +++ b/sdk/compute/arm-compute/src/models/virtualMachineRunCommandsMappers.ts @@ -7,9 +7,211 @@ */ export { + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetUpdate, + AvailablePatchSummary, + BaseResource, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, CloudError, + ContainerService, + ContainerServiceAgentPoolProfile, + ContainerServiceCustomProfile, + ContainerServiceDiagnosticsProfile, + ContainerServiceLinuxProfile, + ContainerServiceMasterProfile, + ContainerServiceOrchestratorProfile, + ContainerServiceServicePrincipalProfile, + ContainerServiceSshConfiguration, + ContainerServiceSshPublicKey, + ContainerServiceVMDiagnostics, + ContainerServiceWindowsProfile, + CreationData, + DataDisk, + DataDiskImage, + DataDiskImageEncryption, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + Disallowed, + DisallowedConfiguration, + Disk, + DiskAccess, + DiskEncryptionSet, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskImageEncryption, + DiskInstanceView, + DiskSku, + Encryption, + EncryptionImages, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + Gallery, + GalleryApplication, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryIdentifier, + GalleryImage, + GalleryImageIdentifier, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionPublishingProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUpdate, + GalleryOSDiskImage, + GalleryUpdate, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageDiskReference, + ImageOSDisk, + ImagePurchasePlan, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSDiskImageEncryption, + OSProfile, + PatchSettings, + Plan, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProximityPlacementGroup, + ProximityPlacementGroupUpdate, + PurchasePlan, + RecommendedMachineConfiguration, + RegionalReplicationStatus, + ReplicationStatus, + Resource, + ResourceRange, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, RunCommandDocument, RunCommandDocumentBase, + RunCommandInputParameter, RunCommandListResult, - RunCommandParameterDefinition + RunCommandParameterDefinition, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + ShareInfoElement, + Sku, + Snapshot, + SnapshotSku, + SourceVault, + SshConfiguration, + SshPublicKey, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + TargetRegion, + TerminateNotificationProfile, + UpdateResource, + UpdateResourceDefinition, + UpgradePolicy, + UserArtifactSource, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineIdentityUserAssignedIdentitiesValue, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandsListResult, + VirtualMachineRunCommandUpdate, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineUpdate, + WindowsConfiguration, + WinRMConfiguration, + WinRMListener } from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetExtensionsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetExtensionsMappers.ts index b97e1690a27a..7b7f263e1889 100644 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetExtensionsMappers.ts +++ b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetExtensionsMappers.ts @@ -123,6 +123,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -160,6 +161,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetRollingUpgradesMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetRollingUpgradesMappers.ts index 94265b583cca..868fda8ab233 100644 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetRollingUpgradesMappers.ts +++ b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetRollingUpgradesMappers.ts @@ -123,6 +123,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -160,6 +161,9 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMExtensionsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMExtensionsMappers.ts index 6299932f5dcc..1c7bc6b8f3b9 100644 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMExtensionsMappers.ts +++ b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMExtensionsMappers.ts @@ -128,6 +128,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -169,6 +170,10 @@ export { VirtualMachineImageResource, VirtualMachineInstanceView, VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMRunCommandsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMRunCommandsMappers.ts new file mode 100644 index 000000000000..a8e731c67bd4 --- /dev/null +++ b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMRunCommandsMappers.ts @@ -0,0 +1,213 @@ +/* + * 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. + */ + +export { + AdditionalCapabilities, + AdditionalUnattendContent, + ApiEntityReference, + ApiError, + ApiErrorBase, + AutomaticOSUpgradePolicy, + AutomaticOSUpgradeProperties, + AutomaticRepairsPolicy, + AvailabilitySet, + AvailabilitySetUpdate, + AvailablePatchSummary, + BaseResource, + BillingProfile, + BootDiagnostics, + BootDiagnosticsInstanceView, + CloudError, + ContainerService, + ContainerServiceAgentPoolProfile, + ContainerServiceCustomProfile, + ContainerServiceDiagnosticsProfile, + ContainerServiceLinuxProfile, + ContainerServiceMasterProfile, + ContainerServiceOrchestratorProfile, + ContainerServiceServicePrincipalProfile, + ContainerServiceSshConfiguration, + ContainerServiceSshPublicKey, + ContainerServiceVMDiagnostics, + ContainerServiceWindowsProfile, + CreationData, + DataDisk, + DataDiskImage, + DataDiskImageEncryption, + DedicatedHost, + DedicatedHostAllocatableVM, + DedicatedHostAvailableCapacity, + DedicatedHostGroup, + DedicatedHostGroupInstanceView, + DedicatedHostGroupUpdate, + DedicatedHostInstanceView, + DedicatedHostInstanceViewWithName, + DedicatedHostUpdate, + DiagnosticsProfile, + DiffDiskSettings, + Disallowed, + DisallowedConfiguration, + Disk, + DiskAccess, + DiskEncryptionSet, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + DiskImageEncryption, + DiskInstanceView, + DiskSku, + Encryption, + EncryptionImages, + EncryptionSetIdentity, + EncryptionSettingsCollection, + EncryptionSettingsElement, + Gallery, + GalleryApplication, + GalleryApplicationUpdate, + GalleryApplicationVersion, + GalleryApplicationVersionPublishingProfile, + GalleryApplicationVersionUpdate, + GalleryArtifactPublishingProfileBase, + GalleryArtifactVersionSource, + GalleryDataDiskImage, + GalleryDiskImage, + GalleryIdentifier, + GalleryImage, + GalleryImageIdentifier, + GalleryImageUpdate, + GalleryImageVersion, + GalleryImageVersionPublishingProfile, + GalleryImageVersionStorageProfile, + GalleryImageVersionUpdate, + GalleryOSDiskImage, + GalleryUpdate, + HardwareProfile, + Image, + ImageDataDisk, + ImageDisk, + ImageDiskReference, + ImageOSDisk, + ImagePurchasePlan, + ImageReference, + ImageStorageProfile, + ImageUpdate, + InnerError, + InstanceViewStatus, + KeyVaultAndKeyReference, + KeyVaultAndSecretReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LastPatchInstallationSummary, + LinuxConfiguration, + MaintenanceRedeployStatus, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkProfile, + OSDisk, + OSDiskImage, + OSDiskImageEncryption, + OSProfile, + PatchSettings, + Plan, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkServiceConnectionState, + ProximityPlacementGroup, + ProximityPlacementGroupUpdate, + PurchasePlan, + RecommendedMachineConfiguration, + RegionalReplicationStatus, + ReplicationStatus, + Resource, + ResourceRange, + RollingUpgradePolicy, + RollingUpgradeProgressInfo, + RollingUpgradeRunningStatus, + RollingUpgradeStatusInfo, + RunCommandInputParameter, + ScaleInPolicy, + ScheduledEventsProfile, + SecurityProfile, + ShareInfoElement, + Sku, + Snapshot, + SnapshotSku, + SourceVault, + SshConfiguration, + SshPublicKey, + SshPublicKeyResource, + SshPublicKeyUpdateResource, + StorageProfile, + SubResource, + SubResourceReadOnly, + SubResourceWithColocationStatus, + TargetRegion, + TerminateNotificationProfile, + UpdateResource, + UpdateResourceDefinition, + UpgradePolicy, + UserArtifactSource, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineAgentInstanceView, + VirtualMachineCaptureResult, + VirtualMachineExtension, + VirtualMachineExtensionHandlerInstanceView, + VirtualMachineExtensionImage, + VirtualMachineExtensionInstanceView, + VirtualMachineExtensionUpdate, + VirtualMachineHealthStatus, + VirtualMachineIdentity, + VirtualMachineIdentityUserAssignedIdentitiesValue, + VirtualMachineImage, + VirtualMachineImageResource, + VirtualMachineInstanceView, + VirtualMachinePatchStatus, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandsListResult, + VirtualMachineRunCommandUpdate, + VirtualMachineScaleSet, + VirtualMachineScaleSetDataDisk, + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionProfile, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetIdentity, + VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, + VirtualMachineScaleSetIPConfiguration, + VirtualMachineScaleSetIpTag, + VirtualMachineScaleSetManagedDiskParameters, + VirtualMachineScaleSetNetworkConfiguration, + VirtualMachineScaleSetNetworkConfigurationDnsSettings, + VirtualMachineScaleSetNetworkProfile, + VirtualMachineScaleSetOSDisk, + VirtualMachineScaleSetOSProfile, + VirtualMachineScaleSetPublicIPAddressConfiguration, + VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, + VirtualMachineScaleSetStorageProfile, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetUpdateIPConfiguration, + VirtualMachineScaleSetUpdateNetworkConfiguration, + VirtualMachineScaleSetUpdateNetworkProfile, + VirtualMachineScaleSetUpdateOSDisk, + VirtualMachineScaleSetUpdateOSProfile, + VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, + VirtualMachineScaleSetUpdateStorageProfile, + VirtualMachineScaleSetUpdateVMProfile, + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMInstanceView, + VirtualMachineScaleSetVMNetworkProfileConfiguration, + VirtualMachineScaleSetVMProfile, + VirtualMachineScaleSetVMProtectionPolicy, + VirtualMachineUpdate, + WindowsConfiguration, + WinRMConfiguration, + WinRMListener +} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMsMappers.ts index 5a4992a8918f..7784fdeb9a8a 100644 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMsMappers.ts +++ b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMsMappers.ts @@ -165,6 +165,9 @@ export { VirtualMachineInstanceView, VirtualMachinePatchStatus, VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetsMappers.ts index 7ada9068e03d..65cfa9fcc258 100644 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetsMappers.ts +++ b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetsMappers.ts @@ -132,6 +132,7 @@ export { RollingUpgradeProgressInfo, RollingUpgradeRunningStatus, RollingUpgradeStatusInfo, + RunCommandInputParameter, ScaleInPolicy, ScheduledEventsProfile, SecurityProfile, @@ -176,6 +177,10 @@ export { VirtualMachineInstanceView, VirtualMachinePatchStatus, VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/models/virtualMachinesMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachinesMappers.ts index d2ce653f6004..0a460b9f8ab6 100644 --- a/sdk/compute/arm-compute/src/models/virtualMachinesMappers.ts +++ b/sdk/compute/arm-compute/src/models/virtualMachinesMappers.ts @@ -176,6 +176,10 @@ export { VirtualMachineListResult, VirtualMachinePatchStatus, VirtualMachineReimageParameters, + VirtualMachineRunCommand, + VirtualMachineRunCommandInstanceView, + VirtualMachineRunCommandScriptSource, + VirtualMachineRunCommandUpdate, VirtualMachineScaleSet, VirtualMachineScaleSetDataDisk, VirtualMachineScaleSetExtension, diff --git a/sdk/compute/arm-compute/src/operations/index.ts b/sdk/compute/arm-compute/src/operations/index.ts index be38385dadc1..98b520df9692 100644 --- a/sdk/compute/arm-compute/src/operations/index.ts +++ b/sdk/compute/arm-compute/src/operations/index.ts @@ -28,6 +28,7 @@ export * from "./virtualMachineScaleSetVMExtensions"; export * from "./virtualMachineScaleSetVMs"; export * from "./logAnalytics"; export * from "./virtualMachineRunCommands"; +export * from "./virtualMachineScaleSetVMRunCommands"; export * from "./resourceSkus"; export * from "./disks"; export * from "./snapshots"; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts b/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts index 134182cee58b..ba9c19fcae31 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts @@ -9,6 +9,7 @@ */ 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/virtualMachineRunCommandsMappers"; import * as Parameters from "../models/parameters"; @@ -86,6 +87,181 @@ export class VirtualMachineRunCommands { callback) as Promise; } + /** + * The operation to create or update the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be created or + * updated. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommand, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,vmName,runCommandName,runCommand,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The operation to update the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be updated. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommandUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,vmName,runCommandName,runCommand,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The operation to delete the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be deleted. + * @param runCommandName The name of the virtual machine run command. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, vmName: string, runCommandName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,vmName,runCommandName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * The operation to get the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the run command. + * @param runCommandName The name of the virtual machine run command. + * @param [options] The optional parameters + * @returns Promise + */ + getByVirtualMachine(resourceGroupName: string, vmName: string, runCommandName: string, options?: Models.VirtualMachineRunCommandsGetByVirtualMachineOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the run command. + * @param runCommandName The name of the virtual machine run command. + * @param callback The callback + */ + getByVirtualMachine(resourceGroupName: string, vmName: string, runCommandName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the run command. + * @param runCommandName The name of the virtual machine run command. + * @param options The optional parameters + * @param callback The callback + */ + getByVirtualMachine(resourceGroupName: string, vmName: string, runCommandName: string, options: Models.VirtualMachineRunCommandsGetByVirtualMachineOptionalParams, callback: msRest.ServiceCallback): void; + getByVirtualMachine(resourceGroupName: string, vmName: string, runCommandName: string, options?: Models.VirtualMachineRunCommandsGetByVirtualMachineOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vmName, + runCommandName, + options + }, + getByVirtualMachineOperationSpec, + callback) as Promise; + } + + /** + * The operation to get all run commands of a Virtual Machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the run command. + * @param [options] The optional parameters + * @returns Promise + */ + listByVirtualMachine(resourceGroupName: string, vmName: string, options?: Models.VirtualMachineRunCommandsListByVirtualMachineOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the run command. + * @param callback The callback + */ + listByVirtualMachine(resourceGroupName: string, vmName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the run command. + * @param options The optional parameters + * @param callback The callback + */ + listByVirtualMachine(resourceGroupName: string, vmName: string, options: Models.VirtualMachineRunCommandsListByVirtualMachineOptionalParams, callback: msRest.ServiceCallback): void; + listByVirtualMachine(resourceGroupName: string, vmName: string, options?: Models.VirtualMachineRunCommandsListByVirtualMachineOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vmName, + options + }, + listByVirtualMachineOperationSpec, + callback) as Promise; + } + + /** + * The operation to create or update the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be created or + * updated. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommand, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vmName, + runCommandName, + runCommand, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * The operation to update the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be updated. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommandUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vmName, + runCommandName, + runCommand, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * The operation to delete the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be deleted. + * @param runCommandName The name of the virtual machine run command. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, vmName: string, runCommandName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vmName, + runCommandName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + /** * Lists all available run commands for a subscription in a location. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -113,6 +289,34 @@ export class VirtualMachineRunCommands { listNextOperationSpec, callback) as Promise; } + + /** + * The operation to get all run commands of a Virtual Machine. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByVirtualMachineNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByVirtualMachineNext(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 + */ + listByVirtualMachineNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByVirtualMachineNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByVirtualMachineNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -166,6 +370,154 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; +const getByVirtualMachineOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vmName, + Parameters.runCommandName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.expand0, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByVirtualMachineOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vmName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.expand0, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineRunCommandsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vmName, + Parameters.runCommandName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "runCommand", + mapper: { + ...Mappers.VirtualMachineRunCommand, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 201: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vmName, + Parameters.runCommandName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "runCommand", + mapper: { + ...Mappers.VirtualMachineRunCommandUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vmName, + Parameters.runCommandName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", @@ -186,3 +538,24 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByVirtualMachineNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineRunCommandsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.ts new file mode 100644 index 000000000000..6e3b726a327e --- /dev/null +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.ts @@ -0,0 +1,423 @@ +/* + * 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. + */ + +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/virtualMachineScaleSetVMRunCommandsMappers"; +import * as Parameters from "../models/parameters"; +import { ComputeManagementClientContext } from "../computeManagementClientContext"; + +/** Class representing a VirtualMachineScaleSetVMRunCommands. */ +export class VirtualMachineScaleSetVMRunCommands { + private readonly client: ComputeManagementClientContext; + + /** + * Create a VirtualMachineScaleSetVMRunCommands. + * @param {ComputeManagementClientContext} client Reference to the service client. + */ + constructor(client: ComputeManagementClientContext) { + this.client = client; + } + + /** + * The operation to create or update the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommand, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,vmScaleSetName,instanceId,runCommandName,runCommand,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The operation to update the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommandUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,vmScaleSetName,instanceId,runCommandName,runCommand,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The operation to delete the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,vmScaleSetName,instanceId,runCommandName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * The operation to get the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: Models.VirtualMachineScaleSetVMRunCommandsGetOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param callback The callback + */ + get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options: Models.VirtualMachineScaleSetVMRunCommandsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: Models.VirtualMachineScaleSetVMRunCommandsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vmScaleSetName, + instanceId, + runCommandName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The operation to get all run commands of an instance in Virtual Machine Scaleset. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMRunCommandsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param callback The callback + */ + list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: Models.VirtualMachineScaleSetVMRunCommandsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMRunCommandsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vmScaleSetName, + instanceId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * The operation to create or update the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommand, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vmScaleSetName, + instanceId, + runCommandName, + runCommand, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * The operation to update the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommandUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vmScaleSetName, + instanceId, + runCommandName, + runCommand, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * The operation to delete the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vmScaleSetName, + instanceId, + runCommandName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * The operation to get all run commands of an instance in Virtual Machine Scaleset. + * @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 getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vmScaleSetName, + Parameters.instanceId, + Parameters.runCommandName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.expand0, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vmScaleSetName, + Parameters.instanceId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.expand0, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineRunCommandsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vmScaleSetName, + Parameters.instanceId, + Parameters.runCommandName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "runCommand", + mapper: { + ...Mappers.VirtualMachineRunCommand, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 201: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vmScaleSetName, + Parameters.instanceId, + Parameters.runCommandName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "runCommand", + mapper: { + ...Mappers.VirtualMachineRunCommandUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vmScaleSetName, + Parameters.instanceId, + Parameters.runCommandName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineRunCommandsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachines.ts b/sdk/compute/arm-compute/src/operations/virtualMachines.ts index ce51df188f82..3ccec79f95c2 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachines.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachines.ts @@ -103,7 +103,7 @@ export class VirtualMachines { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, vmName: string, options?: msRest.RequestOptionsBase): Promise { + deleteMethod(resourceGroupName: string, vmName: string, options?: Models.VirtualMachinesDeleteMethodOptionalParams): Promise { return this.beginDeleteMethod(resourceGroupName,vmName,options) .then(lroPoller => lroPoller.pollUntilFinished()); } @@ -564,7 +564,7 @@ export class VirtualMachines { * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod(resourceGroupName: string, vmName: string, options?: msRest.RequestOptionsBase): Promise { + beginDeleteMethod(resourceGroupName: string, vmName: string, options?: Models.VirtualMachinesBeginDeleteMethodOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -1199,6 +1199,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ + Parameters.forceDeletion, Parameters.apiVersion0 ], headerParameters: [