standard_assignments
Creates, updates, deletes, gets or lists a standard_assignments
resource.
Overview
Name | standard_assignments |
Type | Resource |
Id | azure.security.standard_assignments |
Fields
- vw_standard_assignments
- standard_assignments
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
description | text | field from the properties object |
assigned_standard | text | field from the properties object |
attestation_data | text | field from the properties object |
display_name | text | field from the properties object |
effect | text | field from the properties object |
excluded_scopes | text | field from the properties object |
exemption_data | text | field from the properties object |
expires_on | text | field from the properties object |
metadata | text | field from the properties object |
resourceId | text | field from the properties object |
scope | text | field from the properties object |
standardAssignmentName | text | field from the properties object |
type | text | Resource type |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
properties | object | Describes the properties of a standardAssignment |
type | string | Resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceId, standardAssignmentName | 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 | resourceId, standardAssignmentName | 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 | resourceId, standardAssignmentName | 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}'. |
SELECT
examples
Get a list of all relevant standard assignments over a scope
- vw_standard_assignments
- standard_assignments
SELECT
id,
name,
description,
assigned_standard,
attestation_data,
display_name,
effect,
excluded_scopes,
exemption_data,
expires_on,
metadata,
resourceId,
scope,
standardAssignmentName,
type
FROM azure.security.vw_standard_assignments
WHERE scope = '{{ scope }}';
SELECT
id,
name,
properties,
type
FROM azure.security.standard_assignments
WHERE scope = '{{ scope }}';
INSERT
example
Use the following StackQL query and manifest file to create a new standard_assignments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.security.standard_assignments (
resourceId,
standardAssignmentName,
properties
)
SELECT
'{{ resourceId }}',
'{{ standardAssignmentName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: displayName
value: string
- name: description
value: string
- name: assignedStandard
value:
- name: id
value: string
- name: effect
value: string
- name: excludedScopes
value:
- string
- name: expiresOn
value: string
- name: exemptionData
value:
- name: exemptionCategory
value: string
- name: assignedAssessment
value:
- name: assessmentKey
value: string
- name: attestationData
value:
- name: complianceState
value: string
- name: complianceDate
value: string
- name: evidence
value:
- - name: description
value: string
- name: sourceUrl
value: string
- name: metadata
value:
- name: createdBy
value: string
- name: createdOn
value: string
- name: lastUpdatedBy
value: string
- name: lastUpdatedOn
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
DELETE
example
Deletes the specified standard_assignments
resource.
/*+ delete */
DELETE FROM azure.security.standard_assignments
WHERE resourceId = '{{ resourceId }}'
AND standardAssignmentName = '{{ standardAssignmentName }}';