OutputServiceBusQueue

Manages a Stream Analytics Output to a ServiceBus Queue.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = Output.Create(Azure.Core.GetResourceGroup.InvokeAsync(new Azure.Core.GetResourceGroupArgs
        {
            Name = "example-resources",
        }));
        var exampleJob = Output.Create(Azure.StreamAnalytics.GetJob.InvokeAsync(new Azure.StreamAnalytics.GetJobArgs
        {
            Name = "example-job",
            ResourceGroupName = azurerm_resource_group.Example.Name,
        }));
        var exampleNamespace = new Azure.ServiceBus.Namespace("exampleNamespace", new Azure.ServiceBus.NamespaceArgs
        {
            Location = exampleResourceGroup.Apply(exampleResourceGroup => exampleResourceGroup.Location),
            ResourceGroupName = exampleResourceGroup.Apply(exampleResourceGroup => exampleResourceGroup.Name),
            Sku = "Standard",
        });
        var exampleQueue = new Azure.ServiceBus.Queue("exampleQueue", new Azure.ServiceBus.QueueArgs
        {
            ResourceGroupName = exampleResourceGroup.Apply(exampleResourceGroup => exampleResourceGroup.Name),
            NamespaceName = exampleNamespace.Name,
            EnablePartitioning = true,
        });
        var exampleOutputServiceBusQueue = new Azure.StreamAnalytics.OutputServiceBusQueue("exampleOutputServiceBusQueue", new Azure.StreamAnalytics.OutputServiceBusQueueArgs
        {
            StreamAnalyticsJobName = exampleJob.Apply(exampleJob => exampleJob.Name),
            ResourceGroupName = exampleJob.Apply(exampleJob => exampleJob.ResourceGroupName),
            QueueName = exampleQueue.Name,
            ServicebusNamespace = exampleNamespace.Name,
            SharedAccessPolicyKey = exampleNamespace.DefaultPrimaryKey,
            SharedAccessPolicyName = "RootManageSharedAccessKey",
            Serialization = new Azure.StreamAnalytics.Inputs.OutputServiceBusQueueSerializationArgs
            {
                Format = "Avro",
            },
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleResourceGroup, err := core.LookupResourceGroup(ctx, &core.LookupResourceGroupArgs{
            Name: "example-resources",
        }, nil)
        if err != nil {
            return err
        }
        exampleJob, err := streamanalytics.LookupJob(ctx, &streamanalytics.LookupJobArgs{
            Name:              "example-job",
            ResourceGroupName: azurerm_resource_group.Example.Name,
        }, nil)
        if err != nil {
            return err
        }
        exampleNamespace, err := servicebus.NewNamespace(ctx, "exampleNamespace", &servicebus.NamespaceArgs{
            Location:          pulumi.String(exampleResourceGroup.Location),
            ResourceGroupName: pulumi.String(exampleResourceGroup.Name),
            Sku:               pulumi.String("Standard"),
        })
        if err != nil {
            return err
        }
        exampleQueue, err := servicebus.NewQueue(ctx, "exampleQueue", &servicebus.QueueArgs{
            ResourceGroupName:  pulumi.String(exampleResourceGroup.Name),
            NamespaceName:      exampleNamespace.Name,
            EnablePartitioning: pulumi.Bool(true),
        })
        if err != nil {
            return err
        }
        _, err = streamanalytics.NewOutputServiceBusQueue(ctx, "exampleOutputServiceBusQueue", &streamanalytics.OutputServiceBusQueueArgs{
            StreamAnalyticsJobName: pulumi.String(exampleJob.Name),
            ResourceGroupName:      pulumi.String(exampleJob.ResourceGroupName),
            QueueName:              exampleQueue.Name,
            ServicebusNamespace:    exampleNamespace.Name,
            SharedAccessPolicyKey:  exampleNamespace.DefaultPrimaryKey,
            SharedAccessPolicyName: pulumi.String("RootManageSharedAccessKey"),
            Serialization: &streamanalytics.OutputServiceBusQueueSerializationArgs{
                Format: pulumi.String("Avro"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.get_resource_group(name="example-resources")
example_job = azure.streamanalytics.get_job(name="example-job",
    resource_group_name=azurerm_resource_group["example"]["name"])
example_namespace = azure.servicebus.Namespace("exampleNamespace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku="Standard")
example_queue = azure.servicebus.Queue("exampleQueue",
    resource_group_name=example_resource_group.name,
    namespace_name=example_namespace.name,
    enable_partitioning=True)
example_output_service_bus_queue = azure.streamanalytics.OutputServiceBusQueue("exampleOutputServiceBusQueue",
    stream_analytics_job_name=example_job.name,
    resource_group_name=example_job.resource_group_name,
    queue_name=example_queue.name,
    servicebus_namespace=example_namespace.name,
    shared_access_policy_key=example_namespace.default_primary_key,
    shared_access_policy_name="RootManageSharedAccessKey",
    serialization={
        "format": "Avro",
    })
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = azure.core.getResourceGroup({
    name: "example-resources",
});
const exampleJob = azure.streamanalytics.getJob({
    name: "example-job",
    resourceGroupName: azurerm_resource_group.example.name,
});
const exampleNamespace = new azure.servicebus.Namespace("exampleNamespace", {
    location: exampleResourceGroup.then(exampleResourceGroup => exampleResourceGroup.location),
    resourceGroupName: exampleResourceGroup.then(exampleResourceGroup => exampleResourceGroup.name),
    sku: "Standard",
});
const exampleQueue = new azure.servicebus.Queue("exampleQueue", {
    resourceGroupName: exampleResourceGroup.then(exampleResourceGroup => exampleResourceGroup.name),
    namespaceName: exampleNamespace.name,
    enablePartitioning: true,
});
const exampleOutputServiceBusQueue = new azure.streamanalytics.OutputServiceBusQueue("exampleOutputServiceBusQueue", {
    streamAnalyticsJobName: exampleJob.then(exampleJob => exampleJob.name),
    resourceGroupName: exampleJob.then(exampleJob => exampleJob.resourceGroupName),
    queueName: exampleQueue.name,
    servicebusNamespace: exampleNamespace.name,
    sharedAccessPolicyKey: exampleNamespace.defaultPrimaryKey,
    sharedAccessPolicyName: "RootManageSharedAccessKey",
    serialization: {
        format: "Avro",
    },
});

Create a OutputServiceBusQueue Resource

def OutputServiceBusQueue(resource_name, opts=None, name=None, queue_name=None, resource_group_name=None, serialization=None, servicebus_namespace=None, shared_access_policy_key=None, shared_access_policy_name=None, stream_analytics_job_name=None, __props__=None);
name string
The unique name of the resource.
args OutputServiceBusQueueArgs
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 OutputServiceBusQueueArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args OutputServiceBusQueueArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

OutputServiceBusQueue Resource Properties

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

Inputs

The OutputServiceBusQueue resource accepts the following input properties:

QueueName string

The name of the Service Bus Queue.

ResourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

Serialization OutputServiceBusQueueSerializationArgs

A serialization block as defined below.

ServicebusNamespace string

The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.

SharedAccessPolicyKey string

The shared access policy key for the specified shared access policy.

SharedAccessPolicyName string

The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc.

StreamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

Name string

The name of the Stream Output. Changing this forces a new resource to be created.

QueueName string

The name of the Service Bus Queue.

ResourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

Serialization OutputServiceBusQueueSerialization

A serialization block as defined below.

ServicebusNamespace string

The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.

SharedAccessPolicyKey string

The shared access policy key for the specified shared access policy.

SharedAccessPolicyName string

The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc.

StreamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

Name string

The name of the Stream Output. Changing this forces a new resource to be created.

queueName string

The name of the Service Bus Queue.

resourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

serialization OutputServiceBusQueueSerialization

A serialization block as defined below.

servicebusNamespace string

The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.

sharedAccessPolicyKey string

The shared access policy key for the specified shared access policy.

sharedAccessPolicyName string

The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc.

streamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

name string

The name of the Stream Output. Changing this forces a new resource to be created.

queue_name str

The name of the Service Bus Queue.

resource_group_name str

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

serialization Dict[OutputServiceBusQueueSerialization]

A serialization block as defined below.

servicebus_namespace str

The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.

shared_access_policy_key str

The shared access policy key for the specified shared access policy.

shared_access_policy_name str

The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc.

stream_analytics_job_name str

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

name str

The name of the Stream Output. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the OutputServiceBusQueue 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing OutputServiceBusQueue Resource

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

static get(resource_name, id, opts=None, name=None, queue_name=None, resource_group_name=None, serialization=None, servicebus_namespace=None, shared_access_policy_key=None, shared_access_policy_name=None, stream_analytics_job_name=None, __props__=None);
func GetOutputServiceBusQueue(ctx *Context, name string, id IDInput, state *OutputServiceBusQueueState, opts ...ResourceOption) (*OutputServiceBusQueue, error)
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:

Name string

The name of the Stream Output. Changing this forces a new resource to be created.

QueueName string

The name of the Service Bus Queue.

ResourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

Serialization OutputServiceBusQueueSerializationArgs

A serialization block as defined below.

ServicebusNamespace string

The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.

SharedAccessPolicyKey string

The shared access policy key for the specified shared access policy.

SharedAccessPolicyName string

The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc.

StreamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

Name string

The name of the Stream Output. Changing this forces a new resource to be created.

QueueName string

The name of the Service Bus Queue.

ResourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

Serialization OutputServiceBusQueueSerialization

A serialization block as defined below.

ServicebusNamespace string

The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.

SharedAccessPolicyKey string

The shared access policy key for the specified shared access policy.

SharedAccessPolicyName string

The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc.

StreamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

name string

The name of the Stream Output. Changing this forces a new resource to be created.

queueName string

The name of the Service Bus Queue.

resourceGroupName string

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

serialization OutputServiceBusQueueSerialization

A serialization block as defined below.

servicebusNamespace string

The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.

sharedAccessPolicyKey string

The shared access policy key for the specified shared access policy.

sharedAccessPolicyName string

The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc.

streamAnalyticsJobName string

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

name str

The name of the Stream Output. Changing this forces a new resource to be created.

queue_name str

The name of the Service Bus Queue.

resource_group_name str

The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

serialization Dict[OutputServiceBusQueueSerialization]

A serialization block as defined below.

servicebus_namespace str

The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.

shared_access_policy_key str

The shared access policy key for the specified shared access policy.

shared_access_policy_name str

The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc.

stream_analytics_job_name str

The name of the Stream Analytics Job. Changing this forces a new resource to be created.

Supporting Types

OutputServiceBusQueueSerialization

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.

Type string

The serialization format used for outgoing data streams. Possible values are Avro, Csv and Json.

Encoding string

The encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. It currently can only be set to UTF8.

FieldDelimiter string

The delimiter that will be used to separate comma-separated value (CSV) records. Possible values are (space), , (comma), (tab), | (pipe) and ;.

Format string

Specifies the format of the JSON the output will be written in. Possible values are Array and LineSeparated.

Type string

The serialization format used for outgoing data streams. Possible values are Avro, Csv and Json.

Encoding string

The encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. It currently can only be set to UTF8.

FieldDelimiter string

The delimiter that will be used to separate comma-separated value (CSV) records. Possible values are (space), , (comma), (tab), | (pipe) and ;.

Format string

Specifies the format of the JSON the output will be written in. Possible values are Array and LineSeparated.

type string

The serialization format used for outgoing data streams. Possible values are Avro, Csv and Json.

encoding string

The encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. It currently can only be set to UTF8.

fieldDelimiter string

The delimiter that will be used to separate comma-separated value (CSV) records. Possible values are (space), , (comma), (tab), | (pipe) and ;.

format string

Specifies the format of the JSON the output will be written in. Possible values are Array and LineSeparated.

type str

The serialization format used for outgoing data streams. Possible values are Avro, Csv and Json.

encoding str

The encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. It currently can only be set to UTF8.

fieldDelimiter str

The delimiter that will be used to separate comma-separated value (CSV) records. Possible values are (space), , (comma), (tab), | (pipe) and ;.

format str

Specifies the format of the JSON the output will be written in. Possible values are Array and LineSeparated.

Package Details

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