Service

Manages an Azure SignalR service.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West US",
        });
        var exampleService = new Azure.SignalR.Service("exampleService", new Azure.SignalR.ServiceArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Sku = new Azure.SignalR.Inputs.ServiceSkuArgs
            {
                Name = "Free_F1",
                Capacity = 1,
            },
            Cors = 
            {
                new Azure.SignalR.Inputs.ServiceCorArgs
                {
                    AllowedOrigins = 
                    {
                        "http://www.example.com",
                    },
                },
            },
            Features = 
            {
                new Azure.SignalR.Inputs.ServiceFeatureArgs
                {
                    Flag = "ServiceMode",
                    Value = "Default",
                },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/signalr"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
            Location: pulumi.String("West US"),
        })
        if err != nil {
            return err
        }
        _, err = signalr.NewService(ctx, "exampleService", &signalr.ServiceArgs{
            Location:          exampleResourceGroup.Location,
            ResourceGroupName: exampleResourceGroup.Name,
            Sku: &signalr.ServiceSkuArgs{
                Name:     pulumi.String("Free_F1"),
                Capacity: pulumi.Int(1),
            },
            Cors: signalr.ServiceCorArray{
                &signalr.ServiceCorArgs{
                    AllowedOrigins: pulumi.StringArray{
                        pulumi.String("http://www.example.com"),
                    },
                },
            },
            Features: signalr.ServiceFeatureArray{
                &signalr.ServiceFeatureArgs{
                    Flag:  pulumi.String("ServiceMode"),
                    Value: pulumi.String("Default"),
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US")
example_service = azure.signalr.Service("exampleService",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "name": "Free_F1",
        "capacity": 1,
    },
    cors=[{
        "allowedOrigins": ["http://www.example.com"],
    }],
    features=[{
        "flag": "ServiceMode",
        "value": "Default",
    }])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West US"});
const exampleService = new azure.signalr.Service("exampleService", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: {
        name: "Free_F1",
        capacity: 1,
    },
    cors: [{
        allowedOrigins: ["http://www.example.com"],
    }],
    features: [{
        flag: "ServiceMode",
        value: "Default",
    }],
});

Create a Service Resource

new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);
def Service(resource_name, opts=None, cors=None, features=None, location=None, name=None, resource_group_name=None, sku=None, tags=None, __props__=None);
func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)
public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Service Resource Properties

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

Inputs

The Service resource accepts the following input properties:

ResourceGroupName string

The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.

Sku ServiceSkuArgs

A sku block as documented below.

Cors List<ServiceCorArgs>

A cors block as documented below.

Features List<ServiceFeatureArgs>

A features block as documented below.

Location string

Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.

Name string

The name of the SignalR service. Changing this forces a new resource to be created.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

ResourceGroupName string

The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.

Sku ServiceSku

A sku block as documented below.

Cors []ServiceCor

A cors block as documented below.

Features []ServiceFeature

A features block as documented below.

Location string

Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.

Name string

The name of the SignalR service. Changing this forces a new resource to be created.

Tags map[string]string

A mapping of tags to assign to the resource.

resourceGroupName string

The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.

sku ServiceSku

A sku block as documented below.

cors ServiceCor[]

A cors block as documented below.

features ServiceFeature[]

A features block as documented below.

location string

Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.

name string

The name of the SignalR service. Changing this forces a new resource to be created.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

resource_group_name str

The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.

sku Dict[ServiceSku]

A sku block as documented below.

cors List[ServiceCor]

A cors block as documented below.

features List[ServiceFeature]

A features block as documented below.

location str

Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.

name str

The name of the SignalR service. Changing this forces a new resource to be created.

tags Dict[str, str]

A mapping of tags to assign to the resource.

Outputs

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

Hostname string

The FQDN of the SignalR service.

Id string
The provider-assigned unique ID for this managed resource.
IpAddress string

The publicly accessible IP of the SignalR service.

PrimaryAccessKey string

The primary access key for the SignalR service.

PrimaryConnectionString string

