Skip to main content

workspace_api_diagnostic

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

Overview

Nameworkspace_api_diagnostic
TypeResource
Idazure.api_management.workspace_api_diagnostic

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.
alwaysLogstringSpecifies for what type of messages sampling settings should not apply. "allErrors" (allErrors)
backendobjectDiagnostic settings for incoming/outgoing HTTP messages to the Backend.
frontendobjectDiagnostic settings for incoming/outgoing HTTP messages to the Gateway.
httpCorrelationProtocolstringSets correlation protocol to use for Application Insights diagnostics. Known values are: "None", "Legacy", and "W3C". (None, Legacy, W3C)
largeLanguageModelobjectLarge Language Models diagnostic settings.
logClientIpbooleanLog the ClientIP. Default is false.
loggerIdstringResource Id of a target logger. Required.
metricsbooleanEmit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.
operationNameFormatstringThe format of the Operation Name for Application Insights telemetries. Default is Name. Known values are: "Name" and "Url". (Name, Url)
samplingobjectSampling settings for Diagnostic.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
verbositystringThe verbosity level applied to traces emitted by trace policies. Known values are: "verbose", "information", and "error". (verbose, information, error)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, service_name, workspace_id, api_id, diagnostic_id, subscription_idGets the details of the Diagnostic for an API specified by its identifier.
list_by_workspaceselectresource_group_name, service_name, workspace_id, api_id, subscription_id$filter, $top, $skipLists all diagnostics of an API.
create_or_updateinsertresource_group_name, service_name, workspace_id, api_id, diagnostic_id, subscription_idCreates a new Diagnostic for an API or updates an existing one.
updateupdateresource_group_name, service_name, workspace_id, api_id, diagnostic_id, subscription_idUpdates the details of the Diagnostic for an API specified by its identifier.
create_or_updatereplaceresource_group_name, service_name, workspace_id, api_id, diagnostic_id, subscription_idCreates a new Diagnostic for an API or updates an existing one.
deletedeleteresource_group_name, service_name, workspace_id, api_id, diagnostic_id, subscription_idDeletes the specified Diagnostic from an API.
get_entity_tagexecresource_group_name, service_name, workspace_id, api_id, diagnostic_id, subscription_idGets the entity state (Etag) version of the Diagnostic for an API specified by its identifier.

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
api_idstringAPI identifier. Must be unique in the current API Management service instance. Required.
diagnostic_idstringDiagnostic identifier. Must be unique in the current API Management service instance. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
service_namestringThe name of the API Management service. Required.
subscription_idstring
workspace_idstringWorkspace identifier. Must be unique in the current API Management service instance. Required.
$filterstring| Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |. Default value is None.
$skipintegerNumber of records to skip. Default value is None.
$topintegerNumber of records to return. Default value is None.

SELECT examples

Gets the details of the Diagnostic for an API specified by its identifier.

SELECT
id,
name,
alwaysLog,
backend,
frontend,
httpCorrelationProtocol,
largeLanguageModel,
logClientIp,
loggerId,
metrics,
operationNameFormat,
sampling,
systemData,
type,
verbosity
FROM azure.api_management.workspace_api_diagnostic
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND workspace_id = '{{ workspace_id }}' -- required
AND api_id = '{{ api_id }}' -- required
AND diagnostic_id = '{{ diagnostic_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new Diagnostic for an API or updates an existing one.

INSERT INTO azure.api_management.workspace_api_diagnostic (
properties,
resource_group_name,
service_name,
workspace_id,
api_id,
diagnostic_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ workspace_id }}',
'{{ api_id }}',
'{{ diagnostic_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Updates the details of the Diagnostic for an API specified by its identifier.

UPDATE azure.api_management.workspace_api_diagnostic
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND api_id = '{{ api_id }}' --required
AND diagnostic_id = '{{ diagnostic_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

REPLACE examples

Creates a new Diagnostic for an API or updates an existing one.

REPLACE azure.api_management.workspace_api_diagnostic
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND api_id = '{{ api_id }}' --required
AND diagnostic_id = '{{ diagnostic_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes the specified Diagnostic from an API.

DELETE FROM azure.api_management.workspace_api_diagnostic
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND api_id = '{{ api_id }}' --required
AND diagnostic_id = '{{ diagnostic_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier.

EXEC azure.api_management.workspace_api_diagnostic.get_entity_tag 
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@workspace_id='{{ workspace_id }}' --required,
@api_id='{{ api_id }}' --required,
@diagnostic_id='{{ diagnostic_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;