DateTimeVariable

Manages a DateTime variable in Azure Automation

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleAccount = new Azure.Automation.Account("exampleAccount", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        SkuName = "Basic",
    });

    var exampleDateTimeVariable = new Azure.Automation.DateTimeVariable("exampleDateTimeVariable", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        AutomationAccountName = exampleAccount.Name,
        Value = "2019-04-24T21:40:54.074Z",
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/automation"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := automation.NewAccount(ctx, "exampleAccount", &automation.AccountArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			SkuName:           pulumi.String("Basic"),
		})
		if err != nil {
			return err
		}
		_, err = automation.NewDateTimeVariable(ctx, "exampleDateTimeVariable", &automation.DateTimeVariableArgs{
			ResourceGroupName:     exampleResourceGroup.Name,
			AutomationAccountName: exampleAccount.Name,
			Value:                 pulumi.String("2019-04-24T21:40:54.074Z"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .skuName("Basic")
            .build());

        var exampleDateTimeVariable = new DateTimeVariable("exampleDateTimeVariable", DateTimeVariableArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .automationAccountName(exampleAccount.name())
            .value("2019-04-24T21:40:54.074Z")
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.automation.Account("exampleAccount",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku_name="Basic")
example_date_time_variable = azure.automation.DateTimeVariable("exampleDateTimeVariable",
    resource_group_name=example_resource_group.name,
    automation_account_name=example_account.name,
    value="2019-04-24T21:40:54.074Z")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.automation.Account("exampleAccount", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    skuName: "Basic",
});
const exampleDateTimeVariable = new azure.automation.DateTimeVariable("exampleDateTimeVariable", {
    resourceGroupName: exampleResourceGroup.name,
    automationAccountName: exampleAccount.name,
    value: "2019-04-24T21:40:54.074Z",
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleAccount:
    type: azure:automation:Account
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      skuName: Basic
  exampleDateTimeVariable:
    type: azure:automation:DateTimeVariable
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      automationAccountName: ${exampleAccount.name}
      value: 2019-04-24T21:40:54.074Z

Create DateTimeVariable Resource

new DateTimeVariable(name: string, args: DateTimeVariableArgs, opts?: CustomResourceOptions);
@overload
def DateTimeVariable(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     automation_account_name: Optional[str] = None,
                     description: Optional[str] = None,
                     encrypted: Optional[bool] = None,
                     name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     value: Optional[str] = None)
@overload
def DateTimeVariable(resource_name: str,
                     args: DateTimeVariableArgs,
                     opts: Optional[ResourceOptions] = None)
func NewDateTimeVariable(ctx *Context, name string, args DateTimeVariableArgs, opts ...ResourceOption) (*DateTimeVariable, error)
public DateTimeVariable(string name, DateTimeVariableArgs args, CustomResourceOptions? opts = null)
public DateTimeVariable(String name, DateTimeVariableArgs args)
public DateTimeVariable(String name, DateTimeVariableArgs args, CustomResourceOptions options)
type: azure:automation:DateTimeVariable
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DateTimeVariableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DateTimeVariableArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DateTimeVariableArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DateTimeVariableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DateTimeVariableArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DateTimeVariable Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DateTimeVariable resource accepts the following input properties:

AutomationAccountName string

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

Description string

The description of the Automation Variable.

Encrypted bool

Specifies if the Automation Variable is encrypted. Defaults to false.

Name string

The name of the Automation Variable. Changing this forces a new resource to be created.

Value string

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

AutomationAccountName string

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

Description string

The description of the Automation Variable.

Encrypted bool

Specifies if the Automation Variable is encrypted. Defaults to false.

Name string

The name of the Automation Variable. Changing this forces a new resource to be created.

Value string

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

automationAccountName String

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

resourceGroupName String

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

description String

The description of the Automation Variable.

encrypted Boolean

Specifies if the Automation Variable is encrypted. Defaults to false.

name String

The name of the Automation Variable. Changing this forces a new resource to be created.

value String

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

automationAccountName string

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

resourceGroupName string

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

description string

The description of the Automation Variable.

encrypted boolean

Specifies if the Automation Variable is encrypted. Defaults to false.

name string

The name of the Automation Variable. Changing this forces a new resource to be created.

value string

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

automation_account_name str

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

description str

The description of the Automation Variable.

encrypted bool

Specifies if the Automation Variable is encrypted. Defaults to false.

name str

The name of the Automation Variable. Changing this forces a new resource to be created.

value str

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

automationAccountName String

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

resourceGroupName String

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

description String

The description of the Automation Variable.

encrypted Boolean

Specifies if the Automation Variable is encrypted. Defaults to false.

name String

The name of the Automation Variable. Changing this forces a new resource to be created.

value String

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

Outputs

All input properties are implicitly available as output properties. Additionally, the DateTimeVariable resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing DateTimeVariable Resource

Get an existing DateTimeVariable resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DateTimeVariableState, opts?: CustomResourceOptions): DateTimeVariable
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        automation_account_name: Optional[str] = None,
        description: Optional[str] = None,
        encrypted: Optional[bool] = None,
        name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        value: Optional[str] = None) -> DateTimeVariable
func GetDateTimeVariable(ctx *Context, name string, id IDInput, state *DateTimeVariableState, opts ...ResourceOption) (*DateTimeVariable, error)
public static DateTimeVariable Get(string name, Input<string> id, DateTimeVariableState? state, CustomResourceOptions? opts = null)
public static DateTimeVariable get(String name, Output<String> id, DateTimeVariableState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AutomationAccountName string

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

Description string

The description of the Automation Variable.

Encrypted bool

Specifies if the Automation Variable is encrypted. Defaults to false.

Name string

The name of the Automation Variable. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

Value string

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

AutomationAccountName string

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

Description string

The description of the Automation Variable.

Encrypted bool

Specifies if the Automation Variable is encrypted. Defaults to false.

Name string

The name of the Automation Variable. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

Value string

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

automationAccountName String

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

description String

The description of the Automation Variable.

encrypted Boolean

Specifies if the Automation Variable is encrypted. Defaults to false.

name String

The name of the Automation Variable. Changing this forces a new resource to be created.

resourceGroupName String

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

value String

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

automationAccountName string

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

description string

The description of the Automation Variable.

encrypted boolean

Specifies if the Automation Variable is encrypted. Defaults to false.

name string

The name of the Automation Variable. Changing this forces a new resource to be created.

resourceGroupName string

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

value string

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

automation_account_name str

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

description str

The description of the Automation Variable.

encrypted bool

Specifies if the Automation Variable is encrypted. Defaults to false.

name str

The name of the Automation Variable. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

value str

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

automationAccountName String

The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.

description String

The description of the Automation Variable.

encrypted Boolean

Specifies if the Automation Variable is encrypted. Defaults to false.

name String

The name of the Automation Variable. Changing this forces a new resource to be created.

resourceGroupName String

The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.

value String

The value of the Automation Variable in the RFC3339 Section 5.6 Internet Date/Time Format.

Import

Automation DateTime Variable can be imported using the resource id, e.g.

 $ 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

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.