Skip to main content

assignments

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

Overview

Nameassignments
TypeResource
Idazure.guest_configuration.assignments

Fields

NameDatatypeDescription
assignment_hashtextfield from the properties object
compliance_statustextfield from the properties object
contexttextfield from the properties object
guestConfigurationAssignmentNametextfield from the properties object
guest_configurationtextfield from the properties object
last_compliance_status_checkedtextfield from the properties object
latest_assignment_reporttextfield from the properties object
latest_report_idtextfield from the properties object
parameter_hashtextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
resource_typetextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
target_resource_idtextfield from the properties object
vmNametextfield from the properties object
vmss_vm_listtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTguestConfigurationAssignmentName, resourceGroupName, subscriptionId, vmNameGet information about a guest configuration assignment
listSELECTresourceGroupName, subscriptionId, vmNameList all guest configuration assignments for a virtual machine.
create_or_updateINSERTguestConfigurationAssignmentName, resourceGroupName, subscriptionId, vmNameCreates an association between a VM and guest configuration
deleteDELETEguestConfigurationAssignmentName, resourceGroupName, subscriptionId, vmNameDelete a guest configuration assignment
rg_listEXECresourceGroupName, subscriptionIdList all guest configuration assignments for a resource group.
subscription_listEXECsubscriptionIdList all guest configuration assignments for a subscription.

SELECT examples

List all guest configuration assignments for a virtual machine.

SELECT
assignment_hash,
compliance_status,
context,
guestConfigurationAssignmentName,
guest_configuration,
last_compliance_status_checked,
latest_assignment_report,
latest_report_id,
parameter_hash,
provisioning_state,
resourceGroupName,
resource_type,
subscriptionId,
system_data,
target_resource_id,
vmName,
vmss_vm_list
FROM azure.guest_configuration.vw_assignments
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vmName = '{{ vmName }}';

INSERT example

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

/*+ create */
INSERT INTO azure.guest_configuration.assignments (
guestConfigurationAssignmentName,
resourceGroupName,
subscriptionId,
vmName,
properties
)
SELECT
'{{ guestConfigurationAssignmentName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vmName }}',
'{{ properties }}'
;

DELETE example

Deletes the specified assignments resource.

/*+ delete */
DELETE FROM azure.guest_configuration.assignments
WHERE guestConfigurationAssignmentName = '{{ guestConfigurationAssignmentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vmName = '{{ vmName }}';