com.pulumi.azure.automation.kotlin.Account.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.kotlin.outputs.AccountEncryption
import com.pulumi.azure.automation.kotlin.outputs.AccountIdentity
import com.pulumi.azure.automation.kotlin.outputs.AccountPrivateEndpointConnection
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.List
import kotlin.collections.Map
import com.pulumi.azure.automation.kotlin.outputs.AccountEncryption.Companion.toKotlin as accountEncryptionToKotlin
import com.pulumi.azure.automation.kotlin.outputs.AccountIdentity.Companion.toKotlin as accountIdentityToKotlin
import com.pulumi.azure.automation.kotlin.outputs.AccountPrivateEndpointConnection.Companion.toKotlin as accountPrivateEndpointConnectionToKotlin
/**
* Builder for [Account].
*/
@PulumiTagMarker
public class AccountResourceBuilder internal constructor() {
public var name: String? = null
public var args: AccountArgs = AccountArgs()
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 AccountArgsBuilder.() -> Unit) {
val builder = AccountArgsBuilder()
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(): Account {
val builtJavaResource = com.pulumi.azure.automation.Account(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Account(builtJavaResource)
}
}
/**
* 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
* ```
*/
public class Account internal constructor(
override val javaResource: com.pulumi.azure.automation.Account,
) : KotlinCustomResource(javaResource, AccountMapper) {
/**
* The Primary Access Key for the DSC Endpoint associated with this Automation Account.
*/
public val dscPrimaryAccessKey: Output
get() = javaResource.dscPrimaryAccessKey().applyValue({ args0 -> args0 })
/**
* The Secondary Access Key for the DSC Endpoint associated with this Automation Account.
*/
public val dscSecondaryAccessKey: Output
get() = javaResource.dscSecondaryAccessKey().applyValue({ args0 -> args0 })
/**
* The DSC Server Endpoint associated with this Automation Account.
*/
public val dscServerEndpoint: Output
get() = javaResource.dscServerEndpoint().applyValue({ args0 -> args0 })
public val encryptions: Output>?
get() = javaResource.encryptions().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> accountEncryptionToKotlin(args0) })
})
}).orElse(null)
})
/**
* The URL of automation hybrid service which is used for hybrid worker on-boarding With this Automation Account.
*/
public val hybridServiceUrl: Output
get() = javaResource.hybridServiceUrl().applyValue({ args0 -> args0 })
/**
* An `identity` block as defined below.
*/
public val identity: Output?
get() = javaResource.identity().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
accountIdentityToKotlin(args0)
})
}).orElse(null)
})
/**
* Whether requests using non-AAD authentication are blocked. Defaults to `true`.
*/
public val localAuthenticationEnabled: Output?
get() = javaResource.localAuthenticationEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Specifies the name of the Automation Account. Changing this forces a new resource to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
public val privateEndpointConnections: Output>
get() = javaResource.privateEndpointConnections().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> accountPrivateEndpointConnectionToKotlin(args0) })
})
})
/**
* Whether public network access is allowed for the automation account. Defaults to `true`.
*/
public val publicNetworkAccessEnabled: Output?
get() = javaResource.publicNetworkAccessEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the resource group in which the Automation Account is created. Changing this forces a new resource to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* The SKU of the account. Possible values are `Basic` and `Free`.
*/
public val skuName: Output
get() = javaResource.skuName().applyValue({ args0 -> args0 })
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy