Azure Classic

v5.25.0 published on Thursday, Nov 24, 2022 by Pulumi

ActiveSlot

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;
using Random = Pulumi.Random;

return await Deployment.RunAsync(() => 
{
    var server = new Random.RandomId("server");

    // ...
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup");

    // ...
    var examplePlan = new Azure.AppService.Plan("examplePlan");

    // ...
    var exampleAppService = new Azure.AppService.AppService("exampleAppService");

    // ...
    var exampleSlot = new Azure.AppService.Slot("exampleSlot");

    // ...
    var exampleActiveSlot = new Azure.AppService.ActiveSlot("exampleActiveSlot", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        AppServiceName = exampleAppService.Name,
        AppServiceSlotName = exampleSlot.Name,
    });

});
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
		}
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", nil)
		if err != nil {
			return err
		}
		_, err = appservice.NewPlan(ctx, "examplePlan", nil)
		if err != nil {
			return err
		}
		exampleAppService, err := appservice.NewAppService(ctx, "exampleAppService", nil)
		if err != nil {
			return err
		}
		exampleSlot, err := appservice.NewSlot(ctx, "exampleSlot", nil)
		if err != nil {
			return err
		}
		_, err = appservice.NewActiveSlot(ctx, "exampleActiveSlot", &appservice.ActiveSlotArgs{
			ResourceGroupName:  exampleResourceGroup.Name,
			AppServiceName:     exampleAppService.Name,
			AppServiceSlotName: exampleSlot.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup");

        var examplePlan = new Plan("examplePlan");

        var exampleAppService = new AppService("exampleAppService");

        var exampleSlot = new Slot("exampleSlot");

        var exampleActiveSlot = new ActiveSlot("exampleActiveSlot", ActiveSlotArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .appServiceName(exampleAppService.name())
            .appServiceSlotName(exampleSlot.name())
            .build());

    }
}
import pulumi
import pulumi_azure as azure
import pulumi_random as random

server = random.RandomId("server")
# ...
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup")
# ...
example_plan = azure.appservice.Plan("examplePlan")
# ...
example_app_service = azure.appservice.AppService("exampleAppService")
# ...
example_slot = azure.appservice.Slot("exampleSlot")
# ...
example_active_slot = azure.appservice.ActiveSlot("exampleActiveSlot",
    resource_group_name=example_resource_group.name,
    app_service_name=example_app_service.name,
    app_service_slot_name=example_slot.name)
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 exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {});
// ...
const examplePlan = new azure.appservice.Plan("examplePlan", {});
// ...
const exampleAppService = new azure.appservice.AppService("exampleAppService", {});
// ...
const exampleSlot = new azure.appservice.Slot("exampleSlot", {});
// ...
const exampleActiveSlot = new azure.appservice.ActiveSlot("exampleActiveSlot", {
    resourceGroupName: exampleResourceGroup.name,
    appServiceName: exampleAppService.name,
    appServiceSlotName: exampleSlot.name,
});
resources:
  server:
    type: random:RandomId
  exampleResourceGroup:
    type: azure:core:ResourceGroup
  examplePlan:
    type: azure:appservice:Plan
  exampleAppService:
    type: azure:appservice:AppService
  exampleSlot:
    type: azure:appservice:Slot
  exampleActiveSlot:
    type: azure:appservice:ActiveSlot
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      appServiceName: ${exampleAppService.name}
      appServiceSlotName: ${exampleSlot.name}

Create ActiveSlot Resource

new ActiveSlot(name: string, args: ActiveSlotArgs, opts?: CustomResourceOptions);
@overload
def ActiveSlot(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               app_service_name: Optional[str] = None,
               app_service_slot_name: Optional[str] = None,
               resource_group_name: Optional[str] = None)
@overload
def ActiveSlot(resource_name: str,
               args: ActiveSlotArgs,
               opts: Optional[ResourceOptions] = None)
func NewActiveSlot(ctx *Context, name string, args ActiveSlotArgs, opts ...ResourceOption) (*ActiveSlot, error)
public ActiveSlot(string name, ActiveSlotArgs args, CustomResourceOptions? opts = null)
public ActiveSlot(String name, ActiveSlotArgs args)
public ActiveSlot(String name, ActiveSlotArgs args, CustomResourceOptions options)
type: azure:appservice:ActiveSlot
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ActiveSlotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ActiveSlotArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ActiveSlotArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ActiveSlotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ActiveSlotArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ActiveSlot Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ActiveSlot resource accepts the following input properties:

AppServiceName string

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

AppServiceSlotName string

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

ResourceGroupName string

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

AppServiceName string

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

AppServiceSlotName string

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

ResourceGroupName string

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

appServiceName String

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

appServiceSlotName String

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

resourceGroupName String

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

appServiceName string

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

appServiceSlotName string

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

resourceGroupName string

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

app_service_name str

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

app_service_slot_name str

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

resource_group_name str

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

appServiceName String

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

appServiceSlotName String

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

resourceGroupName String

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the ActiveSlot resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing ActiveSlot Resource

Get an existing ActiveSlot resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ActiveSlotState, opts?: CustomResourceOptions): ActiveSlot
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        app_service_name: Optional[str] = None,
        app_service_slot_name: Optional[str] = None,
        resource_group_name: Optional[str] = None) -> ActiveSlot
func GetActiveSlot(ctx *Context, name string, id IDInput, state *ActiveSlotState, opts ...ResourceOption) (*ActiveSlot, error)
public static ActiveSlot Get(string name, Input<string> id, ActiveSlotState? state, CustomResourceOptions? opts = null)
public static ActiveSlot get(String name, Output<String> id, ActiveSlotState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AppServiceName string

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

AppServiceSlotName string

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

ResourceGroupName string

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

AppServiceName string

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

AppServiceSlotName string

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

ResourceGroupName string

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

appServiceName String

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

appServiceSlotName String

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

resourceGroupName String

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

appServiceName string

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

appServiceSlotName string

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

resourceGroupName string

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

app_service_name str

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

app_service_slot_name str

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

resource_group_name str

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

appServiceName String

The name of the App Service within which the Slot exists. Changing this forces a new resource to be created.

appServiceSlotName String

The name of the App Service Slot which should be promoted to the Production Slot within the App Service.

resourceGroupName String

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.