Web Pub Sub Replica Args
data class WebPubSubReplicaArgs(val location: Output<String>? = null, val replicaName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val resourceName: Output<String>? = null, val sku: Output<ResourceSkuArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<WebPubSubReplicaArgs>
A class represent a replica resource. Uses Azure REST API version 2023-03-01-preview. Other available API versions: 2023-06-01-preview, 2023-08-01-preview, 2024-01-01-preview, 2024-03-01, 2024-04-01-preview, 2024-08-01-preview, 2024-10-01-preview.
Example Usage
WebPubSubReplicas_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webPubSubReplica = new AzureNative.WebPubSub.WebPubSubReplica("webPubSubReplica", new()
{
Location = "eastus",
ReplicaName = "myWebPubSubService-eastus",
ResourceGroupName = "myResourceGroup",
ResourceName = "myWebPubSubService",
Sku = new AzureNative.WebPubSub.Inputs.ResourceSkuArgs
{
Capacity = 1,
Name = "Premium_P1",
Tier = AzureNative.WebPubSub.WebPubSubSkuTier.Premium,
},
Tags =
{
{ "key1", "value1" },
},
});
});
Content copied to clipboard
package main
import (
webpubsub "github.com/pulumi/pulumi-azure-native-sdk/webpubsub/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := webpubsub.NewWebPubSubReplica(ctx, "webPubSubReplica", &webpubsub.WebPubSubReplicaArgs{
Location: pulumi.String("eastus"),
ReplicaName: pulumi.String("myWebPubSubService-eastus"),
ResourceGroupName: pulumi.String("myResourceGroup"),
ResourceName: pulumi.String("myWebPubSubService"),
Sku: &webpubsub.ResourceSkuArgs{
Capacity: pulumi.Int(1),
Name: pulumi.String("Premium_P1"),
Tier: pulumi.String(webpubsub.WebPubSubSkuTierPremium),
},
Tags: pulumi.StringMap{
"key1": pulumi.String("value1"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.webpubsub.WebPubSubReplica;
import com.pulumi.azurenative.webpubsub.WebPubSubReplicaArgs;
import com.pulumi.azurenative.webpubsub.inputs.ResourceSkuArgs;
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 webPubSubReplica = new WebPubSubReplica("webPubSubReplica", WebPubSubReplicaArgs.builder()
.location("eastus")
.replicaName("myWebPubSubService-eastus")
.resourceGroupName("myResourceGroup")
.resourceName("myWebPubSubService")
.sku(ResourceSkuArgs.builder()
.capacity(1)
.name("Premium_P1")
.tier("Premium")
.build())
.tags(Map.of("key1", "value1"))
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:webpubsub:WebPubSubReplica myWebPubSubService-eastus /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}
Content copied to clipboard