standard_assignments
Creates, updates, deletes, gets or lists a standard_assignments resource.
Overview
| Name | standard_assignments |
| Type | Resource |
| Id | azure.security.standard_assignments |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
assignedStandard | object | Standard item with key as applied to this standard assignment over the given scope. |
attestationData | object | Additional data about assignment that has Attest effect. |
description | string | Description of the standardAssignment. |
displayName | string | Display name of the standardAssignment. |
effect | string | Expected effect of this assignment (Audit/Exempt/Attest). Known values are: "Audit", "Exempt", and "Attest". (Audit, Exempt, Attest) |
excludedScopes | array | Excluded scopes, filter out the descendants of the scope (on management scopes). |
exemptionData | object | Additional data about assignment that has Exempt effect. |
expiresOn | string (date-time) | Expiration date of this assignment as a full ISO date. |
metadata | object | The standard assignment metadata. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
assignedStandard | object | Standard item with key as applied to this standard assignment over the given scope. |
attestationData | object | Additional data about assignment that has Attest effect. |
description | string | Description of the standardAssignment. |
displayName | string | Display name of the standardAssignment. |
effect | string | Expected effect of this assignment (Audit/Exempt/Attest). Known values are: "Audit", "Exempt", and "Attest". (Audit, Exempt, Attest) |
excludedScopes | array | Excluded scopes, filter out the descendants of the scope (on management scopes). |
exemptionData | object | Additional data about assignment that has Exempt effect. |
expiresOn | string (date-time) | Expiration date of this assignment as a full ISO date. |
metadata | object | The standard assignment metadata. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_id, standard_assignment_name | Retrieves a standard assignment. This operation retrieves a single standard assignment, given its name and the scope it was created at. | |
list | select | scope | Get a list of all relevant standard assignments over a scope. | |
create | insert | resource_id, standard_assignment_name | Creates or updates a standard assignment. This operation creates or updates a standard assignment with the given scope and name. standard assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group. | |
delete | delete | resource_id, standard_assignment_name | Deletes a standard assignment. This operation deletes a standard assignment, given its name and the scope it was created in. The scope of a standard assignment is the part of its ID preceding '/providers/Microsoft.Security/standardAssignments/{standardAssignmentName}'. |
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 |
|---|---|---|
resource_id | string | The fully qualified Azure Resource manager identifier of the resource. Required. |
scope | string | The fully qualified Azure Resource manager identifier of the resource. Required. |
standard_assignment_name | string | The standard assignments assignment key - unique key for the standard assignment. Required. |
SELECT examples
- get
- list
Retrieves a standard assignment. This operation retrieves a single standard assignment, given its name and the scope it was created at.
SELECT
id,
name,
assignedStandard,
attestationData,
description,
displayName,
effect,
excludedScopes,
exemptionData,
expiresOn,
metadata,
systemData,
type
FROM azure.security.standard_assignments
WHERE resource_id = '{{ resource_id }}' -- required
AND standard_assignment_name = '{{ standard_assignment_name }}' -- required
;
Get a list of all relevant standard assignments over a scope.
SELECT
id,
name,
assignedStandard,
attestationData,
description,
displayName,
effect,
excludedScopes,
exemptionData,
expiresOn,
metadata,
systemData,
type
FROM azure.security.standard_assignments
WHERE scope = '{{ scope }}' -- required
;
INSERT examples
- create
- Manifest
Creates or updates a standard assignment. This operation creates or updates a standard assignment with the given scope and name. standard assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.
INSERT INTO azure.security.standard_assignments (
properties,
resource_id,
standard_assignment_name
)
SELECT
'{{ properties }}',
'{{ resource_id }}',
'{{ standard_assignment_name }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: standard_assignments
props:
- name: resource_id
value: "{{ resource_id }}"
description: Required parameter for the standard_assignments resource.
- name: standard_assignment_name
value: "{{ standard_assignment_name }}"
description: Required parameter for the standard_assignments resource.
- name: properties
description: |
Properties of a standard assignments assignment.
value:
displayName: "{{ displayName }}"
description: "{{ description }}"
assignedStandard:
id: "{{ id }}"
effect: "{{ effect }}"
excludedScopes:
- "{{ excludedScopes }}"
expiresOn: "{{ expiresOn }}"
exemptionData:
exemptionCategory: "{{ exemptionCategory }}"
assignedAssessment:
assessmentKey: "{{ assessmentKey }}"
attestationData:
complianceState: "{{ complianceState }}"
assignedAssessment:
assessmentKey: "{{ assessmentKey }}"
complianceDate: "{{ complianceDate }}"
evidence:
- description: "{{ description }}"
sourceUrl: "{{ sourceUrl }}"
metadata:
createdBy: "{{ createdBy }}"
createdOn: "{{ createdOn }}"
lastUpdatedBy: "{{ lastUpdatedBy }}"
lastUpdatedOn: "{{ lastUpdatedOn }}"
DELETE examples
- delete
Deletes a standard assignment. This operation deletes a standard assignment, given its name and the scope it was created in. The scope of a standard assignment is the part of its ID preceding '/providers/Microsoft.Security/standardAssignments/{standardAssignmentName}'.
DELETE FROM azure.security.standard_assignments
WHERE resource_id = '{{ resource_id }}' --required
AND standard_assignment_name = '{{ standard_assignment_name }}' --required
;