guest_configuration_assignments
Creates, updates, deletes, gets or lists a guest_configuration_assignments resource.
Overview
| Name | guest_configuration_assignments |
| Type | Resource |
| Id | azure.guest_config.guest_configuration_assignments |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | ARM resource id of the guest configuration assignment. |
name | string | Name of the guest configuration assignment. |
assignmentHash | string | Combined hash of the configuration package and parameters. |
complianceStatus | string | A value indicating compliance status of the machine for the assigned guest configuration. Known values are: "Compliant", "NonCompliant", and "Pending". |
context | string | The source which initiated the guest configuration assignment. Ex: Azure Policy. |
guestConfiguration | object | The guest configuration to assign. |
lastComplianceStatusChecked | string (date-time) | Date and time when last compliance status was checked. |
latestAssignmentReport | object | Last reported guest configuration assignment report. |
latestReportId | string | Id of the latest report for the guest configuration assignment. |
location | string | Region where the VM is located. |
parameterHash | string | parameter hash for the guest configuration assignment. |
provisioningState | string | The provisioning state, which only appears in the response. Known values are: "Succeeded", "Failed", "Canceled", and "Created". |
resourceType | string | Type of the resource - VMSS / VM. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetResourceId | string | VM resource Id. |
type | string | The type of the resource. |
vmssVMList | array | The list of VM Compliance data for VMSS. |
| Name | Datatype | Description |
|---|---|---|
id | string | ARM resource id of the guest configuration assignment. |
name | string | Name of the guest configuration assignment. |
assignmentHash | string | Combined hash of the configuration package and parameters. |
complianceStatus | string | A value indicating compliance status of the machine for the assigned guest configuration. Known values are: "Compliant", "NonCompliant", and "Pending". |
context | string | The source which initiated the guest configuration assignment. Ex: Azure Policy. |
guestConfiguration | object | The guest configuration to assign. |
lastComplianceStatusChecked | string (date-time) | Date and time when last compliance status was checked. |
latestAssignmentReport | object | Last reported guest configuration assignment report. |
latestReportId | string | Id of the latest report for the guest configuration assignment. |
location | string | Region where the VM is located. |
parameterHash | string | parameter hash for the guest configuration assignment. |
provisioningState | string | The provisioning state, which only appears in the response. Known values are: "Succeeded", "Failed", "Canceled", and "Created". |
resourceType | string | Type of the resource - VMSS / VM. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetResourceId | string | VM resource Id. |
type | string | The type of the resource. |
vmssVMList | array | The list of VM Compliance data for VMSS. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, guest_configuration_assignment_name, vm_name, subscription_id | Get information about a guest configuration assignment. | |
list | select | resource_group_name, vm_name, subscription_id | List all guest configuration assignments for a virtual machine. | |
create_or_update | insert | guest_configuration_assignment_name, resource_group_name, vm_name, subscription_id | Creates an association between a VM and guest configuration. | |
create_or_update | replace | guest_configuration_assignment_name, resource_group_name, vm_name, subscription_id | Creates an association between a VM and guest configuration. | |
delete | delete | resource_group_name, guest_configuration_assignment_name, vm_name, subscription_id | Delete a guest configuration assignment. | |
subscription_list | exec | subscription_id | List all guest configuration assignments for a subscription. | |
rg_list | exec | resource_group_name, subscription_id | List all guest configuration assignments for a resource group. |
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 |
|---|---|---|
guest_configuration_assignment_name | string | Name of the guest configuration assignment. Required. |
resource_group_name | string | The resource group name. Required. |
subscription_id | string | |
vm_name | string | The name of the virtual machine. Required. |
SELECT examples
- get
- list
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_assignments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND guest_configuration_assignment_name = '{{ guest_configuration_assignment_name }}' -- required
AND vm_name = '{{ vm_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List all guest configuration assignments for a virtual machine.
SELECT
id,
name,
assignmentHash,
complianceStatus,
context,
guestConfiguration,
lastComplianceStatusChecked,
latestAssignmentReport,
latestReportId,
location,
parameterHash,
provisioningState,
resourceType,
systemData,
targetResourceId,
type,
vmssVMList
FROM azure.guest_config.guest_configuration_assignments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND vm_name = '{{ vm_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates an association between a VM and guest configuration.
INSERT INTO azure.guest_config.guest_configuration_assignments (
name,
location,
properties,
guest_configuration_assignment_name,
resource_group_name,
vm_name,
subscription_id
)
SELECT
'{{ name }}',
'{{ location }}',
'{{ properties }}',
'{{ guest_configuration_assignment_name }}',
'{{ resource_group_name }}',
'{{ vm_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: guest_configuration_assignments
props:
- name: guest_configuration_assignment_name
value: "{{ guest_configuration_assignment_name }}"
description: Required parameter for the guest_configuration_assignments resource.
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the guest_configuration_assignments resource.
- name: vm_name
value: "{{ vm_name }}"
description: Required parameter for the guest_configuration_assignments resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the guest_configuration_assignments resource.
- name: name
value: "{{ name }}"
description: |
Name of the guest configuration assignment.
- name: location
value: "{{ location }}"
description: |
Region where the VM is located.
- name: properties
description: |
Properties of the Guest configuration assignment.
value:
targetResourceId: "{{ targetResourceId }}"
guestConfiguration:
kind: "{{ kind }}"
name: "{{ name }}"
version: "{{ version }}"
contentUri: "{{ contentUri }}"
contentHash: "{{ contentHash }}"
assignmentType: "{{ assignmentType }}"
assignmentSource: "{{ assignmentSource }}"
contentType: "{{ contentType }}"
configurationParameter:
- name: "{{ name }}"
value: "{{ value }}"
configurationProtectedParameter:
- name: "{{ name }}"
value: "{{ value }}"
configurationSetting:
configurationMode: "{{ configurationMode }}"
allowModuleOverwrite: {{ allowModuleOverwrite }}
actionAfterReboot: "{{ actionAfterReboot }}"
refreshFrequencyMins: {{ refreshFrequencyMins }}
rebootIfNeeded: {{ rebootIfNeeded }}
configurationModeFrequencyMins: {{ configurationModeFrequencyMins }}
complianceStatus: "{{ complianceStatus }}"
lastComplianceStatusChecked: "{{ lastComplianceStatusChecked }}"
latestReportId: "{{ latestReportId }}"
parameterHash: "{{ parameterHash }}"
latestAssignmentReport:
id: "{{ id }}"
reportId: "{{ reportId }}"
assignment:
name: "{{ name }}"
configuration:
name: "{{ name }}"
version: "{{ version }}"
vm:
id: "{{ id }}"
uuid: "{{ uuid }}"
startTime: "{{ startTime }}"
endTime: "{{ endTime }}"
complianceStatus: "{{ complianceStatus }}"
operationType: "{{ operationType }}"
resources:
- complianceStatus: "{{ complianceStatus }}"
resourceId: "{{ resourceId }}"
reasons: "{{ reasons }}"
properties: "{{ properties }}"
context: "{{ context }}"
assignmentHash: "{{ assignmentHash }}"
provisioningState: "{{ provisioningState }}"
resourceType: "{{ resourceType }}"
vmssVMList:
- vmId: "{{ vmId }}"
vmResourceId: "{{ vmResourceId }}"
complianceStatus: "{{ complianceStatus }}"
latestReportId: "{{ latestReportId }}"
lastComplianceChecked: "{{ lastComplianceChecked }}"
REPLACE examples
- create_or_update
Creates an association between a VM and guest configuration.
REPLACE azure.guest_config.guest_configuration_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 vm_name = '{{ vm_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
type;
DELETE examples
- delete
Delete a guest configuration assignment.
DELETE FROM azure.guest_config.guest_configuration_assignments
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND guest_configuration_assignment_name = '{{ guest_configuration_assignment_name }}' --required
AND vm_name = '{{ vm_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- subscription_list
- rg_list
List all guest configuration assignments for a subscription.
EXEC azure.guest_config.guest_configuration_assignments.subscription_list
@subscription_id='{{ subscription_id }}' --required
;
List all guest configuration assignments for a resource group.
EXEC azure.guest_config.guest_configuration_assignments.rg_list
@resource_group_name='{{ resource_group_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;