Skip to main content

clusters

Creates, updates, deletes, gets or lists a clusters resource.

Overview

Nameclusters
TypeResource
Idazure.stream_analytics.clusters

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
capacityAllocatedintegerRepresents the number of streaming units currently being used on the cluster.
capacityAssignedintegerRepresents the sum of the SUs of all streaming jobs associated with the cluster. If all of the jobs were running, this would be the capacity allocated.
clusterIdstringUnique identifier for the cluster.
createdDatestring (date-time)The date this cluster was created.
etagstringThe current entity tag for the cluster. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency.
locationstringThe geo-location where the resource lives.
provisioningStatestringThe status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled. Known values are: "Succeeded", "Failed", "Canceled", and "InProgress".
skuobjectThe SKU of the cluster. This determines the size/capacity of the cluster. Required on PUT (CreateOrUpdate) requests.
tagsobjectResource tags.
typestringThe type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, cluster_name, subscription_idGets information about the specified cluster.
list_by_resource_groupselectresource_group_name, subscription_idLists all of the clusters in the given resource group.
list_by_subscriptionselectsubscription_idLists all of the clusters in the given subscription.
create_or_updateinsertresource_group_name, cluster_name, subscription_idIf-Match, If-None-MatchCreates a Stream Analytics Cluster or replaces an already existing cluster.
updateupdateresource_group_name, cluster_name, subscription_idIf-MatchUpdates an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition.
create_or_updatereplaceresource_group_name, cluster_name, subscription_idIf-Match, If-None-MatchCreates a Stream Analytics Cluster or replaces an already existing cluster.
deletedeleteresource_group_name, cluster_name, subscription_idDeletes the specified cluster.
list_streaming_jobsexecresource_group_name, cluster_name, subscription_idLists all of the streaming jobs in the given cluster.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
cluster_namestringThe name of the cluster. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
If-MatchstringThe ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. Default value is None.
If-None-MatchstringSet to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response. Default value is None.

SELECT examples

Gets information about the specified cluster.

SELECT
id,
name,
capacityAllocated,
capacityAssigned,
clusterId,
createdDate,
etag,
location,
provisioningState,
sku,
tags,
type
FROM azure.stream_analytics.clusters
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a Stream Analytics Cluster or replaces an already existing cluster.

INSERT INTO azure.stream_analytics.clusters (
tags,
location,
sku,
properties,
resource_group_name,
cluster_name,
subscription_id,
If-Match,
If-None-Match
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ sku }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ cluster_name }}',
'{{ subscription_id }}',
'{{ If-Match }}',
'{{ If-None-Match }}'
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type
;

UPDATE examples

Updates an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition.

UPDATE azure.stream_analytics.clusters
SET
tags = '{{ tags }}',
location = '{{ location }}',
sku = '{{ sku }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type;

REPLACE examples

Creates a Stream Analytics Cluster or replaces an already existing cluster.

REPLACE azure.stream_analytics.clusters
SET
tags = '{{ tags }}',
location = '{{ location }}',
sku = '{{ sku }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
AND If-None-Match = '{{ If-None-Match}}'
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type;

DELETE examples

Deletes the specified cluster.

DELETE FROM azure.stream_analytics.clusters
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Lists all of the streaming jobs in the given cluster.

EXEC azure.stream_analytics.clusters.list_streaming_jobs 
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;