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
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"
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
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"
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
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
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"
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"
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
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"
Parameters
-
compatibility_leveloptional computed - string -
data_localeoptional computed - string -
events_late_arrival_max_delay_in_secondsoptional - number -
events_out_of_order_max_delay_in_secondsoptional - number -
events_out_of_order_policyoptional - string -
idoptional computed - string -
job_idoptional computed - string -
locationrequired - string -
namerequired - string -
output_error_policyoptional - string -
resource_group_namerequired - string -
streaming_unitsrequired - number -
tagsoptional - map from string to string -
transformation_queryrequired - string -
timeoutssingle block
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
apiVersionrequired - stringidentityoptionalprincipalIdoptional - stringThe identity principal ID
tenantIdoptional - stringThe identity tenantId
typeoptional - stringThe identity type
locationoptional - stringThe geo-location where the resource lives
namerequired - stringThe name of the streaming job.
propertiesrequiredclusteroptionalidoptional - stringThe resource id of cluster.
compatibilityLeveloptional - stringControls certain runtime behaviors of the streaming job.
contentStoragePolicyoptional - stringValid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property.
dataLocaleoptional - stringThe 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.
eventsLateArrivalMaxDelayInSecondsoptional - integerThe 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.
eventsOutOfOrderMaxDelayInSecondsoptional - integerThe maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.
eventsOutOfOrderPolicyoptional - stringIndicates the policy to apply to events that arrive out of order in the input event stream.
functionsoptional arraynameoptional - stringResource name
propertiesoptional
inputsoptional arraynameoptional - stringResource name
propertiesoptionalcompressionoptionaltyperequired - stringIndicates the type of compression that the input uses. Required on PUT (CreateOrReplace) requests.
partitionKeyoptional - stringpartitionKey Describes a key in the input data which is used for partitioning the input data
serializationoptional
jobStorageAccountoptionalaccountKeyoptional - stringThe account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.
accountNameoptional - stringThe name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
authenticationModeoptional - stringAuthentication Mode.
jobTypeoptional - stringDescribes the type of the job. Valid modes are
Cloudand 'Edge'.outputErrorPolicyoptional - stringIndicates 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).
outputsoptional arraynameoptional - stringResource name
propertiesoptionaldatasourceoptionalserializationoptionalsizeWindowoptional - numberThe size window to constrain a Stream Analytics output to.
timeWindowoptional - stringThe time frame for filtering Stream Analytics job outputs.
outputStartModeoptional - stringThis 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.
outputStartTimeoptional - stringValue 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.
skuoptionalnameoptional - stringThe name of the SKU. Required on PUT (CreateOrReplace) requests.
transformationoptionalnameoptional - stringResource name
propertiesoptionalqueryoptional - stringSpecifies 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.
streamingUnitsoptional - integerSpecifies the number of streaming units that the streaming job uses.
validStreamingUnitsoptional - arraySpecifies the valid streaming units a streaming job can scale to.
tagsoptional - stringResource tags.
typerequired - 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.