Skip to main content

database_blob_auditing_policies

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

Overview

Namedatabase_blob_auditing_policies
TypeResource
Idazure.sql.database_blob_auditing_policies

Fields

NameDatatypeDescription
audit_actions_and_groupstextfield from the properties object
blobAuditingPolicyNametextfield from the properties object
databaseNametextfield from the properties object
is_azure_monitor_target_enabledtextfield from the properties object
is_managed_identity_in_usetextfield from the properties object
is_storage_secondary_key_in_usetextfield from the properties object
kindtextResource kind.
queue_delay_mstextfield from the properties object
resourceGroupNametextfield from the properties object
retention_daystextfield from the properties object
serverNametextfield from the properties object
statetextfield from the properties object
storage_account_access_keytextfield from the properties object
storage_account_subscription_idtextfield from the properties object
storage_endpointtextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTblobAuditingPolicyName, databaseName, resourceGroupName, serverName, subscriptionIdGets a database's blob auditing policy.
list_by_databaseSELECTdatabaseName, resourceGroupName, serverName, subscriptionIdLists auditing settings of a database.
create_or_updateINSERTblobAuditingPolicyName, databaseName, resourceGroupName, serverName, subscriptionIdCreates or updates a database's blob auditing policy.

SELECT examples

Lists auditing settings of a database.

SELECT
audit_actions_and_groups,
blobAuditingPolicyName,
databaseName,
is_azure_monitor_target_enabled,
is_managed_identity_in_use,
is_storage_secondary_key_in_use,
kind,
queue_delay_ms,
resourceGroupName,
retention_days,
serverName,
state,
storage_account_access_key,
storage_account_subscription_id,
storage_endpoint,
subscriptionId
FROM azure.sql.vw_database_blob_auditing_policies
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql.database_blob_auditing_policies (
blobAuditingPolicyName,
databaseName,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ blobAuditingPolicyName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;