VirtualMachineRunCommandInner Class
- java.
lang. Object - com.
azure. core. management. ProxyResource - com.
azure. core. management. Resource - com.
azure. resourcemanager. compute. fluent. models. VirtualMachineRunCommandInner
- com.
- com.
- com.
public final class VirtualMachineRunCommandInner
extends Resource
Describes a Virtual Machine run command.
Constructor Summary
Constructor | Description |
---|---|
VirtualMachineRunCommandInner() |
Creates an instance of Virtual |
Method Summary
Modifier and Type | Method and Description |
---|---|
Boolean |
asyncExecution()
Get the async |
Run |
errorBlobManagedIdentity()
Get the error |
String |
errorBlobUri()
Get the error |
static
Virtual |
fromJson(JsonReader jsonReader)
Reads an instance of Virtual |
String |
id()
Get the id property: Fully qualified resource Id for the resource. |
Virtual |
instanceView()
Get the instance |
String |
name()
Get the name property: The name of the resource. |
Run |
outputBlobManagedIdentity()
Get the output |
String |
outputBlobUri()
Get the output |
List<Run |
parameters()
Get the parameters property: The parameters used by the script. |
List<Run |
protectedParameters()
Get the protected |
String |
provisioningState()
Get the provisioning |
String |
runAsPassword()
Get the run |
String |
runAsUser()
Get the run |
Virtual |
source()
Get the source property: The source of the run command script. |
Integer |
timeoutInSeconds()
Get the timeout |
Json |
toJson(JsonWriter jsonWriter) |
Boolean |
treatFailureAsDeploymentFailure()
Get the treat |
String |
type()
Get the type property: The type of the resource. |
void |
validate()
Validates the instance. |
Virtual |
withAsyncExecution(Boolean asyncExecution)
Set the async |
Virtual |
withErrorBlobManagedIdentity(RunCommandManagedIdentity errorBlobManagedIdentity)
Set the error |
Virtual |
withErrorBlobUri(String errorBlobUri)
Set the error |
Virtual |
withLocation(String location) |
Virtual |
withOutputBlobManagedIdentity(RunCommandManagedIdentity outputBlobManagedIdentity)
Set the output |
Virtual |
withOutputBlobUri(String outputBlobUri)
Set the output |
Virtual |
withParameters(List<RunCommandInputParameter> parameters)
Set the parameters property: The parameters used by the script. |
Virtual |
withProtectedParameters(List<RunCommandInputParameter> protectedParameters)
Set the protected |
Virtual |
withRunAsPassword(String runAsPassword)
Set the run |
Virtual |
withRunAsUser(String runAsUser)
Set the run |
Virtual |
withSource(VirtualMachineRunCommandScriptSource source)
Set the source property: The source of the run command script. |
Virtual |
withTags(Map<String,String> tags) |
Virtual |
withTimeoutInSeconds(Integer timeoutInSeconds)
Set the timeout |
Virtual |
withTreatFailureAsDeploymentFailure(Boolean treatFailureAsDeploymentFailure)
Set the treat |
Methods inherited from ProxyResource
Methods inherited from Resource
Methods inherited from java.lang.Object
Constructor Details
VirtualMachineRunCommandInner
public VirtualMachineRunCommandInner()
Creates an instance of VirtualMachineRunCommandInner class.
Method Details
asyncExecution
public Boolean asyncExecution()
Get the asyncExecution property: Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
Returns:
errorBlobManagedIdentity
public RunCommandManagedIdentity errorBlobManagedIdentity()
Get the errorBlobManagedIdentity property: 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.
Returns:
errorBlobUri
public String errorBlobUri()
Get the errorBlobUri property: 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.
Returns:
fromJson
public static VirtualMachineRunCommandInner fromJson(JsonReader jsonReader)
Reads an instance of VirtualMachineRunCommandInner from the JsonReader.
Parameters:
Returns:
Throws:
id
public String id()
Get the id property: Fully qualified resource Id for the resource.
Overrides:
VirtualMachineRunCommandInner.id()Returns:
instanceView
public VirtualMachineRunCommandInstanceView instanceView()
Get the instanceView property: The virtual machine run command instance view.
Returns:
name
public String name()
Get the name property: The name of the resource.
Overrides:
VirtualMachineRunCommandInner.name()Returns:
outputBlobManagedIdentity
public RunCommandManagedIdentity outputBlobManagedIdentity()
Get the outputBlobManagedIdentity property: 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.
Returns:
outputBlobUri
public String outputBlobUri()
Get the outputBlobUri property: 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.
Returns:
parameters
public List
Get the parameters property: The parameters used by the script.
Returns:
protectedParameters
public List
Get the protectedParameters property: The parameters used by the script.
Returns:
provisioningState
public String provisioningState()
Get the provisioningState property: 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.
Returns:
runAsPassword
public String runAsPassword()
Get the runAsPassword property: Specifies the user account password on the VM when executing the run command.
Returns:
runAsUser
public String runAsUser()
Get the runAsUser property: Specifies the user account on the VM when executing the run command.
Returns:
source
public VirtualMachineRunCommandScriptSource source()
Get the source property: The source of the run command script.
Returns:
timeoutInSeconds
public Integer timeoutInSeconds()
Get the timeoutInSeconds property: The timeout in seconds to execute the run command.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
VirtualMachineRunCommandInner.toJson(JsonWriter jsonWriter)Parameters:
Throws:
treatFailureAsDeploymentFailure
public Boolean treatFailureAsDeploymentFailure()
Get the treatFailureAsDeploymentFailure property: 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.
Returns:
type
public String type()
Get the type property: The type of the resource.
Overrides:
VirtualMachineRunCommandInner.type()Returns:
validate
public void validate()
Validates the instance.
withAsyncExecution
public VirtualMachineRunCommandInner withAsyncExecution(Boolean asyncExecution)
Set the asyncExecution property: Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
Parameters:
Returns:
withErrorBlobManagedIdentity
public VirtualMachineRunCommandInner withErrorBlobManagedIdentity(RunCommandManagedIdentity errorBlobManagedIdentity)
Set the errorBlobManagedIdentity property: 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.
Parameters:
Returns:
withErrorBlobUri
public VirtualMachineRunCommandInner withErrorBlobUri(String errorBlobUri)
Set the errorBlobUri property: 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.
Parameters:
Returns:
withLocation
public VirtualMachineRunCommandInner withLocation(String location)
Overrides:
VirtualMachineRunCommandInner.withLocation(String location)Parameters:
withOutputBlobManagedIdentity
public VirtualMachineRunCommandInner withOutputBlobManagedIdentity(RunCommandManagedIdentity outputBlobManagedIdentity)
Set the outputBlobManagedIdentity property: 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.
Parameters:
Returns:
withOutputBlobUri
public VirtualMachineRunCommandInner withOutputBlobUri(String outputBlobUri)
Set the outputBlobUri property: 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.
Parameters:
Returns:
withParameters
public VirtualMachineRunCommandInner withParameters(List
Set the parameters property: The parameters used by the script.
Parameters:
Returns:
withProtectedParameters
public VirtualMachineRunCommandInner withProtectedParameters(List
Set the protectedParameters property: The parameters used by the script.
Parameters:
Returns:
withRunAsPassword
public VirtualMachineRunCommandInner withRunAsPassword(String runAsPassword)
Set the runAsPassword property: Specifies the user account password on the VM when executing the run command.
Parameters:
Returns:
withRunAsUser
public VirtualMachineRunCommandInner withRunAsUser(String runAsUser)
Set the runAsUser property: Specifies the user account on the VM when executing the run command.
Parameters:
Returns:
withSource
public VirtualMachineRunCommandInner withSource(VirtualMachineRunCommandScriptSource source)
Set the source property: The source of the run command script.
Parameters:
Returns:
withTags
public VirtualMachineRunCommandInner withTags(Map
Overrides:
VirtualMachineRunCommandInner.withTags(Map<String,String> tags)Parameters:
withTimeoutInSeconds
public VirtualMachineRunCommandInner withTimeoutInSeconds(Integer timeoutInSeconds)
Set the timeoutInSeconds property: The timeout in seconds to execute the run command.
Parameters:
Returns:
withTreatFailureAsDeploymentFailure
public VirtualMachineRunCommandInner withTreatFailureAsDeploymentFailure(Boolean treatFailureAsDeploymentFailure)
Set the treatFailureAsDeploymentFailure property: 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.
Parameters:
Returns: