Skip to main content

standards

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

Overview

Namestandards
TypeResource
Idazure.security.standards

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
categorystringcategory of the standard provided.
componentsarrayList of component objects containing component unique keys (such as assessment keys) to apply to standard scope. Currently only supports assessment keys.
descriptionstringdescription of the standard.
displayNamestringdisplay name of the standard, equivalent to the standardId.
etagstringEntity tag is used for comparing two or more entities from the same requested resource.
kindstringKind of the resource.
locationstringThe geo-location where the resource lives.
standardTypestringstandard type (Custom or BuiltIn only currently).
supportedCloudsarrayList of all standard supported clouds.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
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
getselectresource_group_name, standard_id, subscription_idGet a specific security standard for the requested scope.
listselectresource_group_name, subscription_idGet security standards on all your resources inside a scope.
list_by_subscriptionselectsubscription_idGet a list of all relevant security standards over a subscription level scope.
create_or_updateinsertresource_group_name, standard_id, subscription_idCreate a security standard on the given scope. Available only for custom standards. Will create/update the required standard definitions.
create_or_updatereplaceresource_group_name, standard_id, subscription_idCreate a security standard on the given scope. Available only for custom standards. Will create/update the required standard definitions.
deletedeleteresource_group_name, standard_id, subscription_idDelete a security standard on a scope.

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
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
standard_idstringThe Security Standard key - unique key for the standard type. Required.
subscription_idstring

SELECT examples

Get a specific security standard for the requested scope.

SELECT
id,
name,
category,
components,
description,
displayName,
etag,
kind,
location,
standardType,
supportedClouds,
systemData,
tags,
type
FROM azure.security.standards
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND standard_id = '{{ standard_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a security standard on the given scope. Available only for custom standards. Will create/update the required standard definitions.

INSERT INTO azure.security.standards (
properties,
tags,
location,
kind,
etag,
resource_group_name,
standard_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ kind }}',
'{{ etag }}',
'{{ resource_group_name }}',
'{{ standard_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
kind,
location,
properties,
systemData,
tags,
type
;

REPLACE examples

Create a security standard on the given scope. Available only for custom standards. Will create/update the required standard definitions.

REPLACE azure.security.standards
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
location = '{{ location }}',
kind = '{{ kind }}',
etag = '{{ etag }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND standard_id = '{{ standard_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
kind,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete a security standard on a scope.

DELETE FROM azure.security.standards
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND standard_id = '{{ standard_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;