Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.compute.VirtualMachineScaleSetVMRunCommandArgs Maven / Gradle / Ivy
Go to download
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.compute;
import com.pulumi.azurenative.compute.inputs.RunCommandInputParameterArgs;
import com.pulumi.azurenative.compute.inputs.RunCommandManagedIdentityArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineRunCommandScriptSourceArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class VirtualMachineScaleSetVMRunCommandArgs extends com.pulumi.resources.ResourceArgs {
public static final VirtualMachineScaleSetVMRunCommandArgs Empty = new VirtualMachineScaleSetVMRunCommandArgs();
/**
* Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
*
*/
@Import(name="asyncExecution")
private @Nullable Output asyncExecution;
/**
* @return Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
*
*/
public Optional> asyncExecution() {
return Optional.ofNullable(this.asyncExecution);
}
/**
* 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
*
*/
@Import(name="errorBlobManagedIdentity")
private @Nullable Output errorBlobManagedIdentity;
/**
* @return 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
*
*/
public Optional> errorBlobManagedIdentity() {
return Optional.ofNullable(this.errorBlobManagedIdentity);
}
/**
* 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.
*
*/
@Import(name="errorBlobUri")
private @Nullable Output errorBlobUri;
/**
* @return 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.
*
*/
public Optional> errorBlobUri() {
return Optional.ofNullable(this.errorBlobUri);
}
/**
* The instance ID of the virtual machine.
*
*/
@Import(name="instanceId", required=true)
private Output instanceId;
/**
* @return The instance ID of the virtual machine.
*
*/
public Output instanceId() {
return this.instanceId;
}
/**
* Resource location
*
*/
@Import(name="location")
private @Nullable Output location;
/**
* @return Resource location
*
*/
public Optional> location() {
return Optional.ofNullable(this.location);
}
/**
* 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
*
*/
@Import(name="outputBlobManagedIdentity")
private @Nullable Output outputBlobManagedIdentity;
/**
* @return 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
*
*/
public Optional> outputBlobManagedIdentity() {
return Optional.ofNullable(this.outputBlobManagedIdentity);
}
/**
* 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.
*
*/
@Import(name="outputBlobUri")
private @Nullable Output outputBlobUri;
/**
* @return 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.
*
*/
public Optional> outputBlobUri() {
return Optional.ofNullable(this.outputBlobUri);
}
/**
* The parameters used by the script.
*
*/
@Import(name="parameters")
private @Nullable Output> parameters;
/**
* @return The parameters used by the script.
*
*/
public Optional>> parameters() {
return Optional.ofNullable(this.parameters);
}
/**
* The parameters used by the script.
*
*/
@Import(name="protectedParameters")
private @Nullable Output> protectedParameters;
/**
* @return The parameters used by the script.
*
*/
public Optional>> protectedParameters() {
return Optional.ofNullable(this.protectedParameters);
}
/**
* The name of the resource group.
*
*/
@Import(name="resourceGroupName", required=true)
private Output resourceGroupName;
/**
* @return The name of the resource group.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* Specifies the user account password on the VM when executing the run command.
*
*/
@Import(name="runAsPassword")
private @Nullable Output runAsPassword;
/**
* @return Specifies the user account password on the VM when executing the run command.
*
*/
public Optional> runAsPassword() {
return Optional.ofNullable(this.runAsPassword);
}
/**
* Specifies the user account on the VM when executing the run command.
*
*/
@Import(name="runAsUser")
private @Nullable Output runAsUser;
/**
* @return Specifies the user account on the VM when executing the run command.
*
*/
public Optional> runAsUser() {
return Optional.ofNullable(this.runAsUser);
}
/**
* The name of the virtual machine run command.
*
*/
@Import(name="runCommandName")
private @Nullable Output runCommandName;
/**
* @return The name of the virtual machine run command.
*
*/
public Optional> runCommandName() {
return Optional.ofNullable(this.runCommandName);
}
/**
* The source of the run command script.
*
*/
@Import(name="source")
private @Nullable Output source;
/**
* @return The source of the run command script.
*
*/
public Optional> source() {
return Optional.ofNullable(this.source);
}
/**
* Resource tags
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return Resource tags
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* The timeout in seconds to execute the run command.
*
*/
@Import(name="timeoutInSeconds")
private @Nullable Output timeoutInSeconds;
/**
* @return The timeout in seconds to execute the run command.
*
*/
public Optional> timeoutInSeconds() {
return Optional.ofNullable(this.timeoutInSeconds);
}
/**
* 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
*
*/
@Import(name="treatFailureAsDeploymentFailure")
private @Nullable Output treatFailureAsDeploymentFailure;
/**
* @return 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
*
*/
public Optional> treatFailureAsDeploymentFailure() {
return Optional.ofNullable(this.treatFailureAsDeploymentFailure);
}
/**
* The name of the VM scale set.
*
*/
@Import(name="vmScaleSetName", required=true)
private Output vmScaleSetName;
/**
* @return The name of the VM scale set.
*
*/
public Output vmScaleSetName() {
return this.vmScaleSetName;
}
private VirtualMachineScaleSetVMRunCommandArgs() {}
private VirtualMachineScaleSetVMRunCommandArgs(VirtualMachineScaleSetVMRunCommandArgs $) {
this.asyncExecution = $.asyncExecution;
this.errorBlobManagedIdentity = $.errorBlobManagedIdentity;
this.errorBlobUri = $.errorBlobUri;
this.instanceId = $.instanceId;
this.location = $.location;
this.outputBlobManagedIdentity = $.outputBlobManagedIdentity;
this.outputBlobUri = $.outputBlobUri;
this.parameters = $.parameters;
this.protectedParameters = $.protectedParameters;
this.resourceGroupName = $.resourceGroupName;
this.runAsPassword = $.runAsPassword;
this.runAsUser = $.runAsUser;
this.runCommandName = $.runCommandName;
this.source = $.source;
this.tags = $.tags;
this.timeoutInSeconds = $.timeoutInSeconds;
this.treatFailureAsDeploymentFailure = $.treatFailureAsDeploymentFailure;
this.vmScaleSetName = $.vmScaleSetName;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(VirtualMachineScaleSetVMRunCommandArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private VirtualMachineScaleSetVMRunCommandArgs $;
public Builder() {
$ = new VirtualMachineScaleSetVMRunCommandArgs();
}
public Builder(VirtualMachineScaleSetVMRunCommandArgs defaults) {
$ = new VirtualMachineScaleSetVMRunCommandArgs(Objects.requireNonNull(defaults));
}
/**
* @param asyncExecution Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
*
* @return builder
*
*/
public Builder asyncExecution(@Nullable Output asyncExecution) {
$.asyncExecution = asyncExecution;
return this;
}
/**
* @param asyncExecution Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
*
* @return builder
*
*/
public Builder asyncExecution(Boolean asyncExecution) {
return asyncExecution(Output.of(asyncExecution));
}
/**
* @param 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
*
* @return builder
*
*/
public Builder errorBlobManagedIdentity(@Nullable Output errorBlobManagedIdentity) {
$.errorBlobManagedIdentity = errorBlobManagedIdentity;
return this;
}
/**
* @param 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
*
* @return builder
*
*/
public Builder errorBlobManagedIdentity(RunCommandManagedIdentityArgs errorBlobManagedIdentity) {
return errorBlobManagedIdentity(Output.of(errorBlobManagedIdentity));
}
/**
* @param 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.
*
* @return builder
*
*/
public Builder errorBlobUri(@Nullable Output errorBlobUri) {
$.errorBlobUri = errorBlobUri;
return this;
}
/**
* @param 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.
*
* @return builder
*
*/
public Builder errorBlobUri(String errorBlobUri) {
return errorBlobUri(Output.of(errorBlobUri));
}
/**
* @param instanceId The instance ID of the virtual machine.
*
* @return builder
*
*/
public Builder instanceId(Output instanceId) {
$.instanceId = instanceId;
return this;
}
/**
* @param instanceId The instance ID of the virtual machine.
*
* @return builder
*
*/
public Builder instanceId(String instanceId) {
return instanceId(Output.of(instanceId));
}
/**
* @param location Resource location
*
* @return builder
*
*/
public Builder location(@Nullable Output location) {
$.location = location;
return this;
}
/**
* @param location Resource location
*
* @return builder
*
*/
public Builder location(String location) {
return location(Output.of(location));
}
/**
* @param 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
*
* @return builder
*
*/
public Builder outputBlobManagedIdentity(@Nullable Output outputBlobManagedIdentity) {
$.outputBlobManagedIdentity = outputBlobManagedIdentity;
return this;
}
/**
* @param 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
*
* @return builder
*
*/
public Builder outputBlobManagedIdentity(RunCommandManagedIdentityArgs outputBlobManagedIdentity) {
return outputBlobManagedIdentity(Output.of(outputBlobManagedIdentity));
}
/**
* @param 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.
*
* @return builder
*
*/
public Builder outputBlobUri(@Nullable Output outputBlobUri) {
$.outputBlobUri = outputBlobUri;
return this;
}
/**
* @param 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.
*
* @return builder
*
*/
public Builder outputBlobUri(String outputBlobUri) {
return outputBlobUri(Output.of(outputBlobUri));
}
/**
* @param parameters The parameters used by the script.
*
* @return builder
*
*/
public Builder parameters(@Nullable Output> parameters) {
$.parameters = parameters;
return this;
}
/**
* @param parameters The parameters used by the script.
*
* @return builder
*
*/
public Builder parameters(List parameters) {
return parameters(Output.of(parameters));
}
/**
* @param parameters The parameters used by the script.
*
* @return builder
*
*/
public Builder parameters(RunCommandInputParameterArgs... parameters) {
return parameters(List.of(parameters));
}
/**
* @param protectedParameters The parameters used by the script.
*
* @return builder
*
*/
public Builder protectedParameters(@Nullable Output> protectedParameters) {
$.protectedParameters = protectedParameters;
return this;
}
/**
* @param protectedParameters The parameters used by the script.
*
* @return builder
*
*/
public Builder protectedParameters(List protectedParameters) {
return protectedParameters(Output.of(protectedParameters));
}
/**
* @param protectedParameters The parameters used by the script.
*
* @return builder
*
*/
public Builder protectedParameters(RunCommandInputParameterArgs... protectedParameters) {
return protectedParameters(List.of(protectedParameters));
}
/**
* @param resourceGroupName The name of the resource group.
*
* @return builder
*
*/
public Builder resourceGroupName(Output resourceGroupName) {
$.resourceGroupName = resourceGroupName;
return this;
}
/**
* @param resourceGroupName The name of the resource group.
*
* @return builder
*
*/
public Builder resourceGroupName(String resourceGroupName) {
return resourceGroupName(Output.of(resourceGroupName));
}
/**
* @param runAsPassword Specifies the user account password on the VM when executing the run command.
*
* @return builder
*
*/
public Builder runAsPassword(@Nullable Output runAsPassword) {
$.runAsPassword = runAsPassword;
return this;
}
/**
* @param runAsPassword Specifies the user account password on the VM when executing the run command.
*
* @return builder
*
*/
public Builder runAsPassword(String runAsPassword) {
return runAsPassword(Output.of(runAsPassword));
}
/**
* @param runAsUser Specifies the user account on the VM when executing the run command.
*
* @return builder
*
*/
public Builder runAsUser(@Nullable Output runAsUser) {
$.runAsUser = runAsUser;
return this;
}
/**
* @param runAsUser Specifies the user account on the VM when executing the run command.
*
* @return builder
*
*/
public Builder runAsUser(String runAsUser) {
return runAsUser(Output.of(runAsUser));
}
/**
* @param runCommandName The name of the virtual machine run command.
*
* @return builder
*
*/
public Builder runCommandName(@Nullable Output runCommandName) {
$.runCommandName = runCommandName;
return this;
}
/**
* @param runCommandName The name of the virtual machine run command.
*
* @return builder
*
*/
public Builder runCommandName(String runCommandName) {
return runCommandName(Output.of(runCommandName));
}
/**
* @param source The source of the run command script.
*
* @return builder
*
*/
public Builder source(@Nullable Output source) {
$.source = source;
return this;
}
/**
* @param source The source of the run command script.
*
* @return builder
*
*/
public Builder source(VirtualMachineRunCommandScriptSourceArgs source) {
return source(Output.of(source));
}
/**
* @param tags Resource tags
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags Resource tags
*
* @return builder
*
*/
public Builder tags(Map tags) {
return tags(Output.of(tags));
}
/**
* @param timeoutInSeconds The timeout in seconds to execute the run command.
*
* @return builder
*
*/
public Builder timeoutInSeconds(@Nullable Output timeoutInSeconds) {
$.timeoutInSeconds = timeoutInSeconds;
return this;
}
/**
* @param timeoutInSeconds The timeout in seconds to execute the run command.
*
* @return builder
*
*/
public Builder timeoutInSeconds(Integer timeoutInSeconds) {
return timeoutInSeconds(Output.of(timeoutInSeconds));
}
/**
* @param 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
*
* @return builder
*
*/
public Builder treatFailureAsDeploymentFailure(@Nullable Output treatFailureAsDeploymentFailure) {
$.treatFailureAsDeploymentFailure = treatFailureAsDeploymentFailure;
return this;
}
/**
* @param 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
*
* @return builder
*
*/
public Builder treatFailureAsDeploymentFailure(Boolean treatFailureAsDeploymentFailure) {
return treatFailureAsDeploymentFailure(Output.of(treatFailureAsDeploymentFailure));
}
/**
* @param vmScaleSetName The name of the VM scale set.
*
* @return builder
*
*/
public Builder vmScaleSetName(Output vmScaleSetName) {
$.vmScaleSetName = vmScaleSetName;
return this;
}
/**
* @param vmScaleSetName The name of the VM scale set.
*
* @return builder
*
*/
public Builder vmScaleSetName(String vmScaleSetName) {
return vmScaleSetName(Output.of(vmScaleSetName));
}
public VirtualMachineScaleSetVMRunCommandArgs build() {
$.asyncExecution = Codegen.booleanProp("asyncExecution").output().arg($.asyncExecution).def(false).getNullable();
if ($.instanceId == null) {
throw new MissingRequiredPropertyException("VirtualMachineScaleSetVMRunCommandArgs", "instanceId");
}
if ($.resourceGroupName == null) {
throw new MissingRequiredPropertyException("VirtualMachineScaleSetVMRunCommandArgs", "resourceGroupName");
}
$.treatFailureAsDeploymentFailure = Codegen.booleanProp("treatFailureAsDeploymentFailure").output().arg($.treatFailureAsDeploymentFailure).def(false).getNullable();
if ($.vmScaleSetName == null) {
throw new MissingRequiredPropertyException("VirtualMachineScaleSetVMRunCommandArgs", "vmScaleSetName");
}
return $;
}
}
}