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

com.pulumi.azure.appservice.kotlin.ActiveSlotArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.appservice.kotlin

import com.pulumi.azure.appservice.ActiveSlotArgs.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

/**
 * Promotes an App Service Slot to Production within an App Service.
 * !> **NOTE:** This resource has been deprecated in version 5.0 of the provider and will be removed in version 6.0. Please use `azure.appservice.WebAppActiveSlot` resource instead.
 * > **Note:** When using Slots - the `app_settings`, `connection_string` and `site_config` blocks on the `azure.appservice.AppService` resource will be overwritten when promoting a Slot using the `azure.appservice.ActiveSlot` resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * import * as random from "@pulumi/random";
 * const server = new random.RandomId("server", {});
 * const example = new azure.core.ResourceGroup("example", {});
 * const examplePlan = new azure.appservice.Plan("example", {});
 * const exampleAppService = new azure.appservice.AppService("example", {});
 * const exampleSlot = new azure.appservice.Slot("example", {});
 * const exampleActiveSlot = new azure.appservice.ActiveSlot("example", {
 *     resourceGroupName: example.name,
 *     appServiceName: exampleAppService.name,
 *     appServiceSlotName: exampleSlot.name,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * import pulumi_random as random
 * server = random.RandomId("server")
 * example = azure.core.ResourceGroup("example")
 * example_plan = azure.appservice.Plan("example")
 * example_app_service = azure.appservice.AppService("example")
 * example_slot = azure.appservice.Slot("example")
 * example_active_slot = azure.appservice.ActiveSlot("example",
 *     resource_group_name=example.name,
 *     app_service_name=example_app_service.name,
 *     app_service_slot_name=example_slot.name)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * using Random = Pulumi.Random;
 * return await Deployment.RunAsync(() =>
 * {
 *     var server = new Random.RandomId("server");
 *     var example = new Azure.Core.ResourceGroup("example");
 *     var examplePlan = new Azure.AppService.Plan("example");
 *     var exampleAppService = new Azure.AppService.AppService("example");
 *     var exampleSlot = new Azure.AppService.Slot("example");
 *     var exampleActiveSlot = new Azure.AppService.ActiveSlot("example", new()
 *     {
 *         ResourceGroupName = example.Name,
 *         AppServiceName = exampleAppService.Name,
 *         AppServiceSlotName = exampleSlot.Name,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := random.NewRandomId(ctx, "server", nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		example, err := core.NewResourceGroup(ctx, "example", nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = appservice.NewPlan(ctx, "example", nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAppService, err := appservice.NewAppService(ctx, "example", nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleSlot, err := appservice.NewSlot(ctx, "example", nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = appservice.NewActiveSlot(ctx, "example", &appservice.ActiveSlotArgs{
 * 			ResourceGroupName:  example.Name,
 * 			AppServiceName:     exampleAppService.Name,
 * 			AppServiceSlotName: exampleSlot.Name,
 * 		})
 * 		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.random.RandomId;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.appservice.Plan;
 * import com.pulumi.azure.appservice.AppService;
 * import com.pulumi.azure.appservice.Slot;
 * import com.pulumi.azure.appservice.ActiveSlot;
 * import com.pulumi.azure.appservice.ActiveSlotArgs;
 * 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 server = new RandomId("server");
 *         var example = new ResourceGroup("example");
 *         var examplePlan = new Plan("examplePlan");
 *         var exampleAppService = new AppService("exampleAppService");
 *         var exampleSlot = new Slot("exampleSlot");
 *         var exampleActiveSlot = new ActiveSlot("exampleActiveSlot", ActiveSlotArgs.builder()
 *             .resourceGroupName(example.name())
 *             .appServiceName(exampleAppService.name())
 *             .appServiceSlotName(exampleSlot.name())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   server:
 *     type: random:RandomId
 *   example:
 *     type: azure:core:ResourceGroup
 *   examplePlan:
 *     type: azure:appservice:Plan
 *     name: example
 *   exampleAppService:
 *     type: azure:appservice:AppService
 *     name: example
 *   exampleSlot:
 *     type: azure:appservice:Slot
 *     name: example
 *   exampleActiveSlot:
 *     type: azure:appservice:ActiveSlot
 *     name: example
 *     properties:
 *       resourceGroupName: ${example.name}
 *       appServiceName: ${exampleAppService.name}
 *       appServiceSlotName: ${exampleSlot.name}
 * ```
 * 
 * @property appServiceName The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
 * @property appServiceSlotName The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
 * @property resourceGroupName The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
 */
public data class ActiveSlotArgs(
    public val appServiceName: Output? = null,
    public val appServiceSlotName: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.appservice.ActiveSlotArgs =
        com.pulumi.azure.appservice.ActiveSlotArgs.builder()
            .appServiceName(appServiceName?.applyValue({ args0 -> args0 }))
            .appServiceSlotName(appServiceSlotName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ActiveSlotArgs].
 */
@PulumiTagMarker
public class ActiveSlotArgsBuilder internal constructor() {
    private var appServiceName: Output? = null

    private var appServiceSlotName: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
     */
    @JvmName("nqmilymndnimicmw")
    public suspend fun appServiceName(`value`: Output) {
        this.appServiceName = value
    }

    /**
     * @param value The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
     */
    @JvmName("pqtslfuoqmscdhhm")
    public suspend fun appServiceSlotName(`value`: Output) {
        this.appServiceSlotName = value
    }

    /**
     * @param value The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
     */
    @JvmName("ylbyhxviiqljddre")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.
     */
    @JvmName("acirsymilcbnbxoh")
    public suspend fun appServiceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appServiceName = mapped
    }

    /**
     * @param value The name of the App Service Slot which should be promoted to the Production Slot within the App Service.
     */
    @JvmName("yqosgwaghunrpeen")
    public suspend fun appServiceSlotName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appServiceSlotName = mapped
    }

    /**
     * @param value The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.
     */
    @JvmName("xaesmbmkpjpiiwll")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    internal fun build(): ActiveSlotArgs = ActiveSlotArgs(
        appServiceName = appServiceName,
        appServiceSlotName = appServiceSlotName,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy