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.AccountArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.automation.kotlin
import com.pulumi.azure.automation.AccountArgs.builder
import com.pulumi.azure.automation.kotlin.inputs.AccountEncryptionArgs
import com.pulumi.azure.automation.kotlin.inputs.AccountEncryptionArgsBuilder
import com.pulumi.azure.automation.kotlin.inputs.AccountIdentityArgs
import com.pulumi.azure.automation.kotlin.inputs.AccountIdentityArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages a Automation Account.
* ## 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: "example-account",
* location: example.location,
* resourceGroupName: example.name,
* skuName: "Basic",
* tags: {
* environment: "development",
* },
* });
* ```
* ```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="example-account",
* location=example.location,
* resource_group_name=example.name,
* sku_name="Basic",
* tags={
* "environment": "development",
* })
* ```
* ```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 = "example-account",
* Location = example.Location,
* ResourceGroupName = example.Name,
* SkuName = "Basic",
* Tags =
* {
* { "environment", "development" },
* },
* });
* });
* ```
* ```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
* }
* _, err = automation.NewAccount(ctx, "example", &automation.AccountArgs{
* Name: pulumi.String("example-account"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* SkuName: pulumi.String("Basic"),
* Tags: pulumi.StringMap{
* "environment": pulumi.String("development"),
* },
* })
* 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 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("example-account")
* .location(example.location())
* .resourceGroupName(example.name())
* .skuName("Basic")
* .tags(Map.of("environment", "development"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleAccount:
* type: azure:automation:Account
* name: example
* properties:
* name: example-account
* location: ${example.location}
* resourceGroupName: ${example.name}
* skuName: Basic
* tags:
* environment: development
* ```
*
* ## Import
* Automation Accounts can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:automation/account:Account account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1
* ```
* @property encryptions
* @property identity An `identity` block as defined below.
* @property localAuthenticationEnabled Whether requests using non-AAD authentication are blocked. Defaults to `true`.
* @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
* @property name Specifies the name of the Automation Account. Changing this forces a new resource to be created.
* @property publicNetworkAccessEnabled Whether public network access is allowed for the automation account. Defaults to `true`.
* @property resourceGroupName The name of the resource group in which the Automation Account is created. Changing this forces a new resource to be created.
* @property skuName The SKU of the account. Possible values are `Basic` and `Free`.
* @property tags
*/
public data class AccountArgs(
public val encryptions: Output>? = null,
public val identity: Output? = null,
public val localAuthenticationEnabled: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val publicNetworkAccessEnabled: Output? = null,
public val resourceGroupName: Output? = null,
public val skuName: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.automation.AccountArgs =
com.pulumi.azure.automation.AccountArgs.builder()
.encryptions(
encryptions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.localAuthenticationEnabled(localAuthenticationEnabled?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.skuName(skuName?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [AccountArgs].
*/
@PulumiTagMarker
public class AccountArgsBuilder internal constructor() {
private var encryptions: Output>? = null
private var identity: Output? = null
private var localAuthenticationEnabled: Output? = null
private var location: Output? = null
private var name: Output? = null
private var publicNetworkAccessEnabled: Output? = null
private var resourceGroupName: Output? = null
private var skuName: Output? = null
private var tags: Output>? = null
/**
* @param value
*/
@JvmName("whotgfgjhxxixdvt")
public suspend fun encryptions(`value`: Output>) {
this.encryptions = value
}
@JvmName("lndhmfyitchggwtw")
public suspend fun encryptions(vararg values: Output) {
this.encryptions = Output.all(values.asList())
}
/**
* @param values
*/
@JvmName("nhffncaubxytsxdp")
public suspend fun encryptions(values: List>) {
this.encryptions = Output.all(values)
}
/**
* @param value An `identity` block as defined below.
*/
@JvmName("udaluuratyaprhxn")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value Whether requests using non-AAD authentication are blocked. Defaults to `true`.
*/
@JvmName("babmiorqhtgqbxcy")
public suspend fun localAuthenticationEnabled(`value`: Output) {
this.localAuthenticationEnabled = value
}
/**
* @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
@JvmName("mecjvgvqcudusoyj")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Specifies the name of the Automation Account. Changing this forces a new resource to be created.
*/
@JvmName("pjxevdwnpxqooywf")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Whether public network access is allowed for the automation account. Defaults to `true`.
*/
@JvmName("xgqqkboldfqpjeue")
public suspend fun publicNetworkAccessEnabled(`value`: Output) {
this.publicNetworkAccessEnabled = value
}
/**
* @param value The name of the resource group in which the Automation Account is created. Changing this forces a new resource to be created.
*/
@JvmName("bmlwgpvmjyhsoejv")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The SKU of the account. Possible values are `Basic` and `Free`.
*/
@JvmName("thfvifgmksjfxdfa")
public suspend fun skuName(`value`: Output) {
this.skuName = value
}
/**
* @param value
*/
@JvmName("bufjocagswcxjivg")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value
*/
@JvmName("cpeuhjclqmjiurik")
public suspend fun encryptions(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.encryptions = mapped
}
/**
* @param argument
*/
@JvmName("oqtoklcmivrvvrjd")
public suspend fun encryptions(argument: List Unit>) {
val toBeMapped = argument.toList().map {
AccountEncryptionArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.encryptions = mapped
}
/**
* @param argument
*/
@JvmName("odbnnxavydfcduvt")
public suspend fun encryptions(vararg argument: suspend AccountEncryptionArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
AccountEncryptionArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.encryptions = mapped
}
/**
* @param argument
*/
@JvmName("fnhdobawrsbbqqqy")
public suspend fun encryptions(argument: suspend AccountEncryptionArgsBuilder.() -> Unit) {
val toBeMapped = listOf(AccountEncryptionArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.encryptions = mapped
}
/**
* @param values
*/
@JvmName("tdulackyxywicxhs")
public suspend fun encryptions(vararg values: AccountEncryptionArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.encryptions = mapped
}
/**
* @param value An `identity` block as defined below.
*/
@JvmName("uqdbpkvtcvyjvdiw")
public suspend fun identity(`value`: AccountIdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument An `identity` block as defined below.
*/
@JvmName("wkbqxoaehyisknxd")
public suspend fun identity(argument: suspend AccountIdentityArgsBuilder.() -> Unit) {
val toBeMapped = AccountIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value Whether requests using non-AAD authentication are blocked. Defaults to `true`.
*/
@JvmName("jalfsifpplbxuaxh")
public suspend fun localAuthenticationEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.localAuthenticationEnabled = mapped
}
/**
* @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
@JvmName("yoonuimqlfnoogdm")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Specifies the name of the Automation Account. Changing this forces a new resource to be created.
*/
@JvmName("mkqariftreplvbvc")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Whether public network access is allowed for the automation account. Defaults to `true`.
*/
@JvmName("whnqntyoyfvipxdg")
public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.publicNetworkAccessEnabled = mapped
}
/**
* @param value The name of the resource group in which the Automation Account is created. Changing this forces a new resource to be created.
*/
@JvmName("ecvtqqlpuckfnsbv")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The SKU of the account. Possible values are `Basic` and `Free`.
*/
@JvmName("ytelnyiwvmobireq")
public suspend fun skuName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.skuName = mapped
}
/**
* @param value
*/
@JvmName("lhycphxgabhvfwba")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values
*/
@JvmName("erglufourxqaghab")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): AccountArgs = AccountArgs(
encryptions = encryptions,
identity = identity,
localAuthenticationEnabled = localAuthenticationEnabled,
location = location,
name = name,
publicNetworkAccessEnabled = publicNetworkAccessEnabled,
resourceGroupName = resourceGroupName,
skuName = skuName,
tags = tags,
)
}