The primary connection string for the SignalR service.

PublicPort int

The publicly accessible port of the SignalR service which is designed for browser/client use.

SecondaryAccessKey string

The secondary access key for the SignalR service.

SecondaryConnectionString string

The secondary connection string for the SignalR service.

ServerPort int

The publicly accessible port of the SignalR service which is designed for customer server side use.

Hostname string

The FQDN of the SignalR service.

Id string
The provider-assigned unique ID for this managed resource.
IpAddress string

The publicly accessible IP of the SignalR service.

PrimaryAccessKey string

The primary access key for the SignalR service.

PrimaryConnectionString string

The primary connection string for the SignalR service.

PublicPort int

The publicly accessible port of the SignalR service which is designed for browser/client use.

SecondaryAccessKey string

The secondary access key for the SignalR service.

SecondaryConnectionString string

The secondary connection string for the SignalR service.

ServerPort int

The publicly accessible port of the SignalR service which is designed for customer server side use.

hostname string

The FQDN of the SignalR service.

id string
The provider-assigned unique ID for this managed resource.
ipAddress string

The publicly accessible IP of the SignalR service.

primaryAccessKey string

The primary access key for the SignalR service.

primaryConnectionString string

The primary connection string for the SignalR service.

publicPort number

The publicly accessible port of the SignalR service which is designed for browser/client use.

secondaryAccessKey string

The secondary access key for the SignalR service.

secondaryConnectionString string

The secondary connection string for the SignalR service.

serverPort number

The publicly accessible port of the SignalR service which is designed for customer server side use.

hostname str

The FQDN of the SignalR service.

id str
The provider-assigned unique ID for this managed resource.
ip_address str

The publicly accessible IP of the SignalR service.

primary_access_key str

The primary access key for the SignalR service.

primary_connection_string str

The primary connection string for the SignalR service.

public_port float

The publicly accessible port of the SignalR service which is designed for browser/client use.

secondary_access_key str

The secondary access key for the SignalR service.

secondary_connection_string str

The secondary connection string for the SignalR service.

server_port float

The publicly accessible port of the SignalR service which is designed for customer server side use.

Look up an Existing Service Resource

Get an existing Service 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?: ServiceState, opts?: CustomResourceOptions): Service
static get(resource_name, id, opts=None, cors=None, features=None, hostname=None, ip_address=None, location=None, name=None, primary_access_key=None, primary_connection_string=None, public_port=None, resource_group_name=None, secondary_access_key=None, secondary_connection_string=None, server_port=None, sku=None, tags=None, __props__=None);
func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Cors List<ServiceCorArgs>

A cors block as documented below.

Features List<ServiceFeatureArgs>

A features block as documented below.

Hostname string

The FQDN of the SignalR service.

IpAddress string

The publicly accessible IP of the SignalR service.

Location string

Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.

Name string

The name of the SignalR service. Changing this forces a new resource to be created.

PrimaryAccessKey string

The primary access key for the SignalR service.

PrimaryConnectionString string

The primary connection string for the SignalR service.

PublicPort int

The publicly accessible port of the SignalR service which is designed for browser/client use.

ResourceGroupName string

The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.

SecondaryAccessKey string

The secondary access key for the SignalR service.

SecondaryConnectionString string

The secondary connection string for the SignalR service.

ServerPort int

The publicly accessible port of the SignalR service which is designed for customer server side use.

Sku ServiceSkuArgs

A sku block as documented below.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

Cors []ServiceCor

A cors block as documented below.

Features []ServiceFeature

A features block as documented below.

Hostname string

The FQDN of the SignalR service.

IpAddress string

The publicly accessible IP of the SignalR service.

Location string

Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.

Name string

The name of the SignalR service. Changing this forces a new resource to be created.

PrimaryAccessKey string

The primary access key for the SignalR service.

PrimaryConnectionString string

The primary connection string for the SignalR service.

PublicPort int

The publicly accessible port of the SignalR service which is designed for browser/client use.

ResourceGroupName string

