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

com.pulumi.azurenative.datafactory.kotlin.CredentialOperationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.datafactory.kotlin

import com.pulumi.azurenative.datafactory.CredentialOperationArgs.builder
import com.pulumi.azurenative.datafactory.kotlin.inputs.ManagedIdentityCredentialArgs
import com.pulumi.azurenative.datafactory.kotlin.inputs.ServicePrincipalCredentialArgs
import com.pulumi.core.Either
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

/**
 * Credential resource type.
 * Azure REST API version: 2018-06-01. Prior API version in Azure Native 1.x: 2018-06-01.
 * ## Example Usage
 * ### Credentials_Create
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var credentialOperation = new AzureNative.DataFactory.CredentialOperation("credentialOperation", new()
 *     {
 *         CredentialName = "exampleCredential",
 *         FactoryName = "exampleFactoryName",
 *         Properties = new AzureNative.DataFactory.Inputs.ManagedIdentityCredentialArgs
 *         {
 *             ResourceId = "/subscriptions/12345678-1234-1234-1234-12345678abc/resourcegroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleUami",
 *             Type = "ManagedIdentity",
 *         },
 *         ResourceGroupName = "exampleResourceGroup",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	datafactory "github.com/pulumi/pulumi-azure-native-sdk/datafactory/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := datafactory.NewCredentialOperation(ctx, "credentialOperation", &datafactory.CredentialOperationArgs{
 * 			CredentialName: pulumi.String("exampleCredential"),
 * 			FactoryName:    pulumi.String("exampleFactoryName"),
 * 			Properties: &datafactory.ManagedIdentityCredentialArgs{
 * 				ResourceId: pulumi.String("/subscriptions/12345678-1234-1234-1234-12345678abc/resourcegroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleUami"),
 * 				Type:       pulumi.String("ManagedIdentity"),
 * 			},
 * 			ResourceGroupName: pulumi.String("exampleResourceGroup"),
 * 		})
 * 		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.datafactory.CredentialOperation;
 * import com.pulumi.azurenative.datafactory.CredentialOperationArgs;
 * 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 credentialOperation = new CredentialOperation("credentialOperation", CredentialOperationArgs.builder()
 *             .credentialName("exampleCredential")
 *             .factoryName("exampleFactoryName")
 *             .properties(ManagedIdentityCredentialArgs.builder()
 *                 .resourceId("/subscriptions/12345678-1234-1234-1234-12345678abc/resourcegroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleUami")
 *                 .type("ManagedIdentity")
 *                 .build())
 *             .resourceGroupName("exampleResourceGroup")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:datafactory:CredentialOperation exampleCredential /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}
 * ```
 * @property credentialName Credential name
 * @property factoryName The factory name.
 * @property properties Properties of credentials.
 * @property resourceGroupName The resource group name.
 */
public data class CredentialOperationArgs(
    public val credentialName: Output? = null,
    public val factoryName: Output? = null,
    public val properties: Output>? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.datafactory.CredentialOperationArgs =
        com.pulumi.azurenative.datafactory.CredentialOperationArgs.builder()
            .credentialName(credentialName?.applyValue({ args0 -> args0 }))
            .factoryName(factoryName?.applyValue({ args0 -> args0 }))
            .properties(
                properties?.applyValue({ args0 ->
                    args0.transform({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CredentialOperationArgs].
 */
@PulumiTagMarker
public class CredentialOperationArgsBuilder internal constructor() {
    private var credentialName: Output? = null

    private var factoryName: Output? = null

    private var properties:
        Output>? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value Credential name
     */
    @JvmName("nmkqeeynkgyptbda")
    public suspend fun credentialName(`value`: Output) {
        this.credentialName = value
    }

    /**
     * @param value The factory name.
     */
    @JvmName("ungujerglcogxldy")
    public suspend fun factoryName(`value`: Output) {
        this.factoryName = value
    }

    /**
     * @param value Properties of credentials.
     */
    @JvmName("kxyfwieohtsvdcuo")
    public suspend fun properties(`value`: Output>) {
        this.properties = value
    }

    /**
     * @param value The resource group name.
     */
    @JvmName("cicnvecrvkddbulq")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

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

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

    /**
     * @param value Properties of credentials.
     */
    @JvmName("phesmdljewjlnyuh")
    public suspend fun properties(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param value Properties of credentials.
     */
    @JvmName("dvbwyhvqkgyuxjni")
    public fun properties(`value`: ManagedIdentityCredentialArgs) {
        val toBeMapped = Either.ofLeft<
            ManagedIdentityCredentialArgs,
            ServicePrincipalCredentialArgs,
            >(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param value Properties of credentials.
     */
    @JvmName("nyhqaillnfixycks")
    public fun properties(`value`: ServicePrincipalCredentialArgs) {
        val toBeMapped = Either.ofRight<
            ManagedIdentityCredentialArgs,
            ServicePrincipalCredentialArgs,
            >(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.properties = mapped
    }

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

    internal fun build(): CredentialOperationArgs = CredentialOperationArgs(
        credentialName = credentialName,
        factoryName = factoryName,
        properties = properties,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy