assignments
Creates, updates, deletes, gets or lists an assignments resource.
Overview
| Name | assignments |
| Type | Resource |
| Id | azure.blueprints.assignments |
Fields
The following fields are returned by SELECT queries:
- get
- list
OK -- blueprint assignment retrieved.
| Name | Datatype | Description |
|---|---|---|
identity | object | Managed identity for this blueprint assignment. |
location | string | The geo-location where the resource lives |
properties | object | Properties for blueprint assignment object. |
tags | object | Resource tags. |
OK -- all blueprint assignments retrieved.
| Name | Datatype | Description |
|---|---|---|
identity | object | Managed identity for this blueprint assignment. |
location | string | The geo-location where the resource lives |
properties | object | Properties for blueprint assignment object. |
tags | object | Resource tags. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resourceScope, assignmentName | Get a blueprint assignment. | |
list | select | resourceScope | List blueprint assignments within a subscription or a management group. | |
create_or_update | insert | resourceScope, assignmentName, data__identity, data__properties | Create or update a blueprint assignment. | |
delete | delete | resourceScope, assignmentName | deleteBehavior | Delete a blueprint assignment. |
who_is_blueprint | exec | resourceScope, assignmentName | Get Blueprints service SPN objectId |
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.
| Name | Datatype | Description |
|---|---|---|
assignmentName | string | Name of the blueprint assignment. |
resourceScope | string | The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'). |
deleteBehavior | string | When deleteBehavior=all, the resources that were created by the blueprint assignment will be deleted. |
SELECT examples
- get
- list
Get a blueprint assignment.
SELECT
identity,
location,
properties,
tags
FROM azure.blueprints.assignments
WHERE resourceScope = '{{ resourceScope }}' -- required
AND assignmentName = '{{ assignmentName }}' -- required
;
List blueprint assignments within a subscription or a management group.
SELECT
identity,
location,
properties,
tags
FROM azure.blueprints.assignments
WHERE resourceScope = '{{ resourceScope }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create or update a blueprint assignment.
INSERT INTO azure.blueprints.assignments (
data__identity,
data__properties,
data__tags,
data__location,
resourceScope,
assignmentName
)
SELECT
'{{ identity }}' /* required */,
'{{ properties }}' /* required */,
'{{ tags }}',
'{{ location }}',
'{{ resourceScope }}',
'{{ assignmentName }}'
RETURNING
identity,
location,
properties,
tags
;
# Description fields are for documentation purposes
- name: assignments
props:
- name: resourceScope
value: string
description: Required parameter for the assignments resource.
- name: assignmentName
value: string
description: Required parameter for the assignments resource.
- name: identity
value: object
description: |
Managed identity for this blueprint assignment.
- name: properties
value: object
description: |
Properties for blueprint assignment object.
- name: tags
value: object
description: |
Resource tags.
- name: location
value: string
description: |
The geo-location where the resource lives
DELETE examples
- delete
Delete a blueprint assignment.
DELETE FROM azure.blueprints.assignments
WHERE resourceScope = '{{ resourceScope }}' --required
AND assignmentName = '{{ assignmentName }}' --required
AND deleteBehavior = '{{ deleteBehavior }}'
;
Lifecycle Methods
- who_is_blueprint
Get Blueprints service SPN objectId
EXEC azure.blueprints.assignments.who_is_blueprint
@resourceScope='{{ resourceScope }}' --required,
@assignmentName='{{ assignmentName }}' --required
;