The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.

SecondaryAccessKey string

The secondary access key for the SignalR service.

SecondaryConnectionString string

The secondary connection string for the SignalR service.

ServerPort int

The publicly accessible port of the SignalR service which is designed for customer server side use.

Sku ServiceSku

A sku block as documented below.

Tags map[string]string

A mapping of tags to assign to the resource.

cors ServiceCor[]

A cors block as documented below.

features ServiceFeature[]

A features block as documented below.

hostname string

The FQDN of the SignalR service.

ipAddress string

The publicly accessible IP of the SignalR service.

location string

Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.

name string

The name of the SignalR service. Changing this forces a new resource to be created.

primaryAccessKey string

The primary access key for the SignalR service.

primaryConnectionString string

The primary connection string for the SignalR service.

publicPort number

The publicly accessible port of the SignalR service which is designed for browser/client use.

resourceGroupName string

The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.

secondaryAccessKey string

The secondary access key for the SignalR service.

secondaryConnectionString string

The secondary connection string for the SignalR service.

serverPort number

The publicly accessible port of the SignalR service which is designed for customer server side use.

sku ServiceSku

A sku block as documented below.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

cors List[ServiceCor]

A cors block as documented below.

features List[ServiceFeature]

A features block as documented below.

hostname str

The FQDN of the SignalR service.

ip_address str

The publicly accessible IP of the SignalR service.

location str

Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.

name str

The name of the SignalR service. Changing this forces a new resource to be created.

primary_access_key str

The primary access key for the SignalR service.

primary_connection_string str

The primary connection string for the SignalR service.

public_port float

The publicly accessible port of the SignalR service which is designed for browser/client use.

resource_group_name str

The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.

secondary_access_key str

The secondary access key for the SignalR service.

secondary_connection_string str

The secondary connection string for the SignalR service.

server_port float

The publicly accessible port of the SignalR service which is designed for customer server side use.

sku Dict[ServiceSku]

A sku block as documented below.

tags Dict[str, str]

A mapping of tags to assign to the resource.

Supporting Types

ServiceCor

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AllowedOrigins List<string>

A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

AllowedOrigins []string

A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

allowedOrigins string[]

A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

allowedOrigins List[str]

A list of origins which should be able to make cross-origin calls. * can be used to allow all calls.

ServiceFeature

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Flag string

The kind of Feature. Possible values are EnableConnectivityLogs, EnableMessagingLogs, and ServiceMode.

Value string

A value of a feature flag. Possible values are Classic, Default and Serverless.

Flag string

The kind of Feature. Possible values are EnableConnectivityLogs, EnableMessagingLogs, and ServiceMode.

Value string

A value of a feature flag. Possible values are Classic, Default and Serverless.

flag string

The kind of Feature. Possible values are EnableConnectivityLogs, EnableMessagingLogs, and ServiceMode.

value string

A value of a feature flag. Possible values are Classic, Default and Serverless.

flag str

The kind of Feature. Possible values are EnableConnectivityLogs, EnableMessagingLogs, and ServiceMode.

value str

A value of a feature flag. Possible values are Classic, Default and Serverless.

ServiceSku

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Capacity int

Specifies the number of units associated with this SignalR service. Valid values are 1, 2, 5, 10, 20, 50 and 100.

Name string

Specifies which tier to use. Valid values are Free_F1 and Standard_S1.

Capacity int

Specifies the number of units associated with this SignalR service. Valid values are 1, 2, 5, 10, 20, 50 and 100.

Name string

Specifies which tier to use. Valid values are Free_F1 and Standard_S1.

capacity number

Specifies the number of units associated with this SignalR service. Valid values are 1, 2, 5, 10, 20, 50 and 100.

name string

Specifies which tier to use. Valid values are Free_F1 and Standard_S1.

capacity float

Specifies the number of units associated with this SignalR service. Valid values are 1, 2, 5, 10, 20, 50 and 100.

name str

Specifies which tier to use. Valid values are Free_F1 and Standard_S1.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.