Skip to main content

assignments

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

Overview

Nameassignments
TypeResource
Idazure.blueprints.assignments

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
assignmentNametextfield from the properties object
blueprint_idtextfield from the properties object
display_nametextfield from the properties object
identitytextManaged identity generic object.
locationtextThe location of this blueprint assignment.
lockstextfield from the properties object
parameterstextfield from the properties object
provisioning_statetextfield from the properties object
resourceScopetextfield from the properties object
resource_groupstextfield from the properties object
scopetextfield from the properties object
statustextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTassignmentName, resourceScopeGet a blueprint assignment.
listSELECTresourceScopeList blueprint assignments within a subscription or a management group.
create_or_updateINSERTassignmentName, resourceScope, data__identity, data__propertiesCreate or update a blueprint assignment.
deleteDELETEassignmentName, resourceScopeDelete a blueprint assignment.
who_is_blueprintEXECassignmentName, resourceScopeGet Blueprints service SPN objectId

SELECT examples

List blueprint assignments within a subscription or a management group.

SELECT
description,
assignmentName,
blueprint_id,
display_name,
identity,
location,
locks,
parameters,
provisioning_state,
resourceScope,
resource_groups,
scope,
status
FROM azure.blueprints.vw_assignments
WHERE resourceScope = '{{ resourceScope }}';

INSERT example

Use the following StackQL query and manifest file to create a new assignments resource.

/*+ create */
INSERT INTO azure.blueprints.assignments (
assignmentName,
resourceScope,
data__identity,
data__properties,
identity,
properties,
location
)
SELECT
'{{ assignmentName }}',
'{{ resourceScope }}',
'{{ data__identity }}',
'{{ data__properties }}',
'{{ identity }}',
'{{ properties }}',
'{{ location }}'
;

DELETE example

Deletes the specified assignments resource.

/*+ delete */
DELETE FROM azure.blueprints.assignments
WHERE assignmentName = '{{ assignmentName }}'
AND resourceScope = '{{ resourceScope }}';