com.pulumi.azure.automation.kotlin.WebhookArgs.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.WebhookArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages an Automation Runbook's Webhook.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleAccount = new azure.automation.Account("example", {
* name: "account1",
* location: example.location,
* resourceGroupName: example.name,
* skuName: "Basic",
* });
* const exampleRunBook = new azure.automation.RunBook("example", {
* name: "Get-AzureVMTutorial",
* location: example.location,
* resourceGroupName: example.name,
* automationAccountName: exampleAccount.name,
* logVerbose: true,
* logProgress: true,
* description: "This is an example runbook",
* runbookType: "PowerShellWorkflow",
* publishContentLink: {
* uri: "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1",
* },
* });
* const exampleWebhook = new azure.automation.Webhook("example", {
* name: "TestRunbook_webhook",
* resourceGroupName: example.name,
* automationAccountName: exampleAccount.name,
* expiryTime: "2021-12-31T00:00:00Z",
* enabled: true,
* runbookName: exampleRunBook.name,
* parameters: {
* input: "parameter",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_account = azure.automation.Account("example",
* name="account1",
* location=example.location,
* resource_group_name=example.name,
* sku_name="Basic")
* example_run_book = azure.automation.RunBook("example",
* name="Get-AzureVMTutorial",
* location=example.location,
* resource_group_name=example.name,
* automation_account_name=example_account.name,
* log_verbose=True,
* log_progress=True,
* description="This is an example runbook",
* runbook_type="PowerShellWorkflow",
* publish_content_link=azure.automation.RunBookPublishContentLinkArgs(
* uri="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1",
* ))
* example_webhook = azure.automation.Webhook("example",
* name="TestRunbook_webhook",
* resource_group_name=example.name,
* automation_account_name=example_account.name,
* expiry_time="2021-12-31T00:00:00Z",
* enabled=True,
* runbook_name=example_run_book.name,
* parameters={
* "input": "parameter",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleAccount = new Azure.Automation.Account("example", new()
* {
* Name = "account1",
* Location = example.Location,
* ResourceGroupName = example.Name,
* SkuName = "Basic",
* });
* var exampleRunBook = new Azure.Automation.RunBook("example", new()
* {
* Name = "Get-AzureVMTutorial",
* Location = example.Location,
* ResourceGroupName = example.Name,
* AutomationAccountName = exampleAccount.Name,
* LogVerbose = true,
* LogProgress = true,
* Description = "This is an example runbook",
* RunbookType = "PowerShellWorkflow",
* PublishContentLink = new Azure.Automation.Inputs.RunBookPublishContentLinkArgs
* {
* Uri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1",
* },
* });
* var exampleWebhook = new Azure.Automation.Webhook("example", new()
* {
* Name = "TestRunbook_webhook",
* ResourceGroupName = example.Name,
* AutomationAccountName = exampleAccount.Name,
* ExpiryTime = "2021-12-31T00:00:00Z",
* Enabled = true,
* RunbookName = exampleRunBook.Name,
* Parameters =
* {
* { "input", "parameter" },
* },
* });
* });
* ```
* ```go
* 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 {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
* Name: pulumi.String("account1"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* SkuName: pulumi.String("Basic"),
* })
* if err != nil {
* return err
* }
* exampleRunBook, err := automation.NewRunBook(ctx, "example", &automation.RunBookArgs{
* Name: pulumi.String("Get-AzureVMTutorial"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* AutomationAccountName: exampleAccount.Name,
* LogVerbose: pulumi.Bool(true),
* LogProgress: pulumi.Bool(true),
* Description: pulumi.String("This is an example runbook"),
* RunbookType: pulumi.String("PowerShellWorkflow"),
* PublishContentLink: &automation.RunBookPublishContentLinkArgs{
* Uri: pulumi.String("https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1"),
* },
* })
* if err != nil {
* return err
* }
* _, err = automation.NewWebhook(ctx, "example", &automation.WebhookArgs{
* Name: pulumi.String("TestRunbook_webhook"),
* ResourceGroupName: example.Name,
* AutomationAccountName: exampleAccount.Name,
* ExpiryTime: pulumi.String("2021-12-31T00:00:00Z"),
* Enabled: pulumi.Bool(true),
* RunbookName: exampleRunBook.Name,
* Parameters: pulumi.StringMap{
* "input": pulumi.String("parameter"),
* },
* })
* 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.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.RunBook;
* import com.pulumi.azure.automation.RunBookArgs;
* import com.pulumi.azure.automation.inputs.RunBookPublishContentLinkArgs;
* import com.pulumi.azure.automation.Webhook;
* import com.pulumi.azure.automation.WebhookArgs;
* 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("example-resources")
* .location("West Europe")
* .build());
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("account1")
* .location(example.location())
* .resourceGroupName(example.name())
* .skuName("Basic")
* .build());
* var exampleRunBook = new RunBook("exampleRunBook", RunBookArgs.builder()
* .name("Get-AzureVMTutorial")
* .location(example.location())
* .resourceGroupName(example.name())
* .automationAccountName(exampleAccount.name())
* .logVerbose("true")
* .logProgress("true")
* .description("This is an example runbook")
* .runbookType("PowerShellWorkflow")
* .publishContentLink(RunBookPublishContentLinkArgs.builder()
* .uri("https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1")
* .build())
* .build());
* var exampleWebhook = new Webhook("exampleWebhook", WebhookArgs.builder()
* .name("TestRunbook_webhook")
* .resourceGroupName(example.name())
* .automationAccountName(exampleAccount.name())
* .expiryTime("2021-12-31T00:00:00Z")
* .enabled(true)
* .runbookName(exampleRunBook.name())
* .parameters(Map.of("input", "parameter"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleAccount:
* type: azure:automation:Account
* name: example
* properties:
* name: account1
* location: ${example.location}
* resourceGroupName: ${example.name}
* skuName: Basic
* exampleRunBook:
* type: azure:automation:RunBook
* name: example
* properties:
* name: Get-AzureVMTutorial
* location: ${example.location}
* resourceGroupName: ${example.name}
* automationAccountName: ${exampleAccount.name}
* logVerbose: 'true'
* logProgress: 'true'
* description: This is an example runbook
* runbookType: PowerShellWorkflow
* publishContentLink:
* uri: https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1
* exampleWebhook:
* type: azure:automation:Webhook
* name: example
* properties:
* name: TestRunbook_webhook
* resourceGroupName: ${example.name}
* automationAccountName: ${exampleAccount.name}
* expiryTime: 2021-12-31T00:00:00Z
* enabled: true
* runbookName: ${exampleRunBook.name}
* parameters:
* input: parameter
* ```
*
* ## Import
* Automation Webhooks can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:automation/webhook:Webhook TestRunbook_webhook /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/webHooks/TestRunbook_webhook
* ```
* @property automationAccountName The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created.
* @property enabled Controls if Webhook is enabled. Defaults to `true`.
* @property expiryTime Timestamp when the webhook expires. Changing this forces a new resource to be created.
* @property name Specifies the name of the Webhook. Changing this forces a new resource to be created.
* @property parameters Map of input parameters passed to runbook.
* @property resourceGroupName The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created.
* @property runOnWorkerGroup Name of the hybrid worker group the Webhook job will run on.
* @property runbookName Name of the Automation Runbook to execute by Webhook.
* @property uri URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created.
*/
public data class WebhookArgs(
public val automationAccountName: Output? = null,
public val enabled: Output? = null,
public val expiryTime: Output? = null,
public val name: Output? = null,
public val parameters: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy