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

The following fields are returned by SELECT queries:

Returns information about the standard assignment.

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
propertiesobjectProperties of a standard assignments assignment
systemDataobjectMetadata pertaining to creation and last modification of the resource.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectstandardAssignmentNameresourceIdThis 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
createinsertstandardAssignmentNameresourceId 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.
deletedeletestandardAssignmentNameresourceIdThis 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.

NameDatatypeDescription
scopestringThe scope of the standard assignment. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'
standardAssignmentNamestringThe standard assignments assignment key - unique key for the standard assignment
resourceIdstringOptional filter for listing the assignments of a specific resource.

SELECT examples

This operation retrieves a single standard assignment, given its name and the scope it was created at.

SELECT
id,
name,
properties,
systemData,
type
FROM azure.security.standard_assignments
WHERE standardAssignmentName = '{{ standardAssignmentName }}' -- required
AND resourceId = '{{ resourceId }}'
;

INSERT examples

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 (
data__properties,
standardAssignmentName,
resourceId
)
SELECT
'{{ properties }}',
'{{ standardAssignmentName }}',
'{{ resourceId }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

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 standardAssignmentName = '{{ standardAssignmentName }}' --required
AND resourceId = '{{ resourceId }}'
;