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

com.pulumi.azurenative.app.kotlin.ContainerAppsSourceControlArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.app.kotlin

import com.pulumi.azurenative.app.ContainerAppsSourceControlArgs.builder
import com.pulumi.azurenative.app.kotlin.inputs.GithubActionConfigurationArgs
import com.pulumi.azurenative.app.kotlin.inputs.GithubActionConfigurationArgsBuilder
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.jvm.JvmName

/**
 * Container App SourceControl.
 * Azure REST API version: 2022-10-01. Prior API version in Azure Native 1.x: 2022-03-01.
 * Other available API versions: 2022-01-01-preview, 2023-04-01-preview, 2023-05-01, 2023-05-02-preview, 2023-08-01-preview, 2023-11-02-preview, 2024-02-02-preview, 2024-03-01.
 * ## Example Usage
 * ### Create or Update Container App SourceControl
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var containerAppsSourceControl = new AzureNative.App.ContainerAppsSourceControl("containerAppsSourceControl", new()
 *     {
 *         Branch = "master",
 *         ContainerAppName = "testcanadacentral",
 *         GithubActionConfiguration = new AzureNative.App.Inputs.GithubActionConfigurationArgs
 *         {
 *             AzureCredentials = new AzureNative.App.Inputs.AzureCredentialsArgs
 *             {
 *                 ClientId = "",
 *                 ClientSecret = "",
 *                 TenantId = "",
 *             },
 *             ContextPath = "./",
 *             Image = "image/tag",
 *             RegistryInfo = new AzureNative.App.Inputs.RegistryInfoArgs
 *             {
 *                 RegistryPassword = "",
 *                 RegistryUrl = "xwang971reg.azurecr.io",
 *                 RegistryUserName = "xwang971reg",
 *             },
 *         },
 *         RepoUrl = "https://github.com/xwang971/ghatest",
 *         ResourceGroupName = "workerapps-rg-xj",
 *         SourceControlName = "current",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	app "github.com/pulumi/pulumi-azure-native-sdk/app/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := app.NewContainerAppsSourceControl(ctx, "containerAppsSourceControl", &app.ContainerAppsSourceControlArgs{
 * 			Branch:           pulumi.String("master"),
 * 			ContainerAppName: pulumi.String("testcanadacentral"),
 * 			GithubActionConfiguration: &app.GithubActionConfigurationArgs{
 * 				AzureCredentials: &app.AzureCredentialsArgs{
 * 					ClientId:     pulumi.String(""),
 * 					ClientSecret: pulumi.String(""),
 * 					TenantId:     pulumi.String(""),
 * 				},
 * 				ContextPath: pulumi.String("./"),
 * 				Image:       pulumi.String("image/tag"),
 * 				RegistryInfo: &app.RegistryInfoArgs{
 * 					RegistryPassword: pulumi.String(""),
 * 					RegistryUrl:      pulumi.String("xwang971reg.azurecr.io"),
 * 					RegistryUserName: pulumi.String("xwang971reg"),
 * 				},
 * 			},
 * 			RepoUrl:           pulumi.String("https://github.com/xwang971/ghatest"),
 * 			ResourceGroupName: pulumi.String("workerapps-rg-xj"),
 * 			SourceControlName: pulumi.String("current"),
 * 		})
 * 		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.app.ContainerAppsSourceControl;
 * import com.pulumi.azurenative.app.ContainerAppsSourceControlArgs;
 * import com.pulumi.azurenative.app.inputs.GithubActionConfigurationArgs;
 * import com.pulumi.azurenative.app.inputs.AzureCredentialsArgs;
 * import com.pulumi.azurenative.app.inputs.RegistryInfoArgs;
 * 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 containerAppsSourceControl = new ContainerAppsSourceControl("containerAppsSourceControl", ContainerAppsSourceControlArgs.builder()
 *             .branch("master")
 *             .containerAppName("testcanadacentral")
 *             .githubActionConfiguration(GithubActionConfigurationArgs.builder()
 *                 .azureCredentials(AzureCredentialsArgs.builder()
 *                     .clientId("")
 *                     .clientSecret("")
 *                     .tenantId("")
 *                     .build())
 *                 .contextPath("./")
 *                 .image("image/tag")
 *                 .registryInfo(RegistryInfoArgs.builder()
 *                     .registryPassword("")
 *                     .registryUrl("xwang971reg.azurecr.io")
 *                     .registryUserName("xwang971reg")
 *                     .build())
 *                 .build())
 *             .repoUrl("https://github.com/xwang971/ghatest")
 *             .resourceGroupName("workerapps-rg-xj")
 *             .sourceControlName("current")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:app:ContainerAppsSourceControl current /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}
 * ```
 * @property branch The branch which will trigger the auto deployment
 * @property containerAppName Name of the Container App.
 * @property githubActionConfiguration Container App Revision Template with all possible settings and the
 * defaults if user did not provide them. The defaults are populated
 * as they were at the creation time
 * @property repoUrl The repo url which will be integrated to ContainerApp.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property sourceControlName Name of the Container App SourceControl.
 */
