Skip to main content

standard_assignments

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

Overview

Namestandard_assignments
TypeResource
Idazure.security.standard_assignments

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
descriptiontextfield from the properties object
assigned_standardtextfield from the properties object
attestation_datatextfield from the properties object
display_nametextfield from the properties object
effecttextfield from the properties object
excluded_scopestextfield from the properties object
exemption_datatextfield from the properties object
expires_ontextfield from the properties object
metadatatextfield from the properties object
resourceIdtextfield from the properties object
scopetextfield from the properties object
standardAssignmentNametextfield from the properties object
typetextResource type

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceId, standardAssignmentNameThis operation retrieves a single standard assignment, given its name and the scope it was created at.
listSELECTscopeGet a list of all relevant standard assignments over a scope
createINSERTresourceId, standardAssignmentNameThis 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.
deleteDELETEresourceId, standardAssignmentNameThis 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

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 }}';

INSERT example

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

/*+ create */
INSERT INTO azure.security.standard_assignments (
resourceId,
standardAssignmentName,
properties
)
SELECT
'{{ resourceId }}',
'{{ standardAssignmentName }}',
'{{ properties }}'
;

DELETE example

Deletes the specified standard_assignments resource.

/*+ delete */
DELETE FROM azure.security.standard_assignments
WHERE resourceId = '{{ resourceId }}'
AND standardAssignmentName = '{{ standardAssignmentName }}';