swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Use these REST APIs for performing operations on logger entity Azure API Management deployment.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 EventHub.
  title: ApiManagementClient
  version: 2019-12-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimloggers.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: apimanagement-apimloggers
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow.
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters: {}
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers":
    get:
      description: Lists a collection of loggers in the specified service instance.
      externalDocs:
        url: https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-log-event-hubs
      operationId: Logger_ListByService
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: "|   Field     |     Usage     |     Supported operators     |     Supported functions     |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| loggerType | filter | eq |     | </br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>"
          in: query
          name: $filter
          required: false
          type: string
        - description: Number of records to return.
          format: int32
          in: query
          minimum: 1
          name: $top
          required: false
          type: integer
          x-ms-parameter-location: method
        - description: Number of records to skip.
          format: int32
          in: query
          minimum: 0
          name: $skip
          required: false
          type: integer
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: Lists a collection of Logger entities.
          schema:
            description: Paged Logger list representation.
            properties:
              count:
                description: Total record count number across all pages.
                format: int64
                type: integer
              nextLink:
                description: Next page link if any.
                type: string
              value:
                description: Logger values.
                items:
                  allOf:
                    - description: The Resource definition.
                      properties:
                        id:
                          description: Resource ID.
                          readOnly: true
                          type: string
                        name:
                          description: Resource name.
                          readOnly: true
                          type: string
                        type:
                          description: Resource type for API Management resource.
                          readOnly: true
                          type: string
                      x-ms-azure-resource: true
                  description: Logger details.
                  properties:
                    properties:
                      description: 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.
                      properties:
                        credentials:
                          additionalProperties:
                            type: string
                          description: |-
                            The name and SendRule connection string of the event hub for azureEventHub logger.
                            Instrumentation key for applicationInsights logger.
                          example:
                            connectionString: Endpoint=sb://contoso-ns.servicebus.windows.net/;SharedAccessKeyName=Sender;SharedAccessKey=...
                            name: apim
                          type: object
                        description:
                          description: Logger description.
                          maxLength: 256
                          type: string
                        isBuffered:
                          description: Whether records are buffered in the logger before publishing. Default is assumed to be true.
                          type: boolean
                        loggerType:
                          description: Logger type.
                          enum:
                            - azureEventHub
                            - applicationInsights
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: LoggerType
                            values:
                              - description: Azure Event Hub as log destination.
                                value: azureEventHub
                              - description: Azure Application Insights as log destination.
                                value: applicationInsights
                        resourceId:
                          description: Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
                          type: string
                      required:
                        - loggerType
                        - credentials
                type: array
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - Logger
      x-ms-examples:
        ApiManagementListLoggers:
          parameters:
            api-version: 2019-12-01-preview
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/buffered111
                    name: buffered111
                    properties:
                      credentials:
                        connectionString: Endpoint=sb://apimaccounts.servicebus.windows.net/;SharedAccessKeyName=Send;SharedAccessKey=*******************h=****
                      description: Sample description
                      isBuffered: true
                      loggerType: azureEventHub
                      resourceId: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/apimaccounts
                    type: Microsoft.ApiManagement/service/loggers
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/loggerId
                    name: loggerId
                    properties:
                      credentials:
                        connectionString: "{{Logger-Credentials-59544ef2e4bbd50d9468c618}}"
                        name: hydraeventhub
                      description: adding a new logger
                      isBuffered: true
                      loggerType: azureEventHub
                      resourceId: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/hydraeventhub-ns
                    type: Microsoft.ApiManagement/service/loggers
      x-ms-odata: ./definitions.json#/definitions/LoggerContract
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}":
    delete:
      description: Deletes the specified logger.
      operationId: Logger_Delete
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Logger identifier. Must be unique in the API Management service instance.
          in: path
          maxLength: 256
          name: loggerId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
          in: header
          name: If-Match
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Force deletion even if diagnostic is attached.
          in: query
          name: force
          required: false
          type: boolean
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: The logger was successfully deleted.
        "204":
          description: The logger was successfully deleted.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - Logger
      x-ms-examples:
        ApiManagementDeleteLogger:
          parameters:
            If-Match: "*"
            api-version: 2019-12-01-preview
            loggerId: loggerId
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200": {}
            "204": {}
    get:
      description: Gets the details of the logger specified by its identifier.
      operationId: Logger_Get
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Logger identifier. Must be unique in the API Management service instance.
          in: path
          maxLength: 256
          name: loggerId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: The response body contains the specified Logger entity.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Logger details.
            properties:
              properties:
                description: 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.
                properties:
                  credentials:
                    additionalProperties:
                      type: string
                    description: |-
                      The name and SendRule connection string of the event hub for azureEventHub logger.
                      Instrumentation key for applicationInsights logger.
                    example:
                      connectionString: Endpoint=sb://contoso-ns.servicebus.windows.net/;SharedAccessKeyName=Sender;SharedAccessKey=...
                      name: apim
                    type: object
                  description:
                    description: Logger description.
                    maxLength: 256
                    type: string
                  isBuffered:
                    description: Whether records are buffered in the logger before publishing. Default is assumed to be true.
                    type: boolean
                  loggerType:
                    description: Logger type.
                    enum:
                      - azureEventHub
                      - applicationInsights
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: LoggerType
                      values:
                        - description: Azure Event Hub as log destination.
                          value: azureEventHub
                        - description: Azure Application Insights as log destination.
                          value: applicationInsights
                  resourceId:
                    description: Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
                    type: string
                required:
                  - loggerType
                  - credentials
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - Logger
      x-ms-examples:
        ApiManagementGetLogger:
          parameters:
            api-version: 2019-12-01-preview
            loggerId: templateLogger
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/kloudapilogger1
                name: kloudapilogger1
                properties:
                  credentials:
                    connectionString: Endpoint=sb://eventhubapim.servicebus.windows.net/;SharedAccessKeyName=Sender;SharedAccessKey=************
                    name: testeventhub4
                  description: testeventhub3again
                  isBuffered: true
                  loggerType: azureEventHub
                  resourceId: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/eventhubapim
                type: Microsoft.ApiManagement/service/loggers
    head:
      description: Gets the entity state (Etag) version of the logger specified by its identifier.
      operationId: Logger_GetEntityTag
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Logger identifier. Must be unique in the API Management service instance.
          in: path
          maxLength: 256
          name: loggerId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: Specified logger entity exists and current entity state version is present in the ETag header.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - Logger
      x-ms-examples:
        ApiManagementHeadLogger:
          parameters:
            api-version: 2019-12-01-preview
            loggerId: templateLogger
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              headers:
                etag: AAAAAAAAAAa=
    patch:
      description: Updates an existing logger.
      operationId: Logger_Update
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Logger identifier. Must be unique in the API Management service instance.
          in: path
          maxLength: 256
          name: loggerId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Update parameters.
          in: body
          name: parameters
          required: true
          schema:
            description: Logger update contract.
            properties:
              properties:
                description: Parameters supplied to the Update Logger operation.
                properties:
                  credentials:
                    additionalProperties:
                      type: string
                    description: Logger credentials.
                    type: object
                  description:
                    description: Logger description.
                    type: string
                  isBuffered:
                    description: Whether records are buffered in the logger before publishing. Default is assumed to be true.
                    type: boolean
                  loggerType:
                    description: Logger type.
                    enum:
                      - azureEventHub
                      - applicationInsights
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: LoggerType
                      values:
                        - description: Azure Event Hub as log destination.
                          value: azureEventHub
                        - description: Azure Application Insights as log destination.
                          value: applicationInsights
        - description: ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
          in: header
          name: If-Match
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "204":
          description: The existing logger was successfully updated.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - Logger
      x-ms-examples:
        ApiManagementUpdateLogger:
          parameters:
            If-Match: "*"
            api-version: 2019-12-01-preview
            loggerId: loggerId
            parameters:
              properties:
                credentials:
                  connectionString: Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=
                  name: hydraeventhub
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "204": {}
    put:
      description: Creates or Updates a logger.
      operationId: Logger_CreateOrUpdate
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Logger identifier. Must be unique in the API Management service instance.
          in: path
          maxLength: 256
          name: loggerId
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Create parameters.
          in: body
          name: parameters
          required: true
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Logger details.
            properties:
              properties:
                description: 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.
                properties:
                  credentials:
                    additionalProperties:
                      type: string
                    description: |-
                      The name and SendRule connection string of the event hub for azureEventHub logger.
                      Instrumentation key for applicationInsights logger.
                    example:
                      connectionString: Endpoint=sb://contoso-ns.servicebus.windows.net/;SharedAccessKeyName=Sender;SharedAccessKey=...
                      name: apim
                    type: object
                  description:
                    description: Logger description.
                    maxLength: 256
                    type: string
                  isBuffered:
                    description: Whether records are buffered in the logger before publishing. Default is assumed to be true.
                    type: boolean
                  loggerType:
                    description: Logger type.
                    enum:
                      - azureEventHub
                      - applicationInsights
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: LoggerType
                      values:
                        - description: Azure Event Hub as log destination.
                          value: azureEventHub
                        - description: Azure Application Insights as log destination.
                          value: applicationInsights
                  resourceId:
                    description: Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
                    type: string
                required:
                  - loggerType
                  - credentials
        - description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
          in: header
          name: If-Match
          required: false
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: The existing logger was successfully updated.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Logger details.
            properties:
              properties:
                description: 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.
                properties:
                  credentials:
                    additionalProperties:
                      type: string
                    description: |-
                      The name and SendRule connection string of the event hub for azureEventHub logger.
                      Instrumentation key for applicationInsights logger.
                    example:
                      connectionString: Endpoint=sb://contoso-ns.servicebus.windows.net/;SharedAccessKeyName=Sender;SharedAccessKey=...
                      name: apim
                    type: object
                  description:
                    description: Logger description.
                    maxLength: 256
                    type: string
                  isBuffered:
                    description: Whether records are buffered in the logger before publishing. Default is assumed to be true.
                    type: boolean
                  loggerType:
                    description: Logger type.
                    enum:
                      - azureEventHub
                      - applicationInsights
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: LoggerType
                      values:
                        - description: Azure Event Hub as log destination.
                          value: azureEventHub
                        - description: Azure Application Insights as log destination.
                          value: applicationInsights
                  resourceId:
                    description: Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
                    type: string
                required:
                  - loggerType
                  - credentials
        "201":
          description: Logger was successfully created.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Logger details.
            properties:
              properties:
                description: 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.
                properties:
                  credentials:
                    additionalProperties:
                      type: string
                    description: |-
                      The name and SendRule connection string of the event hub for azureEventHub logger.
                      Instrumentation key for applicationInsights logger.
                    example:
                      connectionString: Endpoint=sb://contoso-ns.servicebus.windows.net/;SharedAccessKeyName=Sender;SharedAccessKey=...
                      name: apim
                    type: object
                  description:
                    description: Logger description.
                    maxLength: 256
                    type: string
                  isBuffered:
                    description: Whether records are buffered in the logger before publishing. Default is assumed to be true.
                    type: boolean
                  loggerType:
                    description: Logger type.
                    enum:
                      - azureEventHub
                      - applicationInsights
                    type: string
                    x-ms-enum:
                      modelAsString: true
                      name: LoggerType
                      values:
                        - description: Azure Event Hub as log destination.
                          value: azureEventHub
                        - description: Azure Application Insights as log destination.
                          value: applicationInsights
                  resourceId:
                    description: Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
                    type: string
                required:
                  - loggerType
                  - credentials
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - Logger
      x-ms-examples:
        ApiManagementCreateAILogger:
          parameters:
            api-version: 2019-12-01-preview
            loggerId: loggerId
            parameters:
              properties:
                credentials:
                  instrumentationKey: 11................a1
                description: adding a new logger
                loggerType: applicationInsights
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/loggerId
                name: loggerId
                properties:
                  credentials:
                    instrumentationKey: "{{5a.......2a}}"
                  description: null
                  isBuffered: false
                  loggerType: applicationInsights
                type: Microsoft.ApiManagement/service/loggers
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/loggerId
                name: loggerId
                properties:
                  credentials:
                    instrumentationKey: "{{5a.......2a}}"
                  description: null
                  isBuffered: false
                  loggerType: applicationInsights
                  resourceId: /subscriptions/subid/resourceGroups/rg1/providers/microsoft.insights/components/airesource
                type: Microsoft.ApiManagement/service/loggers
        ApiManagementCreateEHLogger:
          parameters:
            api-version: 2019-12-01-preview
            loggerId: loggerId
            parameters:
              properties:
                credentials:
                  connectionString: Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=
                  name: hydraeventhub
                description: adding a new logger
                loggerType: azureEventHub
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/loggerId
                name: loggerId
                properties:
                  credentials:
                    connectionString: "{{59544ef2e4bbd50d9468c617}}"
                    name: hydraeventhub
                  description: adding a new logger
                  isBuffered: true
                  loggerType: azureEventHub
                  resourceId: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/hydraeventhub-ns
                type: Microsoft.ApiManagement/service/loggers
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/loggerId
                name: loggerId
                properties:
                  credentials:
                    connectionString: "{{59544ef2e4bbd50d9468c617}}"
                    name: hydraeventhub
                  description: adding a new logger
                  isBuffered: true
                  loggerType: azureEventHub
                  resourceId: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/hydraeventhub-ns
                type: Microsoft.ApiManagement/service/loggers
definitions: {}
