Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.automation.kotlin.Powershell72ModuleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.automation.kotlin
import com.pulumi.azure.automation.Powershell72ModuleArgs.builder
import com.pulumi.azure.automation.kotlin.inputs.Powershell72ModuleModuleLinkArgs
import com.pulumi.azure.automation.kotlin.inputs.Powershell72ModuleModuleLinkArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages a Automation Powershell 7.2 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 examplePowershell72Module = new azure.automation.Powershell72Module("example", {
* name: "xActiveDirectory",
* automationAccountId: exampleAccount.id,
* 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_powershell72_module = azure.automation.Powershell72Module("example",
* name="xActiveDirectory",
* automation_account_id=example_account.id,
* module_link={
* "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 examplePowershell72Module = new Azure.Automation.Powershell72Module("example", new()
* {
* Name = "xActiveDirectory",
* AutomationAccountId = exampleAccount.Id,
* ModuleLink = new Azure.Automation.Inputs.Powershell72ModuleModuleLinkArgs
* {
* 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.NewPowershell72Module(ctx, "example", &automation.Powershell72ModuleArgs{
* Name: pulumi.String("xActiveDirectory"),
* AutomationAccountId: exampleAccount.ID(),
* ModuleLink: &automation.Powershell72ModuleModuleLinkArgs{
* 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.Powershell72Module;
* import com.pulumi.azure.automation.Powershell72ModuleArgs;
* import com.pulumi.azure.automation.inputs.Powershell72ModuleModuleLinkArgs;
* 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 examplePowershell72Module = new Powershell72Module("examplePowershell72Module", Powershell72ModuleArgs.builder()
* .name("xActiveDirectory")
* .automationAccountId(exampleAccount.id())
* .moduleLink(Powershell72ModuleModuleLinkArgs.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
* examplePowershell72Module:
* type: azure:automation:Powershell72Module
* name: example
* properties:
* name: xActiveDirectory
* automationAccountId: ${exampleAccount.id}
* 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/powershell72Module:Powershell72Module module1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/powerShell72Modules/module1
* ```
* @property automationAccountId The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher 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 tags A mapping of tags to assign to the resource.
*/
public data class Powershell72ModuleArgs(
public val automationAccountId: Output? = null,
public val moduleLink: Output? = null,
public val name: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.automation.Powershell72ModuleArgs =
com.pulumi.azure.automation.Powershell72ModuleArgs.builder()
.automationAccountId(automationAccountId?.applyValue({ args0 -> args0 }))
.moduleLink(moduleLink?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [Powershell72ModuleArgs].
*/
@PulumiTagMarker
public class Powershell72ModuleArgsBuilder internal constructor() {
private var automationAccountId: Output? = null
private var moduleLink: Output? = null
private var name: Output? = null
private var tags: Output>? = null
/**
* @param value The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
*/
@JvmName("xjfehgijxakfycts")
public suspend fun automationAccountId(`value`: Output) {
this.automationAccountId = value
}
/**
* @param value A `module_link` block as defined below.
*/
@JvmName("ijipdkpyhsrlnbcm")
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("pewhobbkmksrjxbj")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value A mapping of tags to assign to the resource.
*/
@JvmName("lsoapliyujwwqcnl")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
*/
@JvmName("erssbxooexjhqljv")
public suspend fun automationAccountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.automationAccountId = mapped
}
/**
* @param value A `module_link` block as defined below.
*/
@JvmName("aufgpxjulfphqqkt")
public suspend fun moduleLink(`value`: Powershell72ModuleModuleLinkArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.moduleLink = mapped
}
/**
* @param argument A `module_link` block as defined below.
*/
@JvmName("gxskvegmcxgkruov")
public suspend fun moduleLink(argument: suspend Powershell72ModuleModuleLinkArgsBuilder.() -> Unit) {
val toBeMapped = Powershell72ModuleModuleLinkArgsBuilder().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("dmetdmxobxvkgwje")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value A mapping of tags to assign to the resource.
*/
@JvmName("vmghogqlxjpenmxy")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A mapping of tags to assign to the resource.
*/
@JvmName("yvvrughkouqrsjil")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): Powershell72ModuleArgs = Powershell72ModuleArgs(
automationAccountId = automationAccountId,
moduleLink = moduleLink,
name = name,
tags = tags,
)
}