All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.automation.kotlin.ConnectionClassicCertificateArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.automation.kotlin

import com.pulumi.azure.automation.ConnectionClassicCertificateArgs.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 `AzureClassicCertificate`.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * 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 exampleConnectionClassicCertificate = new azure.automation.ConnectionClassicCertificate("example", {
 *     name: "connection-example",
 *     resourceGroupName: exampleResourceGroup.name,
 *     automationAccountName: exampleAccount.name,
 *     certificateAssetName: "cert1",
 *     subscriptionName: "subs1",
 *     subscriptionId: example.then(example => example.subscriptionId),
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * 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_connection_classic_certificate = azure.automation.ConnectionClassicCertificate("example",
 *     name="connection-example",
 *     resource_group_name=example_resource_group.name,
 *     automation_account_name=example_account.name,
 *     certificate_asset_name="cert1",
 *     subscription_name="subs1",
 *     subscription_id=example.subscription_id)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * 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 exampleConnectionClassicCertificate = new Azure.Automation.ConnectionClassicCertificate("example", new()
 *     {
 *         Name = "connection-example",
 *         ResourceGroupName = exampleResourceGroup.Name,
 *         AutomationAccountName = exampleAccount.Name,
 *         CertificateAssetName = "cert1",
 *         SubscriptionName = "subs1",
 *         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/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
 * 		}
 * 		_, err = automation.NewConnectionClassicCertificate(ctx, "example", &automation.ConnectionClassicCertificateArgs{
 * 			Name:                  pulumi.String("connection-example"),
 * 			ResourceGroupName:     exampleResourceGroup.Name,
 * 			AutomationAccountName: exampleAccount.Name,
 * 			CertificateAssetName:  pulumi.String("cert1"),
 * 			SubscriptionName:      pulumi.String("subs1"),
 * 			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.ConnectionClassicCertificate;
 * import com.pulumi.azure.automation.ConnectionClassicCertificateArgs;
 * 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 exampleConnectionClassicCertificate = new ConnectionClassicCertificate("exampleConnectionClassicCertificate", ConnectionClassicCertificateArgs.builder()
 *             .name("connection-example")
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .automationAccountName(exampleAccount.name())
 *             .certificateAssetName("cert1")
 *             .subscriptionName("subs1")
 *             .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
 *   exampleConnectionClassicCertificate:
 *     type: azure:automation:ConnectionClassicCertificate
 *     name: example
 *     properties:
 *       name: connection-example
 *       resourceGroupName: ${exampleResourceGroup.name}
 *       automationAccountName: ${exampleAccount.name}
 *       certificateAssetName: cert1
 *       subscriptionName: subs1
 *       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/connectionClassicCertificate:ConnectionClassicCertificate conn1 /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 certificateAssetName The name of the certificate asset.
 * @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.
 * @property subscriptionName The name of subscription.
 */
public data class ConnectionClassicCertificateArgs(
    public val automationAccountName: Output? = null,
    public val certificateAssetName: Output? = null,
    public val description: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val subscriptionId: Output? = null,
    public val subscriptionName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.automation.ConnectionClassicCertificateArgs =
        com.pulumi.azure.automation.ConnectionClassicCertificateArgs.builder()
            .automationAccountName(automationAccountName?.applyValue({ args0 -> args0 }))
            .certificateAssetName(certificateAssetName?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .subscriptionId(subscriptionId?.applyValue({ args0 -> args0 }))
            .subscriptionName(subscriptionName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConnectionClassicCertificateArgs].
 */
@PulumiTagMarker
public class ConnectionClassicCertificateArgsBuilder internal constructor() {
    private var automationAccountName: Output? = null

    private var certificateAssetName: Output? = null

    private var description: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var subscriptionId: Output? = null

    private var subscriptionName: 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("oiebjrdnktglhyse")
    public suspend fun automationAccountName(`value`: Output) {
        this.automationAccountName = value
    }

    /**
     * @param value The name of the certificate asset.
     */
    @JvmName("frsnyncvewgbfefa")
    public suspend fun certificateAssetName(`value`: Output) {
        this.certificateAssetName = value
    }

    /**
     * @param value A description for this Connection.
     */
    @JvmName("xbksjhxlwnirjnui")
    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("wpgcsdfgvrkncrhg")
    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("kjgginefutqydeka")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The id of subscription.
     */
    @JvmName("bwmjuvvlqdgvfvfe")
    public suspend fun subscriptionId(`value`: Output) {
        this.subscriptionId = value
    }

    /**
     * @param value The name of subscription.
     */
    @JvmName("blbccwrukfledaje")
    public suspend fun subscriptionName(`value`: Output) {
        this.subscriptionName = 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("htruxorpppqgldfy")
    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 certificate asset.
     */
    @JvmName("ukehmgsmekfoxblg")
    public suspend fun certificateAssetName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.certificateAssetName = mapped
    }

    /**
     * @param value A description for this Connection.
     */
    @JvmName("joohxefaeyuwedub")
    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("noaoevtwcrrnevcs")
    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("wfhgvusbfsffjcip")
    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.
     */
    @JvmName("gtesthoqfchnevna")
    public suspend fun subscriptionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subscriptionId = mapped
    }

    /**
     * @param value The name of subscription.
     */
    @JvmName("xyphqarrufydjdyn")
    public suspend fun subscriptionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subscriptionName = mapped
    }

    internal fun build(): ConnectionClassicCertificateArgs = ConnectionClassicCertificateArgs(
        automationAccountName = automationAccountName,
        certificateAssetName = certificateAssetName,
        description = description,
        name = name,
        resourceGroupName = resourceGroupName,
        subscriptionId = subscriptionId,
        subscriptionName = subscriptionName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy