Skip to main content

guest_configuration_hcrp_assignments

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

Overview

Nameguest_configuration_hcrp_assignments
TypeResource
Idazure.guest_config.guest_configuration_hcrp_assignments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringARM resource id of the guest configuration assignment.
namestringName of the guest configuration assignment.
assignmentHashstringCombined hash of the configuration package and parameters.
complianceStatusstringA value indicating compliance status of the machine for the assigned guest configuration. Known values are: "Compliant", "NonCompliant", and "Pending".
contextstringThe source which initiated the guest configuration assignment. Ex: Azure Policy.
guestConfigurationobjectThe guest configuration to assign.
lastComplianceStatusCheckedstring (date-time)Date and time when last compliance status was checked.
latestAssignmentReportobjectLast reported guest configuration assignment report.
latestReportIdstringId of the latest report for the guest configuration assignment.
locationstringRegion where the VM is located.
parameterHashstringparameter hash for the guest configuration assignment.
provisioningStatestringThe provisioning state, which only appears in the response. Known values are: "Succeeded", "Failed", "Canceled", and "Created".
resourceTypestringType of the resource - VMSS / VM.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
targetResourceIdstringVM resource Id.
typestringThe type of the resource.
vmssVMListarrayThe list of VM Compliance data for VMSS.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, guest_configuration_assignment_name, machine_name, subscription_idGet information about a guest configuration assignment.
listselectresource_group_name, machine_name, subscription_idList all guest configuration assignments for an ARC machine.
create_or_updateinsertguest_configuration_assignment_name, resource_group_name, machine_name, subscription_idCreates an association between a ARC machine and guest configuration.
create_or_updatereplaceguest_configuration_assignment_name, resource_group_name, machine_name, subscription_idCreates an association between a ARC machine and guest configuration.
deletedeleteresource_group_name, guest_configuration_assignment_name, machine_name, subscription_idDelete a guest configuration assignment.

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
guest_configuration_assignment_namestringName of the guest configuration assignment. Required.
machine_namestringThe name of the ARC machine. Required.
resource_group_namestringThe resource group name. Required.
subscription_idstring

SELECT examples

Get information about a guest configuration assignment.

SELECT
id,
name,
assignmentHash,
complianceStatus,
context,
guestConfiguration,
lastComplianceStatusChecked,
latestAssignmentReport,
latestReportId,
location,
parameterHash,
provisioningState,
resourceType,
systemData,
targetResourceId,
type,
vmssVMList
FROM azure.guest_config.guest_configuration_hcrp_assignments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND guest_configuration_assignment_name = '{{ guest_configuration_assignment_name }}' -- required
AND machine_name = '{{ machine_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates an association between a ARC machine and guest configuration.

INSERT INTO azure.guest_config.guest_configuration_hcrp_assignments (
name,
location,
properties,
guest_configuration_assignment_name,
resource_group_name,
machine_name,
subscription_id
)
SELECT
'{{ name }}',
'{{ location }}',
'{{ properties }}',
'{{ guest_configuration_assignment_name }}',
'{{ resource_group_name }}',
'{{ machine_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
type
;

REPLACE examples

Creates an association between a ARC machine and guest configuration.

REPLACE azure.guest_config.guest_configuration_hcrp_assignments
SET
name = '{{ name }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
guest_configuration_assignment_name = '{{ guest_configuration_assignment_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND machine_name = '{{ machine_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
type;

DELETE examples

Delete a guest configuration assignment.

DELETE FROM azure.guest_config.guest_configuration_hcrp_assignments
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND guest_configuration_assignment_name = '{{ guest_configuration_assignment_name }}' --required
AND machine_name = '{{ machine_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;