openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 48.5 kB
JSON
{"openapi":"3.0.0","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":"2019-12-01-preview","x-apisguru-categories":["cloud"],"x-logo":{"url":"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/apimdiagnostics.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"apimanagement-apimdiagnostics","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"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,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"ApiManagementListDiagnostics":{"value":"rg1"}}},{"description":"The name of the API Management service.","in":"path","name":"serviceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"},"examples":{"ApiManagementListDiagnostics":{"value":"apimService1"}}},{"description":"| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>","in":"query","name":"$filter","required":false,"schema":{"type":"string"}},{"description":"Number of records to return.","in":"query","name":"$top","required":false,"x-ms-parameter-location":"method","schema":{"type":"integer","format":"int32","minimum":1}},{"description":"Number of records to skip.","in":"query","name":"$skip","required":false,"x-ms-parameter-location":"method","schema":{"type":"integer","format":"int32","minimum":0}},{"description":"Version of the API to be used with the client request.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"ApiManagementListDiagnostics":{"value":"2019-12-01-preview"}}},{"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,"schema":{"type":"string"},"examples":{"ApiManagementListDiagnostics":{"value":"subid"}}}],"responses":{"200":{"description":"Paged Result response of diagnostics.","content":{"application/json":{"schema":{"description":"Paged Diagnostic list representation.","properties":{"nextLink":{"description":"Next page link if any.","type":"string"},"value":{"description":"Page 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":"Diagnostic details.","properties":{"properties":{"description":"Diagnostic Entity Properties","properties":{"alwaysLog":{"description":"Specifies for what type of messages sampling settings should not apply.","enum":["allErrors"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"AlwaysLog","values":[{"description":"Always log all erroneous request regardless of sampling settings.","value":"allErrors"}]}},"backend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"frontend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"httpCorrelationProtocol":{"description":"Sets correlation protocol to use for Application Insights diagnostics.","enum":["None","Legacy","W3C"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"HttpCorrelationProtocol","values":[{"description":"Do not read and inject correlation headers.","value":"None"},{"description":"Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.","value":"Legacy"},{"description":"Inject Trace Context headers. See https://w3c.github.io/trace-context.","value":"W3C"}]}},"logClientIp":{"description":"Log the ClientIP. Default is false.","type":"boolean"},"loggerId":{"description":"Resource Id of a target logger.","type":"string"},"sampling":{"description":"Sampling settings for Diagnostic.","properties":{"percentage":{"description":"Rate of sampling for fixed-rate sampling.","format":"double","maximum":100,"minimum":0,"type":"number"},"samplingType":{"description":"Sampling type.","enum":["fixed"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"SamplingType","values":[{"description":"Fixed-rate sampling.","value":"fixed"}]}}}},"verbosity":{"description":"The verbosity level applied to traces emitted by trace policies.","enum":["verbose","information","error"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Verbosity","values":[{"description":"All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.","value":"verbose"},{"description":"Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance.","value":"information"},{"description":"Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance.","value":"error"}]}}},"required":["loggerId"]}}},"type":"array"}}},"examples":{"ApiManagementListDiagnostics":{"$ref":"#/components/examples/ApiManagementListDiagnostics"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"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":["Diagnostic"],"x-ms-odata":"./definitions.json#/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,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"ApiManagementDeleteDiagnostic":{"value":"rg1"}}},{"description":"The name of the API Management service.","in":"path","name":"serviceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"},"examples":{"ApiManagementDeleteDiagnostic":{"value":"apimService1"}}},{"description":"Diagnostic identifier. Must be unique in the current API Management service instance.","in":"path","name":"diagnosticId","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^*#&+:<>?]+$"},"examples":{"ApiManagementDeleteDiagnostic":{"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,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"ApiManagementDeleteDiagnostic":{"value":"*"}}},{"description":"Version of the API to be used with the client request.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"ApiManagementDeleteDiagnostic":{"value":"2019-12-01-preview"}}},{"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,"schema":{"type":"string"},"examples":{"ApiManagementDeleteDiagnostic":{"value":"subid"}}}],"responses":{"200":{"description":"The Diagnostic was successfully deleted."},"204":{"description":"The Diagnostic was successfully deleted."},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"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":["Diagnostic"]},"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,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"ApiManagementGetDiagnostic":{"value":"rg1"}}},{"description":"The name of the API Management service.","in":"path","name":"serviceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"},"examples":{"ApiManagementGetDiagnostic":{"value":"apimService1"}}},{"description":"Diagnostic identifier. Must be unique in the current API Management service instance.","in":"path","name":"diagnosticId","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^*#&+:<>?]+$"},"examples":{"ApiManagementGetDiagnostic":{"value":"applicationinsights"}}},{"description":"Version of the API to be used with the client request.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"ApiManagementGetDiagnostic":{"value":"2019-12-01-preview"}}},{"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,"schema":{"type":"string"},"examples":{"ApiManagementGetDiagnostic":{"value":"subid"}}}],"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.","schema":{"type":"string"}}},"content":{"application/json":{"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":"Diagnostic details.","properties":{"properties":{"description":"Diagnostic Entity Properties","properties":{"alwaysLog":{"description":"Specifies for what type of messages sampling settings should not apply.","enum":["allErrors"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"AlwaysLog","values":[{"description":"Always log all erroneous request regardless of sampling settings.","value":"allErrors"}]}},"backend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"frontend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"httpCorrelationProtocol":{"description":"Sets correlation protocol to use for Application Insights diagnostics.","enum":["None","Legacy","W3C"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"HttpCorrelationProtocol","values":[{"description":"Do not read and inject correlation headers.","value":"None"},{"description":"Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.","value":"Legacy"},{"description":"Inject Trace Context headers. See https://w3c.github.io/trace-context.","value":"W3C"}]}},"logClientIp":{"description":"Log the ClientIP. Default is false.","type":"boolean"},"loggerId":{"description":"Resource Id of a target logger.","type":"string"},"sampling":{"description":"Sampling settings for Diagnostic.","properties":{"percentage":{"description":"Rate of sampling for fixed-rate sampling.","format":"double","maximum":100,"minimum":0,"type":"number"},"samplingType":{"description":"Sampling type.","enum":["fixed"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"SamplingType","values":[{"description":"Fixed-rate sampling.","value":"fixed"}]}}}},"verbosity":{"description":"The verbosity level applied to traces emitted by trace policies.","enum":["verbose","information","error"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Verbosity","values":[{"description":"All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.","value":"verbose"},{"description":"Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance.","value":"information"},{"description":"Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance.","value":"error"}]}}},"required":["loggerId"]}}},"examples":{"ApiManagementGetDiagnostic":{"$ref":"#/components/examples/ApiManagementGetDiagnostic"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"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":["Diagnostic"]},"head":{"description":"Gets the entity state (Etag) version of the Diagnostic specified by its identifier.","operationId":"Diagnostic_GetEntityTag","parameters":[{"description":"The name of the resource group.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"ApiManagementHeadDiagnostic":{"value":"rg1"}}},{"description":"The name of the API Management service.","in":"path","name":"serviceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"},"examples":{"ApiManagementHeadDiagnostic":{"value":"apimService1"}}},{"description":"Diagnostic identifier. Must be unique in the current API Management service instance.","in":"path","name":"diagnosticId","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^*#&+:<>?]+$"},"examples":{"ApiManagementHeadDiagnostic":{"value":"applicationinsights"}}},{"description":"Version of the API to be used with the client request.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"ApiManagementHeadDiagnostic":{"value":"2019-12-01-preview"}}},{"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,"schema":{"type":"string"},"examples":{"ApiManagementHeadDiagnostic":{"value":"subid"}}}],"responses":{"200":{"description":"Gets the entity tag of the diagnostic","headers":{"ETag":{"description":"Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.","schema":{"type":"string"}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"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":["Diagnostic"]},"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,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"ApiManagementUpdateDiagnostic":{"value":"rg1"}}},{"description":"The name of the API Management service.","in":"path","name":"serviceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"},"examples":{"ApiManagementUpdateDiagnostic":{"value":"apimService1"}}},{"description":"Diagnostic identifier. Must be unique in the current API Management service instance.","in":"path","name":"diagnosticId","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^*#&+:<>?]+$"},"examples":{"ApiManagementUpdateDiagnostic":{"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,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"ApiManagementUpdateDiagnostic":{"value":"*"}}},{"description":"Version of the API to be used with the client request.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"ApiManagementUpdateDiagnostic":{"value":"2019-12-01-preview"}}},{"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,"schema":{"type":"string"},"examples":{"ApiManagementUpdateDiagnostic":{"value":"subid"}}}],"requestBody":{"content":{"application/json":{"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":"Diagnostic details.","properties":{"properties":{"description":"Diagnostic Entity Properties","properties":{"alwaysLog":{"description":"Specifies for what type of messages sampling settings should not apply.","enum":["allErrors"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"AlwaysLog","values":[{"description":"Always log all erroneous request regardless of sampling settings.","value":"allErrors"}]}},"backend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"frontend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"httpCorrelationProtocol":{"description":"Sets correlation protocol to use for Application Insights diagnostics.","enum":["None","Legacy","W3C"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"HttpCorrelationProtocol","values":[{"description":"Do not read and inject correlation headers.","value":"None"},{"description":"Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.","value":"Legacy"},{"description":"Inject Trace Context headers. See https://w3c.github.io/trace-context.","value":"W3C"}]}},"logClientIp":{"description":"Log the ClientIP. Default is false.","type":"boolean"},"loggerId":{"description":"Resource Id of a target logger.","type":"string"},"sampling":{"description":"Sampling settings for Diagnostic.","properties":{"percentage":{"description":"Rate of sampling for fixed-rate sampling.","format":"double","maximum":100,"minimum":0,"type":"number"},"samplingType":{"description":"Sampling type.","enum":["fixed"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"SamplingType","values":[{"description":"Fixed-rate sampling.","value":"fixed"}]}}}},"verbosity":{"description":"The verbosity level applied to traces emitted by trace policies.","enum":["verbose","information","error"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Verbosity","values":[{"description":"All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.","value":"verbose"},{"description":"Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance.","value":"information"},{"description":"Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance.","value":"error"}]}}},"required":["loggerId"]}}}}},"description":"Diagnostic Update parameters.","required":true},"responses":{"204":{"description":"The Diagnostic was successfully updated."},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"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":["Diagnostic"]},"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,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"ApiManagementCreateDiagnostic":{"value":"rg1"}}},{"description":"The name of the API Management service.","in":"path","name":"serviceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"},"examples":{"ApiManagementCreateDiagnostic":{"value":"apimService1"}}},{"description":"Diagnostic identifier. Must be unique in the current API Management service instance.","in":"path","name":"diagnosticId","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^*#&+:<>?]+$"},"examples":{"ApiManagementCreateDiagnostic":{"value":"applicationinsights"}}},{"description":"ETag of the Entity. Not required when creating an entity, but required when updating an entity.","in":"header","name":"If-Match","required":false,"x-ms-parameter-location":"method","schema":{"type":"string"}},{"description":"Version of the API to be used with the client request.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"ApiManagementCreateDiagnostic":{"value":"2019-12-01-preview"}}},{"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,"schema":{"type":"string"},"examples":{"ApiManagementCreateDiagnostic":{"value":"subid"}}}],"requestBody":{"content":{"application/json":{"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":"Diagnostic details.","properties":{"properties":{"description":"Diagnostic Entity Properties","properties":{"alwaysLog":{"description":"Specifies for what type of messages sampling settings should not apply.","enum":["allErrors"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"AlwaysLog","values":[{"description":"Always log all erroneous request regardless of sampling settings.","value":"allErrors"}]}},"backend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"frontend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"httpCorrelationProtocol":{"description":"Sets correlation protocol to use for Application Insights diagnostics.","enum":["None","Legacy","W3C"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"HttpCorrelationProtocol","values":[{"description":"Do not read and inject correlation headers.","value":"None"},{"description":"Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.","value":"Legacy"},{"description":"Inject Trace Context headers. See https://w3c.github.io/trace-context.","value":"W3C"}]}},"logClientIp":{"description":"Log the ClientIP. Default is false.","type":"boolean"},"loggerId":{"description":"Resource Id of a target logger.","type":"string"},"sampling":{"description":"Sampling settings for Diagnostic.","properties":{"percentage":{"description":"Rate of sampling for fixed-rate sampling.","format":"double","maximum":100,"minimum":0,"type":"number"},"samplingType":{"description":"Sampling type.","enum":["fixed"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"SamplingType","values":[{"description":"Fixed-rate sampling.","value":"fixed"}]}}}},"verbosity":{"description":"The verbosity level applied to traces emitted by trace policies.","enum":["verbose","information","error"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Verbosity","values":[{"description":"All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.","value":"verbose"},{"description":"Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance.","value":"information"},{"description":"Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance.","value":"error"}]}}},"required":["loggerId"]}}}}},"description":"Create parameters.","required":true},"responses":{"200":{"description":"Diagnostic successfully updated","headers":{"ETag":{"description":"Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.","schema":{"type":"string"}}},"content":{"application/json":{"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":"Diagnostic details.","properties":{"properties":{"description":"Diagnostic Entity Properties","properties":{"alwaysLog":{"description":"Specifies for what type of messages sampling settings should not apply.","enum":["allErrors"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"AlwaysLog","values":[{"description":"Always log all erroneous request regardless of sampling settings.","value":"allErrors"}]}},"backend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"frontend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"httpCorrelationProtocol":{"description":"Sets correlation protocol to use for Application Insights diagnostics.","enum":["None","Legacy","W3C"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"HttpCorrelationProtocol","values":[{"description":"Do not read and inject correlation headers.","value":"None"},{"description":"Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.","value":"Legacy"},{"description":"Inject Trace Context headers. See https://w3c.github.io/trace-context.","value":"W3C"}]}},"logClientIp":{"description":"Log the ClientIP. Default is false.","type":"boolean"},"loggerId":{"description":"Resource Id of a target logger.","type":"string"},"sampling":{"description":"Sampling settings for Diagnostic.","properties":{"percentage":{"description":"Rate of sampling for fixed-rate sampling.","format":"double","maximum":100,"minimum":0,"type":"number"},"samplingType":{"description":"Sampling type.","enum":["fixed"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"SamplingType","values":[{"description":"Fixed-rate sampling.","value":"fixed"}]}}}},"verbosity":{"description":"The verbosity level applied to traces emitted by trace policies.","enum":["verbose","information","error"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Verbosity","values":[{"description":"All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.","value":"verbose"},{"description":"Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance.","value":"information"},{"description":"Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance.","value":"error"}]}}},"required":["loggerId"]}}},"examples":{"ApiManagementCreateDiagnostic":{"$ref":"#/components/examples/ApiManagementCreateDiagnostic"}}}}},"201":{"description":"Diagnostic was successfully created.","headers":{"ETag":{"description":"Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.","schema":{"type":"string"}}},"content":{"application/json":{"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":"Diagnostic details.","properties":{"properties":{"description":"Diagnostic Entity Properties","properties":{"alwaysLog":{"description":"Specifies for what type of messages sampling settings should not apply.","enum":["allErrors"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"AlwaysLog","values":[{"description":"Always log all erroneous request regardless of sampling settings.","value":"allErrors"}]}},"backend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"frontend":{"description":"Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.","properties":{"request":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}},"response":{"description":"Http message diagnostic settings.","properties":{"body":{"description":"Body logging settings.","properties":{"bytes":{"description":"Number of request body bytes to log.","format":"int32","maximum":8192,"type":"integer"}}},"headers":{"description":"Array of HTTP Headers to log.","items":{"type":"string"},"type":"array"}}}}},"httpCorrelationProtocol":{"description":"Sets correlation protocol to use for Application Insights diagnostics.","enum":["None","Legacy","W3C"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"HttpCorrelationProtocol","values":[{"description":"Do not read and inject correlation headers.","value":"None"},{"description":"Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.","value":"Legacy"},{"description":"Inject Trace Context headers. See https://w3c.github.io/trace-context.","value":"W3C"}]}},"logClientIp":{"description":"Log the ClientIP. Default is false.","type":"boolean"},"loggerId":{"description":"Resource Id of a target logger.","type":"string"},"sampling":{"description":"Sampling settings for Diagnostic.","properties":{"percentage":{"description":"Rate of sampling for fixed-rate sampling.","format":"double","maximum":100,"minimum":0,"type":"number"},"samplingType":{"description":"Sampling type.","enum":["fixed"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"SamplingType","values":[{"description":"Fixed-rate sampling.","value":"fixed"}]}}}},"verbosity":{"description":"The verbosity level applied to traces emitted by trace policies.","enum":["verbose","information","error"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Verbosity","values":[{"description":"All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.","value":"verbose"},{"description":"Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance.","value":"information"},{"description":"Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance.","value":"error"}]}}},"required":["loggerId"]}}},"examples":{"ApiManagementCreateDiagnostic":{"$ref":"#/components/examples/ApiManagementCreateDiagnostic"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"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":["Diagnostic"]}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"ApiManagementListDiagnostics":{"value":{"value":[{"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/applicationinsights","name":"applicationinsights","properties":{"alwaysLog":"allErrors","backend":{"request":{"body":{"bytes":0},"headers":[]},"response":{"body":{"bytes":0},"headers":[]}},"frontend":{"request":{"body":{"bytes":0},"headers":[]},"response":{"body":{"bytes":0},"headers":[]}},"httpCorrelationProtocol":"Legacy","logClientIp":true,"loggerId":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest","sampling":{"percentage":100,"samplingType":"fixed"},"verbosity":"information"},"type":"Microsoft.ApiManagement/service/diagnostics"},{"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/azuremonitor","name":"azuremonitor","properties":{"logClientIp":true,"loggerId":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/azuremonitor","sampling":{"percentage":100,"samplingType":"fixed"}},"type":"Microsoft.ApiManagement/service/diagnostics"}]}},"ApiManagementGetDiagnostic":{"value":{"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/applicationinsights","name":"applicationinsights","properties":{"alwaysLog":"allErrors","backend":{"request":{"body":{"bytes":100},"headers":[]},"response":{"body":{"bytes":100},"headers":[]}},"frontend":{"request":{"body":{"bytes":100},"headers":[]},"response":{"body":{"bytes":100},"headers":[]}},"httpCorrelationProtocol":"Legacy","logClientIp":true,"loggerId":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest","sampling":{"percentage":100,"samplingType":"fixed"}},"type":"Microsoft.ApiManagement/service/diagnostics"}},"ApiManagementCreateDiagnostic":{"value":{"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/applicationinsights","name":"applicationinsights","properties":{"alwaysLog":"allErrors","backend":{"request":{"body":{"bytes":512},"headers":["Content-type"]},"response":{"body":{"bytes":512},"headers":["Content-type"]}},"frontend":{"request":{"body":{"bytes":512},"headers":["Content-type"]},"response":{"body":{"bytes":512},"headers":["Content-type"]}},"loggerId":"/loggers/azuremonitor","sampling":{"percentage":50,"samplingType":"fixed"}},"type":"Microsoft.ApiManagement/service/diagnostics"}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow.","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}}}}