diagnostics
Creates, updates, deletes, gets or lists a diagnostics
resource.
Overview
Name | diagnostics |
Type | Resource |
Id | azure.api_management.diagnostics |
Fields
- vw_diagnostics
- diagnostics
Name | Datatype | Description |
---|---|---|
always_log | text | field from the properties object |
backend | text | field from the properties object |
diagnosticId | text | field from the properties object |
frontend | text | field from the properties object |
http_correlation_protocol | text | field from the properties object |
log_client_ip | text | field from the properties object |
logger_id | text | field from the properties object |
metrics | text | field from the properties object |
operation_name_format | text | field from the properties object |
resourceGroupName | text | field from the properties object |
sampling | text | field from the properties object |
serviceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
verbosity | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Diagnostic Entity Properties |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | diagnosticId, resourceGroupName, serviceName, subscriptionId | Gets the details of the Diagnostic specified by its identifier. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Lists all diagnostics of the API Management service instance. |
create_or_update | INSERT | diagnosticId, resourceGroupName, serviceName, subscriptionId | Creates a new Diagnostic or updates an existing one. |
delete | DELETE | If-Match, diagnosticId, resourceGroupName, serviceName, subscriptionId | Deletes the specified Diagnostic. |
update | UPDATE | If-Match, diagnosticId, resourceGroupName, serviceName, subscriptionId | Updates the details of the Diagnostic specified by its identifier. |
SELECT
examples
Lists all diagnostics of the API Management service instance.
- vw_diagnostics
- diagnostics
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 }}';
SELECT
properties
FROM azure.api_management.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.diagnostics (
diagnosticId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ diagnosticId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: alwaysLog
value: string
- name: loggerId
value: string
- name: sampling
value:
- name: samplingType
value: string
- name: percentage
value: number
- name: frontend
value:
- name: request
value:
- name: headers
value:
- string
- name: body
value:
- name: bytes
value: integer
- name: dataMasking
value:
- name: queryParams
value:
- - name: value
value: string
- name: mode
value: string
- name: headers
value:
- - name: value
value: string
- name: mode
value: string
- name: logClientIp
value: boolean
- name: httpCorrelationProtocol
value: string
- name: verbosity
value: string
- name: operationNameFormat
value: string
- name: metrics
value: boolean
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 }}';