From 9fe15f64000232313dd5873ae65c62cfceddd856 Mon Sep 17 00:00:00 2001 From: Ji Wang Date: Tue, 8 Dec 2020 18:50:21 -0800 Subject: [PATCH] Update ResourceIdentity reference and remove ManagedInstanceMetric (#11960) * update ResourceIdentity reference * Change IdentityTypeWithNone to IdentityType --- .../preview/2019-06-01-preview/servers.json | 31 +- .../ManagedInstanceAdministrators.json | 4 +- .../2020-08-01-preview/ManagedInstances.json | 414 +----------------- .../preview/2020-08-01-preview/Servers.json | 34 +- ...ManagedInstancesListMetricDefinitions.json | 132 ------ .../examples/ManagedInstancesListMetrics.json | 148 ------- .../sql/resource-manager/common/v1/types.json | 4 +- 7 files changed, 10 insertions(+), 757 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/examples/ManagedInstancesListMetricDefinitions.json delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/examples/ManagedInstancesListMetrics.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/servers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/servers.json index 1eda90f1b705..c33659e07f19 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/servers.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/servers.json @@ -346,35 +346,6 @@ } } }, - "ResourceIdentity": { - "description": "Azure Active Directory identity configuration for a resource.", - "type": "object", - "properties": { - "principalId": { - "format": "uuid", - "description": "The Azure Active Directory principal id.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.", - "enum": [ - "SystemAssigned" - ], - "type": "string", - "x-ms-enum": { - "name": "IdentityType", - "modelAsString": true - } - }, - "tenantId": { - "format": "uuid", - "description": "The Azure Active Directory tenant id.", - "type": "string", - "readOnly": true - } - } - }, "ServerProperties": { "description": "The properties of a server.", "type": "object", @@ -594,7 +565,7 @@ ], "properties": { "identity": { - "$ref": "#/definitions/ResourceIdentity", + "$ref": "../../../common/v1/types.json#/definitions/ResourceIdentity", "description": "The Azure Active Directory identity of the server.", "x-ms-mutability": [ "read", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ManagedInstanceAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ManagedInstanceAdministrators.json index d8d8a0265cd5..0e1cde5d1700 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ManagedInstanceAdministrators.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ManagedInstanceAdministrators.json @@ -159,7 +159,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidManagedServerAdministratorType - Invalid administrator type specified in properties.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidManagedServerAzureADAdminDeleteOperation - User tried to delete managed server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 PrincipalNotFoundInTenant - AzureAD Lookup returned no results for this name.\n\n * 400 ServerPrincipalHasDuplicateDisplayNameInAad - AzureAD Lookup returned multiple results for this name.\n\n * 400 ManagedInstanceIsBusy - Managed Instance is busy with another request.\n\n * 400 InvalidPrincipalType - This principal type is not supported in Windows Azure SQL Database.\n\n * 400 ServicePrincipalLookupInAadFailed - AzureAD Lookup failed due to service infrastructure errors.\n\n * 400 TenantNotFoundInActiveDirectory - Tenant is not available in active directory.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceHasNoPermissionsToAccessAad - Attempt to perform operation, which involves a non-existing login or login on which executing principal has no permissions.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerPrincipalAlreadyExists - Attempt to create server principal with non-unique name.\n\n * 409 ServerPrincipalCurrentlyLoggedIn - Self-explanatory.\n\n * 409 ServerPrincipalOwnsJobs - Attempt to remove a login when it has active jobs.\n\n * 409 ServerPrincipalIsGrantorOfPermissions - Attempt to drop a server principal, which is a grantor of permissions.\n\n * 409 ServerPrincipalOwnsDatabase - Change the owner of the database(s) before dropping the login.\n\n * 409 ServerPrincipalUsedInTriggerOrEventNotification - Attempt to drop login, which is used as an execution context of a trigger or event notification.\n\n * 409 ServerPrincipalOwnsObjects - Attempt to drop a login, which owns objects.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActiveDirectoryLookupTimedOut - The operation could not be completed at this time. Please try again later.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidManagedServerAdministratorType - Invalid administrator type specified in properties.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidManagedServerAzureADAdminDeleteOperation - User tried to delete managed server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 PrincipalNotFoundInTenant - AzureAD Lookup returned no results for this name.\n\n * 400 ServerPrincipalHasDuplicateDisplayNameInAad - AzureAD Lookup returned multiple results for this name.\n\n * 400 ManagedInstanceIsBusy - Managed Instance is busy with another request.\n\n * 400 InvalidPrincipalType - This principal type is not supported in Windows Azure SQL Database.\n\n * 400 ServicePrincipalLookupInAadFailed - AzureAD Lookup failed due to service infrastructure errors.\n\n * 400 TenantNotFoundInActiveDirectory - Tenant is not available in active directory.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceHasNoPermissionsToAccessAad - Attempt to perform operation, which involves a non-existing login or login on which executing principal has no permissions.\n\n * 403 ServicePrincipalLookupInAadFailedIdentityForbidden - AzureAD Lookup failed because MSI was not granted read permissions on AAD.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerPrincipalAlreadyExists - Attempt to create server principal with non-unique name.\n\n * 409 ServerPrincipalCurrentlyLoggedIn - Self-explanatory.\n\n * 409 ServerPrincipalOwnsJobs - Attempt to remove a login when it has active jobs.\n\n * 409 ServerPrincipalIsGrantorOfPermissions - Attempt to drop a server principal, which is a grantor of permissions.\n\n * 409 ServerPrincipalOwnsDatabase - Change the owner of the database(s) before dropping the login.\n\n * 409 ServerPrincipalUsedInTriggerOrEventNotification - Attempt to drop login, which is used as an execution context of a trigger or event notification.\n\n * 409 ServerPrincipalOwnsObjects - Attempt to drop a login, which owns objects.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActiveDirectoryLookupTimedOut - The operation could not be completed at this time. Please try again later.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." }, "202": { "description": "Accepted" @@ -219,7 +219,7 @@ "description": "Successfully deleted the managed instance administrator." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidManagedServerAdministratorType - Invalid administrator type specified in properties.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidManagedServerAzureADAdminDeleteOperation - User tried to delete managed server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 PrincipalNotFoundInTenant - AzureAD Lookup returned no results for this name.\n\n * 400 ServerPrincipalHasDuplicateDisplayNameInAad - AzureAD Lookup returned multiple results for this name.\n\n * 400 ManagedInstanceIsBusy - Managed Instance is busy with another request.\n\n * 400 InvalidPrincipalType - This principal type is not supported in Windows Azure SQL Database.\n\n * 400 ServicePrincipalLookupInAadFailed - AzureAD Lookup failed due to service infrastructure errors.\n\n * 400 TenantNotFoundInActiveDirectory - Tenant is not available in active directory.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceHasNoPermissionsToAccessAad - Attempt to perform operation, which involves a non-existing login or login on which executing principal has no permissions.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerPrincipalAlreadyExists - Attempt to create server principal with non-unique name.\n\n * 409 ServerPrincipalCurrentlyLoggedIn - Self-explanatory.\n\n * 409 ServerPrincipalOwnsJobs - Attempt to remove a login when it has active jobs.\n\n * 409 ServerPrincipalIsGrantorOfPermissions - Attempt to drop a server principal, which is a grantor of permissions.\n\n * 409 ServerPrincipalOwnsDatabase - Change the owner of the database(s) before dropping the login.\n\n * 409 ServerPrincipalUsedInTriggerOrEventNotification - Attempt to drop login, which is used as an execution context of a trigger or event notification.\n\n * 409 ServerPrincipalOwnsObjects - Attempt to drop a login, which owns objects.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActiveDirectoryLookupTimedOut - The operation could not be completed at this time. Please try again later.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidManagedServerAdministratorType - Invalid administrator type specified in properties.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidManagedServerAzureADAdminDeleteOperation - User tried to delete managed server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 PrincipalNotFoundInTenant - AzureAD Lookup returned no results for this name.\n\n * 400 ServerPrincipalHasDuplicateDisplayNameInAad - AzureAD Lookup returned multiple results for this name.\n\n * 400 ManagedInstanceIsBusy - Managed Instance is busy with another request.\n\n * 400 InvalidPrincipalType - This principal type is not supported in Windows Azure SQL Database.\n\n * 400 ServicePrincipalLookupInAadFailed - AzureAD Lookup failed due to service infrastructure errors.\n\n * 400 TenantNotFoundInActiveDirectory - Tenant is not available in active directory.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceHasNoPermissionsToAccessAad - Attempt to perform operation, which involves a non-existing login or login on which executing principal has no permissions.\n\n * 403 ServicePrincipalLookupInAadFailedIdentityForbidden - AzureAD Lookup failed because MSI was not granted read permissions on AAD.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerPrincipalAlreadyExists - Attempt to create server principal with non-unique name.\n\n * 409 ServerPrincipalCurrentlyLoggedIn - Self-explanatory.\n\n * 409 ServerPrincipalOwnsJobs - Attempt to remove a login when it has active jobs.\n\n * 409 ServerPrincipalIsGrantorOfPermissions - Attempt to drop a server principal, which is a grantor of permissions.\n\n * 409 ServerPrincipalOwnsDatabase - Change the owner of the database(s) before dropping the login.\n\n * 409 ServerPrincipalUsedInTriggerOrEventNotification - Attempt to drop login, which is used as an execution context of a trigger or event notification.\n\n * 409 ServerPrincipalOwnsObjects - Attempt to drop a login, which owns objects.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ActiveDirectoryLookupTimedOut - The operation could not be completed at this time. Please try again later.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." }, "202": { "description": "Accepted" diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ManagedInstances.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ManagedInstances.json index 35e18be0c812..e8715ab18bf0 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ManagedInstances.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ManagedInstances.json @@ -16,118 +16,6 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/metricDefinitions": { - "get": { - "tags": [ - "ManagedInstances" - ], - "description": "Gets a list of managed instance metric definitions.", - "operationId": "ManagedInstances_ListMetricDefinitions", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ManagedInstanceNameParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved the list of metric definitions for managed instance.", - "schema": { - "$ref": "#/definitions/MetricDefinitionListResult" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 ServerNotFound - The requested server was not found.\n\n * 405 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "List metric definitions by managed instance": { - "$ref": "./examples/ManagedInstancesListMetricDefinitions.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/metrics": { - "get": { - "tags": [ - "ManagedInstances" - ], - "description": "Gets a list of managed instance metrics.", - "operationId": "ManagedInstances_ListMetrics", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ManagedInstanceNameParameter" - }, - { - "name": "metric", - "in": "query", - "description": "Name of the metrics to get.", - "required": false, - "type": "string" - }, - { - "name": "timespan", - "in": "query", - "description": "The timespan for the metric.", - "required": false, - "type": "string" - }, - { - "name": "aggregation", - "in": "query", - "description": "The aggregation type to use.", - "required": false, - "type": "string" - }, - { - "name": "interval", - "in": "query", - "description": "The time step to be used to summarize the metric values.", - "required": false, - "type": "string" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved the list of databases.", - "schema": { - "$ref": "#/definitions/MetricListResult" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 ServerNotFound - The requested server was not found.\n\n * 405 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "List metrics by managed instance": { - "$ref": "./examples/ManagedInstancesListMetrics.json" - } - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances": { "get": { "tags": [ @@ -630,274 +518,6 @@ } }, "definitions": { - "MetricDefinitionListResult": { - "description": "A list of metric definition resources.", - "type": "object", - "properties": { - "value": { - "description": "Array of results.", - "type": "array", - "items": { - "$ref": "#/definitions/MetricDefinition" - }, - "readOnly": true - }, - "nextLink": { - "description": "Link to retrieve next page of results.", - "type": "string", - "readOnly": true - } - } - }, - "MetricDefinition": { - "description": "A metric definition resource.", - "type": "object", - "properties": { - "name": { - "$ref": "#/definitions/MetricName", - "description": "Name of the metric.", - "readOnly": true - }, - "unit": { - "description": "The unit of the metric.", - "enum": [ - "Count", - "Bytes", - "Seconds", - "Percent", - "CountPerSecond", - "BytesPerSecond" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "UnitType", - "modelAsString": true - } - }, - "resourceId": { - "description": "The uri of the resource that the metric describes.", - "type": "string", - "readOnly": true - }, - "primaryAggregationType": { - "description": "The primary aggregation type defining how metric values are displayed.", - "enum": [ - "None", - "Average", - "Count", - "Minimum", - "Maximum", - "Total" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "PrimaryAggregationType", - "modelAsString": true - } - }, - "supportedAggregationTypes": { - "description": "The supported aggregation types defining how metric values are displayed.", - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - }, - "metricAvailabilities": { - "description": "The list of metric availabilities for the metric.", - "type": "array", - "items": { - "$ref": "#/definitions/MetricAvailability" - }, - "readOnly": true - } - } - }, - "MetricName": { - "description": "A managed instance metric name.", - "type": "object", - "properties": { - "value": { - "description": "The name of the database metric.", - "type": "string", - "readOnly": true - }, - "localizedValue": { - "description": "The friendly name of the database metric.", - "type": "string", - "readOnly": true - } - } - }, - "MetricAvailability": { - "description": "A metric availability value.", - "type": "object", - "properties": { - "timeGrain": { - "description": "The granularity of the database metric.", - "enum": [ - "PT5M", - "PT1H", - "P1D" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "TimeGrainType", - "modelAsString": true - } - }, - "retention": { - "description": "The length of retention for the database metric.", - "enum": [ - "P14D" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "RetentionType", - "modelAsString": true - } - } - } - }, - "MetricListResult": { - "description": "A list of metric resources.", - "type": "object", - "properties": { - "value": { - "description": "Array of results.", - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - }, - "readOnly": true - }, - "nextLink": { - "description": "Link to retrieve next page of results.", - "type": "string", - "readOnly": true - } - } - }, - "Metric": { - "description": "A metric resource.", - "type": "object", - "properties": { - "name": { - "$ref": "#/definitions/MetricName", - "description": "The name information for the metric.", - "readOnly": true - }, - "unit": { - "description": "The unit of the metric.", - "enum": [ - "Count", - "Bytes", - "Seconds", - "Percent", - "CountPerSecond", - "BytesPerSecond" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "UnitType", - "modelAsString": true - } - }, - "timeGrain": { - "description": "The time step to be used to summarize the metric values.", - "enum": [ - "PT5M", - "PT1H", - "P1D" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "TimeGrainType", - "modelAsString": true - } - }, - "startTime": { - "description": "The start time for the metric (ISO-8601 format).", - "type": "string", - "readOnly": true - }, - "endTime": { - "description": "The end time for the metric (ISO-8601 format).", - "type": "string", - "readOnly": true - }, - "timeseries": { - "description": "The metric timeseries for the specified time window and timestep.", - "type": "array", - "items": { - "$ref": "#/definitions/MetricTimeseries" - }, - "readOnly": true - } - } - }, - "MetricTimeseries": { - "description": "A metric timeseries.", - "type": "object", - "properties": { - "data": { - "description": "The metric values for the specified time window and timestep.", - "type": "array", - "items": { - "$ref": "#/definitions/MetricValue" - }, - "readOnly": true - } - } - }, - "MetricValue": { - "description": "A metric value.", - "type": "object", - "properties": { - "timeStamp": { - "format": "date-time", - "description": "The metric timestamp (ISO-8601 format).", - "type": "string", - "readOnly": true - }, - "average": { - "format": "double", - "description": "The average value of the metric.", - "type": "number", - "readOnly": true - }, - "minimum": { - "format": "double", - "description": "The min value of the metric.", - "type": "number", - "readOnly": true - }, - "maximum": { - "format": "double", - "description": "The max value of the metric.", - "type": "number", - "readOnly": true - }, - "total": { - "format": "double", - "description": "The total value of the metric.", - "type": "number", - "readOnly": true - }, - "count": { - "format": "int32", - "description": "The number of values for the metric.", - "type": "integer", - "readOnly": true - } - } - }, "ManagedInstanceListResult": { "description": "A list of managed instances.", "type": "object", @@ -917,36 +537,6 @@ } } }, - "ResourceIdentity": { - "description": "Azure Active Directory identity configuration for a resource.", - "type": "object", - "properties": { - "principalId": { - "format": "uuid", - "description": "The Azure Active Directory principal id.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.", - "enum": [ - "None", - "SystemAssigned" - ], - "type": "string", - "x-ms-enum": { - "name": "IdentityTypeWithNone", - "modelAsString": true - } - }, - "tenantId": { - "format": "uuid", - "description": "The Azure Active Directory tenant id.", - "type": "string", - "readOnly": true - } - } - }, "ManagedInstanceProperties": { "description": "The properties of a managed instance.", "type": "object", @@ -1212,7 +802,7 @@ ], "properties": { "identity": { - "$ref": "#/definitions/ResourceIdentity", + "$ref": "../../../common/v1/types.json#/definitions/ResourceIdentity", "description": "The Azure Active Directory identity of the managed instance.", "x-ms-mutability": [ "read", @@ -1239,7 +829,7 @@ "description": "Managed instance sku" }, "identity": { - "$ref": "#/definitions/ResourceIdentity", + "$ref": "../../../common/v1/types.json#/definitions/ResourceIdentity", "description": "Managed instance identity" }, "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/Servers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/Servers.json index bb98fb3ea22e..f3d6e5565f33 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/Servers.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/Servers.json @@ -346,36 +346,6 @@ } } }, - "ResourceIdentity": { - "description": "Azure Active Directory identity configuration for a resource.", - "type": "object", - "properties": { - "principalId": { - "format": "uuid", - "description": "The Azure Active Directory principal id.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.", - "enum": [ - "None", - "SystemAssigned" - ], - "type": "string", - "x-ms-enum": { - "name": "IdentityTypeWithNone", - "modelAsString": true - } - }, - "tenantId": { - "format": "uuid", - "description": "The Azure Active Directory tenant id.", - "type": "string", - "readOnly": true - } - } - }, "ServerProperties": { "description": "The properties of a server.", "type": "object", @@ -557,7 +527,7 @@ ], "properties": { "identity": { - "$ref": "#/definitions/ResourceIdentity", + "$ref": "../../../common/v1/types.json#/definitions/ResourceIdentity", "description": "The Azure Active Directory identity of the server.", "x-ms-mutability": [ "read", @@ -581,7 +551,7 @@ "type": "object", "properties": { "identity": { - "$ref": "#/definitions/ResourceIdentity", + "$ref": "../../../common/v1/types.json#/definitions/ResourceIdentity", "description": "Server identity" }, "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/examples/ManagedInstancesListMetricDefinitions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/examples/ManagedInstancesListMetricDefinitions.json deleted file mode 100644 index d8924ac6dba9..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/examples/ManagedInstancesListMetricDefinitions.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "Test1", - "managedInstanceName": "managedInstance", - "api-version": "2020-08-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": { - "value": "reserved_storage_mb", - "localizedValue": "Storage space reserved" - }, - "unit": "Bytes", - "resourceId": "/subscriptions/932e64b2-e71f-4873-8b1c-6cb6b41768c7/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl", - "primaryAggregationType": "Average", - "supportedAggregationTypes": [ - "Average", - "Minimum", - "Maximum", - "Count" - ], - "metricAvailabilities": [ - { - "timeGrain": "PT5M", - "retention": "P14D" - }, - { - "timeGrain": "PT1H", - "retention": "P14D" - }, - { - "timeGrain": "P1D", - "retention": "P14D" - } - ] - }, - { - "name": { - "value": "storage_space_used_mb", - "localizedValue": "Storage space used" - }, - "unit": "Bytes", - "resourceId": "/subscriptions/932e64b2-e71f-4873-8b1c-6cb6b41768c7/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl", - "primaryAggregationType": "Average", - "supportedAggregationTypes": [ - "Average", - "Minimum", - "Maximum", - "Count" - ], - "metricAvailabilities": [ - { - "timeGrain": "PT5M", - "retention": "P14D" - }, - { - "timeGrain": "PT1H", - "retention": "P14D" - }, - { - "timeGrain": "P1D", - "retention": "P14D" - } - ] - }, - { - "name": { - "value": "avg_cpu_percent", - "localizedValue": "Average CPU percentage" - }, - "unit": "Percent", - "resourceId": "/subscriptions/932e64b2-e71f-4873-8b1c-6cb6b41768c7/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl", - "primaryAggregationType": "Average", - "supportedAggregationTypes": [ - "Average", - "Minimum", - "Maximum", - "Count" - ], - "metricAvailabilities": [ - { - "timeGrain": "PT5M", - "retention": "P14D" - }, - { - "timeGrain": "PT1H", - "retention": "P14D" - }, - { - "timeGrain": "P1D", - "retention": "P14D" - } - ] - }, - { - "name": { - "value": "virtual_core_count", - "localizedValue": "Virtual core count" - }, - "unit": "Count", - "resourceId": "/subscriptions/932e64b2-e71f-4873-8b1c-6cb6b41768c7/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl", - "primaryAggregationType": "Average", - "supportedAggregationTypes": [ - "Average", - "Minimum", - "Maximum", - "Count" - ], - "metricAvailabilities": [ - { - "timeGrain": "PT5M", - "retention": "P14D" - }, - { - "timeGrain": "PT1H", - "retention": "P14D" - }, - { - "timeGrain": "P1D", - "retention": "P14D" - } - ] - } - ] - } - } - } -} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/examples/ManagedInstancesListMetrics.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/examples/ManagedInstancesListMetrics.json deleted file mode 100644 index 424b1a046afa..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/examples/ManagedInstancesListMetrics.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "Test1", - "managedInstanceName": "managedInstance", - "metric": "avg_cpu_percent", - "timespan": "2018-03-01T00:00:00Z/2018-03-03T18:00:00Z", - "aggregation": "average", - "interval": "PT5M", - "api-version": "2020-08-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": { - "value": "avg_cpu_percent", - "localizedValue": "Average CPU percentage" - }, - "unit": "Percent", - "timeGrain": "PT5M", - "startTime": "3/1/2018 1:00:00 AM", - "endTime": "3/3/2018 7:00:00 PM", - "timeseries": [ - { - "data": [ - { - "timeStamp": "2018-03-02T13:30:01Z", - "average": 1.881666, - "minimum": 0.13, - "maximum": 7.06, - "count": 12 - }, - { - "timeStamp": "2018-03-02T13:35:01Z", - "average": 0.8755, - "minimum": 0.12, - "maximum": 4.22, - "count": 20 - }, - { - "timeStamp": "2018-03-02T13:40:01Z", - "average": 0.4665, - "minimum": 0.14, - "maximum": 2.31, - "count": 20 - }, - { - "timeStamp": "2018-03-02T13:45:01Z", - "average": 0.3545, - "minimum": 0.13, - "maximum": 1.72, - "count": 20 - }, - { - "timeStamp": "2018-03-02T13:50:01Z", - "average": 0.3505, - "minimum": 0.13, - "maximum": 1.38, - "count": 20 - }, - { - "timeStamp": "2018-03-02T13:55:01Z", - "average": 0.3535, - "minimum": 0.13, - "maximum": 1.39, - "count": 20 - }, - { - "timeStamp": "2018-03-02T14:00:01Z", - "average": 0.418, - "minimum": 0.13, - "maximum": 1.54, - "count": 20 - }, - { - "timeStamp": "2018-03-02T14:05:01Z", - "average": 0.35, - "minimum": 0.15, - "maximum": 1.44, - "count": 20 - }, - { - "timeStamp": "2018-03-02T14:10:01Z", - "average": 0.3525, - "minimum": 0.14, - "maximum": 1.41, - "count": 20 - }, - { - "timeStamp": "2018-03-02T14:15:01Z", - "average": 0.352, - "minimum": 0.15, - "maximum": 1.56, - "count": 20 - }, - { - "timeStamp": "2018-03-02T14:20:01Z", - "average": 0.3495, - "minimum": 0.16, - "maximum": 1.41, - "count": 20 - }, - { - "timeStamp": "2018-03-02T14:25:01Z", - "average": 0.368, - "minimum": 0.15, - "maximum": 1.31, - "count": 20 - }, - { - "timeStamp": "2018-03-02T14:30:01Z", - "average": 0.438, - "minimum": 0.15, - "maximum": 2.69, - "count": 20 - }, - { - "timeStamp": "2018-03-02T14:35:01Z", - "average": 0.3895, - "minimum": 0.16, - "maximum": 1.29, - "count": 20 - }, - { - "timeStamp": "2018-03-02T14:40:01Z", - "average": 0.3515, - "minimum": 0.12, - "maximum": 1.41, - "count": 20 - }, - { - "timeStamp": "2018-03-02T14:45:01Z", - "average": 0.405263, - "minimum": 0.12, - "maximum": 2.17, - "count": 19 - } - ] - } - ] - } - ] - } - } - } -} diff --git a/specification/sql/resource-manager/common/v1/types.json b/specification/sql/resource-manager/common/v1/types.json index 6fffe326ebf1..76517772a1e4 100644 --- a/specification/sql/resource-manager/common/v1/types.json +++ b/specification/sql/resource-manager/common/v1/types.json @@ -168,7 +168,9 @@ "type": { "description": "The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.", "enum": [ - "SystemAssigned" + "None", + "SystemAssigned", + "UserAssigned" ], "type": "string", "x-ms-enum": {