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.ConnectionCertificateArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.automation.kotlin
import com.pulumi.azure.automation.ConnectionCertificateArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages an Automation Connection with type `Azure`.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* import * as std from "@pulumi/std";
* const exampleResourceGroup = new azure.core.ResourceGroup("example", {
* name: "resourceGroup-example",
* location: "West Europe",
* });
* const example = azure.core.getClientConfig({});
* const exampleAccount = new azure.automation.Account("example", {
* name: "account-example",
* location: exampleResourceGroup.location,
* resourceGroupName: exampleResourceGroup.name,
* skuName: "Basic",
* });
* const exampleCertificate = new azure.automation.Certificate("example", {
* name: "certificate-example",
* resourceGroupName: exampleResourceGroup.name,
* automationAccountName: exampleAccount.name,
* base64: std.filebase64({
* input: "certificate.pfx",
* }).then(invoke => invoke.result),
* });
* const exampleConnectionCertificate = new azure.automation.ConnectionCertificate("example", {
* name: "connection-example",
* resourceGroupName: exampleResourceGroup.name,
* automationAccountName: exampleAccount.name,
* automationCertificateName: exampleCertificate.name,
* subscriptionId: example.then(example => example.subscriptionId),
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* import pulumi_std as std
* example_resource_group = azure.core.ResourceGroup("example",
* name="resourceGroup-example",
* location="West Europe")
* example = azure.core.get_client_config()
* example_account = azure.automation.Account("example",
* name="account-example",
* location=example_resource_group.location,
* resource_group_name=example_resource_group.name,
* sku_name="Basic")
* example_certificate = azure.automation.Certificate("example",
* name="certificate-example",
* resource_group_name=example_resource_group.name,
* automation_account_name=example_account.name,
* base64=std.filebase64(input="certificate.pfx").result)
* example_connection_certificate = azure.automation.ConnectionCertificate("example",
* name="connection-example",
* resource_group_name=example_resource_group.name,
* automation_account_name=example_account.name,
* automation_certificate_name=example_certificate.name,
* subscription_id=example.subscription_id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* using Std = Pulumi.Std;
* return await Deployment.RunAsync(() =>
* {
* var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "resourceGroup-example",
* Location = "West Europe",
* });
* var example = Azure.Core.GetClientConfig.Invoke();
* var exampleAccount = new Azure.Automation.Account("example", new()
* {
* Name = "account-example",
* Location = exampleResourceGroup.Location,
* ResourceGroupName = exampleResourceGroup.Name,
* SkuName = "Basic",
* });
* var exampleCertificate = new Azure.Automation.Certificate("example", new()
* {
* Name = "certificate-example",
* ResourceGroupName = exampleResourceGroup.Name,
* AutomationAccountName = exampleAccount.Name,
* Base64 = Std.Filebase64.Invoke(new()
* {
* Input = "certificate.pfx",
* }).Apply(invoke => invoke.Result),
* });
* var exampleConnectionCertificate = new Azure.Automation.ConnectionCertificate("example", new()
* {
* Name = "connection-example",
* ResourceGroupName = exampleResourceGroup.Name,
* AutomationAccountName = exampleAccount.Name,
* AutomationCertificateName = exampleCertificate.Name,
* SubscriptionId = example.Apply(getClientConfigResult => getClientConfigResult.SubscriptionId),
* });
* });
* ```
* ```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-std/sdk/go/std"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("resourceGroup-example"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* example, err := core.GetClientConfig(ctx, nil, nil)
* if err != nil {
* return err
* }
* exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
* Name: pulumi.String("account-example"),
* Location: exampleResourceGroup.Location,
* ResourceGroupName: exampleResourceGroup.Name,
* SkuName: pulumi.String("Basic"),
* })
* if err != nil {
* return err
* }
* invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
* Input: "certificate.pfx",
* }, nil)
* if err != nil {
* return err
* }
* exampleCertificate, err := automation.NewCertificate(ctx, "example", &automation.CertificateArgs{
* Name: pulumi.String("certificate-example"),
* ResourceGroupName: exampleResourceGroup.Name,
* AutomationAccountName: exampleAccount.Name,
* Base64: pulumi.String(invokeFilebase64.Result),
* })
* if err != nil {
* return err
* }
* _, err = automation.NewConnectionCertificate(ctx, "example", &automation.ConnectionCertificateArgs{
* Name: pulumi.String("connection-example"),
* ResourceGroupName: exampleResourceGroup.Name,
* AutomationAccountName: exampleAccount.Name,
* AutomationCertificateName: exampleCertificate.Name,
* SubscriptionId: pulumi.String(example.SubscriptionId),
* })
* 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.core.CoreFunctions;
* import com.pulumi.azure.automation.Account;
* import com.pulumi.azure.automation.AccountArgs;
* import com.pulumi.azure.automation.Certificate;
* import com.pulumi.azure.automation.CertificateArgs;
* import com.pulumi.azure.automation.ConnectionCertificate;
* import com.pulumi.azure.automation.ConnectionCertificateArgs;
* 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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
* .name("resourceGroup-example")
* .location("West Europe")
* .build());
* final var example = CoreFunctions.getClientConfig();
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("account-example")
* .location(exampleResourceGroup.location())
* .resourceGroupName(exampleResourceGroup.name())
* .skuName("Basic")
* .build());
* var exampleCertificate = new Certificate("exampleCertificate", CertificateArgs.builder()
* .name("certificate-example")
* .resourceGroupName(exampleResourceGroup.name())
* .automationAccountName(exampleAccount.name())
* .base64(StdFunctions.filebase64(Filebase64Args.builder()
* .input("certificate.pfx")
* .build()).result())
* .build());
* var exampleConnectionCertificate = new ConnectionCertificate("exampleConnectionCertificate", ConnectionCertificateArgs.builder()
* .name("connection-example")
* .resourceGroupName(exampleResourceGroup.name())
* .automationAccountName(exampleAccount.name())
* .automationCertificateName(exampleCertificate.name())
* .subscriptionId(example.applyValue(getClientConfigResult -> getClientConfigResult.subscriptionId()))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleResourceGroup:
* type: azure:core:ResourceGroup
* name: example
* properties:
* name: resourceGroup-example
* location: West Europe
* exampleAccount:
* type: azure:automation:Account
* name: example
* properties:
* name: account-example
* location: ${exampleResourceGroup.location}
* resourceGroupName: ${exampleResourceGroup.name}
* skuName: Basic
* exampleCertificate:
* type: azure:automation:Certificate
* name: example
* properties:
* name: certificate-example
* resourceGroupName: ${exampleResourceGroup.name}
* automationAccountName: ${exampleAccount.name}
* base64:
* fn::invoke:
* Function: std:filebase64
* Arguments:
* input: certificate.pfx
* Return: result
* exampleConnectionCertificate:
* type: azure:automation:ConnectionCertificate
* name: example
* properties:
* name: connection-example
* resourceGroupName: ${exampleResourceGroup.name}
* automationAccountName: ${exampleAccount.name}
* automationCertificateName: ${exampleCertificate.name}
* subscriptionId: ${example.subscriptionId}
* variables:
* example:
* fn::invoke:
* Function: azure:core:getClientConfig
* Arguments: {}
* ```
*
* ## Import
* Automation Connection can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:automation/connectionCertificate:ConnectionCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/connections/conn1
* ```
* @property automationAccountName The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
* @property automationCertificateName The name of the automation certificate.
* @property description A description for this Connection.
* @property name Specifies the name of the Connection. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
* @property subscriptionId The id of subscription where the automation certificate exists.
*/
public data class ConnectionCertificateArgs(
public val automationAccountName: Output? = null,
public val automationCertificateName: Output? = null,
public val description: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val subscriptionId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.automation.ConnectionCertificateArgs =
com.pulumi.azure.automation.ConnectionCertificateArgs.builder()
.automationAccountName(automationAccountName?.applyValue({ args0 -> args0 }))
.automationCertificateName(automationCertificateName?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.subscriptionId(subscriptionId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ConnectionCertificateArgs].
*/
@PulumiTagMarker
public class ConnectionCertificateArgsBuilder internal constructor() {
private var automationAccountName: Output? = null
private var automationCertificateName: Output? = null
private var description: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var subscriptionId: Output? = null
/**
* @param value The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
*/
@JvmName("vjsxglbbrkwoxino")
public suspend fun automationAccountName(`value`: Output) {
this.automationAccountName = value
}
/**
* @param value The name of the automation certificate.
*/
@JvmName("emchltsilpsfmdot")
public suspend fun automationCertificateName(`value`: Output) {
this.automationCertificateName = value
}
/**
* @param value A description for this Connection.
*/
@JvmName("olgisceigusmjinw")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Specifies the name of the Connection. Changing this forces a new resource to be created.
*/
@JvmName("kwsbjoaqlbuyxrie")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
*/
@JvmName("umgbrhrdknvnhnpf")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The id of subscription where the automation certificate exists.
*/
@JvmName("rsxtpnqmvvxwucuh")
public suspend fun subscriptionId(`value`: Output) {
this.subscriptionId = value
}
/**
* @param value The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
*/
@JvmName("gwuonjcuvmjrhhvt")
public suspend fun automationAccountName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.automationAccountName = mapped
}
/**
* @param value The name of the automation certificate.
*/
@JvmName("lhbwfjfclqiucroq")
public suspend fun automationCertificateName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.automationCertificateName = mapped
}
/**
* @param value A description for this Connection.
*/
@JvmName("kxihevsoxguvsius")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Specifies the name of the Connection. Changing this forces a new resource to be created.
*/
@JvmName("jxtxeaucdlhmluhw")
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 Connection is created. Changing this forces a new resource to be created.
*/
@JvmName("nbvwemhhuwaefqjb")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The id of subscription where the automation certificate exists.
*/
@JvmName("dlljyxxbxbnddwvy")
public suspend fun subscriptionId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subscriptionId = mapped
}
internal fun build(): ConnectionCertificateArgs = ConnectionCertificateArgs(
automationAccountName = automationAccountName,
automationCertificateName = automationCertificateName,
description = description,
name = name,
resourceGroupName = resourceGroupName,
subscriptionId = subscriptionId,
)
}