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:
- Resource
Group stringName The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
- Sku
Service
Sku Args A
skublock as documented below.- Cors
List<Service
Cor Args> A
corsblock as documented below.- Features
List<Service
Feature Args> A
featuresblock 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.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Resource
Group stringName The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
- Sku
Service
Sku A
skublock as documented below.- Cors
[]Service
Cor A
corsblock as documented below.- Features
[]Service
Feature A
featuresblock 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.
- map[string]string
A mapping of tags to assign to the resource.
- resource
Group stringName The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
- sku
Service
Sku A
skublock as documented below.- cors
Service
Cor[] A
corsblock as documented below.- features
Service
Feature[] A
featuresblock 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.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- resource_
group_ strname The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
- sku
Dict[Service
Sku] A
skublock as documented below.- cors
List[Service
Cor] A
corsblock as documented below.- features
List[Service
Feature] A
featuresblock 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.
- 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.
- Ip
Address string The publicly accessible IP of the SignalR service.
- Primary
Access stringKey The primary access key for the SignalR service.
- Primary
Connection stringString The primary connection string for the SignalR service.
- Public
Port int The publicly accessible port of the SignalR service which is designed for browser/client use.
- Secondary
Access stringKey The secondary access key for the SignalR service.
- Secondary
Connection stringString The secondary connection string for the SignalR service.
- Server
Port 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.
- Ip
Address string The publicly accessible IP of the SignalR service.
- Primary
Access stringKey The primary access key for the SignalR service.
- Primary
Connection stringString The primary connection string for the SignalR service.
- Public
Port int The publicly accessible port of the SignalR service which is designed for browser/client use.
- Secondary
Access stringKey The secondary access key for the SignalR service.
- Secondary
Connection stringString The secondary connection string for the SignalR service.
- Server
Port 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.
- ip
Address string The publicly accessible IP of the SignalR service.
- primary
Access stringKey The primary access key for the SignalR service.
- primary
Connection stringString The primary connection string for the SignalR service.
- public
Port number The publicly accessible port of the SignalR service which is designed for browser/client use.
- secondary
Access stringKey The secondary access key for the SignalR service.
- secondary
Connection stringString The secondary connection string for the SignalR service.
- server
Port 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_ strkey The primary access key for the SignalR service.
- primary_
connection_ strstring 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_ strkey The secondary access key for the SignalR service.
- secondary_
connection_ strstring 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): Servicestatic 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<Service
Cor Args> A
corsblock as documented below.- Features
List<Service
Feature Args> A
featuresblock as documented below.- Hostname string
The FQDN of the SignalR service.
- Ip
Address 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.
- Primary
Access stringKey The primary access key for the SignalR service.
- Primary
Connection stringString The primary connection string for the SignalR service.
- Public
Port int The publicly accessible port of the SignalR service which is designed for browser/client use.
- Resource
Group stringName The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
- Secondary
Access stringKey The secondary access key for the SignalR service.
- Secondary
Connection stringString The secondary connection string for the SignalR service.
- Server
Port int The publicly accessible port of the SignalR service which is designed for customer server side use.
- Sku
Service
Sku Args A
skublock as documented below.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Cors
[]Service
Cor A
corsblock as documented below.- Features
[]Service
Feature A
featuresblock as documented below.- Hostname string
The FQDN of the SignalR service.
- Ip
Address 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.
- Primary
Access stringKey The primary access key for the SignalR service.
- Primary
Connection stringString The primary connection string for the SignalR service.
- Public
Port int The publicly accessible port of the SignalR service which is designed for browser/client use.
- Resource
Group stringName The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
- Secondary
Access stringKey The secondary access key for the SignalR service.
- Secondary
Connection stringString The secondary connection string for the SignalR service.
- Server
Port int The publicly accessible port of the SignalR service which is designed for customer server side use.
- Sku
Service
Sku A
skublock as documented below.- map[string]string
A mapping of tags to assign to the resource.
- cors
Service
Cor[] A
corsblock as documented below.- features
Service
Feature[] A
featuresblock as documented below.- hostname string
The FQDN of the SignalR service.
- ip
Address 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.
- primary
Access stringKey The primary access key for the SignalR service.
- primary
Connection stringString The primary connection string for the SignalR service.
- public
Port number The publicly accessible port of the SignalR service which is designed for browser/client use.
- resource
Group stringName The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
- secondary
Access stringKey The secondary access key for the SignalR service.
- secondary
Connection stringString The secondary connection string for the SignalR service.
- server
Port number The publicly accessible port of the SignalR service which is designed for customer server side use.
- sku
Service
Sku A
skublock as documented below.- {[key: string]: string}
A mapping of tags to assign to the resource.
- cors
List[Service
Cor] A
corsblock as documented below.- features
List[Service
Feature] A
featuresblock 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_ strkey The primary access key for the SignalR service.
- primary_
connection_ strstring 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_ strname The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
- secondary_
access_ strkey The secondary access key for the SignalR service.
- secondary_
connection_ strstring 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[Service
Sku] A
skublock as documented below.- Dict[str, str]
A mapping of tags to assign to the resource.
Supporting Types
ServiceCor
- Allowed
Origins List<string> A list of origins which should be able to make cross-origin calls.
*can be used to allow all calls.
- Allowed
Origins []string A list of origins which should be able to make cross-origin calls.
*can be used to allow all calls.
- allowed
Origins string[] A list of origins which should be able to make cross-origin calls.
*can be used to allow all calls.
- allowed
Origins List[str] A list of origins which should be able to make cross-origin calls.
*can be used to allow all calls.
ServiceFeature
ServiceSku
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.