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.Powershell72Module.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.automation.kotlin
import com.pulumi.azure.automation.kotlin.outputs.Powershell72ModuleModuleLink
import com.pulumi.azure.automation.kotlin.outputs.Powershell72ModuleModuleLink.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [Powershell72Module].
*/
@PulumiTagMarker
public class Powershell72ModuleResourceBuilder internal constructor() {
public var name: String? = null
public var args: Powershell72ModuleArgs = Powershell72ModuleArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend Powershell72ModuleArgsBuilder.() -> Unit) {
val builder = Powershell72ModuleArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Powershell72Module {
val builtJavaResource = com.pulumi.azure.automation.Powershell72Module(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Powershell72Module(builtJavaResource)
}
}
/**
* 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
* ```
*/
public class Powershell72Module internal constructor(
override val javaResource: com.pulumi.azure.automation.Powershell72Module,
) : KotlinCustomResource(javaResource, Powershell72ModuleMapper) {
/**
* The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
*/
public val automationAccountId: Output
get() = javaResource.automationAccountId().applyValue({ args0 -> args0 })
/**
* A `module_link` block as defined below.
*/
public val moduleLink: Output
get() = javaResource.moduleLink().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* Specifies the name of the Module. Changing this forces a new resource to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* A mapping of tags to assign to the resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}).orElse(null)
})
}
public object Powershell72ModuleMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.automation.Powershell72Module::class == javaResource::class
override fun map(javaResource: Resource): Powershell72Module = Powershell72Module(
javaResource as
com.pulumi.azure.automation.Powershell72Module,
)
}
/**
* @see [Powershell72Module].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Powershell72Module].
*/
public suspend fun powershell72Module(
name: String,
block: suspend Powershell72ModuleResourceBuilder.() -> Unit,
): Powershell72Module {
val builder = Powershell72ModuleResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Powershell72Module].
* @param name The _unique_ name of the resulting resource.
*/
public fun powershell72Module(name: String): Powershell72Module {
val builder = Powershell72ModuleResourceBuilder()
builder.name(name)
return builder.build()
}