Azure Stream Analytics Job

This page shows how to write Terraform and Azure Resource Manager for Stream Analytics Job and write them securely.

azurerm_stream_analytics_job (Terraform)

The Job in Stream Analytics can be configured in Terraform with the resource name azurerm_stream_analytics_job. The following sections describe 9 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L9
resource "azurerm_stream_analytics_job" "foo" {
  name                 = "asa-job-foo"
  provider             = azurerm-forked
  resource_group_name  = var.resource_group_name
  location             = var.location
  compatibility_level  = "1.2"
main.tf#L1
resource "azurerm_stream_analytics_job" "streamanalytics" {
  name                                     = var.name
  resource_group_name                      = var.resource_group_name
  location                                 = var.location
  compatibility_level                      = var.compatibility_level
  streaming_units                          = var.streaming_units
main.tf#L11
resource "azurerm_stream_analytics_job" "asa" {
  name                                     = "__asa_name__"
  resource_group_name                      = "__rg_name__"
  location                                 = "__rg_location__"
  compatibility_level                      = "1.1"
  data_locale                              = "en-GB"
main.tf#L7
resource "azurerm_stream_analytics_job" "this" {
  compatibility_level                      = var.compatibility_level
  data_locale                              = var.data_locale
  events_late_arrival_max_delay_in_seconds = var.events_late_arrival_max_delay_in_seconds
  events_out_of_order_max_delay_in_seconds = var.events_out_of_order_max_delay_in_seconds
  events_out_of_order_policy               = var.events_out_of_order_policy
main.tf#L7
resource "azurerm_stream_analytics_job" "this" {
  compatibility_level                      = var.compatibility_level
  data_locale                              = var.data_locale
  events_late_arrival_max_delay_in_seconds = var.events_late_arrival_max_delay_in_seconds
  events_out_of_order_max_delay_in_seconds = var.events_out_of_order_max_delay_in_seconds
  events_out_of_order_policy               = var.events_out_of_order_policy
main.tf#L3
resource "azurerm_stream_analytics_job" "asajob" {
  name                                     = "_asa_name_"
  resource_group_name                      = "_resource_group_name_"
  location                                 = "_resource_group_location_"
  compatibility_level                      = "1.1"
  data_locale                              = "en-GB"
main.tf#L6
resource "azurerm_stream_analytics_job" "example" {
  name                                     = "example-job"
  resource_group_name                      = azurerm_resource_group.this.name
  location                                 = "Australia Southeast"
  compatibility_level                      = "1.1"
  data_locale                              = "en-GB"
main.tf#L25
resource "azurerm_stream_analytics_job" "job" {
  name                                     = var.stream_job_name
  resource_group_name                      = var.resource_group_name
  location                                 = var.location
  compatibility_level                      = var.stream_compatibility_level
  data_locale                              = var.stream_data_locale
main.tf#L70
resource "azurerm_stream_analytics_job" "saj" {
  name                                     = "tfexamplesajdev01"
  resource_group_name                      = azurerm_resource_group.rg.name
  location                                 = azurerm_resource_group.rg.location
  compatibility_level                      = "1.1"
  data_locale                              = "en-GB"

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Stream Analytics Job.

Microsoft.StreamAnalytics/streamingjobs (Azure Resource Manager)

The streamingjobs in Microsoft.StreamAnalytics can be configured in Azure Resource Manager with the resource name Microsoft.StreamAnalytics/streamingjobs. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • apiVersion required - string
  • identity optional
      • principalId optional - string

        The identity principal ID

      • tenantId optional - string

        The identity tenantId

      • type optional - string

        The identity type

  • location optional - string

    The geo-location where the resource lives

  • name required - string

    The name of the streaming job.

  • properties required
      • cluster optional
          • id optional - string

            The resource id of cluster.

      • compatibilityLevel optional - string

        Controls certain runtime behaviors of the streaming job.

      • contentStoragePolicy optional - string

        Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property.

      • dataLocale optional - string

        The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified.

      • eventsLateArrivalMaxDelayInSeconds optional - integer

        The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1.

      • eventsOutOfOrderMaxDelayInSeconds optional - integer

        The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.

      • eventsOutOfOrderPolicy optional - string

        Indicates the policy to apply to events that arrive out of order in the input event stream.

      • functions optional array
          • name optional - string

            Resource name

          • properties optional
        • inputs optional array
            • name optional - string

              Resource name

            • properties optional
                • compression optional
                    • type required - string

                      Indicates the type of compression that the input uses. Required on PUT (CreateOrReplace) requests.

                • partitionKey optional - string

                  partitionKey Describes a key in the input data which is used for partitioning the input data

                • serialization optional
          • jobStorageAccount optional
              • accountKey optional - string

                The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.

              • accountName optional - string

                The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.

              • authenticationMode optional - string

                Authentication Mode.

          • jobType optional - string

            Describes the type of the job. Valid modes are Cloud and 'Edge'.

          • outputErrorPolicy optional - string

            Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size).

          • outputs optional array
              • name optional - string

                Resource name

              • properties optional
                  • datasource optional
                    • serialization optional
                      • sizeWindow optional - number

                        The size window to constrain a Stream Analytics output to.

                      • timeWindow optional - string

                        The time frame for filtering Stream Analytics job outputs.

              • outputStartMode optional - string

                This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.

              • outputStartTime optional - string

                Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime.

              • sku optional
                  • name optional - string

                    The name of the SKU. Required on PUT (CreateOrReplace) requests.

              • transformation optional
                  • name optional - string

                    Resource name

                  • properties optional
                      • query optional - string

                        Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.

                      • streamingUnits optional - integer

                        Specifies the number of streaming units that the streaming job uses.

                      • validStreamingUnits optional - array

                        Specifies the valid streaming units a streaming job can scale to.

          • tags optional - string

            Resource tags.

          • type required - string

          Frequently asked questions

          What is Azure Stream Analytics Job?

          Azure Stream Analytics Job is a resource for Stream Analytics of Microsoft Azure. Settings can be wrote in Terraform.

          Where can I find the example code for the Azure Stream Analytics Job?

          For Terraform, the jakewan/test-azurerm-provider-fork, AnikG-Org/devops-practice and jortegam22/TFM_Juan_Carlos source code examples are useful. See the Terraform Example section for further details.