com.pulumi.azure.automation.DateTimeVariable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.azure.automation;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.automation.DateTimeVariableArgs;
import com.pulumi.azure.automation.inputs.DateTimeVariableState;
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.Boolean;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages a DateTime variable in Azure Automation
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.automation.Account;
* import com.pulumi.azure.automation.AccountArgs;
* import com.pulumi.azure.automation.DateTimeVariable;
* import com.pulumi.azure.automation.DateTimeVariableArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("tfex-example-rg")
* .location("West Europe")
* .build());
*
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("tfex-example-account")
* .location(example.location())
* .resourceGroupName(example.name())
* .skuName("Basic")
* .build());
*
* var exampleDateTimeVariable = new DateTimeVariable("exampleDateTimeVariable", DateTimeVariableArgs.builder()
* .name("tfex-example-var")
* .resourceGroupName(example.name())
* .automationAccountName(exampleAccount.name())
* .value("2019-04-24T21:40:54.074Z")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Automation DateTime Variable can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:automation/dateTimeVariable:DateTimeVariable example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tfex-example-rg/providers/Microsoft.Automation/automationAccounts/tfex-example-account/variables/tfex-example-var
* ```
*
*/
@ResourceType(type="azure:automation/dateTimeVariable:DateTimeVariable")
public class DateTimeVariable extends com.pulumi.resources.CustomResource {
/**
* The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
*
*/
@Export(name="automationAccountName", refs={String.class}, tree="[0]")
private Output automationAccountName;
/**
* @return The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
*
*/
public Output automationAccountName() {
return this.automationAccountName;
}
/**
* The description of the Automation Variable.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return The description of the Automation Variable.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* Specifies if the Automation Variable is encrypted. Defaults to `false`.
*
*/
@Export(name="encrypted", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> encrypted;
/**
* @return Specifies if the Automation Variable is encrypted. Defaults to `false`.
*
*/
public Output> encrypted() {
return Codegen.optional(this.encrypted);
}
/**
* The name of the Automation Variable. Changing this forces a new resource to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the Automation Variable. Changing this forces a new resource to be created.
*
*/
public Output name() {
return this.name;
}
/**
* The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
*
*/
@Export(name="resourceGroupName", refs={String.class}, tree="[0]")
private Output resourceGroupName;
/**
* @return The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6).
*
*/
@Export(name="value", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> value;
/**
* @return The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6).
*
*/
public Output> value() {
return Codegen.optional(this.value);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public DateTimeVariable(java.lang.String name) {
this(name, DateTimeVariableArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public DateTimeVariable(java.lang.String name, DateTimeVariableArgs 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 DateTimeVariable(java.lang.String name, DateTimeVariableArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:automation/dateTimeVariable:DateTimeVariable", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private DateTimeVariable(java.lang.String name, Output id, @Nullable DateTimeVariableState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:automation/dateTimeVariable:DateTimeVariable", name, state, makeResourceOptions(options, id), false);
}
private static DateTimeVariableArgs makeArgs(DateTimeVariableArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? DateTimeVariableArgs.Empty : args;
}
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())
.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 state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static DateTimeVariable get(java.lang.String name, Output id, @Nullable DateTimeVariableState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new DateTimeVariable(name, id, state, options);
}
}