{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Use these REST APIs for performing operations on Diagnostic entity associated with your Azure API Management deployment. Diagnostics are used to log requests/responses in the APIM proxy.",
    "title": "ApiManagementClient",
    "version": "2017-03-01",
    "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/stable/2017-03-01/apimdiagnostics.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "apimanagement-apimdiagnostics",
    "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": {
    "DiagnosticIdParameter": {
      "description": "Diagnostic identifier. Must be unique in the current API Management service instance.",
      "in": "path",
      "maxLength": 256,
      "minLength": 1,
      "name": "diagnosticId",
      "pattern": "^[^*#&+:<>?]+$",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics": {
      "get": {
        "description": "Lists all diagnostics of the API Management service instance.",
        "operationId": "Diagnostic_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": "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"
          },
          {
            "description": "| Field       | Supported operators    | Supported functions               |\n|-------------|------------------------|-----------------------------------|\n| id          | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |",
            "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"
          }
        ],
        "responses": {
          "200": {
            "description": "Paged Result response of diagnostics.",
            "schema": {
              "$ref": "#/definitions/DiagnosticCollection"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "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": [
          "Diagnostics"
        ],
        "x-ms-examples": {
          "ApiManagementListDiagnostics": {
            "parameters": {
              "api-version": "2017-03-01",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": "",
                  "value": [
                    {
                      "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/default",
                      "name": "default",
                      "properties": {
                        "enabled": false
                      },
                      "type": "Microsoft.ApiManagement/service/diagnostics"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-odata": "#/definitions/DiagnosticContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}": {
      "delete": {
        "description": "Deletes the specified Diagnostic.",
        "operationId": "Diagnostic_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"
          },
          {
            "$ref": "#/parameters/DiagnosticIdParameter"
          },
          {
            "description": "ETag of the Diagnostic 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"
          },
          {
            "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 Diagnostic was successfully deleted."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "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": [
          "Diagnostics"
        ],
        "x-ms-examples": {
          "ApiManagementDeleteDiagnostic": {
            "parameters": {
              "If-Match": "*",
              "api-version": "2017-03-01",
              "diagnosticId": "default",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "204": {}
            }
          }
        }
      },
      "get": {
        "description": "Gets the details of the Diagnostic specified by its identifier.",
        "operationId": "Diagnostic_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"
          },
          {
            "$ref": "#/parameters/DiagnosticIdParameter"
          },
          {
            "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 Diagnostic entity.",
            "headers": {
              "ETag": {
                "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/DiagnosticContract"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "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": [
          "Diagnostics"
        ],
        "x-ms-examples": {
          "ApiManagementGetDiagnostic": {
            "parameters": {
              "api-version": "2017-03-01",
              "diagnosticId": "default",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/default",
                  "name": "default",
                  "properties": {
                    "enabled": false
                  },
                  "type": "Microsoft.ApiManagement/service/diagnostics"
                }
              }
            }
          }
        }
      },
      "head": {
        "description": "Gets the entity state (Etag) version of the Diagnostic specified by its identifier.",
        "operationId": "Diagnostic_Head",
        "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"
          },
          {
            "$ref": "#/parameters/DiagnosticIdParameter"
          },
          {
            "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": "Operation completed successfully.",
            "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 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": [
          "Diagnostics"
        ],
        "x-ms-examples": {
          "ApiManagementHeadDiagnostic": {
            "parameters": {
              "api-version": "2017-03-01",
              "diagnosticId": "default",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "headers": {
                  "etag": "AAAAAAAAAAa="
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Updates the details of the Diagnostic specified by its identifier.",
        "operationId": "Diagnostic_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"
          },
          {
            "$ref": "#/parameters/DiagnosticIdParameter"
          },
          {
            "description": "Diagnostic Update parameters.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DiagnosticContract"
            }
          },
          {
            "description": "ETag of the Diagnostic 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"
          },
          {
            "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 Diagnostic was successfully updated."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "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": [
          "Diagnostics"
        ],
        "x-ms-examples": {
          "ApiManagementUpdateDiagnostic": {
            "parameters": {
              "If-Match": "*",
              "api-version": "2017-03-01",
              "diagnosticId": "default",
              "parameters": {
                "properties": {
                  "enabled": false
                }
              },
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "204": {}
            }
          }
        }
      },
      "put": {
        "description": "Creates a new Diagnostic or updates an existing one.",
        "operationId": "Diagnostic_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"
          },
          {
            "$ref": "#/parameters/DiagnosticIdParameter"
          },
          {
            "description": "Create parameters.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DiagnosticContract"
            }
          },
          {
            "description": "ETag of the Diagnostic 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": false,
            "type": "string"
          },
          {
            "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": "Diagnostic was successfully updated.",
            "schema": {
              "$ref": "#/definitions/DiagnosticContract"
            }
          },
          "201": {
            "description": "Diagnostic was successfully created.",
            "schema": {
              "$ref": "#/definitions/DiagnosticContract"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "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": [
          "Diagnostics"
        ],
        "x-ms-examples": {
          "ApiManagementCreateDiagnostic": {
            "parameters": {
              "api-version": "2017-03-01",
              "diagnosticId": "default",
              "parameters": {
                "properties": {
                  "enabled": true
                }
              },
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/default",
                  "name": "default",
                  "properties": {
                    "enabled": true
                  },
                  "type": "Microsoft.ApiManagement/service/diagnostics"
                }
              },
              "201": {
                "body": {
                  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/default",
                  "name": "default",
                  "properties": {
                    "enabled": true
                  },
                  "type": "Microsoft.ApiManagement/service/diagnostics"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers": {
      "get": {
        "description": "Lists all loggers associated with the specified Diagnostic of the API Management service instance.",
        "operationId": "DiagnosticLogger_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": "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"
          },
          {
            "$ref": "#/parameters/DiagnosticIdParameter"
          },
          {
            "description": "| Field       | Supported operators    | Supported functions               |\n|-------------|------------------------|-----------------------------------|\n| id          | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |\n| type        | eq                     |                                   |",
            "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"
          }
        ],
        "responses": {
          "200": {
            "description": "Paged Result response of loggers assigned to the specified Diagnostic.",
            "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.\nInstrumentation 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"
                                }
                              ]
                            }
                          },
                          "sampling": {
                            "description": "Sampling settings contract.",
                            "properties": {
                              "properties": {
                                "description": "Sampling settings for an ApplicationInsights logger.",
                                "properties": {
                                  "evaluationInterval": {
                                    "description": "Rate re-evaluation interval in ISO8601 format.",
                                    "format": "duration",
                                    "maxLength": 2000,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "initialPercentage": {
                                    "description": "Initial sampling rate.",
                                    "format": "double",
                                    "type": "number"
                                  },
                                  "maxPercentage": {
                                    "description": "Maximum allowed rate of sampling.",
                                    "format": "double",
                                    "type": "number"
                                  },
                                  "maxTelemetryItemsPerSecond": {
                                    "description": "Target rate of telemetry items per second.",
                                    "format": "int32",
                                    "type": "integer"
                                  },
                                  "minPercentage": {
                                    "description": "Minimum allowed rate of sampling.",
                                    "format": "double",
                                    "type": "number"
                                  },
                                  "movingAverageRatio": {
                                    "description": "Moving average ration assigned to most recent value.",
                                    "format": "double",
                                    "type": "number"
                                  },
                                  "percentage": {
                                    "description": "Rate of sampling for fixed-rate sampling.",
                                    "format": "double",
                                    "type": "number"
                                  },
                                  "percentageDecreaseTimeout": {
                                    "description": "Duration in ISO8601 format after which it's allowed to lower the sampling rate.",
                                    "format": "duration",
                                    "maxLength": 2000,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "percentageIncreaseTimeout": {
                                    "description": "Duration in ISO8601 format after which it's allowed to increase the sampling rate.",
                                    "format": "duration",
                                    "maxLength": 2000,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "samplingType": {
                                    "description": "Sampling type.",
                                    "enum": [
                                      "fixed",
                                      "adaptive"
                                    ],
                                    "type": "string",
                                    "x-ms-enum": {
                                      "modelAsString": true,
                                      "name": "SamplingType",
                                      "values": [
                                        {
                                          "description": "Fixed-rate sampling.",
                                          "value": "fixed"
                                        },
                                        {
                                          "description": "Sampling with a dynamically adjustable rate.",
                                          "value": "adaptive"
                                        }
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "required": [
                          "loggerType",
                          "credentials"
                        ]
                      }
                    }
                  },
                  "type": "array"
                }
              }
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "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": [
          "DiagnosticLoggers"
        ],
        "x-ms-examples": {
          "ApiManagementListDiagnosticLoggers": {
            "parameters": {
              "api-version": "2017-03-01",
              "diagnosticId": "default",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": "",
                  "value": [
                    {
                      "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/default/loggers/applicationinsights",
                      "name": "applicationinsights",
                      "properties": {
                        "credentials": {
                          "instrumentationKey": "{{5a.......2a}}"
                        },
                        "description": null,
                        "isBuffered": false,
                        "loggerType": "applicationInsights"
                      },
                      "type": "Microsoft.ApiManagement/service/diagnostics/loggers"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-odata": "./apimloggers.json#/definitions/LoggerContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}": {
      "delete": {
        "description": "Deletes the specified Logger from Diagnostic.",
        "operationId": "DiagnosticLogger_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"
          },
          {
            "$ref": "#/parameters/DiagnosticIdParameter"
          },
          {
            "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": {
          "204": {
            "description": "The Logger was successfully detached from Diagnostic."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "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": [
          "DiagnosticLoggers"
        ],
        "x-ms-examples": {
          "ApiManagementDeleteDiagnosticLogger": {
            "parameters": {
              "api-version": "2017-03-01",
              "diagnosticId": "default",
              "loggerid": "applicationinsights",
              "parameters": {},
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "204": {}
            }
          }
        }
      },
      "head": {
        "description": "Checks that logger entity specified by identifier is associated with the diagnostics entity.",
        "operationId": "DiagnosticLogger_CheckEntityExists",
        "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"
          },
          {
            "$ref": "#/parameters/DiagnosticIdParameter"
          },
          {
            "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": {
          "204": {
            "description": "Entity exists"
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "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": [
          "DiagnosticLoggers"
        ],
        "x-ms-examples": {
          "ApiManagementHeadDiagnosticLogger": {
            "parameters": {
              "api-version": "2017-03-01",
              "diagnosticId": "default",
              "loggerid": "templateLogger",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "204": {}
            }
          }
        }
      },
      "put": {
        "description": "Attaches a logger to a diagnostic.",
        "operationId": "DiagnosticLogger_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"
          },
          {
            "$ref": "#/parameters/DiagnosticIdParameter"
          },
          {
            "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": "Logger to Diagnostic link was successfully updated.",
            "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.\nInstrumentation 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"
                          }
                        ]
                      }
                    },
                    "sampling": {
                      "description": "Sampling settings contract.",
                      "properties": {
                        "properties": {
                          "description": "Sampling settings for an ApplicationInsights logger.",
                          "properties": {
                            "evaluationInterval": {
                              "description": "Rate re-evaluation interval in ISO8601 format.",
                              "format": "duration",
                              "maxLength": 2000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "initialPercentage": {
                              "description": "Initial sampling rate.",
                              "format": "double",
                              "type": "number"
                            },
                            "maxPercentage": {
                              "description": "Maximum allowed rate of sampling.",
                              "format": "double",
                              "type": "number"
                            },
                            "maxTelemetryItemsPerSecond": {
                              "description": "Target rate of telemetry items per second.",
                              "format": "int32",
                              "type": "integer"
                            },
                            "minPercentage": {
                              "description": "Minimum allowed rate of sampling.",
                              "format": "double",
                              "type": "number"
                            },
                            "movingAverageRatio": {
                              "description": "Moving average ration assigned to most recent value.",
                              "format": "double",
                              "type": "number"
                            },
                            "percentage": {
                              "description": "Rate of sampling for fixed-rate sampling.",
                              "format": "double",
                              "type": "number"
                            },
                            "percentageDecreaseTimeout": {
                              "description": "Duration in ISO8601 format after which it's allowed to lower the sampling rate.",
                              "format": "duration",
                              "maxLength": 2000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "percentageIncreaseTimeout": {
                              "description": "Duration in ISO8601 format after which it's allowed to increase the sampling rate.",
                              "format": "duration",
                              "maxLength": 2000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "samplingType": {
                              "description": "Sampling type.",
                              "enum": [
                                "fixed",
                                "adaptive"
                              ],
                              "type": "string",
                              "x-ms-enum": {
                                "modelAsString": true,
                                "name": "SamplingType",
                                "values": [
                                  {
                                    "description": "Fixed-rate sampling.",
                                    "value": "fixed"
                                  },
                                  {
                                    "description": "Sampling with a dynamically adjustable rate.",
                                    "value": "adaptive"
                                  }
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "loggerType",
                    "credentials"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Logger was successfully attached to Diagnostic.",
            "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.\nInstrumentation 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"
                          }
                        ]
                      }
                    },
                    "sampling": {
                      "description": "Sampling settings contract.",
                      "properties": {
                        "properties": {
                          "description": "Sampling settings for an ApplicationInsights logger.",
                          "properties": {
                            "evaluationInterval": {
                              "description": "Rate re-evaluation interval in ISO8601 format.",
                              "format": "duration",
                              "maxLength": 2000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "initialPercentage": {
                              "description": "Initial sampling rate.",
                              "format": "double",
                              "type": "number"
                            },
                            "maxPercentage": {
                              "description": "Maximum allowed rate of sampling.",
                              "format": "double",
                              "type": "number"
                            },
                            "maxTelemetryItemsPerSecond": {
                              "description": "Target rate of telemetry items per second.",
                              "format": "int32",
                              "type": "integer"
                            },
                            "minPercentage": {
                              "description": "Minimum allowed rate of sampling.",
                              "format": "double",
                              "type": "number"
                            },
                            "movingAverageRatio": {
                              "description": "Moving average ration assigned to most recent value.",
                              "format": "double",
                              "type": "number"
                            },
                            "percentage": {
                              "description": "Rate of sampling for fixed-rate sampling.",
                              "format": "double",
                              "type": "number"
                            },
                            "percentageDecreaseTimeout": {
                              "description": "Duration in ISO8601 format after which it's allowed to lower the sampling rate.",
                              "format": "duration",
                              "maxLength": 2000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "percentageIncreaseTimeout": {
                              "description": "Duration in ISO8601 format after which it's allowed to increase the sampling rate.",
                              "format": "duration",
                              "maxLength": 2000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "samplingType": {
                              "description": "Sampling type.",
                              "enum": [
                                "fixed",
                                "adaptive"
                              ],
                              "type": "string",
                              "x-ms-enum": {
                                "modelAsString": true,
                                "name": "SamplingType",
                                "values": [
                                  {
                                    "description": "Fixed-rate sampling.",
                                    "value": "fixed"
                                  },
                                  {
                                    "description": "Sampling with a dynamically adjustable rate.",
                                    "value": "adaptive"
                                  }
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "loggerType",
                    "credentials"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "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": [
          "DiagnosticLoggers"
        ],
        "x-ms-examples": {
          "ApiManagementCreateDiagnosticLogger": {
            "parameters": {
              "api-version": "2017-03-01",
              "diagnosticId": "default",
              "loggerid": "applicationinsights",
              "parameters": {},
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/default/loggers/applicationinsights",
                  "name": "applicationinsights",
                  "properties": {
                    "credentials": {
                      "instrumentationKey": "{{5a.......2a}}"
                    },
                    "description": null,
                    "isBuffered": false,
                    "loggerType": "applicationInsights"
                  },
                  "type": "Microsoft.ApiManagement/service/diagnostics/loggers"
                }
              },
              "201": {
                "body": {
                  "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/default/loggers/applicationinsights",
                  "name": "applicationinsights",
                  "properties": {
                    "credentials": {
                      "instrumentationKey": "{{5a.......2a}}"
                    },
                    "description": null,
                    "isBuffered": false,
                    "loggerType": "applicationInsights"
                  },
                  "type": "Microsoft.ApiManagement/service/diagnostics/loggers"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "DiagnosticCollection": {
      "description": "Paged Diagnostic list representation.",
      "properties": {
        "nextLink": {
          "description": "Next page link if any.",
          "type": "string"
        },
        "value": {
          "description": "Page values.",
          "items": {
            "$ref": "#/definitions/DiagnosticContract"
          },
          "type": "array"
        }
      }
    },
    "DiagnosticContract": {
      "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": "Diagnostic details.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/DiagnosticContractProperties",
          "description": "Diagnostic entity contract properties.",
          "x-ms-client-flatten": true
        }
      }
    },
    "DiagnosticContractProperties": {
      "description": "Diagnostic Entity Properties",
      "properties": {
        "enabled": {
          "description": "Indicates whether a diagnostic should receive data or not.",
          "type": "boolean"
        }
      },
      "required": [
        "enabled"
      ]
    }
  }
}