com.pulumi.azure.automation.kotlin.ModuleArgs.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.ModuleArgs.builder
import com.pulumi.azure.automation.kotlin.inputs.ModuleModuleLinkArgs
import com.pulumi.azure.automation.kotlin.inputs.ModuleModuleLinkArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Manages a Automation Module.
* ## 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 exampleModule = new azure.automation.Module("example", {
* name: "xActiveDirectory",
* resourceGroupName: example.name,
* automationAccountName: exampleAccount.name,
* moduleLink: {
* uri: "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
* },
* });
* ```
* ```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_module = azure.automation.Module("example",
* name="xActiveDirectory",
* resource_group_name=example.name,
* automation_account_name=example_account.name,
* module_link=azure.automation.ModuleModuleLinkArgs(
* uri="https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
* ))
* ```
* ```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 exampleModule = new Azure.Automation.Module("example", new()
* {
* Name = "xActiveDirectory",
* ResourceGroupName = example.Name,
* AutomationAccountName = exampleAccount.Name,
* ModuleLink = new Azure.Automation.Inputs.ModuleModuleLinkArgs
* {
* Uri = "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
* },
* });
* });
* ```
* ```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
* }
* _, err = automation.NewModule(ctx, "example", &automation.ModuleArgs{
* Name: pulumi.String("xActiveDirectory"),
* ResourceGroupName: example.Name,
* AutomationAccountName: exampleAccount.Name,
* ModuleLink: &automation.ModuleModuleLinkArgs{
* Uri: pulumi.String("https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg"),
* },
* })
* 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.Module;
* import com.pulumi.azure.automation.ModuleArgs;
* import com.pulumi.azure.automation.inputs.ModuleModuleLinkArgs;
* 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 exampleModule = new Module("exampleModule", ModuleArgs.builder()
* .name("xActiveDirectory")
* .resourceGroupName(example.name())
* .automationAccountName(exampleAccount.name())
* .moduleLink(ModuleModuleLinkArgs.builder()
* .uri("https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg")
* .build())
* .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
* exampleModule:
* type: azure:automation:Module
* name: example
* properties:
* name: xActiveDirectory
* resourceGroupName: ${example.name}
* automationAccountName: ${exampleAccount.name}
* moduleLink:
* uri: https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg
* ```
*
* ## Import
* Automation Modules can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:automation/module:Module module1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/modules/module1
* ```
* @property automationAccountName The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
* @property moduleLink A `module_link` block as defined below.
* @property name Specifies the name of the Module. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
*/
public data class ModuleArgs(
public val automationAccountName: Output? = null,
public val moduleLink: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.automation.ModuleArgs =
com.pulumi.azure.automation.ModuleArgs.builder()
.automationAccountName(automationAccountName?.applyValue({ args0 -> args0 }))
.moduleLink(moduleLink?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ModuleArgs].
*/
@PulumiTagMarker
public class ModuleArgsBuilder internal constructor() {
private var automationAccountName: Output? = null
private var moduleLink: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
/**
* @param value The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
*/
@JvmName("fpsntxrdjhsfuteg")
public suspend fun automationAccountName(`value`: Output) {
this.automationAccountName = value
}
/**
* @param value A `module_link` block as defined below.
*/
@JvmName("blfrvsbgxvmasvra")
public suspend fun moduleLink(`value`: Output) {
this.moduleLink = value
}
/**
* @param value Specifies the name of the Module. Changing this forces a new resource to be created.
*/
@JvmName("vyeobssyjcbmykkg")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
*/
@JvmName("exxfoxqoscyulndh")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
*/
@JvmName("oclsagpssncgcuge")
public suspend fun automationAccountName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.automationAccountName = mapped
}
/**
* @param value A `module_link` block as defined below.
*/
@JvmName("wwwxbtvjxgpqkpbm")
public suspend fun moduleLink(`value`: ModuleModuleLinkArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.moduleLink = mapped
}
/**
* @param argument A `module_link` block as defined below.
*/
@JvmName("xrlelxwiaakbmnvt")
public suspend fun moduleLink(argument: suspend ModuleModuleLinkArgsBuilder.() -> Unit) {
val toBeMapped = ModuleModuleLinkArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.moduleLink = mapped
}
/**
* @param value Specifies the name of the Module. Changing this forces a new resource to be created.
*/
@JvmName("eegqkufegntdiadv")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
*/
@JvmName("tibjeabubhbjofiu")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
internal fun build(): ModuleArgs = ModuleArgs(
automationAccountName = automationAccountName,
moduleLink = moduleLink,
name = name,
resourceGroupName = resourceGroupName,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy