1. Packages
  2. Azure Classic
  3. API Docs
  4. streamanalytics
  5. JobStorageAccount

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.streamanalytics.JobStorageAccount

Explore with Pulumi AI

Manages a Stream Analytics Job Storage Account. Use this resource for managing the Job Storage Account using Msi authentication with a SystemAssigned identity.

Note: The Job Storage Account for a Stream Analytics Job can be managed on the azure.streamanalytics.Job resource with the job_storage_account block, or with this resource. We do not recommend managing the Job Storage Account through both means as this can lead to conflicts.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleJob = new azure.streamanalytics.Job("example", {
    name: "example-job",
    resourceGroupName: example.name,
    location: example.location,
    compatibilityLevel: "1.2",
    dataLocale: "en-GB",
    eventsLateArrivalMaxDelayInSeconds: 60,
    eventsOutOfOrderMaxDelayInSeconds: 50,
    eventsOutOfOrderPolicy: "Adjust",
    outputErrorPolicy: "Drop",
    streamingUnits: 3,
    skuName: "StandardV2",
    identity: {
        type: "SystemAssigned",
    },
    tags: {
        environment: "Example",
    },
    transformationQuery: `    SELECT *
    INTO [YourOutputAlias]
    FROM [YourInputAlias]
`,
});
const exampleAccount = new azure.storage.Account("example", {
    name: "exampleaccount",
    resourceGroupName: example.name,
    location: example.location,
    accountTier: "Standard",
    accountReplicationType: "LRS",
});
const exampleJobStorageAccount = new azure.streamanalytics.JobStorageAccount("example", {
    streamAnalyticsJobId: exampleJob.id,
    storageAccountName: exampleAccount.name,
    authenticationMode: "Msi",
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_job = azure.streamanalytics.Job("example",
    name="example-job",
    resource_group_name=example.name,
    location=example.location,
    compatibility_level="1.2",
    data_locale="en-GB",
    events_late_arrival_max_delay_in_seconds=60,
    events_out_of_order_max_delay_in_seconds=50,
    events_out_of_order_policy="Adjust",
    output_error_policy="Drop",
    streaming_units=3,
    sku_name="StandardV2",
    identity={
        "type": "SystemAssigned",
    },
    tags={
        "environment": "Example",
    },
    transformation_query="""    SELECT *
    INTO [YourOutputAlias]
    FROM [YourInputAlias]
""")
example_account = azure.storage.Account("example",
    name="exampleaccount",
    resource_group_name=example.name,
    location=example.location,
    account_tier="Standard",
    account_replication_type="LRS")
example_job_storage_account = azure.streamanalytics.JobStorageAccount("example",
    stream_analytics_job_id=example_job.id,
    storage_account_name=example_account.name,
    authentication_mode="Msi")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleJob, err := streamanalytics.NewJob(ctx, "example", &streamanalytics.JobArgs{
			Name:                               pulumi.String("example-job"),
			ResourceGroupName:                  example.Name,
			Location:                           example.Location,
			CompatibilityLevel:                 pulumi.String("1.2"),
			DataLocale:                         pulumi.String("en-GB"),
			EventsLateArrivalMaxDelayInSeconds: pulumi.Int(60),
			EventsOutOfOrderMaxDelayInSeconds:  pulumi.Int(50),
			EventsOutOfOrderPolicy:             pulumi.String("Adjust"),
			OutputErrorPolicy:                  pulumi.String("Drop"),
			StreamingUnits:                     pulumi.Int(3),
			SkuName:                            pulumi.String("StandardV2"),
			Identity: &streamanalytics.JobIdentityArgs{
				Type: pulumi.String("SystemAssigned"),
			},
			Tags: pulumi.StringMap{
				"environment": pulumi.String("Example"),
			},
			TransformationQuery: pulumi.String("    SELECT *\n    INTO [YourOutputAlias]\n    FROM [YourInputAlias]\n"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
			Name:                   pulumi.String("exampleaccount"),
			ResourceGroupName:      example.Name,
			Location:               example.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("LRS"),
		})
		if err != nil {
			return err
		}
		_, err = streamanalytics.NewJobStorageAccount(ctx, "example", &streamanalytics.JobStorageAccountArgs{
			StreamAnalyticsJobId: exampleJob.ID(),
			StorageAccountName:   exampleAccount.Name,
			AuthenticationMode:   pulumi.String("Msi"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var exampleJob = new Azure.StreamAnalytics.Job("example", new()
    {
        Name = "example-job",
        ResourceGroupName = example.Name,
        Location = example.Location,
        CompatibilityLevel = "1.2",
        DataLocale = "en-GB",
        EventsLateArrivalMaxDelayInSeconds = 60,
        EventsOutOfOrderMaxDelayInSeconds = 50,
        EventsOutOfOrderPolicy = "Adjust",
        OutputErrorPolicy = "Drop",
        StreamingUnits = 3,
        SkuName = "StandardV2",
        Identity = new Azure.StreamAnalytics.Inputs.JobIdentityArgs
        {
            Type = "SystemAssigned",
        },
        Tags = 
        {
            { "environment", "Example" },
        },
        TransformationQuery = @"    SELECT *
    INTO [YourOutputAlias]
    FROM [YourInputAlias]
",
    });

    var exampleAccount = new Azure.Storage.Account("example", new()
    {
        Name = "exampleaccount",
        ResourceGroupName = example.Name,
        Location = example.Location,
        AccountTier = "Standard",
        AccountReplicationType = "LRS",
    });

    var exampleJobStorageAccount = new Azure.StreamAnalytics.JobStorageAccount("example", new()
    {
        StreamAnalyticsJobId = exampleJob.Id,
        StorageAccountName = exampleAccount.Name,
        AuthenticationMode = "Msi",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.streamanalytics.Job;
import com.pulumi.azure.streamanalytics.JobArgs;
import com.pulumi.azure.streamanalytics.inputs.JobIdentityArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.streamanalytics.JobStorageAccount;
import com.pulumi.azure.streamanalytics.JobStorageAccountArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());

        var exampleJob = new Job("exampleJob", JobArgs.builder()
            .name("example-job")
            .resourceGroupName(example.name())
            .location(example.location())
            .compatibilityLevel("1.2")
            .dataLocale("en-GB")
            .eventsLateArrivalMaxDelayInSeconds(60)
            .eventsOutOfOrderMaxDelayInSeconds(50)
            .eventsOutOfOrderPolicy("Adjust")
            .outputErrorPolicy("Drop")
            .streamingUnits(3)
            .skuName("StandardV2")
            .identity(JobIdentityArgs.builder()
                .type("SystemAssigned")
                .build())
            .tags(Map.of("environment", "Example"))
            .transformationQuery("""
    SELECT *
    INTO [YourOutputAlias]
    FROM [YourInputAlias]
            """)
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
            .name("exampleaccount")
            .resourceGroupName(example.name())
            .location(example.location())
            .accountTier("Standard")
            .accountReplicationType("LRS")
            .build());

        var exampleJobStorageAccount = new JobStorageAccount("exampleJobStorageAccount", JobStorageAccountArgs.builder()
            .streamAnalyticsJobId(exampleJob.id())
            .storageAccountName(exampleAccount.name())
            .authenticationMode("Msi")
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleJob:
    type: azure:streamanalytics:Job
    name: example
    properties:
      name: example-job
      resourceGroupName: ${example.name}
      location: ${example.location}
      compatibilityLevel: '1.2'
      dataLocale: en-GB
      eventsLateArrivalMaxDelayInSeconds: 60
      eventsOutOfOrderMaxDelayInSeconds: 50
      eventsOutOfOrderPolicy: Adjust
      outputErrorPolicy: Drop
      streamingUnits: 3
      skuName: StandardV2
      identity:
        type: SystemAssigned
      tags:
        environment: Example
      transformationQuery: |2
            SELECT *
            INTO [YourOutputAlias]
            FROM [YourInputAlias]
  exampleAccount:
    type: azure:storage:Account
    name: example
    properties:
      name: exampleaccount
      resourceGroupName: ${example.name}
      location: ${example.location}
      accountTier: Standard
      accountReplicationType: LRS
  exampleJobStorageAccount:
    type: azure:streamanalytics:JobStorageAccount
    name: example
    properties:
      streamAnalyticsJobId: ${exampleJob.id}
      storageAccountName: ${exampleAccount.name}
      authenticationMode: Msi
Copy

Create JobStorageAccount Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new JobStorageAccount(name: string, args: JobStorageAccountArgs, opts?: CustomResourceOptions);
@overload
def JobStorageAccount(resource_name: str,
                      args: JobStorageAccountArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def JobStorageAccount(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      authentication_mode: Optional[str] = None,
                      storage_account_name: Optional[str] = None,
                      stream_analytics_job_id: Optional[str] = None,
                      storage_account_key: Optional[str] = None)
func NewJobStorageAccount(ctx *Context, name string, args JobStorageAccountArgs, opts ...ResourceOption) (*JobStorageAccount, error)
public JobStorageAccount(string name, JobStorageAccountArgs args, CustomResourceOptions? opts = null)
public JobStorageAccount(String name, JobStorageAccountArgs args)
public JobStorageAccount(String name, JobStorageAccountArgs args, CustomResourceOptions options)
type: azure:streamanalytics:JobStorageAccount
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. JobStorageAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. JobStorageAccountArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. JobStorageAccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. JobStorageAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. JobStorageAccountArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var jobStorageAccountResource = new Azure.StreamAnalytics.JobStorageAccount("jobStorageAccountResource", new()
{
    AuthenticationMode = "string",
    StorageAccountName = "string",
    StreamAnalyticsJobId = "string",
    StorageAccountKey = "string",
});
Copy
example, err := streamanalytics.NewJobStorageAccount(ctx, "jobStorageAccountResource", &streamanalytics.JobStorageAccountArgs{
	AuthenticationMode:   pulumi.String("string"),
	StorageAccountName:   pulumi.String("string"),
	StreamAnalyticsJobId: pulumi.String("string"),
	StorageAccountKey:    pulumi.String("string"),
})
Copy
var jobStorageAccountResource = new JobStorageAccount("jobStorageAccountResource", JobStorageAccountArgs.builder()
    .authenticationMode("string")
    .storageAccountName("string")
    .streamAnalyticsJobId("string")
    .storageAccountKey("string")
    .build());
Copy
job_storage_account_resource = azure.streamanalytics.JobStorageAccount("jobStorageAccountResource",
    authentication_mode="string",
    storage_account_name="string",
    stream_analytics_job_id="string",
    storage_account_key="string")
Copy
const jobStorageAccountResource = new azure.streamanalytics.JobStorageAccount("jobStorageAccountResource", {
    authenticationMode: "string",
    storageAccountName: "string",
    streamAnalyticsJobId: "string",
    storageAccountKey: "string",
});
Copy
type: azure:streamanalytics:JobStorageAccount
properties:
    authenticationMode: string
    storageAccountKey: string
    storageAccountName: string
    streamAnalyticsJobId: string
Copy

JobStorageAccount Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The JobStorageAccount resource accepts the following input properties:

AuthenticationMode This property is required. string
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
StorageAccountName This property is required. string
StreamAnalyticsJobId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
StorageAccountKey string
AuthenticationMode This property is required. string
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
StorageAccountName This property is required. string
StreamAnalyticsJobId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
StorageAccountKey string
authenticationMode This property is required. String
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
storageAccountName This property is required. String
streamAnalyticsJobId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
storageAccountKey String
authenticationMode This property is required. string
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
storageAccountName This property is required. string
streamAnalyticsJobId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
storageAccountKey string
authentication_mode This property is required. str
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
storage_account_name This property is required. str
stream_analytics_job_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
storage_account_key str
authenticationMode This property is required. String
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
storageAccountName This property is required. String
streamAnalyticsJobId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
storageAccountKey String

Outputs

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

Look up Existing JobStorageAccount Resource

Get an existing JobStorageAccount 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?: JobStorageAccountState, opts?: CustomResourceOptions): JobStorageAccount
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        authentication_mode: Optional[str] = None,
        storage_account_key: Optional[str] = None,
        storage_account_name: Optional[str] = None,
        stream_analytics_job_id: Optional[str] = None) -> JobStorageAccount
func GetJobStorageAccount(ctx *Context, name string, id IDInput, state *JobStorageAccountState, opts ...ResourceOption) (*JobStorageAccount, error)
public static JobStorageAccount Get(string name, Input<string> id, JobStorageAccountState? state, CustomResourceOptions? opts = null)
public static JobStorageAccount get(String name, Output<String> id, JobStorageAccountState state, CustomResourceOptions options)
resources:  _:    type: azure:streamanalytics:JobStorageAccount    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AuthenticationMode string
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
StorageAccountKey string
StorageAccountName string
StreamAnalyticsJobId Changes to this property will trigger replacement. string
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
AuthenticationMode string
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
StorageAccountKey string
StorageAccountName string
StreamAnalyticsJobId Changes to this property will trigger replacement. string
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
authenticationMode String
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
storageAccountKey String
storageAccountName String
streamAnalyticsJobId Changes to this property will trigger replacement. String
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
authenticationMode string
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
storageAccountKey string
storageAccountName string
streamAnalyticsJobId Changes to this property will trigger replacement. string
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
authentication_mode str
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
storage_account_key str
storage_account_name str
stream_analytics_job_id Changes to this property will trigger replacement. str
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
authenticationMode String
The authentication mode for the Stream Analytics Job's Storage Account. Possible values are ConnectionString, and Msi.
storageAccountKey String
storageAccountName String
streamAnalyticsJobId Changes to this property will trigger replacement. String
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.

Import

Stream Analytics Job Storage Accounts can be imported using the resource id, e.g.

$ pulumi import azure:streamanalytics/jobStorageAccount:JobStorageAccount example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.