Skip to main content

diagnostics

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

Overview

Namediagnostics
TypeResource
Idazure.api_management.diagnostics

Fields

NameDatatypeDescription
always_logtextfield from the properties object
backendtextfield from the properties object
diagnosticIdtextfield from the properties object
frontendtextfield from the properties object
http_correlation_protocoltextfield from the properties object
log_client_iptextfield from the properties object
logger_idtextfield from the properties object
metricstextfield from the properties object
operation_name_formattextfield from the properties object
resourceGroupNametextfield from the properties object
samplingtextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object
verbositytextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdiagnosticId, resourceGroupName, serviceName, subscriptionIdGets the details of the Diagnostic specified by its identifier.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdLists all diagnostics of the API Management service instance.
create_or_updateINSERTdiagnosticId, resourceGroupName, serviceName, subscriptionIdCreates a new Diagnostic or updates an existing one.
deleteDELETEIf-Match, diagnosticId, resourceGroupName, serviceName, subscriptionIdDeletes the specified Diagnostic.
updateUPDATEIf-Match, diagnosticId, resourceGroupName, serviceName, subscriptionIdUpdates the details of the Diagnostic specified by its identifier.

SELECT examples

Lists all diagnostics of the API Management service instance.

SELECT
always_log,
backend,
diagnosticId,
frontend,
http_correlation_protocol,
log_client_ip,
logger_id,
metrics,
operation_name_format,
resourceGroupName,
sampling,
serviceName,
subscriptionId,
verbosity
FROM azure.api_management.vw_diagnostics
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.api_management.diagnostics (
diagnosticId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ diagnosticId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

UPDATE example

Updates a diagnostics resource.

/*+ update */
UPDATE azure.api_management.diagnostics
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND diagnosticId = '{{ diagnosticId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified diagnostics resource.

/*+ delete */
DELETE FROM azure.api_management.diagnostics
WHERE If-Match = '{{ If-Match }}'
AND diagnosticId = '{{ diagnosticId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';