{ "swagger": "2.0", "info": { "title": "MonitorManagementClient", "version": "2016-03-01", "description": "Monitor Management Client", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "LogProfiles" } ], "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles": { "get": { "operationId": "LogProfiles_List", "tags": [ "LogProfiles" ], "description": "List the log profiles.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/LogProfileCollection" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, "x-ms-examples": { "List log profiles": { "$ref": "./examples/listLogProfile.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}": { "get": { "operationId": "LogProfiles_Get", "tags": [ "LogProfiles" ], "description": "Gets the log profile.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "logProfileName", "in": "path", "description": "The name of the log profile.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/LogProfileResource" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, "x-ms-examples": { "Get log profile": { "$ref": "./examples/getLogProfile.json" } } }, "put": { "operationId": "LogProfiles_CreateOrUpdate", "tags": [ "LogProfiles" ], "description": "Create or update a log profile in Azure Monitoring REST API.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "logProfileName", "in": "path", "description": "The name of the log profile.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "Parameters supplied to the operation.", "required": true, "schema": { "$ref": "#/definitions/LogProfileResource" } } ], "responses": { "200": { "description": "Resource 'LogProfileResource' update operation succeeded", "schema": { "$ref": "#/definitions/LogProfileResource" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, "x-ms-examples": { "Create or update a log profile": { "$ref": "./examples/createOrUpdateLogProfile.json" } } }, "patch": { "operationId": "LogProfiles_Update", "description": "Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "logProfileName", "in": "path", "description": "The name of the log profile.", "required": true, "type": "string" }, { "name": "logProfilesResource", "in": "body", "description": "Parameters supplied to the operation.", "required": true, "schema": { "$ref": "#/definitions/LogProfileResourcePatch" } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/LogProfileResource" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, "x-ms-examples": { "Patch a log profile": { "$ref": "./examples/patchLogProfile.json" } } }, "delete": { "operationId": "LogProfiles_Delete", "tags": [ "LogProfiles" ], "description": "Deletes the log profile.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "logProfileName", "in": "path", "description": "The name of the log profile.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Resource deleted successfully." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, "x-ms-examples": { "Delete log profile": { "$ref": "./examples/deleteLogProfile.json" } } } } }, "definitions": { "LogProfileCollection": { "type": "object", "description": "Represents a collection of log profiles.", "properties": { "value": { "type": "array", "description": "the values of the log profiles.", "items": { "$ref": "#/definitions/LogProfileResource" } }, "nextLink": { "type": "string", "description": "the URL to get the next set of results." } }, "required": [ "value" ] }, "LogProfileProperties": { "type": "object", "description": "The log profile properties.", "properties": { "storageAccountId": { "type": "string", "description": "the resource id of the storage account to which you would like to send the Activity Log." }, "serviceBusRuleId": { "type": "string", "description": "The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'." }, "locations": { "type": "array", "description": "List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location.", "items": { "type": "string" } }, "categories": { "type": "array", "description": "the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'", "items": { "type": "string" } }, "retentionPolicy": { "$ref": "#/definitions/Microsoft.Common.RetentionPolicy", "description": "the retention policy for the events in the log." } }, "required": [ "locations", "categories", "retentionPolicy" ] }, "LogProfileResource": { "type": "object", "description": "The log profile resource.", "properties": { "properties": { "$ref": "#/definitions/LogProfileProperties", "description": "The log profile properties of the resource.", "x-ms-client-flatten": true } }, "required": [ "properties" ], "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" } ] }, "LogProfileResourcePatch": { "type": "object", "description": "The log profile resource for patch operations.", "properties": { "tags": { "type": "object", "description": "Resource tags", "additionalProperties": { "type": "string" } }, "properties": { "$ref": "#/definitions/LogProfileProperties", "description": "The log profile properties for an update operation.", "x-ms-client-flatten": true } } }, "Microsoft.Common.ErrorResponse": { "type": "object", "description": "Describes the format of Error response.", "properties": { "code": { "type": "string", "description": "Error code" }, "message": { "type": "string", "description": "Error message indicating why the operation failed." } } }, "Microsoft.Common.RetentionPolicy": { "type": "object", "description": "Specifies the retention policy for the log.", "properties": { "enabled": { "type": "boolean", "description": "a value indicating whether the retention policy is enabled." }, "days": { "type": "integer", "format": "int32", "description": "the number of days for the retention in days. A value of 0 will retain the events indefinitely.", "minimum": 0 } }, "required": [ "enabled", "days" ] } }, "parameters": {} }