-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
VirtualMachineRunCommandUpdate.cs
88 lines (82 loc) · 10.1 KB
/
VirtualMachineRunCommandUpdate.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
namespace Azure.ResourceManager.Compute.Models
{
/// <summary> Describes a Virtual Machine run command. </summary>
public partial class VirtualMachineRunCommandUpdate : ComputeResourcePatch
{
/// <summary> Initializes a new instance of <see cref="VirtualMachineRunCommandUpdate"/>. </summary>
public VirtualMachineRunCommandUpdate()
{
Parameters = new ChangeTrackingList<RunCommandInputParameter>();
ProtectedParameters = new ChangeTrackingList<RunCommandInputParameter>();
}
/// <summary> Initializes a new instance of <see cref="VirtualMachineRunCommandUpdate"/>. </summary>
/// <param name="tags"> Resource tags. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
/// <param name="source"> The source of the run command script. </param>
/// <param name="parameters"> The parameters used by the script. </param>
/// <param name="protectedParameters"> The parameters used by the script. </param>
/// <param name="asyncExecution"> Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. </param>
/// <param name="runAsUser"> Specifies the user account on the VM when executing the run command. </param>
/// <param name="runAsPassword"> Specifies the user account password on the VM when executing the run command. </param>
/// <param name="timeoutInSeconds"> The timeout in seconds to execute the run command. </param>
/// <param name="outputBlobUri"> Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. </param>
/// <param name="errorBlobUri"> Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. </param>
/// <param name="outputBlobManagedIdentity"> User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. </param>
/// <param name="errorBlobManagedIdentity"> User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. </param>
/// <param name="provisioningState"> The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results. </param>
/// <param name="instanceView"> The virtual machine run command instance view. </param>
/// <param name="treatFailureAsDeploymentFailure"> Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results. </param>
internal VirtualMachineRunCommandUpdate(IDictionary<string, string> tags, IDictionary<string, BinaryData> serializedAdditionalRawData, VirtualMachineRunCommandScriptSource source, IList<RunCommandInputParameter> parameters, IList<RunCommandInputParameter> protectedParameters, bool? asyncExecution, string runAsUser, string runAsPassword, int? timeoutInSeconds, Uri outputBlobUri, Uri errorBlobUri, RunCommandManagedIdentity outputBlobManagedIdentity, RunCommandManagedIdentity errorBlobManagedIdentity, string provisioningState, VirtualMachineRunCommandInstanceView instanceView, bool? treatFailureAsDeploymentFailure) : base(tags, serializedAdditionalRawData)
{
Source = source;
Parameters = parameters;
ProtectedParameters = protectedParameters;
AsyncExecution = asyncExecution;
RunAsUser = runAsUser;
RunAsPassword = runAsPassword;
TimeoutInSeconds = timeoutInSeconds;
OutputBlobUri = outputBlobUri;
ErrorBlobUri = errorBlobUri;
OutputBlobManagedIdentity = outputBlobManagedIdentity;
ErrorBlobManagedIdentity = errorBlobManagedIdentity;
ProvisioningState = provisioningState;
InstanceView = instanceView;
TreatFailureAsDeploymentFailure = treatFailureAsDeploymentFailure;
}
/// <summary> The source of the run command script. </summary>
public VirtualMachineRunCommandScriptSource Source { get; set; }
/// <summary> The parameters used by the script. </summary>
public IList<RunCommandInputParameter> Parameters { get; }
/// <summary> The parameters used by the script. </summary>
public IList<RunCommandInputParameter> ProtectedParameters { get; }
/// <summary> Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. </summary>
public bool? AsyncExecution { get; set; }
/// <summary> Specifies the user account on the VM when executing the run command. </summary>
public string RunAsUser { get; set; }
/// <summary> Specifies the user account password on the VM when executing the run command. </summary>
public string RunAsPassword { get; set; }
/// <summary> The timeout in seconds to execute the run command. </summary>
public int? TimeoutInSeconds { get; set; }
/// <summary> Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. </summary>
public Uri OutputBlobUri { get; set; }
/// <summary> Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. </summary>
public Uri ErrorBlobUri { get; set; }
/// <summary> User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. </summary>
public RunCommandManagedIdentity OutputBlobManagedIdentity { get; set; }
/// <summary> User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. </summary>
public RunCommandManagedIdentity ErrorBlobManagedIdentity { get; set; }
/// <summary> The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results. </summary>
public string ProvisioningState { get; }
/// <summary> The virtual machine run command instance view. </summary>
public VirtualMachineRunCommandInstanceView InstanceView { get; }
/// <summary> Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results. </summary>
public bool? TreatFailureAsDeploymentFailure { get; set; }
}
}