All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.resources.AzureCliScript Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.resources;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.resources.AzureCliScriptArgs;
import com.pulumi.azurenative.resources.outputs.ContainerConfigurationResponse;
import com.pulumi.azurenative.resources.outputs.EnvironmentVariableResponse;
import com.pulumi.azurenative.resources.outputs.ManagedServiceIdentityResponse;
import com.pulumi.azurenative.resources.outputs.ScriptStatusResponse;
import com.pulumi.azurenative.resources.outputs.StorageAccountConfigurationResponse;
import com.pulumi.azurenative.resources.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Object model for the Azure CLI script.
 * Azure REST API version: 2020-10-01. Prior API version in Azure Native 1.x: 2020-10-01.
 * 
 * ## Example Usage
 * ### DeploymentScriptsCreate
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.resources.AzureCliScript;
 * import com.pulumi.azurenative.resources.AzureCliScriptArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var azureCliScript = new AzureCliScript("azureCliScript", AzureCliScriptArgs.builder()
 *             .resourceGroupName("script-rg")
 *             .scriptName("MyDeploymentScript")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### DeploymentScriptsCreateNoUserManagedIdentity * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.resources.AzureCliScript;
 * import com.pulumi.azurenative.resources.AzureCliScriptArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var azureCliScript = new AzureCliScript("azureCliScript", AzureCliScriptArgs.builder()
 *             .resourceGroupName("script-rg")
 *             .scriptName("MyDeploymentScript")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### DeploymentScriptsCreate_MinCreate * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.resources.AzureCliScript;
 * import com.pulumi.azurenative.resources.AzureCliScriptArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var azureCliScript = new AzureCliScript("azureCliScript", AzureCliScriptArgs.builder()
 *             .resourceGroupName("script-rg")
 *             .scriptName("MyDeploymentScript")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### DeploymentScriptsCreate_UsingCustomACIName * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.resources.AzureCliScript;
 * import com.pulumi.azurenative.resources.AzureCliScriptArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var azureCliScript = new AzureCliScript("azureCliScript", AzureCliScriptArgs.builder()
 *             .resourceGroupName("script-rg")
 *             .scriptName("MyDeploymentScript")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### DeploymentScriptsCreate_UsingExistingStorageAccount * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.resources.AzureCliScript;
 * import com.pulumi.azurenative.resources.AzureCliScriptArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var azureCliScript = new AzureCliScript("azureCliScript", AzureCliScriptArgs.builder()
 *             .resourceGroupName("script-rg")
 *             .scriptName("MyDeploymentScript")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:resources:AzureCliScript myresource1 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName} * ``` * */ @ResourceType(type="azure-native:resources:AzureCliScript") public class AzureCliScript extends com.pulumi.resources.CustomResource { /** * Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' * */ @Export(name="arguments", refs={String.class}, tree="[0]") private Output arguments; /** * @return Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' * */ public Output> arguments() { return Codegen.optional(this.arguments); } /** * Azure CLI module version to be used. * */ @Export(name="azCliVersion", refs={String.class}, tree="[0]") private Output azCliVersion; /** * @return Azure CLI module version to be used. * */ public Output azCliVersion() { return this.azCliVersion; } /** * The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. * */ @Export(name="cleanupPreference", refs={String.class}, tree="[0]") private Output cleanupPreference; /** * @return The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. * */ public Output> cleanupPreference() { return Codegen.optional(this.cleanupPreference); } /** * Container settings. * */ @Export(name="containerSettings", refs={ContainerConfigurationResponse.class}, tree="[0]") private Output containerSettings; /** * @return Container settings. * */ public Output> containerSettings() { return Codegen.optional(this.containerSettings); } /** * The environment variables to pass over to the script. * */ @Export(name="environmentVariables", refs={List.class,EnvironmentVariableResponse.class}, tree="[0,1]") private Output> environmentVariables; /** * @return The environment variables to pass over to the script. * */ public Output>> environmentVariables() { return Codegen.optional(this.environmentVariables); } /** * Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. * */ @Export(name="forceUpdateTag", refs={String.class}, tree="[0]") private Output forceUpdateTag; /** * @return Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. * */ public Output> forceUpdateTag() { return Codegen.optional(this.forceUpdateTag); } /** * Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. * */ @Export(name="identity", refs={ManagedServiceIdentityResponse.class}, tree="[0]") private Output identity; /** * @return Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * Type of the script. * Expected value is 'AzureCLI'. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return Type of the script. * Expected value is 'AzureCLI'. * */ public Output kind() { return this.kind; } /** * The location of the ACI and the storage account for the deployment script. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The location of the ACI and the storage account for the deployment script. * */ public Output location() { return this.location; } /** * Name of this resource. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Name of this resource. * */ public Output name() { return this.name; } /** * List of script outputs. * */ @Export(name="outputs", refs={Map.class,String.class,Object.class}, tree="[0,1,2]") private Output> outputs; /** * @return List of script outputs. * */ public Output> outputs() { return this.outputs; } /** * Uri for the script. This is the entry point for the external script. * */ @Export(name="primaryScriptUri", refs={String.class}, tree="[0]") private Output primaryScriptUri; /** * @return Uri for the script. This is the entry point for the external script. * */ public Output> primaryScriptUri() { return Codegen.optional(this.primaryScriptUri); } /** * State of the script execution. This only appears in the response. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return State of the script execution. This only appears in the response. * */ public Output provisioningState() { return this.provisioningState; } /** * Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). * */ @Export(name="retentionInterval", refs={String.class}, tree="[0]") private Output retentionInterval; /** * @return Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). * */ public Output retentionInterval() { return this.retentionInterval; } /** * Script body. * */ @Export(name="scriptContent", refs={String.class}, tree="[0]") private Output scriptContent; /** * @return Script body. * */ public Output> scriptContent() { return Codegen.optional(this.scriptContent); } /** * Contains the results of script execution. * */ @Export(name="status", refs={ScriptStatusResponse.class}, tree="[0]") private Output status; /** * @return Contains the results of script execution. * */ public Output status() { return this.status; } /** * Storage Account settings. * */ @Export(name="storageAccountSettings", refs={StorageAccountConfigurationResponse.class}, tree="[0]") private Output storageAccountSettings; /** * @return Storage Account settings. * */ public Output> storageAccountSettings() { return Codegen.optional(this.storageAccountSettings); } /** * Supporting files for the external script. * */ @Export(name="supportingScriptUris", refs={List.class,String.class}, tree="[0,1]") private Output> supportingScriptUris; /** * @return Supporting files for the external script. * */ public Output>> supportingScriptUris() { return Codegen.optional(this.supportingScriptUris); } /** * The system metadata related to this resource. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return The system metadata related to this resource. * */ public Output systemData() { return this.systemData; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D * */ @Export(name="timeout", refs={String.class}, tree="[0]") private Output timeout; /** * @return Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D * */ public Output> timeout() { return Codegen.optional(this.timeout); } /** * Type of this resource. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Type of this resource. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public AzureCliScript(java.lang.String name) { this(name, AzureCliScriptArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public AzureCliScript(java.lang.String name, AzureCliScriptArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public AzureCliScript(java.lang.String name, AzureCliScriptArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:resources:AzureCliScript", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private AzureCliScript(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:resources:AzureCliScript", name, null, makeResourceOptions(options, id), false); } private static AzureCliScriptArgs makeArgs(AzureCliScriptArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } var builder = args == null ? AzureCliScriptArgs.builder() : AzureCliScriptArgs.builder(args); return builder .kind("AzureCLI") .build(); } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:resources/v20191001preview:AzureCliScript").build()), Output.of(Alias.builder().type("azure-native:resources/v20201001:AzureCliScript").build()), Output.of(Alias.builder().type("azure-native:resources/v20230801:AzureCliScript").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static AzureCliScript get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new AzureCliScript(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy