
com.pulumi.azure.automation.kotlin.JobScheduleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.automation.kotlin
import com.pulumi.azure.automation.JobScheduleArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Links an Automation Runbook and Schedule.
* > **NOTE** AzureRM provides this stand-alone azure.automation.JobSchedule and an inlined `job_schdule` property in azurerm_runbook to manage the job schedules. You can only make use of one of these methods to manage a job schedule.
* ## Example Usage
* This is an example of just the Job Schedule.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.automation.JobSchedule("example", {
* resourceGroupName: "tf-rgr-automation",
* automationAccountName: "tf-automation-account",
* scheduleName: "hour",
* runbookName: "Get-VirtualMachine",
* parameters: {
* resourcegroup: "tf-rgr-vm",
* vmname: "TF-VM-01",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.automation.JobSchedule("example",
* resource_group_name="tf-rgr-automation",
* automation_account_name="tf-automation-account",
* schedule_name="hour",
* runbook_name="Get-VirtualMachine",
* parameters={
* "resourcegroup": "tf-rgr-vm",
* "vmname": "TF-VM-01",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Automation.JobSchedule("example", new()
* {
* ResourceGroupName = "tf-rgr-automation",
* AutomationAccountName = "tf-automation-account",
* ScheduleName = "hour",
* RunbookName = "Get-VirtualMachine",
* Parameters =
* {
* { "resourcegroup", "tf-rgr-vm" },
* { "vmname", "TF-VM-01" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/automation"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := automation.NewJobSchedule(ctx, "example", &automation.JobScheduleArgs{
* ResourceGroupName: pulumi.String("tf-rgr-automation"),
* AutomationAccountName: pulumi.String("tf-automation-account"),
* ScheduleName: pulumi.String("hour"),
* RunbookName: pulumi.String("Get-VirtualMachine"),
* Parameters: pulumi.StringMap{
* "resourcegroup": pulumi.String("tf-rgr-vm"),
* "vmname": pulumi.String("TF-VM-01"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.automation.JobSchedule;
* import com.pulumi.azure.automation.JobScheduleArgs;
* 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 JobSchedule("example", JobScheduleArgs.builder()
* .resourceGroupName("tf-rgr-automation")
* .automationAccountName("tf-automation-account")
* .scheduleName("hour")
* .runbookName("Get-VirtualMachine")
* .parameters(Map.ofEntries(
* Map.entry("resourcegroup", "tf-rgr-vm"),
* Map.entry("vmname", "TF-VM-01")
* ))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:automation:JobSchedule
* properties:
* resourceGroupName: tf-rgr-automation
* automationAccountName: tf-automation-account
* scheduleName: hour
* runbookName: Get-VirtualMachine
* parameters:
* resourcegroup: tf-rgr-vm
* vmname: TF-VM-01
* ```
*
* ## Import
* Automation Job Schedules can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:automation/jobSchedule:JobSchedule example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/schedules/schedule1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/runbooks/runbook1"
* ```
* @property automationAccountName The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
* @property jobScheduleId The UUID identifying the Automation Job Schedule.
* @property parameters A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. Changing this forces a new resource to be created.
* > **NOTE:** The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation.
* @property resourceGroupName The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
* @property runOn Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
* @property runbookName The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created.
* @property scheduleName The name of the Schedule. Changing this forces a new resource to be created.
*/
public data class JobScheduleArgs(
public val automationAccountName: Output? = null,
public val jobScheduleId: Output? = null,
public val parameters: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy