Skip to main content

attestations

Creates, updates, deletes, gets or lists an attestations resource.

Overview

Nameattestations
TypeResource
Idazure.policy_insights.attestations

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.
assessmentDatestring (date-time)The time the evidence was assessed.
commentsstringComments describing why this attestation was created.
complianceStatestringThe compliance state that should be set on the resource. Known values are: "Compliant", "NonCompliant", and "Unknown". (Compliant, NonCompliant, Unknown)
evidencearrayThe evidence supporting the compliance state set in this attestation.
expiresOnstring (date-time)The time the compliance state should expire.
lastComplianceStateChangeAtstring (date-time)The time the compliance state was last changed in this attestation.
metadataobjectAdditional metadata for this attestation.
ownerstringThe person responsible for setting the state of the resource. This value is typically an Azure Active Directory object ID.
policyAssignmentIdstringThe resource ID of the policy assignment that the attestation is setting the state for. Required.
policyDefinitionReferenceIdstringThe policy definition reference ID from a policy set definition that the attestation is setting the state for. If the policy assignment assigns a policy set definition the attestation can choose a definition within the set definition with this property or omit this and set the state for the entire set definition.
provisioningStatestringThe status of the attestation.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
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
get_at_resource_groupselectresource_group_name, attestation_name, subscription_idGets an existing attestation at resource group scope.
list_for_resource_groupselectresource_group_name, subscription_id$top, $filterGets all attestations for the resource group.
get_at_subscriptionselectattestation_name, subscription_idGets an existing attestation at subscription scope.
get_at_resourceselectresource_id, attestation_nameGets an existing attestation at resource scope.
list_for_subscriptionselectsubscription_id$top, $filterGets all attestations for the subscription.
list_for_resourceselectresource_id$top, $filterGets all attestations for a resource.
create_or_update_at_resource_groupinsertresource_group_name, attestation_name, subscription_id, propertiesCreates or updates an attestation at resource group scope.
create_or_update_at_subscriptioninsertattestation_name, subscription_id, propertiesCreates or updates an attestation at subscription scope.
create_or_update_at_resourceinsertresource_id, attestation_name, propertiesCreates or updates an attestation at resource scope.
create_or_update_at_resource_groupreplaceresource_group_name, attestation_name, subscription_id, propertiesCreates or updates an attestation at resource group scope.
create_or_update_at_subscriptionreplaceattestation_name, subscription_id, propertiesCreates or updates an attestation at subscription scope.
create_or_update_at_resourcereplaceresource_id, attestation_name, propertiesCreates or updates an attestation at resource scope.
delete_at_resource_groupdeleteresource_group_name, attestation_name, subscription_idDeletes an existing attestation at resource group scope.
delete_at_subscriptiondeleteattestation_name, subscription_idDeletes an existing attestation at subscription scope.
delete_at_resourcedeleteresource_id, attestation_nameDeletes an existing attestation at individual resource 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
attestation_namestringThe name of the attestation. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_idstringResource ID. Required.
subscription_idstring
$filterstringOData filter expression. Default value is None.
$topintegerMaximum number of records to return. Default value is None.

SELECT examples

Gets an existing attestation at resource group scope.

SELECT
id,
name,
assessmentDate,
comments,
complianceState,
evidence,
expiresOn,
lastComplianceStateChangeAt,
metadata,
owner,
policyAssignmentId,
policyDefinitionReferenceId,
provisioningState,
systemData,
type
FROM azure.policy_insights.attestations
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND attestation_name = '{{ attestation_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates an attestation at resource group scope.

INSERT INTO azure.policy_insights.attestations (
properties,
resource_group_name,
attestation_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ attestation_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Creates or updates an attestation at resource group scope.

REPLACE azure.policy_insights.attestations
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND attestation_name = '{{ attestation_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes an existing attestation at resource group scope.

DELETE FROM azure.policy_insights.attestations
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND attestation_name = '{{ attestation_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;