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

com.pulumi.azurenative.automation.kotlin.ConnectionArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.automation.kotlin

import com.pulumi.azurenative.automation.ConnectionArgs.builder
import com.pulumi.azurenative.automation.kotlin.inputs.ConnectionTypeAssociationPropertyArgs
import com.pulumi.azurenative.automation.kotlin.inputs.ConnectionTypeAssociationPropertyArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Definition of the connection.
 * Azure REST API version: 2022-08-08. Prior API version in Azure Native 1.x: 2019-06-01.
 * Other available API versions: 2023-05-15-preview, 2023-11-01.
 * ## Example Usage
 * ### Create or update connection
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var connection = new AzureNative.Automation.Connection("connection", new()
 *     {
 *         AutomationAccountName = "myAutomationAccount28",
 *         ConnectionName = "mysConnection",
 *         ConnectionType = new AzureNative.Automation.Inputs.ConnectionTypeAssociationPropertyArgs
 *         {
 *             Name = "Azure",
 *         },
 *         Description = "my description goes here",
 *         FieldDefinitionValues =
 *         {
 *             { "AutomationCertificateName", "mysCertificateName" },
 *             { "SubscriptionID", "subid" },
 *         },
 *         Name = "mysConnection",
 *         ResourceGroupName = "rg",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	automation "github.com/pulumi/pulumi-azure-native-sdk/automation/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := automation.NewConnection(ctx, "connection", &automation.ConnectionArgs{
 * 			AutomationAccountName: pulumi.String("myAutomationAccount28"),
 * 			ConnectionName:        pulumi.String("mysConnection"),
 * 			ConnectionType: &automation.ConnectionTypeAssociationPropertyArgs{
 * 				Name: pulumi.String("Azure"),
 * 			},
 * 			Description: pulumi.String("my description goes here"),
 * 			FieldDefinitionValues: pulumi.StringMap{
 * 				"AutomationCertificateName": pulumi.String("mysCertificateName"),
 * 				"SubscriptionID":            pulumi.String("subid"),
 * 			},
 * 			Name:              pulumi.String("mysConnection"),
 * 			ResourceGroupName: pulumi.String("rg"),
 * 		})
 * 		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.azurenative.automation.Connection;
 * import com.pulumi.azurenative.automation.ConnectionArgs;
 * import com.pulumi.azurenative.automation.inputs.ConnectionTypeAssociationPropertyArgs;
 * 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 connection = new Connection("connection", ConnectionArgs.builder()
 *             .automationAccountName("myAutomationAccount28")
 *             .connectionName("mysConnection")
 *             .connectionType(ConnectionTypeAssociationPropertyArgs.builder()
 *                 .name("Azure")
 *                 .build())
 *             .description("my description goes here")
 *             .fieldDefinitionValues(Map.ofEntries(
 *                 Map.entry("AutomationCertificateName", "mysCertificateName"),
 *                 Map.entry("SubscriptionID", "subid")
 *             ))
 *             .name("mysConnection")
 *             .resourceGroupName("rg")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:automation:Connection mysConnection /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}
 * ```
 * @property automationAccountName The name of the automation account.
 * @property connectionName The parameters supplied to the create or update connection operation.
 * @property connectionType Gets or sets the connectionType of the connection.
 * @property description Gets or sets the description of the connection.
 * @property fieldDefinitionValues Gets or sets the field definition properties of the connection.
 * @property name Gets or sets the name of the connection.
 * @property resourceGroupName Name of an Azure Resource group.
 */
public data class ConnectionArgs(
    public val automationAccountName: Output? = null,
    public val connectionName: Output? = null,
    public val connectionType: Output? = null,
    public val description: Output? = null,
    public val fieldDefinitionValues: Output>? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.automation.ConnectionArgs =
        com.pulumi.azurenative.automation.ConnectionArgs.builder()
            .automationAccountName(automationAccountName?.applyValue({ args0 -> args0 }))
            .connectionName(connectionName?.applyValue({ args0 -> args0 }))
            .connectionType(connectionType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .fieldDefinitionValues(
                fieldDefinitionValues?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

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

    private var connectionName: Output? = null

    private var connectionType: Output? = null

    private var description: Output? = null

    private var fieldDefinitionValues: Output>? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value The name of the automation account.
     */
    @JvmName("icyisqukvybcbpmm")
    public suspend fun automationAccountName(`value`: Output) {
        this.automationAccountName = value
    }

    /**
     * @param value The parameters supplied to the create or update connection operation.
     */
    @JvmName("bmfbsjladvrixuoy")
    public suspend fun connectionName(`value`: Output) {
        this.connectionName = value
    }

    /**
     * @param value Gets or sets the connectionType of the connection.
     */
    @JvmName("kwnujaiikwysqqpl")
    public suspend fun connectionType(`value`: Output) {
        this.connectionType = value
    }

    /**
     * @param value Gets or sets the description of the connection.
     */
    @JvmName("skxlpamelxqabsvu")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Gets or sets the field definition properties of the connection.
     */
    @JvmName("ircivxlbwmlufkrn")
    public suspend fun fieldDefinitionValues(`value`: Output>) {
        this.fieldDefinitionValues = value
    }

    /**
     * @param value Gets or sets the name of the connection.
     */
    @JvmName("vrcbestrtddthexa")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Name of an Azure Resource group.
     */
    @JvmName("efyducqyehwhaass")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The name of the automation account.
     */
    @JvmName("jfwcrqtqkaqmhkxe")
    public suspend fun automationAccountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.automationAccountName = mapped
    }

    /**
     * @param value The parameters supplied to the create or update connection operation.
     */
    @JvmName("hgfpmmrkegualdjy")
    public suspend fun connectionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionName = mapped
    }

    /**
     * @param value Gets or sets the connectionType of the connection.
     */
    @JvmName("fbdogacpymsigfao")
    public suspend fun connectionType(`value`: ConnectionTypeAssociationPropertyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionType = mapped
    }

    /**
     * @param argument Gets or sets the connectionType of the connection.
     */
    @JvmName("qmsiaqbydqrrkdim")
    public suspend fun connectionType(argument: suspend ConnectionTypeAssociationPropertyArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectionTypeAssociationPropertyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.connectionType = mapped
    }

    /**
     * @param value Gets or sets the description of the connection.
     */
    @JvmName("sciadqfwbiecxnlo")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Gets or sets the field definition properties of the connection.
     */
    @JvmName("dwmmcnlijejtqpkh")
    public suspend fun fieldDefinitionValues(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fieldDefinitionValues = mapped
    }

    /**
     * @param values Gets or sets the field definition properties of the connection.
     */
    @JvmName("undghayflittxwws")
    public fun fieldDefinitionValues(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fieldDefinitionValues = mapped
    }

    /**
     * @param value Gets or sets the name of the connection.
     */
    @JvmName("rotwkdcwurkvkcnk")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Name of an Azure Resource group.
     */
    @JvmName("tifbrljxgijebnod")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    internal fun build(): ConnectionArgs = ConnectionArgs(
        automationAccountName = automationAccountName,
        connectionName = connectionName,
        connectionType = connectionType,
        description = description,
        fieldDefinitionValues = fieldDefinitionValues,
        name = name,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy