From d4f5dda32570fba7afa55379c2f7d83806296d20 Mon Sep 17 00:00:00 2001 From: Jennifer Winkler Date: Fri, 24 Sep 2021 14:39:53 -0700 Subject: [PATCH 1/6] Add API versions from private repo --- .../2021-04-01-preview/changeanalysis.json | 628 ++++++++++++++++++ .../ChangeSnapshotsGetChangeSnapshots.json | 78 +++ ...gesListChangesByResourceGroupFiltered.json | 44 ++ ...ngesListChangesBySubscriptionFiltered.json | 69 ++ .../examples/OperationsList.json | 29 + .../examples/ResourceChangesList.json | 69 ++ 6 files changed, 917 insertions(+) create mode 100644 specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json create mode 100644 specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangeSnapshotsGetChangeSnapshots.json create mode 100644 specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesByResourceGroupFiltered.json create mode 100644 specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesBySubscriptionFiltered.json create mode 100644 specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json create mode 100644 specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ResourceChangesList.json diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json new file mode 100644 index 000000000000..59e568450fd9 --- /dev/null +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json @@ -0,0 +1,628 @@ +{ + "swagger": "2.0", + "info": { + "title": "AzureChangeAnalysisManagementClient", + "version": "2021-04-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.ChangeAnalysis/operations": { + "get": { + "tags": [ + "Operations" + ], + "summary": "Lists all the supported operations by the Microsoft.ChangeAnalysis resource provider along with their descriptions.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SkipTokenParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/ResourceProviderOperationList" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Operations_List": { + "$ref": "./examples/OperationsList.json" + } + } + } + }, + "/{resourceId}/providers/Microsoft.ChangeAnalysis/resourceChanges": { + "post": { + "tags": [ + "ResourceChanges" + ], + "summary": "List the changes of a resource within the specified time range. Customer data will be masked if the user doesn't have access.", + "operationId": "ResourceChanges_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ResourceIdParameter" + }, + { + "$ref": "#/parameters/StartTimeParameter" + }, + { + "$ref": "#/parameters/EndTimeParameter" + }, + { + "$ref": "#/parameters/SkipTokenParameter" + }, + { + "$ref": "#/parameters/ScanLatestParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/ChangeList" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ResourceChanges_List": { + "$ref": "./examples/ResourceChangesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ChangeAnalysis/changes": { + "get": { + "tags": [ + "Changes" + ], + "summary": "List the changes of a resource group within the specified time range. Customer data will always be masked.", + "operationId": "Changes_ListChangesByResourceGroup", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/StartTimeParameter" + }, + { + "$ref": "#/parameters/EndTimeParameter" + }, + { + "$ref": "#/parameters/SkipTokenParameter" + }, + { + "$ref": "#/parameters/FilterParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/ChangeList" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Changes_ListChangesByResourceGroupFiltered": { + "$ref": "./examples/ChangesListChangesByResourceGroupFiltered.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ChangeAnalysis/changes": { + "get": { + "tags": [ + "Changes" + ], + "summary": "List the changes of a subscription within the specified time range. Customer data will always be masked.", + "operationId": "Changes_ListChangesBySubscription", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/StartTimeParameter" + }, + { + "$ref": "#/parameters/EndTimeParameter" + }, + { + "$ref": "#/parameters/SkipTokenParameter" + }, + { + "$ref": "#/parameters/FilterParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/ChangeList" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Changes_ListChangesBySubscriptionFiltered": { + "$ref": "./examples/ChangesListChangesBySubscriptionFiltered.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ChangeAnalysis/changeSnapshots": { + "post": { + "tags": [ + "ChangeSnapshots" + ], + "summary": "Gets change snapshots for the given resource Id and change Id.", + "operationId": "ChangeSnapshots_GetChangeSnapshots", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceIdQueryParameter" + }, + { + "$ref": "#/parameters/ChangeIdParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/ChangeSnapshots" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ChangeSnapshots": { + "$ref": "./examples/ChangeSnapshotsGetChangeSnapshots.json" + } + } + } + } + }, + "definitions": { + "ResourceProviderOperationDisplay": { + "description": "The resource provider operation details.", + "type": "object", + "properties": { + "provider": { + "description": "Name of the resource provider.", + "type": "string" + }, + "resource": { + "description": "Name of the resource type.", + "type": "string" + }, + "operation": { + "description": "Name of the resource provider operation.", + "type": "string" + }, + "description": { + "description": "Description of the resource provider operation.", + "type": "string" + } + } + }, + "ResourceProviderOperationDefinition": { + "description": "The resource provider operation definition.", + "type": "object", + "properties": { + "name": { + "description": "The resource provider operation name.", + "type": "string" + }, + "display": { + "$ref": "#/definitions/ResourceProviderOperationDisplay" + } + } + }, + "ResourceProviderOperationList": { + "description": "The resource provider operation list.", + "type": "object", + "properties": { + "value": { + "description": "Resource provider operations list.", + "type": "array", + "items": { + "$ref": "#/definitions/ResourceProviderOperationDefinition" + } + }, + "nextLink": { + "description": "The URI that can be used to request the next page for list of Azure operations.", + "type": "string" + } + } + }, + "ChangeType": { + "description": "The type of the change.", + "enum": [ + "Add", + "Remove", + "Update" + ], + "type": "string", + "x-ms-enum": { + "name": "ChangeType", + "modelAsString": true + } + }, + "Level": { + "enum": [ + "Noisy", + "Normal", + "Important" + ], + "type": "string", + "x-ms-enum": { + "name": "Level", + "modelAsString": true + } + }, + "PropertyChange": { + "description": "Data of a property change.", + "type": "object", + "properties": { + "changeType": { + "$ref": "#/definitions/ChangeType" + }, + "changeCategory": { + "description": "The change category.", + "enum": [ + "User", + "System" + ], + "type": "string", + "x-ms-enum": { + "name": "ChangeCategory", + "modelAsString": false + } + }, + "jsonPath": { + "description": "The json path of the changed property.", + "type": "string" + }, + "displayName": { + "description": "The enhanced display name of the json path. E.g., the json path value[0].properties will be translated to something meaningful like slots[\"Staging\"].properties.", + "type": "string" + }, + "level": { + "$ref": "#/definitions/Level" + }, + "description": { + "description": "The description of the changed property.", + "type": "string" + }, + "oldValue": { + "description": "The value of the property before the change.", + "type": "string" + }, + "newValue": { + "description": "The value of the property after the change.", + "type": "string" + }, + "isDataMasked": { + "description": "The boolean indicating whether the oldValue and newValue are masked. The values are masked if it contains sensitive information that the user doesn't have access to.", + "type": "boolean" + } + } + }, + "ChangeProperties": { + "description": "The properties of a change.", + "type": "object", + "properties": { + "resourceId": { + "description": "The resource id that the change is attached to.", + "type": "string" + }, + "timeStamp": { + "format": "date-time", + "description": "The time when the change is detected.", + "type": "string" + }, + "initiatedByList": { + "description": "The list of identities who might initiated the change.\r\nThe identity could be user name (email address) or the object ID of the Service Principal.", + "type": "array", + "items": { + "type": "string" + } + }, + "changeType": { + "$ref": "#/definitions/ChangeType" + }, + "propertyChanges": { + "description": "The list of detailed changes at json property level.", + "type": "array", + "items": { + "$ref": "#/definitions/PropertyChange" + } + } + } + }, + "Change": { + "description": "The detected change.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ChangeProperties" + } + } + }, + "ChangeList": { + "description": "The list of detected changes.", + "type": "object", + "properties": { + "value": { + "description": "The list of changes.", + "type": "array", + "items": { + "$ref": "#/definitions/Change" + } + }, + "nextLink": { + "description": "The URI that can be used to request the next page of changes.", + "type": "string" + } + } + }, + "ChangeSnapshotsProperties": { + "description": "The change snapshot, represented by a pair of before and after resource snapshots.", + "type": "object", + "properties": { + "beforeSnapshot": { + "description": "The snapshot before the change.", + "type": "object" + }, + "afterSnapshot": { + "description": "The snapshot after the change.", + "type": "object" + }, + "isHidden": { + "description": "Is the snapshot hidden", + "type": "boolean" + } + } + }, + "ChangeSnapshots": { + "description": "The detected change snapshots.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ChangeSnapshotsProperties" + } + } + }, + "ResourceGraphSnapshotData": { + "description": "Data on a specific resource snapshot.", + "type": "object", + "properties": { + "snapshotId": { + "description": "The ID of the snapshot.", + "type": "string" + }, + "timestamp": { + "description": "The time when the snapshot was created.\nThe snapshot timestamp provides an approximation as to when a modification to a resource was detected. There can be a difference between the actual modification time and the detection time. This is due to differences in how operations that modify a resource are processed, versus how operation that record resource snapshots are processed.", + "type": "string", + "format": "date-time" + }, + "content": { + "description": "The resource snapshot content (in resourceChangeDetails response only).", + "type": "object" + } + }, + "required": [ + "timestamp" + ] + }, + "ResourceGraphChangeData": { + "description": "Data on a specific change, represented by a pair of before and after resource snapshots.", + "type": "object", + "properties": { + "resourceId": { + "description": "The resource for a change.", + "type": "string" + }, + "changeId": { + "description": "The change Id.", + "type": "string" + }, + "beforeSnapshot": { + "description": "The snapshot before the change from ARG.", + "allOf": [ + { + "$ref": "#/definitions/ResourceGraphSnapshotData" + } + ] + }, + "afterSnapshot": { + "description": "The snapshot after the change from ARG.", + "allOf": [ + { + "$ref": "#/definitions/ResourceGraphSnapshotData" + } + ] + }, + "changeType": { + "description": "The change type for snapshot. PropertyChanges will be provided in case of Update change type", + "type": "string", + "enum": [ + "Create", + "Update", + "Delete" + ], + "x-ms-enum": { + "name": "ChangeType", + "modelAsString": false + } + } + } + } + }, + "parameters": { + "ResourceIdParameter": { + "in": "path", + "name": "resourceId", + "description": "The identifier of the resource.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "StartTimeParameter": { + "in": "query", + "name": "$startTime", + "description": "Specifies the start time of the changes request.", + "required": true, + "type": "string", + "format": "date-time", + "x-ms-parameter-location": "method" + }, + "EndTimeParameter": { + "in": "query", + "name": "$endTime", + "description": "Specifies the end time of the changes request.", + "required": true, + "type": "string", + "format": "date-time", + "x-ms-parameter-location": "method" + }, + "FilterParameter": { + "name": "$filter", + "in": "query", + "type": "string", + "required": false, + "description": "Reduces the set of data collected.
This argument is not required. Only accepts 'resourceId' and 'resourceType' and only accepts the following patterns.
- *List changes for a resource type*: $filter=resourceType eq 'microsoft.web/sites'.
- *List changes for multiple resource types:* $filter=resourceType eq 'microsoft.web/sites,microsoft.compute/virtualmachines'.
- *List changes for a resource Id*: $filter=resourceId eq '{resourceId}'.
- *List changes for multiple resource Ids:* $filter=resourceId eq '{resourceId1},{resourceId2}}'.", + "x-ms-parameter-location": "method" + }, + "SkipTokenParameter": { + "in": "query", + "name": "$skipToken", + "description": "A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.", + "type": "string", + "x-ms-parameter-location": "method" + }, + "ResourceIdQueryParameter": { + "in": "query", + "name": "$resourceId", + "description": "Specifies the resource Id.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ChangeIdParameter": { + "in": "query", + "name": "$changeId", + "description": "Specifies the change Id.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ScanLatestParameter": { + "in": "query", + "name": "$scanLatest", + "description": "Specifies whether to scan latest", + "required": false, + "type": "boolean", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + }, + "description": "Azure Active Directory OAuth2 Flow" + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} \ No newline at end of file diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangeSnapshotsGetChangeSnapshots.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangeSnapshotsGetChangeSnapshots.json new file mode 100644 index 000000000000..d80446881a2a --- /dev/null +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangeSnapshotsGetChangeSnapshots.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2021-04-01-preview", + "subscriptionId": "4d962866-1e3f-47f2-bd18-450c08f914c1", + "$resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite", + "$changeId": "ARG_23fa00fd-dda0-4268-b482-2076825cf165_970d8c6d-6b78-4270-92ef-88d5aa2b5f0b_132316363294700000_132316498613900000" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite/providers/Microsoft.ChangeAnalysis/changeSnapshots/ARG_23fa00fd-dda0-4268-b482-2076825cf165_970d8c6d-6b78-4270-92ef-88d5aa2b5f0b_132316363294700000_132316498613900000", + "name": "ARG_23fa00fd-dda0-4268-b482-2076825cf165_970d8c6d-6b78-4270-92ef-88d5aa2b5f0b_132316363294700000_132316498613900000", + "type": "Microsoft.ChangeAnalysis/changeSnapshots", + "properties": { + "beforeSnapshot": { + "id": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite", + "kind": "app", + "location": "centralus", + "managedBy": "", + "name": "mysite", + "plan": null, + "properties": { + "adminEnabled": true, + "availabilityState": "Normal", + "buildVersion": null, + "enabled": true, + "serverFarmId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/serverFarms/myServerFarm", + "reserved": false, + "isXenon": false, + "hyperV": false, + "siteConfig": {}, + "scmSiteAlsoStopped": false, + "clientAffinityEnabled": true, + "clientCertEnabled": false, + "hostNamesDisabled": false, + "containerSize": 0, + "httpsOnly": true, + "redundancyMode": "None" + }, + "tags": {}, + "type": "microsoft.web/sites" + }, + "afterSnapshot": { + "id": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite", + "kind": "app", + "location": "centralus", + "managedBy": "", + "name": "mysite", + "plan": null, + "properties": { + "adminEnabled": true, + "availabilityState": "Normal", + "buildVersion": null, + "enabled": true, + "serverFarmId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/serverfarms/myServerFarm", + "reserved": false, + "isXenon": false, + "hyperV": false, + "siteConfig": {}, + "scmSiteAlsoStopped": false, + "clientAffinityEnabled": true, + "clientCertEnabled": false, + "hostNamesDisabled": false, + "containerSize": 0, + "httpsOnly": true, + "redundancyMode": "None" + }, + "tags": { + "hidden-related:diagnostics/changeAnalysisScanEnabled": "false" + }, + "type": "microsoft.web/sites" + }, + "isHidden": false + } + } + } + } +} \ No newline at end of file diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesByResourceGroupFiltered.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesByResourceGroupFiltered.json new file mode 100644 index 000000000000..35cd1a09ca02 --- /dev/null +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesByResourceGroupFiltered.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "4d962866-1e3f-47f2-bd18-450c08f914c1", + "resourceGroupName": "MyResourceGroup", + "api-version": "2021-04-01-preview", + "$startTime": "2021-04-25T12:09:03.141Z", + "$endTime": "2021-04-26T12:09:03.141Z", + "$filter": "resourceTypes eq 'microsoft.web/sites'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite/extensions/AppStateTracker/providers/Microsoft.ChangeAnalysis/changes/AST_b2ecd7ec-00dd-4d44-bd19-fefc88790c05_da36e22e-f541-44bd-8d89-8f10a27af4ad_132592897881782408_132592957873393845", + "name": "AST_b2ecd7ec-00dd-4d44-bd19-fefc88790c05_da36e22e-f541-44bd-8d89-8f10a27af4ad_132592897881782408_132592957873393845", + "type": "Microsoft.ChangeAnalysis/changes", + "properties": { + "resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite", + "timeStamp": "2021-04-26T02:17:41.39Z", + "initiatedByList": [ + "ellen@contoso.com" + ], + "changeType": "Update", + "propertyChanges": [ + { + "changeType": "Update", + "changeCategory": "User", + "jsonPath": "environment.environmentVariables.APPSETTING_DB_CONNSTR", + "displayName": "APPSETTING_DB_CONNSTR", + "level": "Important", + "description": "Application setting", + "oldValue": "***Old Value Hidden***", + "newValue": "***New Value Hidden***", + "isDataMasked": true + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesBySubscriptionFiltered.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesBySubscriptionFiltered.json new file mode 100644 index 000000000000..ef83e1b18227 --- /dev/null +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesBySubscriptionFiltered.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "subscriptionId": "4d962866-1e3f-47f2-bd18-450c08f914c1", + "api-version": "2021-04-01-preview", + "$startTime": "2021-04-25T12:09:03.141Z", + "$endTime": "2021-04-26T12:09:03.141Z", + "$filter": "resourceTypes eq 'microsoft.web/sites,microsoft.compute/virtualmachines'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite1/extensions/AppStateTracker/providers/Microsoft.ChangeAnalysis/changes/AST_b2ecd7ec-00dd-4d44-bd19-fefc88790c05_da36e22e-f541-44bd-8d89-8f10a27af4ad_132592897881782408_132592957873393845", + "name": "AST_b2ecd7ec-00dd-4d44-bd19-fefc88790c05_da36e22e-f541-44bd-8d89-8f10a27af4ad_132592897881782408_132592957873393845", + "type": "Microsoft.ChangeAnalysis/changes", + "properties": { + "resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite1", + "timeStamp": "2021-04-26T02:17:41.39Z", + "initiatedByList": [ + "ellen@contoso.com" + ], + "changeType": "Update", + "propertyChanges": [ + { + "changeType": "Update", + "changeCategory": "User", + "jsonPath": "environment.environmentVariables.APPSETTING_DB_CONNSTR", + "displayName": "APPSETTING_DB_CONNSTR", + "level": "Important", + "description": "Application setting", + "oldValue": "***Old Value Hidden***", + "newValue": "***New Value Hidden***", + "isDataMasked": true + } + ] + } + }, + { + "id": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/providers/Microsoft.ChangeAnalysis/changes/ARG_23fa00fd-dda0-4268-b482-2076825cf165_970d8c6d-6b78-4270-92ef-88d5aa2b5f0b_132316363294700000_132316498613900000", + "name": "ARG_23fa00fd-dda0-4268-b482-2076825cf165_970d8c6d-6b78-4270-92ef-88d5aa2b5f0b_132316363294700000_132316498613900000", + "type": "Microsoft.ChangeAnalysis/changes", + "properties": { + "resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "timeStamp": "2021-04-26T05:36:01.25Z", + "initiatedByList": [ + "ellen@contoso.com" + ], + "changeType": "Update", + "propertyChanges": [ + { + "changeType": "Update", + "changeCategory": "System", + "jsonPath": "properties.provisioningState", + "displayName": "properties.provisioningState", + "level": "Important", + "description": "The provisioning state, which only appears in the response.", + "oldValue": "Updating", + "newValue": "Succeeded", + "isDataMasked": false + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json new file mode 100644 index 000000000000..caed00a146e9 --- /dev/null +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-04-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.ChangeAnalysis/register/action", + "display": { + "provider": "Microsoft Change Analysis", + "resource": "", + "operation": "Register Microsoft Change Analysis resource provider with a subscriptions" + } + }, + { + "name": "Microsoft.ChangeAnalysis/changes/read", + "display": { + "provider": "Microsoft Change Analysis", + "resource": "Azure Application Change Analysis Service Change", + "operation": "Read Azure Application Change Analysis Servie Change" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ResourceChangesList.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ResourceChangesList.json new file mode 100644 index 000000000000..3300ee08ec04 --- /dev/null +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ResourceChangesList.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "resourceId": "subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite", + "api-version": "2021-04-01-preview", + "$startTime": "2021-04-25T12:09:03.141Z", + "$endTime": "2021-04-26T12:09:03.141Z", + "$scanLatest": false + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite/providers/Microsoft.ChangeAnalysis/resourceChanges/ARG_23fa00fd-dda0-4268-b482-2076825cf165_970d8c6d-6b78-4270-92ef-88d5aa2b5f0b_132316363294700000_132316498613900000", + "name": "ARG_23fa00fd-dda0-4268-b482-2076825cf165_970d8c6d-6b78-4270-92ef-88d5aa2b5f0b_132316363294700000_132316498613900000", + "type": "Microsoft.ChangeAnalysis/resourceChanges", + "properties": { + "resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite", + "timeStamp": "2021-04-26T02:17:41.39Z", + "initiatedByList": [ + "ellen@contoso.com" + ], + "changeType": "Update", + "propertyChanges": [ + { + "changeType": "Update", + "changeCategory": "User", + "jsonPath": "value[1].properties.thumbprint", + "displayName": "publicCertificates[\"AppCert\"].properties.thumbprint", + "level": "Important", + "description": "The thumbprint of the certificate", + "oldValue": "21D0482F-E91E-4C14-8078-65BFDCDBCA64", + "newValue": "3F2DF554-B063-4383-8BD3-4970BCF20A7E", + "isDataMasked": false + } + ] + } + }, + { + "id": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite/extensions/AppStateTracker/providers/Microsoft.ChangeAnalysis/resourceChanges/AST_b2ecd7ec-00dd-4d44-bd19-fefc88790c05_da36e22e-f541-44bd-8d89-8f10a27af4ad_132592897881782408_132592957873393845", + "name": "AST_b2ecd7ec-00dd-4d44-bd19-fefc88790c05_da36e22e-f541-44bd-8d89-8f10a27af4ad_132592897881782408_132592957873393845", + "type": "Microsoft.ChangeAnalysis/changes", + "properties": { + "resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/mysite", + "timeStamp": "2021-04-26T02:17:41.39Z", + "initiatedByList": [ + "ellen@contoso.com" + ], + "changeType": "Update", + "propertyChanges": [ + { + "changeType": "Update", + "changeCategory": "User", + "jsonPath": "environment.environmentVariables.APPSETTING_DB_CONNSTR", + "displayName": "APPSETTING_DB_CONNSTR", + "level": "Important", + "description": "Application setting", + "oldValue": "", + "newValue": "", + "isDataMasked": false + } + ] + } + } + ] + } + } + } +} \ No newline at end of file From 90632548d680ad37ee9047fa1bc9e6bf97070a57 Mon Sep 17 00:00:00 2001 From: Jennifer Winkler Date: Mon, 27 Sep 2021 09:06:38 -0700 Subject: [PATCH 2/6] Fix prettier and avocado validation report --- .../examples/ChangeSnapshotsGetChangeSnapshots.json | 2 +- .../ChangesListChangesByResourceGroupFiltered.json | 2 +- .../ChangesListChangesBySubscriptionFiltered.json | 2 +- .../2021-04-01-preview/examples/OperationsList.json | 2 +- .../2021-04-01-preview/examples/ResourceChangesList.json | 2 +- specification/changeanalysis/resource-manager/readme.md | 9 +++++++++ 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangeSnapshotsGetChangeSnapshots.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangeSnapshotsGetChangeSnapshots.json index d80446881a2a..ccd7118f2194 100644 --- a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangeSnapshotsGetChangeSnapshots.json +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangeSnapshotsGetChangeSnapshots.json @@ -75,4 +75,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesByResourceGroupFiltered.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesByResourceGroupFiltered.json index 35cd1a09ca02..3202481cdd10 100644 --- a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesByResourceGroupFiltered.json +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesByResourceGroupFiltered.json @@ -41,4 +41,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesBySubscriptionFiltered.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesBySubscriptionFiltered.json index ef83e1b18227..1c54c25d2d1f 100644 --- a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesBySubscriptionFiltered.json +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ChangesListChangesBySubscriptionFiltered.json @@ -66,4 +66,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json index caed00a146e9..7296f01f245d 100644 --- a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json @@ -26,4 +26,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ResourceChangesList.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ResourceChangesList.json index 3300ee08ec04..84d463adaa96 100644 --- a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ResourceChangesList.json +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/ResourceChangesList.json @@ -66,4 +66,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/changeanalysis/resource-manager/readme.md b/specification/changeanalysis/resource-manager/readme.md index 82e40f5667c7..99e54319e3a6 100644 --- a/specification/changeanalysis/resource-manager/readme.md +++ b/specification/changeanalysis/resource-manager/readme.md @@ -47,6 +47,15 @@ input-file: - Microsoft.ChangeAnalysis/stable/2021-04-01/changeanalysis.json ``` +### Tag: package-2021-04-01-preview + +These settings apply only when `--tag=package-2021-04-01-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2021-04-01-preview' +input-file: +- Microsoft.ChangeAnalysis/stable/2021-04-01-preview/changeanalysis.json +``` + --- # Code Generation From 89727f60486e32b73295e4f2c2825b688fa25caf Mon Sep 17 00:00:00 2001 From: Jennifer Winkler Date: Mon, 27 Sep 2021 09:46:25 -0700 Subject: [PATCH 3/6] Fix prettier and avocado validation report --- .../2021-04-01-preview/changeanalysis.json | 2 +- .../changeanalysis/resource-manager/readme.md | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json index 59e568450fd9..81d2553153c0 100644 --- a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json @@ -625,4 +625,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/specification/changeanalysis/resource-manager/readme.md b/specification/changeanalysis/resource-manager/readme.md index 99e54319e3a6..78fabb01e2e8 100644 --- a/specification/changeanalysis/resource-manager/readme.md +++ b/specification/changeanalysis/resource-manager/readme.md @@ -38,22 +38,22 @@ input-file: - Microsoft.ChangeAnalysis/preview/2020-04-01-preview/changeanalysis.json ``` -### Tag: package-2021-04-01 +### Tag: package-2021-04-01-preview -These settings apply only when `--tag=package-2021-04-01` is specified on the command line. +These settings apply only when `--tag=package-2021-04-01-preview` is specified on the command line. -``` yaml $(tag) == 'package-2021-04-01' +``` yaml $(tag) == 'package-2021-04-01-preview' input-file: -- Microsoft.ChangeAnalysis/stable/2021-04-01/changeanalysis.json +- Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json ``` -### Tag: package-2021-04-01-preview +### Tag: package-2021-04-01 -These settings apply only when `--tag=package-2021-04-01-preview` is specified on the command line. +These settings apply only when `--tag=package-2021-04-01` is specified on the command line. -``` yaml $(tag) == 'package-2021-04-01-preview' +``` yaml $(tag) == 'package-2021-04-01' input-file: -- Microsoft.ChangeAnalysis/stable/2021-04-01-preview/changeanalysis.json +- Microsoft.ChangeAnalysis/stable/2021-04-01/changeanalysis.json ``` --- From 384d1358210e62e55752cc4f8a85f92bc0c40f07 Mon Sep 17 00:00:00 2001 From: Jennifer Winkler Date: Mon, 27 Sep 2021 13:27:16 -0700 Subject: [PATCH 4/6] push manifest from private repo --- .../2021-04-01-preview/changeanalysis.json | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json index 81d2553153c0..e94b8069c511 100644 --- a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json @@ -251,6 +251,48 @@ } } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ChangeAnalysis/computeChanges": { + "post": { + "tags": [ + "ComputeChanges" + ], + "summary": "Compute the changes given by ARG resource changes response. This is intended to be used when the user hasn't registered with our resource provider but uses our services to enrich the ARG data.", + "operationId": "ComputeChanges_ListChanges", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceIdQueryParameter" + }, + { + "$ref": "#/parameters/ComputeChangesParameters" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/ChangeList" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ComputeChanges": { + "$ref": "./examples/ComputeChanges_ListChanges.json" + } + } + } } }, "definitions": { @@ -538,6 +580,19 @@ } } } + }, + "ComputeChangesParameters": { + "description": "The parameters for the compute changes request.", + "type": "object", + "properties": { + "resourceGraphChangeDataList": { + "description": "A list of change details from ARG associated with a resource over a specific time interval.", + "type": "array", + "items": { + "$ref": "#/definitions/ResourceGraphChangeData" + } + } + } } }, "parameters": { @@ -598,6 +653,16 @@ "type": "string", "x-ms-parameter-location": "method" }, + "ComputeChangesParameters": { + "in": "body", + "name": "computeChangesParameters", + "description": "Parameters for compute changes request", + "required": true, + "schema": { + "$ref": "#/definitions/ComputeChangesParameters" + }, + "x-ms-parameter-location": "method" + }, "ScanLatestParameter": { "in": "query", "name": "$scanLatest", From 8870f92dbdf139e651c9eeccd0cd0cc69fe745b7 Mon Sep 17 00:00:00 2001 From: Jennifer Winkler Date: Mon, 27 Sep 2021 13:28:07 -0700 Subject: [PATCH 5/6] Make changes for public repo --- .../2021-04-01-preview/changeanalysis.json | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json index e94b8069c511..81d2553153c0 100644 --- a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/changeanalysis.json @@ -251,48 +251,6 @@ } } } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.ChangeAnalysis/computeChanges": { - "post": { - "tags": [ - "ComputeChanges" - ], - "summary": "Compute the changes given by ARG resource changes response. This is intended to be used when the user hasn't registered with our resource provider but uses our services to enrich the ARG data.", - "operationId": "ComputeChanges_ListChanges", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceIdQueryParameter" - }, - { - "$ref": "#/parameters/ComputeChangesParameters" - } - ], - "responses": { - "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/ChangeList" - } - }, - "default": { - "description": "Error response describing why the operation failed", - "schema": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ComputeChanges": { - "$ref": "./examples/ComputeChanges_ListChanges.json" - } - } - } } }, "definitions": { @@ -580,19 +538,6 @@ } } } - }, - "ComputeChangesParameters": { - "description": "The parameters for the compute changes request.", - "type": "object", - "properties": { - "resourceGraphChangeDataList": { - "description": "A list of change details from ARG associated with a resource over a specific time interval.", - "type": "array", - "items": { - "$ref": "#/definitions/ResourceGraphChangeData" - } - } - } } }, "parameters": { @@ -653,16 +598,6 @@ "type": "string", "x-ms-parameter-location": "method" }, - "ComputeChangesParameters": { - "in": "body", - "name": "computeChangesParameters", - "description": "Parameters for compute changes request", - "required": true, - "schema": { - "$ref": "#/definitions/ComputeChangesParameters" - }, - "x-ms-parameter-location": "method" - }, "ScanLatestParameter": { "in": "query", "name": "$scanLatest", From 15183d7e25ed653944554eb3cc3f850a4d41464b Mon Sep 17 00:00:00 2001 From: Jennifer Winkler Date: Tue, 19 Oct 2021 10:40:11 -0700 Subject: [PATCH 6/6] Update to correct api-version' --- .../preview/2021-04-01-preview/examples/OperationsList.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json index 7296f01f245d..2e9909cf9239 100644 --- a/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json +++ b/specification/changeanalysis/resource-manager/Microsoft.ChangeAnalysis/preview/2021-04-01-preview/examples/OperationsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-04-01" + "api-version": "2021-04-01-preview" }, "responses": { "200": {