loggers
Creates, updates, deletes, gets or lists a loggers resource.
Overview
| Name | loggers |
| Type | Resource |
| Id | azure.api_management.loggers |
Fields
- vw_loggers
- loggers
| Name | Datatype | Description |
|---|---|---|
description | text | field from the properties object |
credentials | text | field from the properties object |
is_buffered | text | field from the properties object |
loggerId | text | field from the properties object |
logger_type | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resource_id | text | field from the properties object |
serviceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
| Name | Datatype | Description |
|---|---|---|
properties | object | The Logger entity in API Management represents an event sink that you can use to log API Management events. Currently the Logger entity supports logging API Management events to Azure Event Hubs. |
Methods
| Name | Accessible by | Required Params | Description |
|---|---|---|---|
get | SELECT | loggerId, resourceGroupName, serviceName, subscriptionId | Gets the details of the logger specified by its identifier. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Lists a collection of loggers in the specified service instance. |
create_or_update | INSERT | loggerId, resourceGroupName, serviceName, subscriptionId | Creates or Updates a logger. |
delete | DELETE | If-Match, loggerId, resourceGroupName, serviceName, subscriptionId | Deletes the specified logger. |
update | UPDATE | If-Match, loggerId, resourceGroupName, serviceName, subscriptionId | Updates an existing logger. |
SELECT examples
Lists a collection of loggers in the specified service instance.
- vw_loggers
- loggers
SELECT
description,
credentials,
is_buffered,
loggerId,
logger_type,
resourceGroupName,
resource_id,
serviceName,
subscriptionId
FROM azure.api_management.vw_loggers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.loggers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT example
Use the following StackQL query and manifest file to create a new loggers resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.loggers (
loggerId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ loggerId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: loggerType
value: string
- name: description
value: string
- name: credentials
value: object
- name: isBuffered
value: boolean
- name: resourceId
value: string
UPDATE example
Updates a loggers resource.
/*+ update */
UPDATE azure.api_management.loggers
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND loggerId = '{{ loggerId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE example
Deletes the specified loggers resource.
/*+ delete */
DELETE FROM azure.api_management.loggers
WHERE If-Match = '{{ If-Match }}'
AND loggerId = '{{ loggerId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';