OutputBlob
Manages a Stream Analytics Output to Blob Storage.
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 exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
{
ResourceGroupName = exampleResourceGroup.Apply(exampleResourceGroup => exampleResourceGroup.Name),
Location = exampleResourceGroup.Apply(exampleResourceGroup => exampleResourceGroup.Location),
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleContainer = new Azure.Storage.Container("exampleContainer", new Azure.Storage.ContainerArgs
{
StorageAccountName = exampleAccount.Name,
ContainerAccessType = "private",
});
var exampleOutputBlob = new Azure.StreamAnalytics.OutputBlob("exampleOutputBlob", new Azure.StreamAnalytics.OutputBlobArgs
{
StreamAnalyticsJobName = exampleJob.Apply(exampleJob => exampleJob.Name),
ResourceGroupName = exampleJob.Apply(exampleJob => exampleJob.ResourceGroupName),
StorageAccountName = exampleAccount.Name,
StorageAccountKey = exampleAccount.PrimaryAccessKey,
StorageContainerName = exampleContainer.Name,
PathPattern = "some-pattern",
DateFormat = "yyyy-MM-dd",
TimeFormat = "HH",
Serialization = new Azure.StreamAnalytics.Inputs.OutputBlobSerializationArgs
{
Type = "Csv",
Encoding = "UTF8",
FieldDelimiter = ",",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/storage"
"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
}
exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
ResourceGroupName: pulumi.String(exampleResourceGroup.Name),
Location: pulumi.String(exampleResourceGroup.Location),
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
exampleContainer, err := storage.NewContainer(ctx, "exampleContainer", &storage.ContainerArgs{
StorageAccountName: exampleAccount.Name,
ContainerAccessType: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = streamanalytics.NewOutputBlob(ctx, "exampleOutputBlob", &streamanalytics.OutputBlobArgs{
StreamAnalyticsJobName: pulumi.String(exampleJob.Name),
ResourceGroupName: pulumi.String(exampleJob.ResourceGroupName),
StorageAccountName: exampleAccount.Name,
StorageAccountKey: exampleAccount.PrimaryAccessKey,
StorageContainerName: exampleContainer.Name,
PathPattern: pulumi.String("some-pattern"),
DateFormat: pulumi.String("yyyy-MM-dd"),
TimeFormat: pulumi.String("HH"),
Serialization: &streamanalytics.OutputBlobSerializationArgs{
Type: pulumi.String("Csv"),
Encoding: pulumi.String("UTF8"),
FieldDelimiter: pulumi.String(","),
},
})
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_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_replication_type="LRS")
example_container = azure.storage.Container("exampleContainer",
storage_account_name=example_account.name,
container_access_type="private")
example_output_blob = azure.streamanalytics.OutputBlob("exampleOutputBlob",
stream_analytics_job_name=example_job.name,
resource_group_name=example_job.resource_group_name,
storage_account_name=example_account.name,
storage_account_key=example_account.primary_access_key,
storage_container_name=example_container.name,
path_pattern="some-pattern",
date_format="yyyy-MM-dd",
time_format="HH",
serialization={
"type": "Csv",
"encoding": "UTF8",
"fieldDelimiter": ",",
})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 exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.then(exampleResourceGroup => exampleResourceGroup.name),
location: exampleResourceGroup.then(exampleResourceGroup => exampleResourceGroup.location),
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleContainer = new azure.storage.Container("exampleContainer", {
storageAccountName: exampleAccount.name,
containerAccessType: "private",
});
const exampleOutputBlob = new azure.streamanalytics.OutputBlob("exampleOutputBlob", {
streamAnalyticsJobName: exampleJob.then(exampleJob => exampleJob.name),
resourceGroupName: exampleJob.then(exampleJob => exampleJob.resourceGroupName),
storageAccountName: exampleAccount.name,
storageAccountKey: exampleAccount.primaryAccessKey,
storageContainerName: exampleContainer.name,
pathPattern: "some-pattern",
dateFormat: "yyyy-MM-dd",
timeFormat: "HH",
serialization: {
type: "Csv",
encoding: "UTF8",
fieldDelimiter: ",",
},
});Create a OutputBlob Resource
new OutputBlob(name: string, args: OutputBlobArgs, opts?: CustomResourceOptions);def OutputBlob(resource_name, opts=None, date_format=None, name=None, path_pattern=None, resource_group_name=None, serialization=None, storage_account_key=None, storage_account_name=None, storage_container_name=None, stream_analytics_job_name=None, time_format=None, __props__=None);func NewOutputBlob(ctx *Context, name string, args OutputBlobArgs, opts ...ResourceOption) (*OutputBlob, error)public OutputBlob(string name, OutputBlobArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args OutputBlobArgs
- 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 OutputBlobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OutputBlobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
OutputBlob Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The OutputBlob resource accepts the following input properties:
- Date
Format string The date format. Wherever
{date}appears inpath_pattern, the value of this property is used as the date format instead.- Path
Pattern string The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job.
- Resource
Group stringName The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
- Serialization
Output
Blob Serialization Args A
serializationblock as defined below.- Storage
Account stringKey The Access Key which should be used to connect to this Storage Account.
- Storage
Account stringName The name of the Storage Account.
- Storage
Container stringName The name of the Container within the Storage Account.
- Stream
Analytics stringJob Name The name of the Stream Analytics Job. Changing this forces a new resource to be created.
- Time
Format string The time format. Wherever
{time}appears inpath_pattern, the value of this property is used as the time format instead.- Name string
The name of the Stream Output. Changing this forces a new resource to be created.
- Date
Format string The date format. Wherever
{date}appears inpath_pattern, the value of this property is used as the date format instead.- Path
Pattern string The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job.
- Resource
Group stringName The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
- Serialization
Output
Blob Serialization A
serializationblock as defined below.- Storage
Account stringKey The Access Key which should be used to connect to this Storage Account.
- Storage
Account stringName The name of the Storage Account.
- Storage
Container stringName The name of the Container within the Storage Account.
- Stream
Analytics stringJob Name The name of the Stream Analytics Job. Changing this forces a new resource to be created.
- Time
Format string The time format. Wherever
{time}appears inpath_pattern, the value of this property is used as the time format instead.- Name string
The name of the Stream Output. Changing this forces a new resource to be created.
- date
Format string The date format. Wherever
{date}appears inpath_pattern, the value of this property is used as the date format instead.- path
Pattern string The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job.
- resource
Group stringName The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
- serialization
Output
Blob Serialization A
serializationblock as defined below.- storage
Account stringKey The Access Key which should be used to connect to this Storage Account.
- storage
Account stringName The name of the Storage Account.
- storage
Container stringName The name of the Container within the Storage Account.
- stream
Analytics stringJob Name The name of the Stream Analytics Job. Changing this forces a new resource to be created.
- time
Format string The time format. Wherever
{time}appears inpath_pattern, the value of this property is used as the time format instead.- name string
The name of the Stream Output. Changing this forces a new resource to be created.
- date_
format str The date format. Wherever
{date}appears inpath_pattern, the value of this property is used as the date format instead.- path_
pattern str The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job.
- resource_
group_ strname The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
- serialization
Dict[Output
Blob Serialization] A
serializationblock as defined below.- storage_
account_ strkey The Access Key which should be used to connect to this Storage Account.
- storage_
account_ strname The name of the Storage Account.
- storage_
container_ strname The name of the Container within the Storage Account.
- stream_
analytics_ strjob_ name The name of the Stream Analytics Job. Changing this forces a new resource to be created.
- time_
format str The time format. Wherever
{time}appears inpath_pattern, the value of this property is used as the time format instead.- 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 OutputBlob resource produces the following output properties:
Look up an Existing OutputBlob Resource
Get an existing OutputBlob 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?: OutputBlobState, opts?: CustomResourceOptions): OutputBlobstatic get(resource_name, id, opts=None, date_format=None, name=None, path_pattern=None, resource_group_name=None, serialization=None, storage_account_key=None, storage_account_name=None, storage_container_name=None, stream_analytics_job_name=None, time_format=None, __props__=None);func GetOutputBlob(ctx *Context, name string, id IDInput, state *OutputBlobState, opts ...ResourceOption) (*OutputBlob, error)public static OutputBlob Get(string name, Input<string> id, OutputBlobState? 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:
- Date
Format string The date format. Wherever
{date}appears inpath_pattern, the value of this property is used as the date format instead.- Name string
The name of the Stream Output. Changing this forces a new resource to be created.
- Path
Pattern string The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job.
- Resource
Group stringName The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
- Serialization
Output
Blob Serialization Args A
serializationblock as defined below.- Storage
Account stringKey The Access Key which should be used to connect to this Storage Account.
- Storage
Account stringName The name of the Storage Account.
- Storage
Container stringName The name of the Container within the Storage Account.
- Stream
Analytics stringJob Name The name of the Stream Analytics Job. Changing this forces a new resource to be created.
- Time
Format string The time format. Wherever
{time}appears inpath_pattern, the value of this property is used as the time format instead.
- Date
Format string The date format. Wherever
{date}appears inpath_pattern, the value of this property is used as the date format instead.- Name string
The name of the Stream Output. Changing this forces a new resource to be created.
- Path
Pattern string The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job.
- Resource
Group stringName The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
- Serialization
Output
Blob Serialization A
serializationblock as defined below.- Storage
Account stringKey The Access Key which should be used to connect to this Storage Account.
- Storage
Account stringName The name of the Storage Account.
- Storage
Container stringName The name of the Container within the Storage Account.
- Stream
Analytics stringJob Name The name of the Stream Analytics Job. Changing this forces a new resource to be created.
- Time
Format string The time format. Wherever
{time}appears inpath_pattern, the value of this property is used as the time format instead.
- date
Format string The date format. Wherever
{date}appears inpath_pattern, the value of this property is used as the date format instead.- name string
The name of the Stream Output. Changing this forces a new resource to be created.
- path
Pattern string The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job.
- resource
Group stringName The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
- serialization
Output
Blob Serialization A
serializationblock as defined below.- storage
Account stringKey The Access Key which should be used to connect to this Storage Account.
- storage
Account stringName The name of the Storage Account.
- storage
Container stringName The name of the Container within the Storage Account.
- stream
Analytics stringJob Name The name of the Stream Analytics Job. Changing this forces a new resource to be created.
- time
Format string The time format. Wherever
{time}appears inpath_pattern, the value of this property is used as the time format instead.
- date_
format str The date format. Wherever
{date}appears inpath_pattern, the value of this property is used as the date format instead.- name str
The name of the Stream Output. Changing this forces a new resource to be created.
- path_
pattern str The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job.
- resource_
group_ strname The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
- serialization
Dict[Output
Blob Serialization] A
serializationblock as defined below.- storage_
account_ strkey The Access Key which should be used to connect to this Storage Account.
- storage_
account_ strname The name of the Storage Account.
- storage_
container_ strname The name of the Container within the Storage Account.
- stream_
analytics_ strjob_ name The name of the Stream Analytics Job. Changing this forces a new resource to be created.
- time_
format str The time format. Wherever
{time}appears inpath_pattern, the value of this property is used as the time format instead.
Supporting Types
OutputBlobSerialization
- Type string
The serialization format used for outgoing data streams. Possible values are
Avro,CsvandJson.- 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.- Field
Delimiter 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
ArrayandLineSeparated.
- Type string
The serialization format used for outgoing data streams. Possible values are
Avro,CsvandJson.- 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.- Field
Delimiter 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
ArrayandLineSeparated.
- type string
The serialization format used for outgoing data streams. Possible values are
Avro,CsvandJson.- 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.- field
Delimiter 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
ArrayandLineSeparated.
- type str
The serialization format used for outgoing data streams. Possible values are
Avro,CsvandJson.- 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.- field
Delimiter 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
ArrayandLineSeparated.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.