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

com.pulumi.azurenative.containerregistry.kotlin.ExportPipelineArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.containerregistry.kotlin

import com.pulumi.azurenative.containerregistry.ExportPipelineArgs.builder
import com.pulumi.azurenative.containerregistry.kotlin.enums.PipelineOptions
import com.pulumi.azurenative.containerregistry.kotlin.inputs.ExportPipelineTargetPropertiesArgs
import com.pulumi.azurenative.containerregistry.kotlin.inputs.ExportPipelineTargetPropertiesArgsBuilder
import com.pulumi.azurenative.containerregistry.kotlin.inputs.IdentityPropertiesArgs
import com.pulumi.azurenative.containerregistry.kotlin.inputs.IdentityPropertiesArgsBuilder
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 com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * An object that represents an export pipeline for a container registry.
 * Azure REST API version: 2023-01-01-preview. Prior API version in Azure Native 1.x: 2020-11-01-preview.
 * Other available API versions: 2023-06-01-preview, 2023-08-01-preview, 2023-11-01-preview.
 * ## Example Usage
 * ### ExportPipelineCreate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var exportPipeline = new AzureNative.ContainerRegistry.ExportPipeline("exportPipeline", new()
 *     {
 *         ExportPipelineName = "myExportPipeline",
 *         Identity = new AzureNative.ContainerRegistry.Inputs.IdentityPropertiesArgs
 *         {
 *             Type = AzureNative.ContainerRegistry.ResourceIdentityType.SystemAssigned,
 *         },
 *         Location = "westus",
 *         Options = new[]
 *         {
 *             AzureNative.ContainerRegistry.PipelineOptions.OverwriteBlobs,
 *         },
 *         RegistryName = "myRegistry",
 *         ResourceGroupName = "myResourceGroup",
 *         Target = new AzureNative.ContainerRegistry.Inputs.ExportPipelineTargetPropertiesArgs
 *         {
 *             KeyVaultUri = "https://myvault.vault.azure.net/secrets/acrexportsas",
 *             Type = "AzureStorageBlobContainer",
 *             Uri = "https://accountname.blob.core.windows.net/containername",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	containerregistry "github.com/pulumi/pulumi-azure-native-sdk/containerregistry/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := containerregistry.NewExportPipeline(ctx, "exportPipeline", &containerregistry.ExportPipelineArgs{
 * 			ExportPipelineName: pulumi.String("myExportPipeline"),
 * 			Identity: &containerregistry.IdentityPropertiesArgs{
 * 				Type: containerregistry.ResourceIdentityTypeSystemAssigned,
 * 			},
 * 			Location: pulumi.String("westus"),
 * 			Options: pulumi.StringArray{
 * 				pulumi.String(containerregistry.PipelineOptionsOverwriteBlobs),
 * 			},
 * 			RegistryName:      pulumi.String("myRegistry"),
 * 			ResourceGroupName: pulumi.String("myResourceGroup"),
 * 			Target: &containerregistry.ExportPipelineTargetPropertiesArgs{
 * 				KeyVaultUri: pulumi.String("https://myvault.vault.azure.net/secrets/acrexportsas"),
 * 				Type:        pulumi.String("AzureStorageBlobContainer"),
 * 				Uri:         pulumi.String("https://accountname.blob.core.windows.net/containername"),
 * 			},
 * 		})
 * 		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.containerregistry.ExportPipeline;
 * import com.pulumi.azurenative.containerregistry.ExportPipelineArgs;
 * import com.pulumi.azurenative.containerregistry.inputs.IdentityPropertiesArgs;
 * import com.pulumi.azurenative.containerregistry.inputs.ExportPipelineTargetPropertiesArgs;
 * 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 exportPipeline = new ExportPipeline("exportPipeline", ExportPipelineArgs.builder()
 *             .exportPipelineName("myExportPipeline")
 *             .identity(IdentityPropertiesArgs.builder()
 *                 .type("SystemAssigned")
 *                 .build())
 *             .location("westus")
 *             .options("OverwriteBlobs")
 *             .registryName("myRegistry")
 *             .resourceGroupName("myResourceGroup")
 *             .target(ExportPipelineTargetPropertiesArgs.builder()
 *                 .keyVaultUri("https://myvault.vault.azure.net/secrets/acrexportsas")
 *                 .type("AzureStorageBlobContainer")
 *                 .uri("https://accountname.blob.core.windows.net/containername")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:containerregistry:ExportPipeline myExportPipeline /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}
 * ```
 * @property exportPipelineName The name of the export pipeline.
 * @property identity The identity of the export pipeline.
 * @property location The location of the export pipeline.
 * @property options The list of all options configured for the pipeline.
 * @property registryName The name of the container registry.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property target The target properties of the export pipeline.
 */
public data class ExportPipelineArgs(
    public val exportPipelineName: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val options: Output>>? = null,
    public val registryName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val target: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.containerregistry.ExportPipelineArgs =
        com.pulumi.azurenative.containerregistry.ExportPipelineArgs.builder()
            .exportPipelineName(exportPipelineName?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .options(
                options?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform(
                            { args0 -> args0 },
                            { args0 -> args0.let({ args0 -> args0.toJava() }) },
                        )
                    })
                }),
            )
            .registryName(registryName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .target(target?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ExportPipelineArgs].
 */
@PulumiTagMarker
public class ExportPipelineArgsBuilder internal constructor() {
    private var exportPipelineName: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var options: Output>>? = null

    private var registryName: Output? = null

    private var resourceGroupName: Output? = null

    private var target: Output? = null

    /**
     * @param value The name of the export pipeline.
     */
    @JvmName("tjexlewtrpcukiqf")
    public suspend fun exportPipelineName(`value`: Output) {
        this.exportPipelineName = value
    }

    /**
     * @param value The identity of the export pipeline.
     */
    @JvmName("rcamtlcqdrrotluo")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The location of the export pipeline.
     */
    @JvmName("bpxrwdobtmxfkqkv")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The list of all options configured for the pipeline.
     */
    @JvmName("gjnsbyetokjqfasi")
    public suspend fun options(`value`: Output>>) {
        this.options = value
    }

    @JvmName("hykcenckjyvybytm")
    public suspend fun options(vararg values: Output>) {
        this.options = Output.all(values.asList())
    }

    /**
     * @param values The list of all options configured for the pipeline.
     */
    @JvmName("fbpfugvdqcnhnknd")
    public suspend fun options(values: List>>) {
        this.options = Output.all(values)
    }

    /**
     * @param value The name of the container registry.
     */
    @JvmName("trerohtrildkfpee")
    public suspend fun registryName(`value`: Output) {
        this.registryName = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("idfjnrcorpyistcg")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The target properties of the export pipeline.
     */
    @JvmName("kmqytjivpibpcufo")
    public suspend fun target(`value`: Output) {
        this.target = value
    }

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

    /**
     * @param value The identity of the export pipeline.
     */
    @JvmName("tvrmhuysxnapeija")
    public suspend fun identity(`value`: IdentityPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument The identity of the export pipeline.
     */
    @JvmName("fechsqdypxxoyvgk")
    public suspend fun identity(argument: suspend IdentityPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = IdentityPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The location of the export pipeline.
     */
    @JvmName("twwikpvkkljemlpc")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The list of all options configured for the pipeline.
     */
    @JvmName("ctjqccoanaexjyut")
    public suspend fun options(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.options = mapped
    }

    /**
     * @param values The list of all options configured for the pipeline.
     */
    @JvmName("wlelpgarafimpsfp")
    public suspend fun options(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.options = mapped
    }

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

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

    /**
     * @param value The target properties of the export pipeline.
     */
    @JvmName("cpickfxxcnqjvcua")
    public suspend fun target(`value`: ExportPipelineTargetPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.target = mapped
    }

    /**
     * @param argument The target properties of the export pipeline.
     */
    @JvmName("rycearcknxsuxqef")
    public suspend fun target(argument: suspend ExportPipelineTargetPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = ExportPipelineTargetPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.target = mapped
    }

    internal fun build(): ExportPipelineArgs = ExportPipelineArgs(
        exportPipelineName = exportPipelineName,
        identity = identity,
        location = location,
        options = options,
        registryName = registryName,
        resourceGroupName = resourceGroupName,
        target = target,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy