Skip to main content

api_diagnostics

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

Overview

Nameapi_diagnostics
TypeResource
Idazure.api_management.api_diagnostics

Fields

NameDatatypeDescription
always_logtextfield from the properties object
apiIdtextfield 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
getSELECTapiId, diagnosticId, resourceGroupName, serviceName, subscriptionIdGets the details of the Diagnostic for an API specified by its identifier.
list_by_serviceSELECTapiId, resourceGroupName, serviceName, subscriptionIdLists all diagnostics of an API.
create_or_updateINSERTapiId, diagnosticId, resourceGroupName, serviceName, subscriptionIdCreates a new Diagnostic for an API or updates an existing one.
deleteDELETEIf-Match, apiId, diagnosticId, resourceGroupName, serviceName, subscriptionIdDeletes the specified Diagnostic from an API.
updateUPDATEIf-Match, apiId, diagnosticId, resourceGroupName, serviceName, subscriptionIdUpdates the details of the Diagnostic for an API specified by its identifier.

SELECT examples

Lists all diagnostics of an API.

SELECT
always_log,
apiId,
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_api_diagnostics
WHERE apiId = '{{ apiId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

UPDATE example

Updates a api_diagnostics resource.

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

DELETE example

Deletes the specified api_diagnostics resource.

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