public data class ContainerAppsSourceControlArgs(
    public val branch: Output? = null,
    public val containerAppName: Output? = null,
    public val githubActionConfiguration: Output? = null,
    public val repoUrl: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sourceControlName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.app.ContainerAppsSourceControlArgs =
        com.pulumi.azurenative.app.ContainerAppsSourceControlArgs.builder()
            .branch(branch?.applyValue({ args0 -> args0 }))
            .containerAppName(containerAppName?.applyValue({ args0 -> args0 }))
            .githubActionConfiguration(
                githubActionConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .repoUrl(repoUrl?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sourceControlName(sourceControlName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ContainerAppsSourceControlArgs].
 */
@PulumiTagMarker
public class ContainerAppsSourceControlArgsBuilder internal constructor() {
    private var branch: Output? = null

    private var containerAppName: Output? = null

    private var githubActionConfiguration: Output? = null

    private var repoUrl: Output? = null

    private var resourceGroupName: Output? = null

    private var sourceControlName: Output? = null

    /**
     * @param value The branch which will trigger the auto deployment
     */
    @JvmName("tcmexwjblgrwlaxt")
    public suspend fun branch(`value`: Output) {
        this.branch = value
    }

    /**
     * @param value Name of the Container App.
     */
    @JvmName("ifsixxnykvgojwvb")
    public suspend fun containerAppName(`value`: Output) {
        this.containerAppName = value
    }

    /**
     * @param value Container App Revision Template with all possible settings and the
     * defaults if user did not provide them. The defaults are populated
     * as they were at the creation time
     */
    @JvmName("pliboqlrnavokjbp")
    public suspend fun githubActionConfiguration(`value`: Output) {
        this.githubActionConfiguration = value
    }

    /**
     * @param value The repo url which will be integrated to ContainerApp.
     */
    @JvmName("ofjfxdsawqvepoap")
    public suspend fun repoUrl(`value`: Output) {
        this.repoUrl = value
    }

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

    /**
     * @param value Name of the Container App SourceControl.
     */
    @JvmName("hfyyqsiajpexsgbl")
    public suspend fun sourceControlName(`value`: Output) {
        this.sourceControlName = value
    }

    /**
     * @param value The branch which will trigger the auto deployment
     */
    @JvmName("fapwmncovbsgouot")
    public suspend fun branch(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.branch = mapped
    }

    /**
     * @param value Name of the Container App.
     */
    @JvmName("vxpaekvisyjamlob")
    public suspend fun containerAppName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerAppName = mapped
    }

    /**
     * @param value Container App Revision Template with all possible settings and the
     * defaults if user did not provide them. The defaults are populated
     * as they were at the creation time
     */
    @JvmName("cbqjqcindrpwdavy")
    public suspend fun githubActionConfiguration(`value`: GithubActionConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.githubActionConfiguration = mapped
    }

    /**
     * @param argument Container App Revision Template with all possible settings and the
     * defaults if user did not provide them. The defaults are populated
     * as they were at the creation time
     */
    @JvmName("gewsefcvpbxfkaah")
    public suspend fun githubActionConfiguration(argument: suspend GithubActionConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = GithubActionConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.githubActionConfiguration = mapped
    }

    /**
     * @param value The repo url which will be integrated to ContainerApp.
     */
    @JvmName("kkdbhogeqrrnseuw")
    public suspend fun repoUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.repoUrl = mapped
    }

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

    /**
     * @param value Name of the Container App SourceControl.
     */
    @JvmName("oqkakhaygmctepbu")
    public suspend fun sourceControlName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceControlName = mapped
    }

    internal fun build(): ContainerAppsSourceControlArgs = ContainerAppsSourceControlArgs(
        branch = branch,
        containerAppName = containerAppName,
        githubActionConfiguration = githubActionConfiguration,
        repoUrl = repoUrl,
        resourceGroupName = resourceGroupName,
        sourceControlName = sourceControlName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy