diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/BackupShortTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/BackupShortTermRetentionPolicies.json new file mode 100644 index 000000000000..c83e6aea1702 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/BackupShortTermRetentionPolicies.json @@ -0,0 +1,345 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies": { + "get": { + "tags": [ + "BackupShortTermRetentionPolicies" + ], + "description": "Gets a database's short term retention policy.", + "operationId": "BackupShortTermRetentionPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policy.", + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/ListShortTermRetentionPoliciesByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "BackupShortTermRetentionPolicies" + ], + "description": "Gets a database's short term retention policy.", + "operationId": "BackupShortTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policy.", + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/GetShortTermRetentionPolicy.json" + } + } + }, + "put": { + "tags": [ + "BackupShortTermRetentionPolicies" + ], + "description": "Updates a database's short term retention policy.", + "operationId": "BackupShortTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidDiffBackupIntervalHours - The differential backup interval hours of {0} is not a valid configuration. Valid differential backup interval must be {1} hours.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 FeatureIsNotAvailableForServiceTier - {0} is not available for {1} service tier.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\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." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the database.": { + "$ref": "./examples/UpdateShortTermRetentionPolicy.json" + } + } + }, + "patch": { + "tags": [ + "BackupShortTermRetentionPolicies" + ], + "description": "Updates a database's short term retention policy.", + "operationId": "BackupShortTermRetentionPolicies_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidDiffBackupIntervalHours - The differential backup interval hours of {0} is not a valid configuration. Valid differential backup interval must be {1} hours.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 FeatureIsNotAvailableForServiceTier - {0} is not available for {1} service tier.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\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." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the database.": { + "$ref": "./examples/UpdateShortTermRetentionPolicy.json" + } + } + } + } + }, + "definitions": { + "BackupShortTermRetentionPolicy": { + "description": "A short term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/BackupShortTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "BackupShortTermRetentionPolicyListResult": { + "description": "A list of short term retention policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/BackupShortTermRetentionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "BackupShortTermRetentionPolicyProperties": { + "description": "Properties of a short term retention policy", + "type": "object", + "properties": { + "retentionDays": { + "format": "int32", + "description": "The backup retention period in days. This is how many days Point-in-Time Restore will be supported.", + "type": "integer" + }, + "diffBackupIntervalInHours": { + "format": "int32", + "description": "The differential backup interval in hours. This is how many interval hours between each differential backup will be supported. This is only applicable to live databases but not dropped databases.", + "enum": [ + "12", + "24" + ], + "type": "integer", + "x-ms-enum": { + "name": "DiffBackupIntervalInHours", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/BlobAuditing.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/BlobAuditing.json new file mode 100644 index 000000000000..d5617158a0b9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/BlobAuditing.json @@ -0,0 +1,1087 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists auditing settings of a server.", + "operationId": "ServerBlobAuditingPolicies_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved server auditing settings.", + "schema": { + "$ref": "#/definitions/ServerBlobAuditingPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List auditing settings of a server": { + "$ref": "./examples/ServerAuditingSettingsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Gets a server's blob auditing policy.", + "operationId": "ServerBlobAuditingPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server blob auditing policy.", + "schema": { + "$ref": "#/definitions/ServerBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get a server's blob auditing policy": { + "$ref": "./examples/ServerBlobAuditingGet.json" + } + } + }, + "put": { + "tags": [ + "BlobAuditing" + ], + "description": "Creates or updates a server's blob auditing policy.", + "operationId": "ServerBlobAuditingPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "Properties of blob auditing policy", + "required": true, + "schema": { + "$ref": "#/definitions/ServerBlobAuditingPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the auditing settings.", + "schema": { + "$ref": "#/definitions/ServerBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidServerBlobAuditingPolicyCreateRequest - The create server blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 BlobAuditingStorageOutboundFirewallNotAllowed - Storage account is not in the list of allowed FQDNs, and, therefore, the outbound firewall rules will block the request.\n\n * 400 BlobAuditingNetworkSecurityPerimeterNotAllowed - Network Security Perimeter blocked outbound request to Storage Account\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerBlobAuditingPolicyInProgress - Set server blob auditing is already in progress.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Updating the auditing settings is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a server's blob auditing policy with minimal parameters": { + "$ref": "./examples/ServerBlobAuditingCreateMin.json" + }, + "Update a server's blob auditing policy with all parameters": { + "$ref": "./examples/ServerBlobAuditingCreateMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists auditing settings of a database.", + "operationId": "DatabaseBlobAuditingPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database auditing settings.", + "schema": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List audit settings of a database": { + "$ref": "./examples/DatabaseAuditingSettingsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Gets a database's blob auditing policy.", + "operationId": "DatabaseBlobAuditingPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database blob auditing policy.", + "schema": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a database's blob auditing policy": { + "$ref": "./examples/DatabaseBlobAuditingGet.json" + } + } + }, + "put": { + "tags": [ + "BlobAuditing" + ], + "description": "Creates or updates a database's blob auditing policy.", + "operationId": "DatabaseBlobAuditingPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The database blob auditing policy.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the database blob auditing policy.", + "schema": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 400 InvalidDatabaseBlobAuditingPolicyCreateRequest - The create database blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 BlobAuditingInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 BlobAuditingStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 BlobAuditingNoServerIdentity - The server identity is not correctly configured.\n\n * 400 BlobAuditingStorageOutboundFirewallNotAllowed - Storage account is not in the list of allowed FQDNs, and, therefore, the outbound firewall rules will block the request.\n\n * 400 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\n\n * 400 BlobAuditingAdalTokenError - The operation could not get access token for the storage account because an Azure Active Directory error was encountered.\n\n * 400 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 BlobAuditingIsNotSupportedOnGeoDr - Blob auditing can be configured on primary databases only.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created the database blob auditing policy.", + "schema": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + } + } + }, + "x-ms-examples": { + "Create or update a database's blob auditing policy with minimal parameters": { + "$ref": "./examples/DatabaseBlobAuditingCreateMin.json" + }, + "Create or update a database's blob auditing policy with all parameters": { + "$ref": "./examples/DatabaseBlobAuditingCreateMax.json" + }, + "Create or update a database's azure monitor auditing policy with minimal parameters": { + "$ref": "./examples/DatabaseAzureMonitorAuditingCreateMin.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists extended auditing settings of a database.", + "operationId": "ExtendedDatabaseBlobAuditingPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database extended auditing settings.", + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List extended auditing settings of a database": { + "$ref": "./examples/DatabaseExtendedAuditingSettingsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Gets an extended database's blob auditing policy.", + "operationId": "ExtendedDatabaseBlobAuditingPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the extended database blob auditing policy.", + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get an extended database's blob auditing policy": { + "$ref": "./examples/ExtendedDatabaseBlobAuditingGet.json" + } + } + }, + "put": { + "tags": [ + "BlobAuditing" + ], + "description": "Creates or updates an extended database's blob auditing policy.", + "operationId": "ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The extended database blob auditing policy.", + "required": true, + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the extended database blob auditing policy.", + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 400 BlobAuditingPredicateExpressionSyntaxError - Invalid value of parameter 'predicateExpression'.\n\n * 400 InvalidDatabaseBlobAuditingPolicyCreateRequest - The create database blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingPredicateExpressionEmpty - Invalid parameter 'predicateExpression', value can not be empty.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 BlobAuditingInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 BlobAuditingStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 BlobAuditingNoServerIdentity - The server identity is not correctly configured.\n\n * 400 BlobAuditingStorageOutboundFirewallNotAllowed - Storage account is not in the list of allowed FQDNs, and, therefore, the outbound firewall rules will block the request.\n\n * 400 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\n\n * 400 BlobAuditingAdalTokenError - The operation could not get access token for the storage account because an Azure Active Directory error was encountered.\n\n * 400 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 BlobAuditingIsNotSupportedOnGeoDr - Blob auditing can be configured on primary databases only.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created the extended database blob auditing policy.", + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + } + } + }, + "x-ms-examples": { + "Create or update an extended database's blob auditing policy with minimal parameters": { + "$ref": "./examples/ExtendedDatabaseBlobAuditingCreateMin.json" + }, + "Create or update an extended database's blob auditing policy with all parameters": { + "$ref": "./examples/ExtendedDatabaseBlobAuditingCreateMax.json" + }, + "Create or update an extended database's azure monitor auditing policy with minimal parameters": { + "$ref": "./examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists extended auditing settings of a server.", + "operationId": "ExtendedServerBlobAuditingPolicies_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved extended server auditing settings.", + "schema": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List extended auditing settings of a server": { + "$ref": "./examples/ServerExtendedAuditingSettingsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Gets an extended server's blob auditing policy.", + "operationId": "ExtendedServerBlobAuditingPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the extended server blob auditing policy.", + "schema": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get a server's blob extended auditing policy": { + "$ref": "./examples/ExtendedServerBlobAuditingGet.json" + } + } + }, + "put": { + "tags": [ + "BlobAuditing" + ], + "description": "Creates or updates an extended server's blob auditing policy.", + "operationId": "ExtendedServerBlobAuditingPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BlobAuditingPolicyNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "Properties of extended blob auditing policy", + "required": true, + "schema": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the extended auditing settings.", + "schema": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerBlobAuditingPolicyCreateRequest - The create server blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingPredicateExpressionEmpty - Invalid parameter 'predicateExpression', value can not be empty.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 BlobAuditingStorageOutboundFirewallNotAllowed - Storage account is not in the list of allowed FQDNs, and, therefore, the outbound firewall rules will block the request.\n\n * 400 BlobAuditingNetworkSecurityPerimeterNotAllowed - Network Security Perimeter blocked outbound request to Storage Account\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerBlobAuditingPolicyInProgress - Set server blob auditing is already in progress.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Updating the extended auditing settings is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a server's extended blob auditing policy with minimal parameters": { + "$ref": "./examples/ExtendedServerBlobAuditingCreateMin.json" + }, + "Update a server's extended blob auditing policy with all parameters": { + "$ref": "./examples/ExtendedServerBlobAuditingCreateMax.json" + } + } + } + } + }, + "definitions": { + "DatabaseBlobAuditingPolicy": { + "description": "A database blob auditing policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseBlobAuditingPolicyListResult": { + "description": "A list of database auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseBlobAuditingPolicyProperties": { + "description": "Properties of a database blob auditing policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the audit logs in the storage account.", + "type": "integer" + }, + "auditActionsAndGroups": { + "description": "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)", + "type": "array", + "items": { + "type": "string" + } + }, + "isStorageSecondaryKeyInUse": { + "description": "Specifies whether storageAccountAccessKey value is the storage's secondary key.", + "type": "boolean" + }, + "isAzureMonitorTargetEnabled": { + "description": "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "queueDelayMs": { + "format": "int32", + "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", + "type": "integer" + }, + "isManagedIdentityInUse": { + "description": "Specifies whether Managed Identity is used to access blob storage", + "type": "boolean" + }, + "state": { + "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "BlobAuditingPolicyState", + "modelAsString": false + } + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountSubscriptionId": { + "format": "uuid", + "description": "Specifies the blob storage subscription Id.", + "type": "string" + } + } + }, + "ExtendedDatabaseBlobAuditingPolicy": { + "description": "An extended database blob auditing policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ExtendedDatabaseBlobAuditingPolicyListResult": { + "description": "A list of database extended auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ExtendedDatabaseBlobAuditingPolicyProperties": { + "description": "Properties of an extended database blob auditing policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "predicateExpression": { + "description": "Specifies condition of where clause when creating an audit.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the audit logs in the storage account.", + "type": "integer" + }, + "auditActionsAndGroups": { + "description": "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)", + "type": "array", + "items": { + "type": "string" + } + }, + "isStorageSecondaryKeyInUse": { + "description": "Specifies whether storageAccountAccessKey value is the storage's secondary key.", + "type": "boolean" + }, + "isAzureMonitorTargetEnabled": { + "description": "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "queueDelayMs": { + "format": "int32", + "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", + "type": "integer" + }, + "isManagedIdentityInUse": { + "description": "Specifies whether Managed Identity is used to access blob storage", + "type": "boolean" + }, + "state": { + "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "BlobAuditingPolicyState", + "modelAsString": false + } + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountSubscriptionId": { + "format": "uuid", + "description": "Specifies the blob storage subscription Id.", + "type": "string" + } + } + }, + "ExtendedServerBlobAuditingPolicy": { + "description": "An extended server blob auditing policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ExtendedServerBlobAuditingPolicyListResult": { + "description": "A list of server extended auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ExtendedServerBlobAuditingPolicyProperties": { + "description": "Properties of an extended server blob auditing policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "isDevopsAuditEnabled": { + "description": "Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.\r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "predicateExpression": { + "description": "Specifies condition of where clause when creating an audit.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the audit logs in the storage account.", + "type": "integer" + }, + "auditActionsAndGroups": { + "description": "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)", + "type": "array", + "items": { + "type": "string" + } + }, + "isStorageSecondaryKeyInUse": { + "description": "Specifies whether storageAccountAccessKey value is the storage's secondary key.", + "type": "boolean" + }, + "isAzureMonitorTargetEnabled": { + "description": "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "queueDelayMs": { + "format": "int32", + "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", + "type": "integer" + }, + "isManagedIdentityInUse": { + "description": "Specifies whether Managed Identity is used to access blob storage", + "type": "boolean" + }, + "state": { + "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "BlobAuditingPolicyState", + "modelAsString": false + } + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountSubscriptionId": { + "format": "uuid", + "description": "Specifies the blob storage subscription Id.", + "type": "string" + } + } + }, + "ServerBlobAuditingPolicy": { + "description": "A server blob auditing policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerBlobAuditingPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerBlobAuditingPolicyListResult": { + "description": "A list of server auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerBlobAuditingPolicyProperties": { + "description": "Properties of a server blob auditing policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "isDevopsAuditEnabled": { + "description": "Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.\r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the audit logs in the storage account.", + "type": "integer" + }, + "auditActionsAndGroups": { + "description": "Specifies the Actions-Groups and Actions to audit.\r\n\r\nThe recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:\r\n\r\nBATCH_COMPLETED_GROUP,\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,\r\nFAILED_DATABASE_AUTHENTICATION_GROUP.\r\n\r\nThis above combination is also the set that is configured by default when enabling auditing from the Azure portal.\r\n\r\nThe supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records):\r\n\r\nAPPLICATION_ROLE_CHANGE_PASSWORD_GROUP\r\nBACKUP_RESTORE_GROUP\r\nDATABASE_LOGOUT_GROUP\r\nDATABASE_OBJECT_CHANGE_GROUP\r\nDATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_OBJECT_PERMISSION_CHANGE_GROUP\r\nDATABASE_OPERATION_GROUP\r\nDATABASE_PERMISSION_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_CHANGE_GROUP\r\nDATABASE_PRINCIPAL_IMPERSONATION_GROUP\r\nDATABASE_ROLE_MEMBER_CHANGE_GROUP\r\nFAILED_DATABASE_AUTHENTICATION_GROUP\r\nSCHEMA_OBJECT_ACCESS_GROUP\r\nSCHEMA_OBJECT_CHANGE_GROUP\r\nSCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP\r\nSCHEMA_OBJECT_PERMISSION_CHANGE_GROUP\r\nSUCCESSFUL_DATABASE_AUTHENTICATION_GROUP\r\nUSER_CHANGE_PASSWORD_GROUP\r\nBATCH_STARTED_GROUP\r\nBATCH_COMPLETED_GROUP\r\nDBCC_GROUP\r\nDATABASE_OWNERSHIP_CHANGE_GROUP\r\nDATABASE_CHANGE_GROUP\r\nLEDGER_OPERATION_GROUP\r\n\r\nThese are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.\r\n\r\nFor more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups).\r\n\r\nFor Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are:\r\nSELECT\r\nUPDATE\r\nINSERT\r\nDELETE\r\nEXECUTE\r\nRECEIVE\r\nREFERENCES\r\n\r\nThe general form for defining an action to be audited is:\r\n{action} ON {object} BY {principal}\r\n\r\nNote that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively.\r\n\r\nFor example:\r\nSELECT on dbo.myTable by public\r\nSELECT on DATABASE::myDatabase by public\r\nSELECT on SCHEMA::mySchema by public\r\n\r\nFor more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions)", + "type": "array", + "items": { + "type": "string" + } + }, + "isStorageSecondaryKeyInUse": { + "description": "Specifies whether storageAccountAccessKey value is the storage's secondary key.", + "type": "boolean" + }, + "isAzureMonitorTargetEnabled": { + "description": "Specifies whether audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.\r\nNote that for server level audit you should use the 'master' database as {databaseName}.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "queueDelayMs": { + "format": "int32", + "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", + "type": "integer" + }, + "isManagedIdentityInUse": { + "description": "Specifies whether Managed Identity is used to access blob storage", + "type": "boolean" + }, + "state": { + "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "BlobAuditingPolicyState", + "modelAsString": false + } + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountSubscriptionId": { + "format": "uuid", + "description": "Specifies the blob storage subscription Id.", + "type": "string" + } + } + } + }, + "parameters": { + "BlobAuditingPolicyNameParameter": { + "name": "blobAuditingPolicyName", + "in": "path", + "description": "The name of the blob auditing policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-parameter-location": "method", + "x-ms-enum": { + "name": "blobAuditingPolicyName", + "modelAsString": false + } + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DataMaskingPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DataMaskingPolicies.json new file mode 100644 index 000000000000..b1f7718a2b0c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DataMaskingPolicies.json @@ -0,0 +1,240 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}": { + "get": { + "tags": [ + "DataMaskingPolicies" + ], + "description": "Gets the database data masking policy.", + "operationId": "DataMaskingPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "dataMaskingPolicyName", + "in": "path", + "description": "The name of the database for which the data masking policy applies.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "DataMaskingPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database data masking policies.", + "schema": { + "$ref": "#/definitions/DataMaskingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-examples": { + "Gets the database data masking policies.": { + "$ref": "./examples/DataMaskingPolicyGet.json" + } + } + }, + "put": { + "tags": [ + "DataMaskingPolicies" + ], + "description": "Creates or updates a database data masking policy.", + "operationId": "DataMaskingPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "dataMaskingPolicyName", + "in": "path", + "description": "The name of the database for which the data masking policy applies.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "DataMaskingPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "Parameters for creating or updating a data masking policy.", + "required": true, + "schema": { + "$ref": "#/definitions/DataMaskingPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created database data masking policy.", + "schema": { + "$ref": "#/definitions/DataMaskingPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***" + }, + "201": { + "description": "Successfully created database data masking policy..", + "schema": { + "$ref": "#/definitions/DataMaskingPolicy" + } + } + }, + "x-ms-examples": { + "Create or update data masking policy max": { + "$ref": "./examples/DataMaskingPolicyCreateOrUpdateMax.json" + }, + "Create or update data masking policy min.": { + "$ref": "./examples/DataMaskingPolicyCreateOrUpdateMin.json" + } + } + } + } + }, + "definitions": { + "DataMaskingPolicy": { + "description": "A database data masking policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "location": { + "description": "The location of the data masking policy.", + "type": "string", + "readOnly": true + }, + "kind": { + "description": "The kind of Data Masking Policy. Metadata, used for Azure portal.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DataMaskingPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DataMaskingPolicyProperties": { + "description": "The properties of a database data masking policy.", + "required": [ + "dataMaskingState" + ], + "type": "object", + "properties": { + "dataMaskingState": { + "description": "The state of the data masking policy.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "DataMaskingState", + "modelAsString": false + } + }, + "exemptPrincipals": { + "description": "The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries.", + "type": "string" + }, + "applicationPrincipals": { + "description": "The list of the application principals. This is a legacy parameter and is no longer used.", + "type": "string", + "readOnly": true + }, + "maskingLevel": { + "description": "The masking level. This is a legacy parameter and is no longer used.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DataMaskingRules.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DataMaskingRules.json new file mode 100644 index 000000000000..b39ab110b421 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DataMaskingRules.json @@ -0,0 +1,323 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules": { + "get": { + "tags": [ + "DataMaskingRules" + ], + "description": "Gets a list of database data masking rules.", + "operationId": "DataMaskingRules_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "dataMaskingPolicyName", + "in": "path", + "description": "The name of the database for which the data masking rule applies.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "DataMaskingPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of server's Advanced Threat Protection states.", + "schema": { + "$ref": "#/definitions/DataMaskingRuleListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of database data masking rules.": { + "$ref": "./examples/DataMaskingRuleListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}": { + "put": { + "tags": [ + "DataMaskingRules" + ], + "description": "Creates or updates a database data masking rule.", + "operationId": "DataMaskingRules_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "dataMaskingPolicyName", + "in": "path", + "description": "The name of the database for which the data masking policy applies.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "DataMaskingPolicyName", + "modelAsString": true + } + }, + { + "name": "dataMaskingRuleName", + "in": "path", + "description": "The name of the data masking rule.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating a data masking rule.", + "required": true, + "schema": { + "$ref": "#/definitions/DataMaskingRule" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set a database data masking rule.", + "schema": { + "$ref": "#/definitions/DataMaskingRule" + } + }, + "default": { + "description": "*** Error Responses: ***" + }, + "201": { + "description": "Successfully created a database data masking rule.", + "schema": { + "$ref": "#/definitions/DataMaskingRule" + } + } + }, + "x-ms-examples": { + "Create/Update data masking rule for default max.": { + "$ref": "./examples/DataMaskingRuleCreateOrUpdateDefaultMax.json" + }, + "Create/Update data masking rule for default min.": { + "$ref": "./examples/DataMaskingRuleCreateOrUpdateDefaultMin.json" + }, + "Create/Update data masking rule for numbers.": { + "$ref": "./examples/DataMaskingRuleCreateOrUpdateNumber.json" + }, + "Create/Update data masking rule for text.": { + "$ref": "./examples/DataMaskingRuleCreateOrUpdateText.json" + } + } + } + } + }, + "definitions": { + "DataMaskingRule": { + "description": "A database data masking rule.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "location": { + "description": "The location of the data masking rule.", + "type": "string", + "readOnly": true + }, + "kind": { + "description": "The kind of Data Masking Rule. Metadata, used for Azure portal.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DataMaskingRuleProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DataMaskingRuleListResult": { + "description": "The list of database data masking rules.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DataMaskingRule" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DataMaskingRuleProperties": { + "description": "The properties of a database data masking rule.", + "required": [ + "schemaName", + "tableName", + "columnName", + "maskingFunction" + ], + "type": "object", + "properties": { + "id": { + "description": "The rule Id.", + "type": "string", + "readOnly": true + }, + "ruleState": { + "description": "The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "DataMaskingRuleState", + "modelAsString": false + } + }, + "schemaName": { + "description": "The schema name on which the data masking rule is applied.", + "type": "string" + }, + "tableName": { + "description": "The table name on which the data masking rule is applied.", + "type": "string" + }, + "columnName": { + "description": "The column name on which the data masking rule is applied.", + "type": "string" + }, + "aliasName": { + "description": "The alias name. This is a legacy parameter and is no longer used.", + "type": "string" + }, + "maskingFunction": { + "description": "The masking function that is used for the data masking rule.", + "enum": [ + "Default", + "CCN", + "Email", + "Number", + "SSN", + "Text" + ], + "type": "string", + "x-ms-enum": { + "name": "DataMaskingFunction", + "modelAsString": false + } + }, + "numberFrom": { + "description": "The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.", + "type": "string" + }, + "numberTo": { + "description": "The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.", + "type": "string" + }, + "prefixSize": { + "description": "If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored.", + "type": "string" + }, + "suffixSize": { + "description": "If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored.", + "type": "string" + }, + "replacementString": { + "description": "If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored.", + "type": "string" + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DataWarehouseUserActivities.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DataWarehouseUserActivities.json new file mode 100644 index 000000000000..65f5b4bc4abe --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DataWarehouseUserActivities.json @@ -0,0 +1,199 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities": { + "get": { + "tags": [ + "DataWarehouseUserActivities" + ], + "description": "List the user activities of a data warehouse which includes running and suspended queries", + "operationId": "DataWarehouseUserActivities_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully list the data warehouse user activities.", + "schema": { + "$ref": "#/definitions/DataWarehouseUserActivitiesListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The specified resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List of the user activities of a data warehouse": { + "$ref": "./examples/ListDataWarehouseUserActivities.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}": { + "get": { + "tags": [ + "DataWarehouseUserActivities" + ], + "description": "Gets the user activities of a data warehouse which includes running and suspended queries", + "operationId": "DataWarehouseUserActivities_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "dataWarehouseUserActivityName", + "in": "path", + "description": "The activity name of the data warehouse. ", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "DataWarehouseUserActivityName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get the data warehouse user activities.", + "schema": { + "$ref": "#/definitions/DataWarehouseUserActivities" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The specified resource was not found." + } + }, + "x-ms-examples": { + "Get the list of the user activities of a data warehouse": { + "$ref": "./examples/GetDataWarehouseUserActivities.json" + } + } + } + } + }, + "definitions": { + "DataWarehouseUserActivities": { + "description": "User activities of a data warehouse", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DataWarehouseUserActivitiesProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DataWarehouseUserActivitiesListResult": { + "description": "User activities of a data warehouse", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DataWarehouseUserActivities" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DataWarehouseUserActivitiesProperties": { + "description": "User activities of a data warehouse. This currently includes the count of running or suspended queries. For more information, please view the sys.dm_pdw_exec_requests dynamic management view (DMV).", + "type": "object", + "properties": { + "activeQueriesCount": { + "format": "int32", + "description": "Count of running and suspended queries.", + "type": "integer", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseAdvancedThreatProtectionSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseAdvancedThreatProtectionSettings.json new file mode 100644 index 000000000000..2d3ba5a80697 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseAdvancedThreatProtectionSettings.json @@ -0,0 +1,292 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings": { + "get": { + "tags": [ + "DatabaseAdvancedThreatProtectionSettings" + ], + "description": "Gets a list of database's Advanced Threat Protection states.", + "operationId": "DatabaseAdvancedThreatProtectionSettings_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database Advanced Threat Protection states.", + "schema": { + "$ref": "#/definitions/DatabaseAdvancedThreatProtectionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidDatabaseAdvancedThreatProtectionCreateRequest - The create database Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 409 DatabaseAdvancedThreatProtectionInProgress - Setting the database Advanced Threat Protection is already in progress\n\n * 409 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 GetDatabaseAdvancedThreatProtectionFailed - Failed to get Advanced Threat Protection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Lists the database's Advanced Threat Protection settings.": { + "$ref": "./examples/DatabaseAdvancedThreatProtectionSettingsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}": { + "get": { + "tags": [ + "DatabaseAdvancedThreatProtectionSettings" + ], + "description": "Gets a database's Advanced Threat Protection state.", + "operationId": "DatabaseAdvancedThreatProtectionSettings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advancedThreatProtectionName", + "in": "path", + "description": "The name of the Advanced Threat Protection state.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AdvancedThreatProtectionName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database's Advanced Threat Protection state.", + "schema": { + "$ref": "#/definitions/DatabaseAdvancedThreatProtection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidDatabaseAdvancedThreatProtectionCreateRequest - The create database Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 409 DatabaseAdvancedThreatProtectionInProgress - Setting the database Advanced Threat Protection is already in progress\n\n * 409 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 GetDatabaseAdvancedThreatProtectionFailed - Failed to get Advanced Threat Protection settings" + } + }, + "x-ms-examples": { + "Get a database's Advanced Threat Protection settings.": { + "$ref": "./examples/DatabaseAdvancedThreatProtectionSettingsGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseAdvancedThreatProtectionSettings" + ], + "description": "Creates or updates a database's Advanced Threat Protection state.", + "operationId": "DatabaseAdvancedThreatProtectionSettings_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advancedThreatProtectionName", + "in": "path", + "description": "The name of the Advanced Threat Protection state.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AdvancedThreatProtectionName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The database Advanced Threat Protection state.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseAdvancedThreatProtection" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the database Advanced Threat Protection state.", + "schema": { + "$ref": "#/definitions/DatabaseAdvancedThreatProtection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidDatabaseAdvancedThreatProtectionCreateRequest - The create database Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 409 DatabaseAdvancedThreatProtectionInProgress - Setting the database Advanced Threat Protection is already in progress\n\n * 409 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 GetDatabaseAdvancedThreatProtectionFailed - Failed to get Advanced Threat Protection settings" + }, + "201": { + "description": "Successfully created the database Advanced Threat Protection state.", + "schema": { + "$ref": "#/definitions/DatabaseAdvancedThreatProtection" + } + } + }, + "x-ms-examples": { + "Update a database's Advanced Threat Protection settings with minimal parameters": { + "$ref": "./examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json" + }, + "Update a database's Advanced Threat Protection settings with all parameters": { + "$ref": "./examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json" + } + } + } + } + }, + "definitions": { + "AdvancedThreatProtectionProperties": { + "description": "Properties of an Advanced Threat Protection state.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.", + "enum": [ + "New", + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "AdvancedThreatProtectionState", + "modelAsString": false + } + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseAdvancedThreatProtection": { + "description": "A database Advanced Threat Protection.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of AdvancedThreatProtectionResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/AdvancedThreatProtectionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseAdvancedThreatProtectionListResult": { + "description": "A list of the database's Advanced Threat Protection configurations.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseAdvancedThreatProtection" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseAdvisors.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseAdvisors.json new file mode 100644 index 000000000000..3735b44e3325 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseAdvisors.json @@ -0,0 +1,665 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors": { + "get": { + "tags": [ + "DatabaseAdvisors" + ], + "description": "Gets a list of database advisors.", + "operationId": "DatabaseAdvisors_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "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 database advisors.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Advisor" + } + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "List of database advisors": { + "$ref": "./examples/DatabaseAdvisorList.json" + }, + "List of database recommended actions for all advisors": { + "$ref": "./examples/DatabaseRecommendedActionListExpand.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}": { + "get": { + "tags": [ + "DatabaseAdvisors" + ], + "description": "Gets a database advisor.", + "operationId": "DatabaseAdvisors_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Database Advisor.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved details of specified database advisor.", + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Get database advisor": { + "$ref": "./examples/DatabaseAdvisorGet.json" + } + } + }, + "patch": { + "tags": [ + "DatabaseAdvisors" + ], + "description": "Updates a database advisor.", + "operationId": "DatabaseAdvisors_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Database Advisor.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested advisor resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the specified database advisor.", + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 400 InvalidAdvisorUpsertRequest - The update advisor request body does not exist or has no properties object.\n\n * 400 InvalidAdvisorAutoExecuteStatus - Specified auto-execute status for the advisor is not allowed.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 AutomaticTuningOptionNotFound - The requested automatic tuning option was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 409 DisabledBySystem - This option is disabled by system\n\n * 409 DefaultAdvisorStateNotAllowedInCustomDbMode - DEFAULT advisor state is not allowed in CUSTOM mode\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Update database advisor": { + "$ref": "./examples/DatabaseAdvisorUpdate.json" + } + } + } + } + }, + "definitions": { + "AdvisorProperties": { + "description": "Properties for a Database, Server or Elastic Pool Advisor.", + "required": [ + "autoExecuteStatus" + ], + "type": "object", + "properties": { + "advisorStatus": { + "description": "Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'.", + "enum": [ + "GA", + "PublicPreview", + "LimitedPublicPreview", + "PrivatePreview" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AdvisorStatus", + "modelAsString": false + } + }, + "autoExecuteStatus": { + "description": "Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'", + "enum": [ + "Enabled", + "Disabled", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "AutoExecuteStatus", + "modelAsString": false + } + }, + "autoExecuteStatusInheritedFrom": { + "description": "Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level).", + "enum": [ + "Default", + "Subscription", + "Server", + "ElasticPool", + "Database" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutoExecuteStatusInheritedFrom", + "modelAsString": false + } + }, + "recommendationsStatus": { + "description": "Gets that status of recommendations for this advisor and reason for not having any recommendations. Possible values include, but are not limited to, 'Ok' (Recommendations available),LowActivity (not enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc.", + "type": "string", + "readOnly": true + }, + "lastChecked": { + "format": "date-time", + "description": "Gets the time when the current resource was analyzed for recommendations by this advisor.", + "type": "string", + "readOnly": true + }, + "recommendedActions": { + "description": "Gets the recommended actions for this advisor.", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedAction" + }, + "readOnly": true + } + } + }, + "RecommendedActionProperties": { + "description": "Properties for a Database, Server or Elastic Pool Recommended Action.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "recommendationReason": { + "description": "Gets the reason for recommending this action. e.g., DuplicateIndex", + "type": "string", + "readOnly": true + }, + "validSince": { + "format": "date-time", + "description": "Gets the time since when this recommended action is valid.", + "type": "string", + "readOnly": true + }, + "lastRefresh": { + "format": "date-time", + "description": "Gets time when this recommended action was last refreshed.", + "type": "string", + "readOnly": true + }, + "state": { + "$ref": "#/definitions/RecommendedActionStateInfo", + "description": "Gets the info of the current state the recommended action is in." + }, + "isExecutableAction": { + "description": "Gets if this recommended action is actionable by user", + "type": "boolean", + "readOnly": true + }, + "isRevertableAction": { + "description": "Gets if changes applied by this recommended action can be reverted by user", + "type": "boolean", + "readOnly": true + }, + "isArchivedAction": { + "description": "Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a new recommended action again.", + "type": "boolean", + "readOnly": true + }, + "executeActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started applying this recommended action on the user resource. e.g., index creation start time", + "type": "string", + "readOnly": true + }, + "executeActionDuration": { + "format": "duration", + "description": "Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation", + "type": "string", + "readOnly": true + }, + "revertActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started reverting changes of this recommended action on user resource. e.g., time when index drop is executed.", + "type": "string", + "readOnly": true + }, + "revertActionDuration": { + "format": "duration", + "description": "Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for dropping the created index.", + "type": "string", + "readOnly": true + }, + "executeActionInitiatedBy": { + "description": "Gets if approval for applying this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "executeActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for execution.", + "type": "string", + "readOnly": true + }, + "revertActionInitiatedBy": { + "description": "Gets if approval for reverting this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "revertActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for revert.", + "type": "string", + "readOnly": true + }, + "score": { + "format": "int32", + "description": "Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High Impact", + "type": "integer", + "readOnly": true + }, + "implementationDetails": { + "$ref": "#/definitions/RecommendedActionImplementationInfo", + "description": "Gets the implementation details of this recommended action for user to apply it manually.", + "readOnly": true + }, + "errorDetails": { + "$ref": "#/definitions/RecommendedActionErrorInfo", + "description": "Gets the error details if and why this recommended action is put to error state.", + "readOnly": true + }, + "estimatedImpact": { + "description": "Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "observedImpact": { + "description": "Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "timeSeries": { + "description": "Gets the time series info of metrics for this recommended action e.g., CPU consumption time series", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionMetricInfo" + }, + "readOnly": true + }, + "linkedObjects": { + "description": "Gets the linked objects, if any.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "details": { + "description": "Gets additional details specific to this recommended action.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true + } + } + }, + "RecommendedActionStateInfo": { + "description": "Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "required": [ + "currentValue" + ], + "type": "object", + "properties": { + "currentValue": { + "description": "Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action. ", + "enum": [ + "Active", + "Pending", + "Executing", + "Verifying", + "PendingRevert", + "RevertCancelled", + "Reverting", + "Reverted", + "Ignored", + "Expired", + "Monitoring", + "Resolved", + "Success", + "Error" + ], + "type": "string", + "x-ms-enum": { + "name": "RecommendedActionCurrentState", + "modelAsString": true + } + }, + "actionInitiatedBy": { + "description": "Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity notified system to apply the recommended action. System -> When auto-execute status of this advisor was set to 'Enabled', in which case the system applied it.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "lastModified": { + "format": "date-time", + "description": "Gets the time when the state was last modified", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionImplementationInfo": { + "description": "Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "method": { + "description": "Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell.", + "enum": [ + "TSql", + "AzurePowerShell" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ImplementationMethod", + "modelAsString": false + } + }, + "script": { + "description": "Gets the manual implementation script. e.g., T-SQL script that could be executed on the database.", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionErrorInfo": { + "description": "Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "errorCode": { + "description": "Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists", + "type": "string", + "readOnly": true + }, + "isRetryable": { + "description": "Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No", + "enum": [ + "Yes", + "No" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "IsRetryable", + "modelAsString": false + } + } + } + }, + "RecommendedActionImpactRecord": { + "description": "Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "dimensionName": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "absoluteValue": { + "format": "double", + "description": "Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected", + "type": "number", + "readOnly": true + }, + "changeValueAbsolute": { + "format": "double", + "description": "Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes", + "type": "number", + "readOnly": true + }, + "changeValueRelative": { + "format": "double", + "description": "Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedActionMetricInfo": { + "description": "Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "metricName": { + "description": "Gets the name of the metric. e.g., CPU, Number of Queries.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the unit in which metric is measured. e.g., DTU, Frequency", + "type": "string", + "readOnly": true + }, + "timeGrain": { + "description": "Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour)", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Gets the start time of time interval given by this MetricInfo.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "double", + "description": "Gets the value of the metric in the time interval given by this MetricInfo.", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedAction": { + "description": "Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/RecommendedActionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "Advisor": { + "description": "Database, Server or Elastic Pool Advisor.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/AdvisorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseAutomaticTuning.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseAutomaticTuning.json new file mode 100644 index 000000000000..29845516879f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseAutomaticTuning.json @@ -0,0 +1,259 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current": { + "get": { + "tags": [ + "DatabaseAutomaticTuning" + ], + "description": "Gets a database's automatic tuning.", + "operationId": "DatabaseAutomaticTuning_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database automatic tuning properties.", + "schema": { + "$ref": "#/definitions/DatabaseAutomaticTuning" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 SystemDatabasesNotSupported - User tried to get automatic tuning information on system databases.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\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 * 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 * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Get a database's automatic tuning settings": { + "$ref": "./examples/DatabaseAutomaticTuningGet.json" + } + } + }, + "patch": { + "tags": [ + "DatabaseAutomaticTuning" + ], + "description": "Update automatic tuning properties for target database.", + "operationId": "DatabaseAutomaticTuning_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested automatic tuning resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseAutomaticTuning" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the specified database automatic tuning settings.", + "schema": { + "$ref": "#/definitions/DatabaseAutomaticTuning" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 SystemDatabasesNotSupported - User tried to get automatic tuning information on system databases.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 400 InvalidAutomaticTuningUpsertRequest - The update automatic tuning request body does not exist or has no properties object.\n\n * 400 InvalidAdvisorAutoExecuteStatus - Specified auto-execute status for the advisor is not allowed.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 AutomaticTuningOptionNotFound - The requested automatic tuning option was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\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 DisabledBySystem - This option is disabled by system\n\n * 409 DefaultAdvisorStateNotAllowedInCustomDbMode - DEFAULT advisor state is not allowed in CUSTOM mode\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 * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Updates database automatic tuning settings with minimal properties": { + "$ref": "./examples/DatabaseAutomaticTuningUpdateMin.json" + }, + "Updates database automatic tuning settings with all properties": { + "$ref": "./examples/DatabaseAutomaticTuningUpdateMax.json" + } + } + } + } + }, + "definitions": { + "AutomaticTuningOptions": { + "description": "Automatic tuning properties for individual advisors.", + "type": "object", + "properties": { + "desiredState": { + "description": "Automatic tuning option desired state.", + "enum": [ + "Off", + "On", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "AutomaticTuningOptionModeDesired", + "modelAsString": false + } + }, + "actualState": { + "description": "Automatic tuning option actual state.", + "enum": [ + "Off", + "On" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningOptionModeActual", + "modelAsString": false + } + }, + "reasonCode": { + "format": "int32", + "description": "Reason code if desired and actual state are different.", + "type": "integer", + "readOnly": true + }, + "reasonDesc": { + "description": "Reason description if desired and actual state are different.", + "enum": [ + "Default", + "Disabled", + "AutoConfigured", + "InheritedFromServer", + "QueryStoreOff", + "QueryStoreReadOnly", + "NotSupported" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningDisabledReason", + "modelAsString": false + } + } + } + }, + "DatabaseAutomaticTuning": { + "description": "Database-level Automatic Tuning.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseAutomaticTuningProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseAutomaticTuningProperties": { + "description": "Database-level Automatic Tuning properties.", + "type": "object", + "properties": { + "desiredState": { + "description": "Automatic tuning desired state.", + "enum": [ + "Inherit", + "Custom", + "Auto", + "Unspecified" + ], + "type": "string", + "x-ms-enum": { + "name": "AutomaticTuningMode", + "modelAsString": false + } + }, + "actualState": { + "description": "Automatic tuning actual state.", + "enum": [ + "Inherit", + "Custom", + "Auto", + "Unspecified" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningMode", + "modelAsString": false + } + }, + "options": { + "description": "Automatic tuning options definition.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AutomaticTuningOptions" + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseColumns.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseColumns.json new file mode 100644 index 000000000000..dad012e7ab86 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseColumns.json @@ -0,0 +1,382 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/columns": { + "get": { + "tags": [ + "DatabaseColumns" + ], + "description": "List database columns", + "operationId": "DatabaseColumns_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schema", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "table", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "column", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "$skiptoken", + "in": "query", + "description": "An opaque token that identifies a starting point in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database columns.", + "schema": { + "$ref": "#/definitions/DatabaseColumnListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UnsupportedColumnOrderByProperty - The order-by property '{0}' is not supported. Allowed properties are: {1}.\n\n * 400 UnsupportedColumnSortDirection - The column sort direction '{0}' is not supported. Allowed values are: {1}.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database columns": { + "$ref": "./examples/ColumnsListByDatabaseMin.json" + }, + "Filter database columns": { + "$ref": "./examples/ColumnsListByDatabaseMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns": { + "get": { + "tags": [ + "DatabaseColumns" + ], + "description": "List database columns", + "operationId": "DatabaseColumns_ListByTable", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database columns.", + "schema": { + "$ref": "#/definitions/DatabaseColumnListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseColumn", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database columns": { + "$ref": "./examples/DatabaseColumnListByTable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}": { + "get": { + "tags": [ + "DatabaseColumns" + ], + "description": "Get database column", + "operationId": "DatabaseColumns_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database column.", + "schema": { + "$ref": "#/definitions/DatabaseColumn" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get database column": { + "$ref": "./examples/DatabaseColumnGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseColumn": { + "description": "A database column resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseColumnProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseColumnListResult": { + "description": "A list of database columns.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseColumn" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseColumnProperties": { + "description": "Database column properties.", + "type": "object", + "properties": { + "columnType": { + "description": "The column data type.", + "enum": [ + "image", + "text", + "uniqueidentifier", + "date", + "time", + "datetime2", + "datetimeoffset", + "tinyint", + "smallint", + "int", + "smalldatetime", + "real", + "money", + "datetime", + "float", + "sql_variant", + "ntext", + "bit", + "decimal", + "numeric", + "smallmoney", + "bigint", + "hierarchyid", + "geometry", + "geography", + "varbinary", + "varchar", + "binary", + "char", + "timestamp", + "nvarchar", + "nchar", + "xml", + "sysname" + ], + "type": "string", + "x-ms-enum": { + "name": "ColumnDataType", + "modelAsString": true + } + }, + "temporalType": { + "description": "The table temporal type.", + "enum": [ + "NonTemporalTable", + "HistoryTable", + "SystemVersionedTemporalTable" + ], + "type": "string", + "x-ms-enum": { + "name": "TableTemporalType", + "modelAsString": true + } + }, + "memoryOptimized": { + "description": "Whether or not the column belongs to a memory optimized table.", + "type": "boolean" + }, + "isComputed": { + "description": "Whether or not the column is computed.", + "type": "boolean" + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseEncryptionProtectorRevalidate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseEncryptionProtectorRevalidate.json new file mode 100644 index 000000000000..783cd170b3aa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseEncryptionProtectorRevalidate.json @@ -0,0 +1,110 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/encryptionProtector/{encryptionProtectorName}/revalidate": { + "post": { + "tags": [ + "DatabaseEncryptionProtectorRevalidate" + ], + "description": "Revalidates an existing encryption protector for a particular database.", + "operationId": "DatabaseEncryptionProtectors_Revalidate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be updated.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully revalidated the encryption protector." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 DatabaseLevelEncryptionProtectorDoesNotExist - Database-level encryption protector does not exist.\n\n * 400 RevertDatabaseLevelKeyOnlySupportedWithSMK - Database-level encryption protector can only be reverted to the server level encryption when the server is configured with Microsoft Managed Key.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 ManagementServiceManagedServerDisabled - Operation failed since Managed Instance '{0}' is disabled. Please enable Managed Instance and try again.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 UpdatingInstanceAndBackupRedundancy - Instance zone redundancy and backup storage redundancy cannot be updated in the same request.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 RequestCantLandOnPaaSv2Platform - Request needs to land on PaaSv2 platform but PaaSv2 is not enabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 DeleteOfVersion2VirtualClusterIsDisabled - Delete of virtual cluster with version 2 is not enabled.\n\n * 400 DeleteOfVirtualClusterIsDisabled - Delete of virtual cluster is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 DnsRefreshOnVirtualClusterIsDisabled - Refresh of DNS records on virtual cluster is not enabled.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerKeyNotFound - The requested server key was not found on the current subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 EncryptionProtectorChangeInProgress - Cannot update database encryption key protector while protector change is already in progress\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - The instance is multi-az but backup storage is being updated from zone redundant to non-zone redundant.\n\n * 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - Cannot update instance redundancy because backup storage redundancy update is in progress.\n\n * 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - The backup storage is non-zone redundant but instance redundancy is being updated to zone redundant.\n\n * 409 BackupRedundancyUpdateConflict - Cannot update backup storage redundancy because a backup storage redundancy update is already in progress.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 412 InstanceNotReadyForBackupRedundancyUpdate - Cannot update backup storage redundancy because the instance is not ready.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Revalidates the encryption protector for a particular database": { + "$ref": "./examples/DatabaseEncryptionProtectorRevalidate.json" + } + } + } + } + }, + "definitions": {}, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseEncryptionProtectorRevert.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseEncryptionProtectorRevert.json new file mode 100644 index 000000000000..9f5b46ebadcd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseEncryptionProtectorRevert.json @@ -0,0 +1,110 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/encryptionProtector/{encryptionProtectorName}/revert": { + "post": { + "tags": [ + "DatabaseEncryptionProtectorRevert" + ], + "description": "Reverts an existing encryption protector for a particular database.", + "operationId": "DatabaseEncryptionProtectors_Revert", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be updated.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully Reverted the encryption protector." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 DatabaseLevelEncryptionProtectorDoesNotExist - Database-level encryption protector does not exist.\n\n * 400 RevertDatabaseLevelKeyOnlySupportedWithSMK - Database-level encryption protector can only be reverted to the server level encryption when the server is configured with Microsoft Managed Key.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerKeyNotFound - The requested server key was not found on the current subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 EncryptionProtectorChangeInProgress - Cannot update database encryption key protector while protector change is already in progress\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 * 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Reverts the encryption protector for a particular database": { + "$ref": "./examples/DatabaseEncryptionProtectorRevert.json" + } + } + } + } + }, + "definitions": {}, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseExtensions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseExtensions.json new file mode 100644 index 000000000000..130ffc582814 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseExtensions.json @@ -0,0 +1,478 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions": { + "get": { + "tags": [ + "DatabaseExtensions" + ], + "description": "List database extension. This will return an empty list as it is not supported.", + "operationId": "DatabaseExtensions_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List extensions import/export operations. This will return an empty list as it is not supported.", + "schema": { + "$ref": "#/definitions/ImportExportExtensionsOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database extensions.": { + "$ref": "./examples/ListDatabaseExtensions.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}": { + "get": { + "tags": [ + "DatabaseExtensions" + ], + "description": "Gets a database extension. This will return resource not found as it is not supported.", + "operationId": "DatabaseExtensions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "extensionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Get extensions import/export operation. This will return resource not found as it is not supported." + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-examples": { + "Get database extensions.": { + "$ref": "./examples/GetDatabaseExtensions.json" + } + } + }, + "put": { + "tags": [ + "DatabaseExtensions" + ], + "description": "Perform a database extension operation, like database import, database export, or polybase import", + "operationId": "DatabaseExtensions_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "extensionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The database import request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseExtensions" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed import/export operation.", + "schema": { + "$ref": "#/definitions/ImportExportExtensionsOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 InvalidImportExportInputParameter - The import/export request failed due to an invalid input parameter.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 InvalidSqlAuthType - ImportExport operation failed because the sql authentication type is invalid\n\n * 400 BlobAlreadyExist - ImportExport operation failed because the storage blob is already exists\n\n * 400 InvalidImportExportOperationResourceLocks - The Import/Export request is invalid due to locks on the Private Link resources.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidImportExportParameter - The Import/Export request failed due to an invalid input parameter.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 InvalidImportExportStorageCredentials - Import/Export operation failed due to invalid storage credentials\n\n * 400 InvalidImportExportStorageAuthType - Import/Export operation failed due to invalid storage auth type\n\n * 400 InvalidImportExportStorageKeyFormat - Import/Export operation failed due to invalid storage key format\n\n * 400 LongImportExportStorageUri - Import/Export operation failed due to long storage URI\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 LargeExportDatabaseSize - Export operation failed because database is larger than max supported size\n\n * 400 UnSupportedImportExportEdition - ImportExport operation failed because it is targeting a invalid edition\n\n * 400 InvalidImportExportStorageURI - ImportExport operation failed because storage URI is invalid\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Import/Export operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or Update database extensions.": { + "$ref": "./examples/CreateOrUpdateDatabaseExtensions.json" + }, + "Import database using database extension.": { + "$ref": "./examples/ImportDatabaseUsingDatabaseExtensions.json" + }, + "Export database using database extension.": { + "$ref": "./examples/ExportDatabaseUsingDatabaseExtensions.json" + } + } + } + } + }, + "definitions": { + "DatabaseExtensions": { + "description": "An Import, Export, or PolybaseImport resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseExtensionsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseExtensionsProperties": { + "description": "Contains the database information after a successful Import, Export, or PolybaseImport", + "required": [ + "operationMode", + "storageKeyType", + "storageKey", + "storageUri" + ], + "type": "object", + "properties": { + "operationMode": { + "description": "Operation mode of the operation: Import, Export, or PolybaseImport.", + "enum": [ + "PolybaseImport", + "Import", + "Export" + ], + "type": "string", + "x-ms-enum": { + "name": "OperationMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageKeyType": { + "description": "Storage key type: StorageAccessKey or SharedAccessKey.", + "enum": [ + "SharedAccessKey", + "StorageAccessKey" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageKey": { + "description": "Storage key for the storage account.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageUri": { + "description": "Storage Uri for the storage account.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLogin": { + "description": "Administrator login name.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLoginPassword": { + "description": "Administrator login password.", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create" + ] + }, + "authenticationType": { + "description": "Authentication type: SQL authentication or AD password.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "databaseEdition": { + "description": "Database edition for the newly created database in the case of an import operation.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "serviceObjectiveName": { + "description": "Database service level objective for the newly created database in the case of an import operation.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "maxSizeBytes": { + "description": "Database max size in bytes for the newly created database in the case of an import operation.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "networkIsolation": { + "$ref": "#/definitions/NetworkIsolationSettings", + "description": "Optional resource information to enable network isolation for request.", + "x-ms-mutability": [ + "create" + ] + } + } + }, + "ImportExportExtensionsOperationListResult": { + "description": "Import export operation extensions list.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ImportExportExtensionsOperationResult" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ImportExportExtensionsOperationResult": { + "description": "An Extension operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ImportExportExtensionsOperationResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ImportExportExtensionsOperationResultProperties": { + "description": "Contains the operation result properties for import/export operation.", + "type": "object", + "properties": { + "requestId": { + "format": "uuid", + "description": "Request Id.", + "type": "string", + "readOnly": true + }, + "requestType": { + "description": "Request type.", + "type": "string", + "readOnly": true + }, + "lastModifiedTime": { + "description": "Last modified time.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "Database name.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Operation status.", + "type": "string", + "readOnly": true + }, + "errorMessage": { + "description": "Error message.", + "type": "string", + "readOnly": true + }, + "queuedTime": { + "description": "Queued time.", + "type": "string", + "readOnly": true + }, + "blobUri": { + "description": "Blob URI.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnections": { + "description": "Gets the status of private endpoints associated with this request.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnectionRequestStatus" + }, + "x-ms-identifiers": [], + "readOnly": true + } + } + }, + "NetworkIsolationSettings": { + "description": "Contains the ARM resources for which to create private endpoint connection.", + "type": "object", + "properties": { + "storageAccountResourceId": { + "description": "The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "sqlServerResourceId": { + "description": "The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + } + } + }, + "PrivateEndpointConnectionRequestStatus": { + "description": "Contains the private endpoint connection requests status.", + "type": "object", + "properties": { + "privateLinkServiceId": { + "description": "Resource id for which the private endpoint is created.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnectionName": { + "description": "The connection name for the private endpoint.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Status of this private endpoint connection.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseOperations.json new file mode 100644 index 000000000000..f42a85762994 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseOperations.json @@ -0,0 +1,305 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations": { + "get": { + "tags": [ + "DatabaseOperations" + ], + "description": "Gets a list of operations performed on the database.", + "operationId": "DatabaseOperations_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for getting database operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/DatabaseOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 UnsupportedBackupStorageRedundancy - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 LTRSterlingToVldbMigrationNotSupported - Cannot change service objective for database to Hyperscale as long-term retention is not yet supported on Hyperscale. Please disable long-term retention on the database and retry.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 MaintenanceWindowNotSupportedForNamedReplica - User tried to create or update named replica with non-default maintenance window which is not supported.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 InvalidStandbyGeoReadScale - User attempted to enable read scale on a standby geo database that does not support it.\n\n * 400 PerDatabaseCMKKeyRotationAttemptedWhileOldThumbprintInUse - Key Rotation for the TDE Protector at the database level is blocked when active transactions are holding up the log encrypted with old keys. Please refer to aka.ms/azuresqldbkeyrotation for possible strategies to workaround this issue.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 PerDBCMKNotSupportedWithLTR - Database-level CMK is not supported when Long-term Backup Retention is enabled on the database.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutDatabaseLevelEncryptionProtector - Database-level encryption protector must be set on the target database while attempting to copy or replicate a database encrypted with a database level key.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeys - While attempting to replicate a database configured with database level encryption protector, the current keys being used by the primary must be passed to the secondary database.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 PerDatabaseCMKGeoPrimaryIsNotConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must be configured with a database level encryption protector before setting a database level encryption protector on the geo-secondary.\n\n * 400 PerDatabaseCMKGeoPrimaryIsConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must not be configured with a database level encryption protector when failing over to a geo-secondary without a database level encryption protector.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 MissingAsymmetricKeyOnTargetServer - Target server does not have access to an asymmetric key.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MultipleDroppedDatabasesWithTheSameName - Found multiple dropped databases with the same name on server.\n\n * 400 AzureKeyVaultClientError - The Azure Key Vault client encountered an error.\n\n * 400 AzureKeyVaultClientInfoError - An error occurred while obtaining information for the Azure Key Vault client.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 IsLedgerDatabaseIsNotSupportedOnResourceType - Changing the ledger property is not supported for this resource type.\n\n * 400 DatabaseNameInUse - Database already exists. Choose a different database name.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 UnableToCreateGeoChain - User attempted to create secondary database (chaining) even though automatic upload of ledger digests has been configured\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 UnsupportedBackupStorageRedundancyForEdition - The requested backup storage redundancy is not supported for edition\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidIdentityId - One or more identity id(s) provided are not valid ARM resource id(s). Please input valid id(s) and try again.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 InvalidNumberOfIdentities - Only one user assigned managed identity is supported at the Database Level.\n\n * 400 NoRestorePointAvailable - The source database has not yet accomplished its first backup in order to support restore operations. Please retry the restore request later.\n\n * 400 DatabaseNamedReplicaChainingNotAllowed - User tried to create a named replica of a named replica which is not allowed.\n\n * 400 DatabaseNamedReplicaInvalidOperation - User attempted an unsupported operation on a named replica.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 DatabaseNamedReplicaInvalidSourceDatabase - User attempted to create a named replica in a different subscription or region than the source database.\n\n * 400 CannotAssignIdentityToMaster - Cannot assign an identity to a system database. Database identity cannot be assigned to 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 MissingThumbprintCrm - The restore operation of a CRM database failed because a required TDE certificate was missing. Please retry the restore operation to an existing elastic pool.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RestoreTargetEditionSizeInsufficientV2 - User attempted to restore a database to an edition that is a smaller size than the allocated size of the restored database.\n\n * 400 ResourcePoolStorageLimitHitDuringRestore - The restored database can't be restored into the resource pool due to the remaining storage capacity in the pool.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 PerDatabaseCMKGeoReplicationNotSupported - Geo Replication and Database Copy is not supported when Database-level CMK is configured in preview.\n\n * 400 InvalidStandbyGeoEdition - User attempted to create a DTU based standby geo.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 GeoRestoreBackupStorageTypeNotSupported - Database recovery requests are invalid when issued against a database that is not configured to use geo-redundant backup storage.\n\n * 400 RestoreHyperscaleToNonHyperscale - Restoring a Hyperscale database backup to a non-Hyperscale service tier or vice versa is not supported.\n\n * 400 SubscriptionDoesNotHaveAccessToServer - The subscription does not have access to the specified server(s)\n\n * 400 RecoveryPointDoesNotExist - The specified recovery point either does not exist or is not valid.\n\n * 400 LtrBackupNotFound - The specified long term retention backup does not exist.\n\n * 400 InvalidPointInTime - The specified point in time is not valid for the database.\n\n * 400 GeoRestoreCannotResolveTargetCluster - Cannot resolve target cluster for server\n\n * 400 CannotSpecifyEditionOrSloWhenRestoringToPool - Specifying the target service level objective or edition is not supported when restoring to an elastic pool.\n\n * 400 RestoreNotSupportedForGeoDrSecondary - Point-in-time restore and database recovery operations are not supported on databases that are currently configured as geo-secondaries.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 GeoRedundantBackupsNotPermittedForSubscription - Geo-redundant backup storage is blocked for all databases under subscription '{0}' by preview feature 'Azure SQL Database Block Geo-redundant Backup Storage'. Please select a different backup storage redundancy.\n\n * 400 RestoreHyperscaleToNonHyperscaleElasticPool - Restoring a Hyperscale database to an elastic pool which is not Hyperscale or restoring a database which is not Hyperscale to a Hyperscale elastic pool is not supported.\n\n * 400 RestoreIneligibleDatabaseName - The specified target database name, '{0}', is reserved and cannot be used in a restore operation.\n\n * 400 RestoreNotSupportedForSystemDb - Restore and database recovery are not supported for system databases.\n\n * 400 RestoreIneligibleDroppedDatabaseShortLifespan - The source database, '{0}', dropped on '{1}', has not existed long enough to support restores.\n\n * 400 RestoreIneligibleLiveDatabaseShortLifespan - The source database, '{0}', has not yet accomplished its first backup in order to support restore operations. Please wait until at least the indicated earliest restore date '{1}' and resubmit the request.\n\n * 400 RestoreCrossServerDisabled - For point-in-time restores, the target logical server must be the same as the source logical server. Consider restoring to the source database's server, or using database copy or database recovery.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 RestoreSameServerRecoveryDisabled - Same-server recovery is currently not supported. Consider using point-in-time restore or recovering to a different server.\n\n * 400 RestoreNotSupportedFromLtrBackupToEdition - Restore from long-term retention backup to '{0}' edition not supported.\n\n * 400 RestoreNotSupportedFromExternalBackupToEdition - Restore from external backup to '{0}' edition not supported.\n\n * 400 UpdateToServerlessIfLtrIsNotDisabled - Enabling auto-pause for a serverless database is not supported if long-term backup retention is enabled.\n\n * 400 DuplicateRestoreOperation - A restore request with the same target database name '{0}' on server '{1}' already exists.\n\n * 400 ExternalBackupUriMalformed - The external backup storage container URI is malformed.\n\n * 400 ExternalBackupUriHostNotAllowed - The host name for the external backup storage container URI is not allowed.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 ExternalBackupUriInvalidSchemeOrPort - The external backup storage container URI uses an invalid scheme or port. Please use https and port 443.\n\n * 400 ExternalBackupVldbUnsupported - Hyperscale does not support external backup restore requests.\n\n * 400 InvalidPitrPriorToVldbMigration - For database '{0}', specified point-in-time '{1}' is prior to the Hyperscale migration time of '{2}'. Please specify a target edition or service level objective which is not Hyperscale when restoring to a point earlier than the Hyperscale migration.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 BlockRestoreOnVldbGeoSecondary - Restore of Hyperscale database where source database is geo-secondary is not allowed.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 LedgerNoDropPrimary - The Geo-primary database cannot be dropped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotDropDatabaseAKVError - The database {0} on server {1} cannot be safely dropped because it is encrypted with a customer managed key that is no longer accessible to take the last backup before drop. Please restore Azure Key Vault Access on the server and revalidate the keys to make this database accessible and then proceed with the drop. For details see https://aka.ms/tdecmkrestorability\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\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 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\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 * 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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - 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 the database management operations": { + "$ref": "./examples/ListDatabaseOperations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel": { + "post": { + "tags": [ + "DatabaseOperations" + ], + "description": "Cancels the asynchronous operation on the database.", + "operationId": "DatabaseOperations_Cancel", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "operationId", + "in": "path", + "description": "The operation identifier.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for cancel has been executed successfully." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 UnsupportedBackupStorageRedundancy - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 LTRSterlingToVldbMigrationNotSupported - Cannot change service objective for database to Hyperscale as long-term retention is not yet supported on Hyperscale. Please disable long-term retention on the database and retry.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 MaintenanceWindowNotSupportedForNamedReplica - User tried to create or update named replica with non-default maintenance window which is not supported.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 InvalidStandbyGeoReadScale - User attempted to enable read scale on a standby geo database that does not support it.\n\n * 400 PerDatabaseCMKKeyRotationAttemptedWhileOldThumbprintInUse - Key Rotation for the TDE Protector at the database level is blocked when active transactions are holding up the log encrypted with old keys. Please refer to aka.ms/azuresqldbkeyrotation for possible strategies to workaround this issue.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 PerDBCMKNotSupportedWithLTR - Database-level CMK is not supported when Long-term Backup Retention is enabled on the database.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutDatabaseLevelEncryptionProtector - Database-level encryption protector must be set on the target database while attempting to copy or replicate a database encrypted with a database level key.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeys - While attempting to replicate a database configured with database level encryption protector, the current keys being used by the primary must be passed to the secondary database.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 PerDatabaseCMKGeoPrimaryIsNotConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must be configured with a database level encryption protector before setting a database level encryption protector on the geo-secondary.\n\n * 400 PerDatabaseCMKGeoPrimaryIsConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must not be configured with a database level encryption protector when failing over to a geo-secondary without a database level encryption protector.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 MissingAsymmetricKeyOnTargetServer - Target server does not have access to an asymmetric key.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MultipleDroppedDatabasesWithTheSameName - Found multiple dropped databases with the same name on server.\n\n * 400 AzureKeyVaultClientError - The Azure Key Vault client encountered an error.\n\n * 400 AzureKeyVaultClientInfoError - An error occurred while obtaining information for the Azure Key Vault client.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 IsLedgerDatabaseIsNotSupportedOnResourceType - Changing the ledger property is not supported for this resource type.\n\n * 400 DatabaseNameInUse - Database already exists. Choose a different database name.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 UnableToCreateGeoChain - User attempted to create secondary database (chaining) even though automatic upload of ledger digests has been configured\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 UnsupportedBackupStorageRedundancyForEdition - The requested backup storage redundancy is not supported for edition\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidIdentityId - One or more identity id(s) provided are not valid ARM resource id(s). Please input valid id(s) and try again.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 InvalidNumberOfIdentities - Only one user assigned managed identity is supported at the Database Level.\n\n * 400 NoRestorePointAvailable - The source database has not yet accomplished its first backup in order to support restore operations. Please retry the restore request later.\n\n * 400 DatabaseNamedReplicaChainingNotAllowed - User tried to create a named replica of a named replica which is not allowed.\n\n * 400 DatabaseNamedReplicaInvalidOperation - User attempted an unsupported operation on a named replica.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 DatabaseNamedReplicaInvalidSourceDatabase - User attempted to create a named replica in a different subscription or region than the source database.\n\n * 400 CannotAssignIdentityToMaster - Cannot assign an identity to a system database. Database identity cannot be assigned to 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 MissingThumbprintCrm - The restore operation of a CRM database failed because a required TDE certificate was missing. Please retry the restore operation to an existing elastic pool.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RestoreTargetEditionSizeInsufficientV2 - User attempted to restore a database to an edition that is a smaller size than the allocated size of the restored database.\n\n * 400 ResourcePoolStorageLimitHitDuringRestore - The restored database can't be restored into the resource pool due to the remaining storage capacity in the pool.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 PerDatabaseCMKGeoReplicationNotSupported - Geo Replication and Database Copy is not supported when Database-level CMK is configured in preview.\n\n * 400 InvalidStandbyGeoEdition - User attempted to create a DTU based standby geo.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 GeoRestoreBackupStorageTypeNotSupported - Database recovery requests are invalid when issued against a database that is not configured to use geo-redundant backup storage.\n\n * 400 RestoreHyperscaleToNonHyperscale - Restoring a Hyperscale database backup to a non-Hyperscale service tier or vice versa is not supported.\n\n * 400 SubscriptionDoesNotHaveAccessToServer - The subscription does not have access to the specified server(s)\n\n * 400 RecoveryPointDoesNotExist - The specified recovery point either does not exist or is not valid.\n\n * 400 LtrBackupNotFound - The specified long term retention backup does not exist.\n\n * 400 InvalidPointInTime - The specified point in time is not valid for the database.\n\n * 400 GeoRestoreCannotResolveTargetCluster - Cannot resolve target cluster for server\n\n * 400 CannotSpecifyEditionOrSloWhenRestoringToPool - Specifying the target service level objective or edition is not supported when restoring to an elastic pool.\n\n * 400 RestoreNotSupportedForGeoDrSecondary - Point-in-time restore and database recovery operations are not supported on databases that are currently configured as geo-secondaries.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 GeoRedundantBackupsNotPermittedForSubscription - Geo-redundant backup storage is blocked for all databases under subscription '{0}' by preview feature 'Azure SQL Database Block Geo-redundant Backup Storage'. Please select a different backup storage redundancy.\n\n * 400 RestoreHyperscaleToNonHyperscaleElasticPool - Restoring a Hyperscale database to an elastic pool which is not Hyperscale or restoring a database which is not Hyperscale to a Hyperscale elastic pool is not supported.\n\n * 400 RestoreIneligibleDatabaseName - The specified target database name, '{0}', is reserved and cannot be used in a restore operation.\n\n * 400 RestoreNotSupportedForSystemDb - Restore and database recovery are not supported for system databases.\n\n * 400 RestoreIneligibleDroppedDatabaseShortLifespan - The source database, '{0}', dropped on '{1}', has not existed long enough to support restores.\n\n * 400 RestoreIneligibleLiveDatabaseShortLifespan - The source database, '{0}', has not yet accomplished its first backup in order to support restore operations. Please wait until at least the indicated earliest restore date '{1}' and resubmit the request.\n\n * 400 RestoreCrossServerDisabled - For point-in-time restores, the target logical server must be the same as the source logical server. Consider restoring to the source database's server, or using database copy or database recovery.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 RestoreSameServerRecoveryDisabled - Same-server recovery is currently not supported. Consider using point-in-time restore or recovering to a different server.\n\n * 400 RestoreNotSupportedFromLtrBackupToEdition - Restore from long-term retention backup to '{0}' edition not supported.\n\n * 400 RestoreNotSupportedFromExternalBackupToEdition - Restore from external backup to '{0}' edition not supported.\n\n * 400 UpdateToServerlessIfLtrIsNotDisabled - Enabling auto-pause for a serverless database is not supported if long-term backup retention is enabled.\n\n * 400 DuplicateRestoreOperation - A restore request with the same target database name '{0}' on server '{1}' already exists.\n\n * 400 ExternalBackupUriMalformed - The external backup storage container URI is malformed.\n\n * 400 ExternalBackupUriHostNotAllowed - The host name for the external backup storage container URI is not allowed.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 ExternalBackupUriInvalidSchemeOrPort - The external backup storage container URI uses an invalid scheme or port. Please use https and port 443.\n\n * 400 ExternalBackupVldbUnsupported - Hyperscale does not support external backup restore requests.\n\n * 400 InvalidPitrPriorToVldbMigration - For database '{0}', specified point-in-time '{1}' is prior to the Hyperscale migration time of '{2}'. Please specify a target edition or service level objective which is not Hyperscale when restoring to a point earlier than the Hyperscale migration.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 BlockRestoreOnVldbGeoSecondary - Restore of Hyperscale database where source database is geo-secondary is not allowed.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 LedgerNoDropPrimary - The Geo-primary database cannot be dropped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotDropDatabaseAKVError - The database {0} on server {1} cannot be safely dropped because it is encrypted with a customer managed key that is no longer accessible to take the last backup before drop. Please restore Azure Key Vault Access on the server and revalidate the keys to make this database accessible and then proceed with the drop. For details see https://aka.ms/tdecmkrestorability\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\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 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - 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-examples": { + "Cancel the database management operation": { + "$ref": "./examples/CancelDatabaseOperation.json" + } + } + } + } + }, + "definitions": { + "DatabaseOperation": { + "description": "A database operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseOperationListResult": { + "description": "The response to a list database operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseOperationProperties": { + "description": "The properties of a database operation.", + "type": "object", + "properties": { + "databaseName": { + "description": "The name of the database the operation is being performed on.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "serverName": { + "description": "The name of the server.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagementOperationState", + "modelAsString": true + } + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + }, + "operationPhaseDetails": { + "$ref": "#/definitions/PhaseDetails", + "description": "The operation phase details.", + "readOnly": true + } + } + }, + "PhaseDetails": { + "description": "The phase details properties of a database operation.", + "type": "object", + "properties": { + "phase": { + "description": "The operation phase.", + "enum": [ + "Copying", + "Catchup", + "WaitingForCutover", + "CutoverInProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "Phase", + "modelAsString": true + } + }, + "phaseInformation": { + "description": "The operation phase information.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseRecommendedActions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseRecommendedActions.json new file mode 100644 index 000000000000..eddb92ff02d6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseRecommendedActions.json @@ -0,0 +1,578 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions": { + "get": { + "tags": [ + "DatabaseRecommendedActions" + ], + "description": "Gets list of Database Recommended Actions.", + "operationId": "DatabaseRecommendedActions_ListByDatabaseAdvisor", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Database Advisor.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of database recommended actions.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedAction" + } + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "List of database recommended actions": { + "$ref": "./examples/DatabaseRecommendedActionList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}": { + "get": { + "tags": [ + "DatabaseRecommendedActions" + ], + "description": "Gets a database recommended action.", + "operationId": "DatabaseRecommendedActions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Database Advisor.", + "required": true, + "type": "string" + }, + { + "name": "recommendedActionName", + "in": "path", + "description": "The name of Database Recommended Action.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved details of specified database recommended action.", + "schema": { + "$ref": "#/definitions/RecommendedAction" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Get database recommended action": { + "$ref": "./examples/DatabaseRecommendedActionGet.json" + } + } + }, + "patch": { + "tags": [ + "DatabaseRecommendedActions" + ], + "description": "Updates a database recommended action.", + "operationId": "DatabaseRecommendedActions_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Database Advisor.", + "required": true, + "type": "string" + }, + { + "name": "recommendedActionName", + "in": "path", + "description": "The name of Database Recommended Action.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested recommended action resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/RecommendedAction" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the specified database recommended action.", + "schema": { + "$ref": "#/definitions/RecommendedAction" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidRecommendedActionUpsertRequest - The update recommended action request body does not exist or has no properties or state object.\n\n * 400 InvalidRecommendedActionState - The specified state for recommended action is invalid\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 RecommendedActionNotFound - The requested recommended action was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Update database recommended action": { + "$ref": "./examples/DatabaseRecommendedActionUpdate.json" + } + } + } + } + }, + "definitions": { + "RecommendedActionProperties": { + "description": "Properties for a Database, Server or Elastic Pool Recommended Action.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "recommendationReason": { + "description": "Gets the reason for recommending this action. e.g., DuplicateIndex", + "type": "string", + "readOnly": true + }, + "validSince": { + "format": "date-time", + "description": "Gets the time since when this recommended action is valid.", + "type": "string", + "readOnly": true + }, + "lastRefresh": { + "format": "date-time", + "description": "Gets time when this recommended action was last refreshed.", + "type": "string", + "readOnly": true + }, + "state": { + "$ref": "#/definitions/RecommendedActionStateInfo", + "description": "Gets the info of the current state the recommended action is in." + }, + "isExecutableAction": { + "description": "Gets if this recommended action is actionable by user", + "type": "boolean", + "readOnly": true + }, + "isRevertableAction": { + "description": "Gets if changes applied by this recommended action can be reverted by user", + "type": "boolean", + "readOnly": true + }, + "isArchivedAction": { + "description": "Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a new recommended action again.", + "type": "boolean", + "readOnly": true + }, + "executeActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started applying this recommended action on the user resource. e.g., index creation start time", + "type": "string", + "readOnly": true + }, + "executeActionDuration": { + "format": "duration", + "description": "Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation", + "type": "string", + "readOnly": true + }, + "revertActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started reverting changes of this recommended action on user resource. e.g., time when index drop is executed.", + "type": "string", + "readOnly": true + }, + "revertActionDuration": { + "format": "duration", + "description": "Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for dropping the created index.", + "type": "string", + "readOnly": true + }, + "executeActionInitiatedBy": { + "description": "Gets if approval for applying this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "executeActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for execution.", + "type": "string", + "readOnly": true + }, + "revertActionInitiatedBy": { + "description": "Gets if approval for reverting this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "revertActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for revert.", + "type": "string", + "readOnly": true + }, + "score": { + "format": "int32", + "description": "Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High Impact", + "type": "integer", + "readOnly": true + }, + "implementationDetails": { + "$ref": "#/definitions/RecommendedActionImplementationInfo", + "description": "Gets the implementation details of this recommended action for user to apply it manually.", + "readOnly": true + }, + "errorDetails": { + "$ref": "#/definitions/RecommendedActionErrorInfo", + "description": "Gets the error details if and why this recommended action is put to error state.", + "readOnly": true + }, + "estimatedImpact": { + "description": "Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "observedImpact": { + "description": "Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "timeSeries": { + "description": "Gets the time series info of metrics for this recommended action e.g., CPU consumption time series", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionMetricInfo" + }, + "readOnly": true + }, + "linkedObjects": { + "description": "Gets the linked objects, if any.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "details": { + "description": "Gets additional details specific to this recommended action.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true + } + } + }, + "RecommendedActionStateInfo": { + "description": "Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "required": [ + "currentValue" + ], + "type": "object", + "properties": { + "currentValue": { + "description": "Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action. ", + "enum": [ + "Active", + "Pending", + "Executing", + "Verifying", + "PendingRevert", + "RevertCancelled", + "Reverting", + "Reverted", + "Ignored", + "Expired", + "Monitoring", + "Resolved", + "Success", + "Error" + ], + "type": "string", + "x-ms-enum": { + "name": "RecommendedActionCurrentState", + "modelAsString": true + } + }, + "actionInitiatedBy": { + "description": "Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity notified system to apply the recommended action. System -> When auto-execute status of this advisor was set to 'Enabled', in which case the system applied it.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "lastModified": { + "format": "date-time", + "description": "Gets the time when the state was last modified", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionImplementationInfo": { + "description": "Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "method": { + "description": "Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell.", + "enum": [ + "TSql", + "AzurePowerShell" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ImplementationMethod", + "modelAsString": false + } + }, + "script": { + "description": "Gets the manual implementation script. e.g., T-SQL script that could be executed on the database.", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionErrorInfo": { + "description": "Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "errorCode": { + "description": "Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists", + "type": "string", + "readOnly": true + }, + "isRetryable": { + "description": "Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No", + "enum": [ + "Yes", + "No" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "IsRetryable", + "modelAsString": false + } + } + } + }, + "RecommendedActionImpactRecord": { + "description": "Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "dimensionName": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "absoluteValue": { + "format": "double", + "description": "Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected", + "type": "number", + "readOnly": true + }, + "changeValueAbsolute": { + "format": "double", + "description": "Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes", + "type": "number", + "readOnly": true + }, + "changeValueRelative": { + "format": "double", + "description": "Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedActionMetricInfo": { + "description": "Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "metricName": { + "description": "Gets the name of the metric. e.g., CPU, Number of Queries.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the unit in which metric is measured. e.g., DTU, Frequency", + "type": "string", + "readOnly": true + }, + "timeGrain": { + "description": "Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour)", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Gets the start time of time interval given by this MetricInfo.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "double", + "description": "Gets the value of the metric in the time interval given by this MetricInfo.", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedAction": { + "description": "Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/RecommendedActionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSchemas.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSchemas.json new file mode 100644 index 000000000000..619640d81b6d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSchemas.json @@ -0,0 +1,182 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas": { + "get": { + "tags": [ + "DatabaseSchemas" + ], + "description": "List database schemas", + "operationId": "DatabaseSchemas_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database schemas.", + "schema": { + "$ref": "#/definitions/DatabaseSchemaListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseSchema", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database schemas": { + "$ref": "./examples/DatabaseSchemaListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}": { + "get": { + "tags": [ + "DatabaseSchemas" + ], + "description": "Get database schema", + "operationId": "DatabaseSchemas_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database schema.", + "schema": { + "$ref": "#/definitions/DatabaseSchema" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get database schema": { + "$ref": "./examples/DatabaseSchemaGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseSchema": { + "description": "A database schema resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": {} + }, + "DatabaseSchemaListResult": { + "description": "A list of database schemas.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSchema" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSecurityAlertPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSecurityAlertPolicies.json new file mode 100644 index 000000000000..a4ec4d9dc55c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSecurityAlertPolicies.json @@ -0,0 +1,329 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies": { + "get": { + "tags": [ + "DatabaseSecurityAlertPolicies" + ], + "description": "Gets a list of database's security alert policies.", + "operationId": "DatabaseSecurityAlertPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database security alert policy.", + "schema": { + "$ref": "#/definitions/DatabaseSecurityAlertListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidDatabaseSecurityAlertPolicyCreateRequest - The create database Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 DatabaseSecurityAlertPolicyInProgress - Set database security alert policy is already in progress\n\n * 409 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetDatabaseSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the database's threat detection policies": { + "$ref": "./examples/DatabaseSecurityAlertListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}": { + "get": { + "tags": [ + "DatabaseSecurityAlertPolicies" + ], + "description": "Gets a database's security alert policy.", + "operationId": "DatabaseSecurityAlertPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database security alert policy.", + "schema": { + "$ref": "#/definitions/DatabaseSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidDatabaseSecurityAlertPolicyCreateRequest - The create database Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 DatabaseSecurityAlertPolicyInProgress - Set database security alert policy is already in progress\n\n * 409 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetDatabaseSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-examples": { + "Get a database's threat detection policy": { + "$ref": "./examples/DatabaseSecurityAlertGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseSecurityAlertPolicies" + ], + "description": "Creates or updates a database's security alert policy.", + "operationId": "DatabaseSecurityAlertPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The database security alert policy.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSecurityAlertPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the database security alert policy.", + "schema": { + "$ref": "#/definitions/DatabaseSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidDatabaseSecurityAlertPolicyCreateRequest - The create database Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 DatabaseSecurityAlertPolicyInProgress - Set database security alert policy is already in progress\n\n * 409 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetDatabaseSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + }, + "201": { + "description": "Successfully created the database security alert policy.", + "schema": { + "$ref": "#/definitions/DatabaseSecurityAlertPolicy" + } + } + }, + "x-ms-examples": { + "Update a database's threat detection policy with minimal parameters": { + "$ref": "./examples/DatabaseSecurityAlertCreateMin.json" + }, + "Update a database's threat detection policy with all parameters": { + "$ref": "./examples/DatabaseSecurityAlertCreateMax.json" + } + } + } + } + }, + "definitions": { + "DatabaseSecurityAlertListResult": { + "description": "A list of the database's security alert policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSecurityAlertPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSecurityAlertPolicy": { + "description": "A database security alert policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SecurityAlertPolicyResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SecurityAlertsPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SecurityAlertsPolicyProperties": { + "description": "Properties of a security alert policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SecurityAlertsPolicyState", + "modelAsString": false + } + }, + "disabledAlerts": { + "description": "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAddresses": { + "description": "Specifies an array of e-mail addresses to which the alert is sent.", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAccountAdmins": { + "description": "Specifies that the alert is sent to the account administrators.", + "type": "boolean" + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the Threat Detection audit storage account.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the Threat Detection audit logs.", + "type": "integer" + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentBaselines.json new file mode 100644 index 000000000000..14359711531f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentBaselines.json @@ -0,0 +1,368 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentBaselines" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "DatabaseSqlVulnerabilityAssessmentBaselines_ListBySqlVulnerabilityAssessment", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSetListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentBaselines" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "DatabaseSqlVulnerabilityAssessmentBaselines_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentBaselines" + ], + "description": "Add a database's vulnerability assessment rule baseline list.", + "operationId": "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully add the vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Add a database's vulnerability assessment rule baseline list.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json" + }, + "Add a database's vulnerability assessment rule baseline from the latest scan result.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json" + } + } + } + } + }, + "definitions": { + "DatabaseSqlVulnerabilityAssessmentBaselineSet": { + "description": "A database sql vulnerability assessment baseline set.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentBaselineSetResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSetProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentBaselineSetListResult": { + "description": "A list of SQL Vulnerability Assessments baseline set.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentBaselineSetProperties": { + "description": "Properties of a database Sql Vulnerability Assessment baseline set.", + "required": [ + "results" + ], + "type": "object", + "properties": { + "results": { + "description": "The baseline set result", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput": { + "description": "A database sql vulnerability assessment rule baseline list input.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "latestScan", + "results" + ], + "type": "object", + "properties": { + "latestScan": { + "description": "The latest scan flag", + "type": "boolean" + }, + "results": { + "description": "The rule baseline result list", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json new file mode 100644 index 000000000000..87a31f133be3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json @@ -0,0 +1,107 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan": { + "post": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentExecuteScan" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "DatabaseSqlVulnerabilityAssessmentExecuteScan_Execute", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 VulnerabilityAssessmentStoragelessIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\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 * 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 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json" + } + } + } + } + }, + "definitions": {}, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json new file mode 100644 index 000000000000..b8f6f8ffe54b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -0,0 +1,460 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentRuleBaselines" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_ListByBaseline", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentRuleBaselines" + ], + "description": "Gets a database's sql vulnerability assessment rule baseline.", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database's sql vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentRuleBaselines" + ], + "description": "Creates or updates a database's vulnerability assessment rule baseline.", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineInput" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Creates or updates a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json" + } + } + }, + "delete": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentRuleBaselines" + ], + "description": "Removes the database's vulnerability assessment rule baseline.", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment rule baseline." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "204": { + "description": "The specified rule baseline does not exist." + } + }, + "x-ms-examples": { + "Removes a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseSqlVulnerabilityAssessmentRuleBaseline": { + "description": "A database sql vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineInput": { + "description": "A database sql vulnerability assessment rule baseline input.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineInputResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "latestScan", + "results" + ], + "type": "object", + "properties": { + "latestScan": { + "description": "The latest scan flag", + "type": "boolean" + }, + "results": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": { + "description": "A list of SQL Vulnerability Assessments rule baseline.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "results" + ], + "type": "object", + "properties": { + "results": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json new file mode 100644 index 000000000000..f37c22c994a5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json @@ -0,0 +1,507 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScanResult" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScanResult_ListByScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The scan id of the SQL Vulnerability Assessment scan to retrieve result from.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment scan results.", + "schema": { + "$ref": "#/definitions/SQLVulnerabilityAssessmentScanListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database SQL Vulnerability Assessment scan results for scan id": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults/{scanResultId}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScanResult" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScanResult_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The scan id of the SQL Vulnerability Assessment scan to retrieve result from.", + "required": true, + "type": "string" + }, + { + "name": "scanResultId", + "in": "path", + "description": "The scan result id of the specific result to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment scan results for id.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResults" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a database SQL Vulnerability Assessment scan result for scan id and scan result id": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentScansResults.json" + } + } + } + } + }, + "definitions": { + "Baseline": { + "description": "SQL Vulnerability Assessment baseline Details", + "type": "object", + "properties": { + "expectedResults": { + "description": "SQL Vulnerability Assessment baseline expected results", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "updatedTime": { + "format": "date-time", + "description": "SQL Vulnerability Assessment baseline update time (UTC)", + "type": "string", + "readOnly": true + } + } + }, + "BaselineAdjustedResult": { + "description": "SQL Vulnerability Assessment baseline adjusted results", + "type": "object", + "properties": { + "baseline": { + "$ref": "#/definitions/Baseline", + "description": "SQL Vulnerability Assessment baseline details", + "readOnly": true + }, + "status": { + "description": "SQL Vulnerability Assessment baseline status", + "enum": [ + "NonFinding", + "Finding", + "InternalError" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": true + } + }, + "resultsNotInBaseline": { + "description": "SQL Vulnerability Assessment results that are not in baseline", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "resultsOnlyInBaseline": { + "description": "SQL Vulnerability Assessment results that are in baseline.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + } + } + }, + "BenchmarkReference": { + "description": "SQL Vulnerability Assessment benchmark reference", + "type": "object", + "properties": { + "benchmark": { + "description": "SQL Vulnerability Assessment benchmark name", + "type": "string", + "readOnly": true + }, + "reference": { + "description": "SQL Vulnerability Assessment benchmark reference.", + "type": "string", + "readOnly": true + } + } + }, + "QueryCheck": { + "description": "SQL Vulnerability Assessment query check object.", + "type": "object", + "properties": { + "query": { + "description": "SQL Vulnerability Assessment rule query.", + "type": "string", + "readOnly": true + }, + "expectedResult": { + "description": "SQL Vulnerability Assessment query expected result.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "columnNames": { + "description": "SQL Vulnerability Assessment column names of query expected result.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + }, + "Remediation": { + "description": "SQL Vulnerability Assessment remediation Details.", + "type": "object", + "properties": { + "description": { + "description": "SQL Vulnerability Assessment remediation description.", + "type": "string", + "readOnly": true + }, + "scripts": { + "description": "SQL Vulnerability Assessment remediation script.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "automated": { + "description": "SQL Vulnerability Assessment is remediation automated.", + "type": "boolean", + "readOnly": true + }, + "portalLink": { + "description": "SQL Vulnerability Assessment optional link to remediate in Azure Portal.", + "type": "string", + "readOnly": true + } + } + }, + "SQLVulnerabilityAssessmentScanListResult": { + "description": "A list of vulnerability assessment scan results.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResults" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanResultProperties": { + "description": "SQL Vulnerability Assessment scan result properties for a single rule.", + "type": "object", + "properties": { + "ruleId": { + "description": "SQL Vulnerability Assessment rule Id.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "SQL Vulnerability Assessment rule result status.", + "enum": [ + "NonFinding", + "Finding", + "InternalError" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": true + } + }, + "errorMessage": { + "description": "SQL Vulnerability Assessment error message.", + "type": "string", + "readOnly": true + }, + "isTrimmed": { + "description": "SQL Vulnerability Assessment is the query results trimmed.", + "type": "boolean", + "readOnly": true + }, + "queryResults": { + "description": "SQL Vulnerability Assessment query results that was run.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "remediation": { + "$ref": "#/definitions/Remediation", + "description": "SQL Vulnerability Assessment the remediation details.", + "readOnly": true + }, + "baselineAdjustedResult": { + "$ref": "#/definitions/BaselineAdjustedResult", + "description": "SQL Vulnerability Assessment rule result adjusted with baseline.", + "readOnly": true + }, + "ruleMetadata": { + "$ref": "#/definitions/VaRule", + "description": "SQL Vulnerability Assessment rule metadata.", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanResults": { + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of AdvancedThreatProtectionResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VaRule": { + "description": "SQL Vulnerability Assessment rule metadata details.", + "type": "object", + "properties": { + "ruleId": { + "description": "SQL Vulnerability Assessment rule Id.", + "type": "string", + "readOnly": true + }, + "severity": { + "description": "SQL Vulnerability Assessment rule severity.", + "enum": [ + "High", + "Medium", + "Low", + "Informational", + "Obsolete" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RuleSeverity", + "modelAsString": true + } + }, + "category": { + "description": "SQL Vulnerability Assessment rule category.", + "type": "string", + "readOnly": true + }, + "ruleType": { + "description": "SQL Vulnerability Assessment rule type.", + "enum": [ + "Binary", + "BaselineExpected", + "PositiveList", + "NegativeList" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RuleType", + "modelAsString": true + } + }, + "title": { + "description": "SQL Vulnerability Assessment rule title.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "SQL Vulnerability Assessment rule description.", + "type": "string", + "readOnly": true + }, + "rationale": { + "description": "SQL Vulnerability Assessment rule rationale.", + "type": "string", + "readOnly": true + }, + "queryCheck": { + "$ref": "#/definitions/QueryCheck", + "description": "SQL Vulnerability Assessment rule query details.", + "readOnly": true + }, + "benchmarkReferences": { + "description": "SQL Vulnerability Assessment benchmark references.", + "type": "array", + "items": { + "$ref": "#/definitions/BenchmarkReference" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json new file mode 100644 index 000000000000..a182609d3e65 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json @@ -0,0 +1,350 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScans" + ], + "description": "Lists the vulnerability assessment scans of a database.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScans_ListBySqlVulnerabilityAssessments", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan records.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecordListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the list of a database vulnerability assessment scan records": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScans" + ], + "description": "Get a database vulnerability assessment scan result.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScans_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecord" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a database's vulnerability assessment scan.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentScan.json" + } + } + } + } + }, + "definitions": { + "SqlVulnerabilityAssessmentScanError": { + "description": "Properties of a vulnerability assessment scan error.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecord": { + "description": "A vulnerability assessment scan record.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SqlVulnerabilityAssessmentScanRecordResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecordProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecordListResult": { + "description": "A list of vulnerability assessment scan records.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecord" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecordProperties": { + "description": "Properties of a vulnerability assessment scan record.", + "type": "object", + "properties": { + "scanId": { + "description": "The scan ID.", + "type": "string", + "readOnly": true + }, + "triggerType": { + "description": "The scan trigger type.", + "enum": [ + "OnDemand", + "Recurring" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanTriggerType", + "modelAsString": true + } + }, + "state": { + "description": "The scan status.", + "enum": [ + "Passed", + "Failed", + "FailedToRun", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanState", + "modelAsString": true + } + }, + "startTime": { + "format": "date-time", + "description": "The scan start time (UTC).", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The scan end time (UTC).", + "type": "string", + "readOnly": true + }, + "errors": { + "description": "The scan errors.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanError" + }, + "readOnly": true + }, + "server": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "database": { + "description": "The database name.", + "type": "string", + "readOnly": true + }, + "sqlVersion": { + "description": "The SQL version.", + "type": "string", + "readOnly": true + }, + "highSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with high severity.", + "type": "integer", + "readOnly": true + }, + "mediumSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with medium severity.", + "type": "integer", + "readOnly": true + }, + "lowSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with low severity.", + "type": "integer", + "readOnly": true + }, + "totalPassedRulesCount": { + "format": "int32", + "description": "The number of total passed rules.", + "type": "integer", + "readOnly": true + }, + "totalFailedRulesCount": { + "format": "int32", + "description": "The number of total failed rules.", + "type": "integer", + "readOnly": true + }, + "totalRulesCount": { + "format": "int32", + "description": "The number of total rules assessed.", + "type": "integer", + "readOnly": true + }, + "isBaselineApplied": { + "description": "Baseline created for this database, and has one or more rules.", + "type": "boolean", + "readOnly": true + }, + "lastScanTime": { + "format": "date-time", + "description": "The last scan time.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json new file mode 100644 index 000000000000..da9850229bad --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json @@ -0,0 +1,209 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentsSettings" + ], + "description": "Lists SQL Vulnerability Assessment policies associated with a database.", + "operationId": "DatabaseSqlVulnerabilityAssessmentsSettings_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment policies on a given database.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get SQL Vulnerability Assessment policies on a given database": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentsSettings" + ], + "description": "Gets SQL Vulnerability Assessment policy for database.", + "operationId": "DatabaseSqlVulnerabilityAssessmentsSettings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment policy for database.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get SQL Vulnerability Assessment policy for database": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentGet.json" + } + } + } + } + }, + "definitions": { + "SqlVulnerabilityAssessment": { + "description": "A SQL Vulnerability Assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SqlVulnerabilityAssessmentResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlVulnerabilityAssessmentListResult": { + "description": "A list of SQL Vulnerability Assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentPolicyProperties": { + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentState", + "modelAsString": false + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseTables.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseTables.json new file mode 100644 index 000000000000..58ddeadaec51 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseTables.json @@ -0,0 +1,225 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables": { + "get": { + "tags": [ + "DatabaseTables" + ], + "description": "List database tables", + "operationId": "DatabaseTables_ListBySchema", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database tables.", + "schema": { + "$ref": "#/definitions/DatabaseTableListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseTable", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database tables": { + "$ref": "./examples/DatabaseTableListBySchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}": { + "get": { + "tags": [ + "DatabaseTables" + ], + "description": "Get database table", + "operationId": "DatabaseTables_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database table.", + "schema": { + "$ref": "#/definitions/DatabaseTable" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get database table": { + "$ref": "./examples/DatabaseTableGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseTable": { + "description": "A database table resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseTableProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseTableListResult": { + "description": "A list of database tables.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseTable" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseTableProperties": { + "description": "Database table properties.", + "type": "object", + "properties": { + "temporalType": { + "description": "The table temporal type.", + "enum": [ + "NonTemporalTable", + "HistoryTable", + "SystemVersionedTemporalTable" + ], + "type": "string", + "x-ms-enum": { + "name": "TableTemporalType", + "modelAsString": true + } + }, + "memoryOptimized": { + "description": "Whether or not the table is memory optimized.", + "type": "boolean" + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseUsages.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseUsages.json new file mode 100644 index 000000000000..dfb679e2e0da --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseUsages.json @@ -0,0 +1,159 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages": { + "get": { + "tags": [ + "DatabaseUsages" + ], + "description": "Gets database usages.", + "operationId": "DatabaseUsages_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database usages.", + "schema": { + "$ref": "#/definitions/DatabaseUsageListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 UnsupportedBackupStorageRedundancy - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 LTRSterlingToVldbMigrationNotSupported - Cannot change service objective for database to Hyperscale as long-term retention is not yet supported on Hyperscale. Please disable long-term retention on the database and retry.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 MaintenanceWindowNotSupportedForNamedReplica - User tried to create or update named replica with non-default maintenance window which is not supported.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 InvalidStandbyGeoReadScale - User attempted to enable read scale on a standby geo database that does not support it.\n\n * 400 PerDatabaseCMKKeyRotationAttemptedWhileOldThumbprintInUse - Key Rotation for the TDE Protector at the database level is blocked when active transactions are holding up the log encrypted with old keys. Please refer to aka.ms/azuresqldbkeyrotation for possible strategies to workaround this issue.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 PerDBCMKNotSupportedWithLTR - Database-level CMK is not supported when Long-term Backup Retention is enabled on the database.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutDatabaseLevelEncryptionProtector - Database-level encryption protector must be set on the target database while attempting to copy or replicate a database encrypted with a database level key.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeys - While attempting to replicate a database configured with database level encryption protector, the current keys being used by the primary must be passed to the secondary database.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 PerDatabaseCMKGeoPrimaryIsNotConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must be configured with a database level encryption protector before setting a database level encryption protector on the geo-secondary.\n\n * 400 PerDatabaseCMKGeoPrimaryIsConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must not be configured with a database level encryption protector when failing over to a geo-secondary without a database level encryption protector.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 MissingAsymmetricKeyOnTargetServer - Target server does not have access to an asymmetric key.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MultipleDroppedDatabasesWithTheSameName - Found multiple dropped databases with the same name on server.\n\n * 400 AzureKeyVaultClientError - The Azure Key Vault client encountered an error.\n\n * 400 AzureKeyVaultClientInfoError - An error occurred while obtaining information for the Azure Key Vault client.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 IsLedgerDatabaseIsNotSupportedOnResourceType - Changing the ledger property is not supported for this resource type.\n\n * 400 DatabaseNameInUse - Database already exists. Choose a different database name.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 UnableToCreateGeoChain - User attempted to create secondary database (chaining) even though automatic upload of ledger digests has been configured\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 UnsupportedBackupStorageRedundancyForEdition - The requested backup storage redundancy is not supported for edition\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidIdentityId - One or more identity id(s) provided are not valid ARM resource id(s). Please input valid id(s) and try again.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 InvalidNumberOfIdentities - Only one user assigned managed identity is supported at the Database Level.\n\n * 400 NoRestorePointAvailable - The source database has not yet accomplished its first backup in order to support restore operations. Please retry the restore request later.\n\n * 400 DatabaseNamedReplicaChainingNotAllowed - User tried to create a named replica of a named replica which is not allowed.\n\n * 400 DatabaseNamedReplicaInvalidOperation - User attempted an unsupported operation on a named replica.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 DatabaseNamedReplicaInvalidSourceDatabase - User attempted to create a named replica in a different subscription or region than the source database.\n\n * 400 CannotAssignIdentityToMaster - Cannot assign an identity to a system database. Database identity cannot be assigned to 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 MissingThumbprintCrm - The restore operation of a CRM database failed because a required TDE certificate was missing. Please retry the restore operation to an existing elastic pool.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RestoreTargetEditionSizeInsufficientV2 - User attempted to restore a database to an edition that is a smaller size than the allocated size of the restored database.\n\n * 400 ResourcePoolStorageLimitHitDuringRestore - The restored database can't be restored into the resource pool due to the remaining storage capacity in the pool.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 PerDatabaseCMKGeoReplicationNotSupported - Geo Replication and Database Copy is not supported when Database-level CMK is configured in preview.\n\n * 400 InvalidStandbyGeoEdition - User attempted to create a DTU based standby geo.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 GeoRestoreBackupStorageTypeNotSupported - Database recovery requests are invalid when issued against a database that is not configured to use geo-redundant backup storage.\n\n * 400 RestoreHyperscaleToNonHyperscale - Restoring a Hyperscale database backup to a non-Hyperscale service tier or vice versa is not supported.\n\n * 400 SubscriptionDoesNotHaveAccessToServer - The subscription does not have access to the specified server(s)\n\n * 400 RecoveryPointDoesNotExist - The specified recovery point either does not exist or is not valid.\n\n * 400 LtrBackupNotFound - The specified long term retention backup does not exist.\n\n * 400 InvalidPointInTime - The specified point in time is not valid for the database.\n\n * 400 GeoRestoreCannotResolveTargetCluster - Cannot resolve target cluster for server\n\n * 400 CannotSpecifyEditionOrSloWhenRestoringToPool - Specifying the target service level objective or edition is not supported when restoring to an elastic pool.\n\n * 400 RestoreNotSupportedForGeoDrSecondary - Point-in-time restore and database recovery operations are not supported on databases that are currently configured as geo-secondaries.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 GeoRedundantBackupsNotPermittedForSubscription - Geo-redundant backup storage is blocked for all databases under subscription '{0}' by preview feature 'Azure SQL Database Block Geo-redundant Backup Storage'. Please select a different backup storage redundancy.\n\n * 400 RestoreHyperscaleToNonHyperscaleElasticPool - Restoring a Hyperscale database to an elastic pool which is not Hyperscale or restoring a database which is not Hyperscale to a Hyperscale elastic pool is not supported.\n\n * 400 RestoreIneligibleDatabaseName - The specified target database name, '{0}', is reserved and cannot be used in a restore operation.\n\n * 400 RestoreNotSupportedForSystemDb - Restore and database recovery are not supported for system databases.\n\n * 400 RestoreIneligibleDroppedDatabaseShortLifespan - The source database, '{0}', dropped on '{1}', has not existed long enough to support restores.\n\n * 400 RestoreIneligibleLiveDatabaseShortLifespan - The source database, '{0}', has not yet accomplished its first backup in order to support restore operations. Please wait until at least the indicated earliest restore date '{1}' and resubmit the request.\n\n * 400 RestoreCrossServerDisabled - For point-in-time restores, the target logical server must be the same as the source logical server. Consider restoring to the source database's server, or using database copy or database recovery.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 RestoreSameServerRecoveryDisabled - Same-server recovery is currently not supported. Consider using point-in-time restore or recovering to a different server.\n\n * 400 RestoreNotSupportedFromLtrBackupToEdition - Restore from long-term retention backup to '{0}' edition not supported.\n\n * 400 RestoreNotSupportedFromExternalBackupToEdition - Restore from external backup to '{0}' edition not supported.\n\n * 400 UpdateToServerlessIfLtrIsNotDisabled - Enabling auto-pause for a serverless database is not supported if long-term backup retention is enabled.\n\n * 400 DuplicateRestoreOperation - A restore request with the same target database name '{0}' on server '{1}' already exists.\n\n * 400 ExternalBackupUriMalformed - The external backup storage container URI is malformed.\n\n * 400 ExternalBackupUriHostNotAllowed - The host name for the external backup storage container URI is not allowed.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 ExternalBackupUriInvalidSchemeOrPort - The external backup storage container URI uses an invalid scheme or port. Please use https and port 443.\n\n * 400 ExternalBackupVldbUnsupported - Hyperscale does not support external backup restore requests.\n\n * 400 InvalidPitrPriorToVldbMigration - For database '{0}', specified point-in-time '{1}' is prior to the Hyperscale migration time of '{2}'. Please specify a target edition or service level objective which is not Hyperscale when restoring to a point earlier than the Hyperscale migration.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 BlockRestoreOnVldbGeoSecondary - Restore of Hyperscale database where source database is geo-secondary is not allowed.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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": { + "Gets database usages.": { + "$ref": "./examples/GetDatabaseUsages.json" + } + } + } + } + }, + "definitions": { + "DatabaseUsage": { + "description": "Usage metric of a database.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseUsageProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseUsageListResult": { + "description": "A list of database usage metrics.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseUsage" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseUsageProperties": { + "description": "Properties of a database usage.", + "type": "object", + "properties": { + "displayName": { + "description": "User-readable name of the metric.", + "type": "string", + "readOnly": true + }, + "currentValue": { + "format": "double", + "description": "Current value of the metric.", + "type": "number", + "readOnly": true + }, + "limit": { + "format": "double", + "description": "Boundary value of the metric.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit of the metric.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessmentRuleBaselines.json new file mode 100644 index 000000000000..8e568da8430b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessmentRuleBaselines.json @@ -0,0 +1,339 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}": { + "get": { + "tags": [ + "DatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Gets a database's vulnerability assessment rule baseline.", + "operationId": "DatabaseVulnerabilityAssessmentRuleBaselines_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Creates or updates a database's vulnerability assessment rule baseline.", + "operationId": "DatabaseVulnerabilityAssessmentRuleBaselines_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Creates or updates a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json" + } + } + }, + "delete": { + "tags": [ + "DatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Removes the database's vulnerability assessment rule baseline.", + "operationId": "DatabaseVulnerabilityAssessmentRuleBaselines_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment rule baseline." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Removes a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessmentRuleBaseline": { + "description": "A database vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseVulnerabilityAssessmentRuleBaselineItem": { + "description": "Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result.", + "required": [ + "result" + ], + "type": "object", + "properties": { + "result": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DatabaseVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Vulnerability Assessment rule baseline.", + "required": [ + "baselineResults" + ], + "type": "object", + "properties": { + "baselineResults": { + "description": "The rule baseline result", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineItem" + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessmentScans.json new file mode 100644 index 000000000000..6eb5b9667d2d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessmentScans.json @@ -0,0 +1,458 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans": { + "get": { + "tags": [ + "DatabaseVulnerabilityAssessmentScans" + ], + "description": "Lists the vulnerability assessment scans of a database.", + "operationId": "DatabaseVulnerabilityAssessmentScans_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan records.", + "schema": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecordListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the list of a database vulnerability assessment scan records": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { + "get": { + "tags": [ + "DatabaseVulnerabilityAssessmentScans" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "DatabaseVulnerabilityAssessmentScans_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan record.", + "schema": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database vulnerability assessment scan record by scan ID": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export": { + "post": { + "tags": [ + "DatabaseVulnerabilityAssessmentScans" + ], + "description": "Convert an existing scan result to a human readable format. If already exists nothing happens", + "operationId": "DatabaseVulnerabilityAssessmentScans_Export", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the scanned database.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Scan result was converted successfully.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 409 VulnerabilityAssessmentStoragelessIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Scan result was converted successfully.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" + } + } + }, + "x-ms-examples": { + "Export a database's vulnerability assessment scan results.": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentScanExport.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan": { + "post": { + "tags": [ + "DatabaseVulnerabilityAssessmentScans" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "DatabaseVulnerabilityAssessmentScans_InitiateScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidVulnerabilityAssessmentScanIdLength - The vulnerability assessment scan ID length must be below {0} characters.\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 VulnerabilityAssessmentStoragelessIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\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 * 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 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentScansExecute.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessmentScanExportProperties": { + "description": "Properties of the export operation's result.", + "type": "object", + "properties": { + "exportedReportLocation": { + "description": "Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx).", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseVulnerabilityAssessmentScansExport": { + "description": "A database Vulnerability Assessment scan export resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScanExportProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VulnerabilityAssessmentScanError": { + "description": "Properties of a vulnerability assessment scan error.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanRecord": { + "description": "A vulnerability assessment scan record.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecordProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VulnerabilityAssessmentScanRecordListResult": { + "description": "A list of vulnerability assessment scan records.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanRecordProperties": { + "description": "Properties of a vulnerability assessment scan record.", + "type": "object", + "properties": { + "scanId": { + "description": "The scan ID.", + "type": "string", + "readOnly": true + }, + "triggerType": { + "description": "The scan trigger type.", + "enum": [ + "OnDemand", + "Recurring" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanTriggerType", + "modelAsString": true + } + }, + "state": { + "description": "The scan status.", + "enum": [ + "Passed", + "Failed", + "FailedToRun", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanState", + "modelAsString": true + } + }, + "startTime": { + "format": "date-time", + "description": "The scan start time (UTC).", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The scan end time (UTC).", + "type": "string", + "readOnly": true + }, + "errors": { + "description": "The scan errors.", + "type": "array", + "items": { + "$ref": "#/definitions/VulnerabilityAssessmentScanError" + }, + "readOnly": true + }, + "storageContainerPath": { + "description": "The scan results storage container path.", + "type": "string", + "readOnly": true + }, + "numberOfFailedSecurityChecks": { + "format": "int32", + "description": "The number of failed security checks.", + "type": "integer", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessments.json new file mode 100644 index 000000000000..a29b56e6a0b3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessments.json @@ -0,0 +1,377 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments": { + "get": { + "tags": [ + "DatabaseVulnerabilityAssessments" + ], + "description": "Lists the vulnerability assessment policies associated with a database.", + "operationId": "DatabaseVulnerabilityAssessments_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment policies are defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment policies.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the database's vulnerability assessment policies": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "DatabaseVulnerabilityAssessments" + ], + "description": "Gets the database's vulnerability assessment.", + "operationId": "DatabaseVulnerabilityAssessments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a database's vulnerability assessment": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseVulnerabilityAssessments" + ], + "description": "Creates or updates the database's vulnerability assessment.", + "operationId": "DatabaseVulnerabilityAssessments_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 VulnerabilityAssessmentStoragelessIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a database's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json" + }, + "Create a database's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json" + }, + "Create a database's vulnerability assessment with all parameters": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "DatabaseVulnerabilityAssessments" + ], + "description": "Removes the database's vulnerability assessment.", + "operationId": "DatabaseVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Remove a database's vulnerability assessment": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessment": { + "description": "A database vulnerability assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseVulnerabilityAssessmentListResult": { + "description": "A list of the database's vulnerability assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseVulnerabilityAssessmentProperties": { + "description": "Properties of a database Vulnerability Assessment.", + "type": "object", + "properties": { + "storageContainerPath": { + "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn't set", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageContainerSasKey": { + "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "recurringScans": { + "$ref": "#/definitions/VulnerabilityAssessmentRecurringScansProperties", + "description": "The recurring scans settings" + } + } + }, + "VulnerabilityAssessmentRecurringScansProperties": { + "description": "Properties of a Vulnerability Assessment recurring scans.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Recurring scans state.", + "type": "boolean" + }, + "emailSubscriptionAdmins": { + "description": "Specifies that the schedule scan notification will be is sent to the subscription administrators.", + "default": true, + "type": "boolean" + }, + "emails": { + "description": "Specifies an array of e-mail addresses to which the scan notification is sent.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Databases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Databases.json new file mode 100644 index 000000000000..29994be57f65 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Databases.json @@ -0,0 +1,2205 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases": { + "get": { + "tags": [ + "Databases" + ], + "description": "Gets a list of databases.", + "operationId": "Databases_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "$skipToken", + "in": "query", + "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/DatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of databases.": { + "$ref": "./examples/ListVCoreDatabasesByServer.json" + }, + "Gets a list of databases configured with enclave type.": { + "$ref": "./examples/ListVCoreDatabasesEnclaveTypeByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}": { + "get": { + "tags": [ + "Databases" + ], + "description": "Gets a database.", + "operationId": "Databases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-odata": "#/definitions/Database", + "x-ms-examples": { + "Gets a database configured with Default enclave type.": { + "$ref": "./examples/GetVCoreDatabaseDefaultEnclave.json" + }, + "Gets a database configured with VBS enclave type.": { + "$ref": "./examples/GetVCoreDatabaseVBSEnclave.json" + }, + "Gets a database.": { + "$ref": "./examples/GetVCoreDatabase.json" + }, + "Gets a database with database level keys expanded.": { + "$ref": "./examples/GetVCoreDatabaseWithExpandEqualsKeys.json" + }, + "Gets a database with Availability zone specified.": { + "$ref": "./examples/GetDatabaseWithAvailabilityZone.json" + } + } + }, + "put": { + "tags": [ + "Databases" + ], + "description": "Creates a new database or updates an existing database.", + "operationId": "Databases_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested database resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/Database" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingMaxSizeBytes - MaxSizeBytes is required.\n\n * 400 MissingSkuName - Sku name is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 InvalidLicenseType - The specified license type is invalid.\n\n * 400 InvalidSkuName - Invalid SKU name.\n\n * 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.\n\n * 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.\n\n * 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.\n\n * 400 LedgerNotAllowedWithSpecifiedCreateMode - IsLedgerOn is not allowed with the specified create mode.\n\n * 400 LedgerNotAllowedOnSampleDatabase - Database creation is not allowed with IsLedgerOn for a sample database.\n\n * 400 FreeLimitDatabaseNotAllowedInNonDefaultCreate - Free limit database creation is not allowed in non default create mode.\n\n * 400 AvailabilityZoneNotSupported - Availability Zones for databases and elastic pools are not yet supported.\n\n * 400 DatabaseNameDoesNotMatchSourceDatabaseId - The database name specified doesn’t match the database name in sourceDatabaseId.\n\n * 400 ElasticPoolNotSupportedForExternalBackupRestore - Elastic pool is not supported for external backup restore\n\n * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.\n\n * 400 InvalidRecoveryServicesRecoveryPointId - Invalid recovery services recovery point identifier.\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 MissingRecoverableDatabaseId - Missing recoverable database identifier.\n\n * 400 MissingRecoveryServicesRecoveryPointId - Missing recovery services recovery point Id.\n\n * 400 MissingRestorableDroppedDatabaseId - Missing restorableDroppedDatabaseId\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingSourceDatabaseDeletionDate - Missing source database deletion date\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 400 MultipleIdentitiesOnDatabase - Only one user assigned managed identity is supported at the Database Level.\n\n * 400 MultipleIdentityDelegationsOnDatabase - Only one identity delegation is supported at the Database Level.\n\n * 400 MissingPrimaryDelegatedIdentityClientId - In order to use delegated identities please provide a primary delegated identity client id.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 IsLedgerDatabaseIsNotSupportedOnResourceType - Changing the ledger property is not supported for this resource type.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 UnableToCreateGeoChain - User attempted to create secondary database (chaining) even though automatic upload of ledger digests has been configured\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 DatabaseNameInUse - Database already exists. Choose a different database name.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 UnsupportedBackupStorageRedundancyForEdition - The requested backup storage redundancy is not supported for edition\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 InvalidIdentityId - One or more identity id(s) provided are not valid ARM resource id(s). Please input valid id(s) and try again.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 InvalidNumberOfIdentities - Only one user assigned managed identity is supported at the Database Level.\n\n * 400 NoRestorePointAvailable - The source database has not yet accomplished its first backup in order to support restore operations. Please retry the restore request later.\n\n * 400 DatabaseNamedReplicaChainingNotAllowed - User tried to create a named replica of a named replica which is not allowed.\n\n * 400 DatabaseNamedReplicaInvalidOperation - User attempted an unsupported operation on a named replica.\n\n * 400 DatabaseNamedReplicaInvalidSourceDatabase - User attempted to create a named replica in a different subscription or region than the source database.\n\n * 400 CannotAssignIdentityToMaster - Cannot assign an identity to a system database. Database identity cannot be assigned to 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 MissingThumbprintCrm - The restore operation of a CRM database failed because a required TDE certificate was missing. Please retry the restore operation to an existing elastic pool.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RestoreTargetEditionSizeInsufficientV2 - User attempted to restore a database to an edition that is a smaller size than the allocated size of the restored database.\n\n * 400 ResourcePoolStorageLimitHitDuringRestore - The restored database can't be restored into the resource pool due to the remaining storage capacity in the pool.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 PerDatabaseCMKGeoReplicationNotSupported - Geo Replication and Database Copy is not supported when Database-level CMK is configured in preview.\n\n * 400 InvalidStandbyGeoEdition - User attempted to create a DTU based standby geo.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 GeoRestoreBackupStorageTypeNotSupported - Database recovery requests are invalid when issued against a database that is not configured to use geo-redundant backup storage.\n\n * 400 RestoreHyperscaleToNonHyperscale - Restoring a Hyperscale database backup to a non-Hyperscale service tier or vice versa is not supported.\n\n * 400 SubscriptionDoesNotHaveAccessToServer - The subscription does not have access to the specified server(s)\n\n * 400 RecoveryPointDoesNotExist - The specified recovery point either does not exist or is not valid.\n\n * 400 LtrBackupNotFound - The specified long term retention backup does not exist.\n\n * 400 InvalidPointInTime - The specified point in time is not valid for the database.\n\n * 400 GeoRestoreCannotResolveTargetCluster - Cannot resolve target cluster for server\n\n * 400 CannotSpecifyEditionOrSloWhenRestoringToPool - Specifying the target service level objective or edition is not supported when restoring to an elastic pool.\n\n * 400 RestoreNotSupportedForGeoDrSecondary - Point-in-time restore and database recovery operations are not supported on databases that are currently configured as geo-secondaries.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 GeoRedundantBackupsNotPermittedForSubscription - Geo-redundant backup storage is blocked for all databases under subscription '{0}' by preview feature 'Azure SQL Database Block Geo-redundant Backup Storage'. Please select a different backup storage redundancy.\n\n * 400 RestoreHyperscaleToNonHyperscaleElasticPool - Restoring a Hyperscale database to an elastic pool which is not Hyperscale or restoring a database which is not Hyperscale to a Hyperscale elastic pool is not supported.\n\n * 400 RestoreIneligibleDatabaseName - The specified target database name, '{0}', is reserved and cannot be used in a restore operation.\n\n * 400 RestoreNotSupportedForSystemDb - Restore and database recovery are not supported for system databases.\n\n * 400 RestoreIneligibleDroppedDatabaseShortLifespan - The source database, '{0}', dropped on '{1}', has not existed long enough to support restores.\n\n * 400 RestoreIneligibleLiveDatabaseShortLifespan - The source database, '{0}', has not yet accomplished its first backup in order to support restore operations. Please wait until at least the indicated earliest restore date '{1}' and resubmit the request.\n\n * 400 RestoreCrossServerDisabled - For point-in-time restores, the target logical server must be the same as the source logical server. Consider restoring to the source database's server, or using database copy or database recovery.\n\n * 400 RestoreSameServerRecoveryDisabled - Same-server recovery is currently not supported. Consider using point-in-time restore or recovering to a different server.\n\n * 400 RestoreNotSupportedFromLtrBackupToEdition - Restore from long-term retention backup to '{0}' edition not supported.\n\n * 400 RestoreNotSupportedFromExternalBackupToEdition - Restore from external backup to '{0}' edition not supported.\n\n * 400 UpdateToServerlessIfLtrIsNotDisabled - Enabling auto-pause for a serverless database is not supported if long-term backup retention is enabled.\n\n * 400 DuplicateRestoreOperation - A restore request with the same target database name '{0}' on server '{1}' already exists.\n\n * 400 ExternalBackupUriMalformed - The external backup storage container URI is malformed.\n\n * 400 ExternalBackupUriHostNotAllowed - The host name for the external backup storage container URI is not allowed.\n\n * 400 ExternalBackupUriInvalidSchemeOrPort - The external backup storage container URI uses an invalid scheme or port. Please use https and port 443.\n\n * 400 ExternalBackupVldbUnsupported - Hyperscale does not support external backup restore requests.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 InvalidPitrPriorToVldbMigration - For database '{0}', specified point-in-time '{1}' is prior to the Hyperscale migration time of '{2}'. Please specify a target edition or service level objective which is not Hyperscale when restoring to a point earlier than the Hyperscale migration.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 BlockRestoreOnVldbGeoSecondary - Restore of Hyperscale database where source database is geo-secondary is not allowed.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 MaintenanceWindowNotSupportedForNamedReplica - User tried to create or update named replica with non-default maintenance window which is not supported.\n\n * 400 InvalidStandbyGeoReadScale - User attempted to enable read scale on a standby geo database that does not support it.\n\n * 400 PerDatabaseCMKKeyRotationAttemptedWhileOldThumbprintInUse - Key Rotation for the TDE Protector at the database level is blocked when active transactions are holding up the log encrypted with old keys. Please refer to aka.ms/azuresqldbkeyrotation for possible strategies to workaround this issue.\n\n * 400 PerDBCMKNotSupportedWithLTR - Database-level CMK is not supported when Long-term Backup Retention is enabled on the database.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutDatabaseLevelEncryptionProtector - Database-level encryption protector must be set on the target database while attempting to copy or replicate a database encrypted with a database level key.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeys - While attempting to replicate a database configured with database level encryption protector, the current keys being used by the primary must be passed to the secondary database.\n\n * 400 PerDatabaseCMKGeoPrimaryIsNotConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must be configured with a database level encryption protector before setting a database level encryption protector on the geo-secondary.\n\n * 400 PerDatabaseCMKGeoPrimaryIsConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must not be configured with a database level encryption protector when failing over to a geo-secondary without a database level encryption protector.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 MissingAsymmetricKeyOnTargetServer - Target server does not have access to an asymmetric key.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MultipleDroppedDatabasesWithTheSameName - Found multiple dropped databases with the same name on server.\n\n * 400 AzureKeyVaultClientError - The Azure Key Vault client encountered an error.\n\n * 400 AzureKeyVaultClientInfoError - An error occurred while obtaining information for the Azure Key Vault client.\n\n * 400 UnsupportedBackupStorageRedundancy - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LTRSterlingToVldbMigrationNotSupported - Cannot change service objective for database to Hyperscale as long-term retention is not yet supported on Hyperscale. Please disable long-term retention on the database and retry.\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 400 LongTermRetentionMigrationBackupStorageRedundancyNotAllowed - Changing backup storage redundancy is not allowed for LTR Copy operations.\n\n * 400 LongTermRetentionMigrationSubscriptionNotFound - The subscription could not be found.\n\n * 400 VBSEnclaveResourcePoolInvalidCombination - Elastic pool {0} and the preferred enclave type {1} combination is invalid.\n\n * 400 VBSEnclaveNotSupportedForDW - The preferredEnclaveType is not supported in Synapse SQL.\n\n * 400 VBSEnclaveNotSupportedForDCSeriesSLO - Configuring the 'VBS' preferredEnclaveType for databases using the DC-series hardware configuration is not supported. DC-series databases are pre-configured with Intel SGX enclaves. Virtualization based security (VBS) enclaves are not supported.\n\n * 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary {0} database on the {1} server uses the {2} preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary {3} database on the {4} server is {5}.\n\n * 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\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 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\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 * 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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 500 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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": "Creating or updating the database is in progress." + }, + "201": { + "description": "Successfully created the database.", + "schema": { + "$ref": "#/definitions/Database" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Creates a database with default mode.": { + "$ref": "./examples/CreateDatabaseDefaultMode.json" + }, + "Creates a VCore database by specifying service objective name.": { + "$ref": "./examples/CreateVCoreDatabaseByServiceObjective.json" + }, + "Creates a VCore database by specifying sku name and capacity.": { + "$ref": "./examples/CreateVCoreDatabaseBySkuNameCapacity.json" + }, + "Creates a database with minimum number of parameters.": { + "$ref": "./examples/CreateDatabaseMin.json" + }, + "Creates a database as a copy.": { + "$ref": "./examples/CreateDatabaseCopyMode.json" + }, + "Creates a database as an on-line secondary.": { + "$ref": "./examples/CreateDatabaseSecondaryMode.json" + }, + "Creates a database as named replica secondary.": { + "$ref": "./examples/CreateDatabaseNamedReplica.json" + }, + "Creates a database from PointInTimeRestore.": { + "$ref": "./examples/CreateDatabasePITRMode.json" + }, + "Creates a database with preferred maintenance window.": { + "$ref": "./examples/CreateDatabaseMaintenanceConfiguration.json" + }, + "Creates a database with specified backup storage redundancy.": { + "$ref": "./examples/CreateDatabaseConfiguredBackupStorageRedundancy.json" + }, + "Creates a database with ledger on.": { + "$ref": "./examples/CreateDatabaseLedger.json" + }, + "Creates a database with Default enclave type.": { + "$ref": "./examples/CreateDatabaseDefaultEnclave.json" + }, + "Creates a database with VBS enclave type.": { + "$ref": "./examples/CreateDatabaseVBSEnclave.json" + }, + "Creates a data warehouse database as a cross-subscription restore from a restore point of an existing database.": { + "$ref": "./examples/CreateDwDatabaseCrossSubscriptionPITR.json" + }, + "Creates a data warehouse database as a cross-subscription restore from a geo-backup.": { + "$ref": "./examples/CreateDwDatabaseCrossSubscriptionRecovery.json" + }, + "Creates a data warehouse database as a cross-subscription restore from a backup of a dropped database.": { + "$ref": "./examples/CreateDwDatabaseCrossSubscriptionRestore.json" + }, + "Creates a database as a standby secondary.": { + "$ref": "./examples/CreateDatabaseStandbyMode.json" + }, + "Creates a database with database-level customer managed keys.": { + "$ref": "./examples/CreateDatabaseDefaultModeWithKeysAndEncryptionProtector.json" + }, + "Updates a database to Hyperscale SLO with manual cutover": { + "$ref": "./examples/UpdateDatabaseHyperscaleMigrationWithManualCutover.json" + }, + "Updates a database to Hyperscale tier by triggering manual cutover during Migration workflow": { + "$ref": "./examples/UpdateDatabaseHyperscaleMigrationPerformCutover.json" + }, + "Creates a database with availability zone specified.": { + "$ref": "./examples/CreateDatabaseWithAvailabilityZone.json" + } + } + }, + "delete": { + "tags": [ + "Databases" + ], + "description": "Deletes the database.", + "operationId": "Databases_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the database." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerNoDropPrimary - The Geo-primary database cannot be dropped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 CannotDropDatabaseAKVError - The database {0} on server {1} cannot be safely dropped because it is encrypted with a customer managed key that is no longer accessible to take the last backup before drop. Please restore Azure Key Vault Access on the server and revalidate the keys to make this database accessible and then proceed with the drop. For details see https://aka.ms/tdecmkrestorability\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\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 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Deleting the database is in progress." + }, + "204": { + "description": "The specified database does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Deletes a database.": { + "$ref": "./examples/DeleteDatabase.json" + } + } + }, + "patch": { + "tags": [ + "Databases" + ], + "description": "Updates an existing database.", + "operationId": "Databases_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested database resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingMaxSizeBytes - MaxSizeBytes is required.\n\n * 400 MissingSkuName - Sku name is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 InvalidLicenseType - The specified license type is invalid.\n\n * 400 InvalidSkuName - Invalid SKU name.\n\n * 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.\n\n * 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.\n\n * 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.\n\n * 400 LedgerNotAllowedWithSpecifiedCreateMode - IsLedgerOn is not allowed with the specified create mode.\n\n * 400 LedgerNotAllowedOnSampleDatabase - Database creation is not allowed with IsLedgerOn for a sample database.\n\n * 400 FreeLimitDatabaseNotAllowedInNonDefaultCreate - Free limit database creation is not allowed in non default create mode.\n\n * 400 AvailabilityZoneNotSupported - Availability Zones for databases and elastic pools are not yet supported.\n\n * 400 DatabaseNameDoesNotMatchSourceDatabaseId - The database name specified doesn’t match the database name in sourceDatabaseId.\n\n * 400 ElasticPoolNotSupportedForExternalBackupRestore - Elastic pool is not supported for external backup restore\n\n * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.\n\n * 400 InvalidRecoveryServicesRecoveryPointId - Invalid recovery services recovery point identifier.\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 MissingRecoverableDatabaseId - Missing recoverable database identifier.\n\n * 400 MissingRecoveryServicesRecoveryPointId - Missing recovery services recovery point Id.\n\n * 400 MissingRestorableDroppedDatabaseId - Missing restorableDroppedDatabaseId\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingSourceDatabaseDeletionDate - Missing source database deletion date\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 400 MultipleIdentitiesOnDatabase - Only one user assigned managed identity is supported at the Database Level.\n\n * 400 MultipleIdentityDelegationsOnDatabase - Only one identity delegation is supported at the Database Level.\n\n * 400 MissingPrimaryDelegatedIdentityClientId - In order to use delegated identities please provide a primary delegated identity client id.\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 400 LongTermRetentionMigrationBackupStorageRedundancyNotAllowed - Changing backup storage redundancy is not allowed for LTR Copy operations.\n\n * 400 LongTermRetentionMigrationSubscriptionNotFound - The subscription could not be found.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 IsLedgerDatabaseIsNotSupportedOnResourceType - Changing the ledger property is not supported for this resource type.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 UnableToCreateGeoChain - User attempted to create secondary database (chaining) even though automatic upload of ledger digests has been configured\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 DatabaseNameInUse - Database already exists. Choose a different database name.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 UnsupportedBackupStorageRedundancyForEdition - The requested backup storage redundancy is not supported for edition\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 InvalidIdentityId - One or more identity id(s) provided are not valid ARM resource id(s). Please input valid id(s) and try again.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 InvalidNumberOfIdentities - Only one user assigned managed identity is supported at the Database Level.\n\n * 400 NoRestorePointAvailable - The source database has not yet accomplished its first backup in order to support restore operations. Please retry the restore request later.\n\n * 400 DatabaseNamedReplicaChainingNotAllowed - User tried to create a named replica of a named replica which is not allowed.\n\n * 400 DatabaseNamedReplicaInvalidOperation - User attempted an unsupported operation on a named replica.\n\n * 400 DatabaseNamedReplicaInvalidSourceDatabase - User attempted to create a named replica in a different subscription or region than the source database.\n\n * 400 CannotAssignIdentityToMaster - Cannot assign an identity to a system database. Database identity cannot be assigned to 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 MissingThumbprintCrm - The restore operation of a CRM database failed because a required TDE certificate was missing. Please retry the restore operation to an existing elastic pool.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RestoreTargetEditionSizeInsufficientV2 - User attempted to restore a database to an edition that is a smaller size than the allocated size of the restored database.\n\n * 400 ResourcePoolStorageLimitHitDuringRestore - The restored database can't be restored into the resource pool due to the remaining storage capacity in the pool.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 PerDatabaseCMKGeoReplicationNotSupported - Geo Replication and Database Copy is not supported when Database-level CMK is configured in preview.\n\n * 400 InvalidStandbyGeoEdition - User attempted to create a DTU based standby geo.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 GeoRestoreBackupStorageTypeNotSupported - Database recovery requests are invalid when issued against a database that is not configured to use geo-redundant backup storage.\n\n * 400 RestoreHyperscaleToNonHyperscale - Restoring a Hyperscale database backup to a non-Hyperscale service tier or vice versa is not supported.\n\n * 400 SubscriptionDoesNotHaveAccessToServer - The subscription does not have access to the specified server(s)\n\n * 400 RecoveryPointDoesNotExist - The specified recovery point either does not exist or is not valid.\n\n * 400 LtrBackupNotFound - The specified long term retention backup does not exist.\n\n * 400 InvalidPointInTime - The specified point in time is not valid for the database.\n\n * 400 GeoRestoreCannotResolveTargetCluster - Cannot resolve target cluster for server\n\n * 400 CannotSpecifyEditionOrSloWhenRestoringToPool - Specifying the target service level objective or edition is not supported when restoring to an elastic pool.\n\n * 400 RestoreNotSupportedForGeoDrSecondary - Point-in-time restore and database recovery operations are not supported on databases that are currently configured as geo-secondaries.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 GeoRedundantBackupsNotPermittedForSubscription - Geo-redundant backup storage is blocked for all databases under subscription '{0}' by preview feature 'Azure SQL Database Block Geo-redundant Backup Storage'. Please select a different backup storage redundancy.\n\n * 400 RestoreHyperscaleToNonHyperscaleElasticPool - Restoring a Hyperscale database to an elastic pool which is not Hyperscale or restoring a database which is not Hyperscale to a Hyperscale elastic pool is not supported.\n\n * 400 RestoreIneligibleDatabaseName - The specified target database name, '{0}', is reserved and cannot be used in a restore operation.\n\n * 400 RestoreNotSupportedForSystemDb - Restore and database recovery are not supported for system databases.\n\n * 400 RestoreIneligibleDroppedDatabaseShortLifespan - The source database, '{0}', dropped on '{1}', has not existed long enough to support restores.\n\n * 400 RestoreIneligibleLiveDatabaseShortLifespan - The source database, '{0}', has not yet accomplished its first backup in order to support restore operations. Please wait until at least the indicated earliest restore date '{1}' and resubmit the request.\n\n * 400 RestoreCrossServerDisabled - For point-in-time restores, the target logical server must be the same as the source logical server. Consider restoring to the source database's server, or using database copy or database recovery.\n\n * 400 RestoreSameServerRecoveryDisabled - Same-server recovery is currently not supported. Consider using point-in-time restore or recovering to a different server.\n\n * 400 RestoreNotSupportedFromLtrBackupToEdition - Restore from long-term retention backup to '{0}' edition not supported.\n\n * 400 RestoreNotSupportedFromExternalBackupToEdition - Restore from external backup to '{0}' edition not supported.\n\n * 400 UpdateToServerlessIfLtrIsNotDisabled - Enabling auto-pause for a serverless database is not supported if long-term backup retention is enabled.\n\n * 400 DuplicateRestoreOperation - A restore request with the same target database name '{0}' on server '{1}' already exists.\n\n * 400 ExternalBackupUriMalformed - The external backup storage container URI is malformed.\n\n * 400 ExternalBackupUriHostNotAllowed - The host name for the external backup storage container URI is not allowed.\n\n * 400 ExternalBackupUriInvalidSchemeOrPort - The external backup storage container URI uses an invalid scheme or port. Please use https and port 443.\n\n * 400 ExternalBackupVldbUnsupported - Hyperscale does not support external backup restore requests.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 InvalidPitrPriorToVldbMigration - For database '{0}', specified point-in-time '{1}' is prior to the Hyperscale migration time of '{2}'. Please specify a target edition or service level objective which is not Hyperscale when restoring to a point earlier than the Hyperscale migration.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 BlockRestoreOnVldbGeoSecondary - Restore of Hyperscale database where source database is geo-secondary is not allowed.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 MaintenanceWindowNotSupportedForNamedReplica - User tried to create or update named replica with non-default maintenance window which is not supported.\n\n * 400 InvalidStandbyGeoReadScale - User attempted to enable read scale on a standby geo database that does not support it.\n\n * 400 PerDatabaseCMKKeyRotationAttemptedWhileOldThumbprintInUse - Key Rotation for the TDE Protector at the database level is blocked when active transactions are holding up the log encrypted with old keys. Please refer to aka.ms/azuresqldbkeyrotation for possible strategies to workaround this issue.\n\n * 400 PerDBCMKNotSupportedWithLTR - Database-level CMK is not supported when Long-term Backup Retention is enabled on the database.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutDatabaseLevelEncryptionProtector - Database-level encryption protector must be set on the target database while attempting to copy or replicate a database encrypted with a database level key.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeys - While attempting to replicate a database configured with database level encryption protector, the current keys being used by the primary must be passed to the secondary database.\n\n * 400 PerDatabaseCMKGeoPrimaryIsNotConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must be configured with a database level encryption protector before setting a database level encryption protector on the geo-secondary.\n\n * 400 PerDatabaseCMKGeoPrimaryIsConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must not be configured with a database level encryption protector when failing over to a geo-secondary without a database level encryption protector.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 MissingAsymmetricKeyOnTargetServer - Target server does not have access to an asymmetric key.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MultipleDroppedDatabasesWithTheSameName - Found multiple dropped databases with the same name on server.\n\n * 400 AzureKeyVaultClientError - The Azure Key Vault client encountered an error.\n\n * 400 AzureKeyVaultClientInfoError - An error occurred while obtaining information for the Azure Key Vault client.\n\n * 400 UnsupportedBackupStorageRedundancy - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LTRSterlingToVldbMigrationNotSupported - Cannot change service objective for database to Hyperscale as long-term retention is not yet supported on Hyperscale. Please disable long-term retention on the database and retry.\n\n * 400 VBSEnclaveResourcePoolInvalidCombination - Elastic pool {0} and the preferred enclave type {1} combination is invalid.\n\n * 400 VBSEnclaveNotSupportedForDW - The preferredEnclaveType is not supported in Synapse SQL.\n\n * 400 VBSEnclaveNotSupportedForDCSeriesSLO - Configuring the 'VBS' preferredEnclaveType for databases using the DC-series hardware configuration is not supported. DC-series databases are pre-configured with Intel SGX enclaves. Virtualization based security (VBS) enclaves are not supported.\n\n * 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary {0} database on the {1} server uses the {2} preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary {3} database on the {4} server is {5}.\n\n * 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\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 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\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 * 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 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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": "Updating the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Updates a database with Default enclave type.": { + "$ref": "./examples/PatchDatabaseDefaultEnclave.json" + }, + "Creates a database with VBS enclave type.": { + "$ref": "./examples/PatchDatabaseVBSEnclave.json" + }, + "Updates a database.": { + "$ref": "./examples/PatchVCoreDatabase.json" + }, + "Assigns maintenance window to a database.": { + "$ref": "./examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json" + }, + "Resets maintenance window of a database to default.": { + "$ref": "./examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json" + }, + "Patch a database with database-level customer managed keys.": { + "$ref": "./examples/PatchVCoreDatabaseWithKeysAndEncryptionProtector.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export": { + "post": { + "tags": [ + "Databases" + ], + "description": "Exports a database.", + "operationId": "Databases_Export", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The database export request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ExportDatabaseDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully exported the database.", + "schema": { + "$ref": "#/definitions/ImportExportOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 InvalidImportExportInputParameter - The import/export request failed due to an invalid input parameter.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 InvalidImportExportOperationResourceLocks - The Import/Export request is invalid due to locks on the Private Link resources.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidImportExportParameter - The Import/Export request failed due to an invalid input parameter.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 400 InvalidImportExportStorageCredentials - Import/Export operation failed due to invalid storage credentials\n\n * 400 InvalidImportExportStorageAuthType - Import/Export operation failed due to invalid storage auth type\n\n * 400 InvalidImportExportStorageKeyFormat - Import/Export operation failed due to invalid storage key format\n\n * 400 LongImportExportStorageUri - Import/Export operation failed due to long storage URI\n\n * 400 LargeExportDatabaseSize - Export operation failed because database is larger than max supported size\n\n * 400 UnSupportedImportExportEdition - ImportExport operation failed because it is targeting a invalid edition\n\n * 400 InvalidImportExportStorageURI - ImportExport operation failed because storage URI is invalid\n\n * 400 InvalidSqlAuthType - ImportExport operation failed because the sql authentication type is invalid\n\n * 400 BlobAlreadyExist - ImportExport operation failed because the storage blob is already exists\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Exporting the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Exports a database.": { + "$ref": "./examples/ExportDatabase.json" + }, + "Exports a database, using private link to communicate with SQL server and storage account.": { + "$ref": "./examples/ExportDatabaseWithNetworkIsolation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover": { + "post": { + "tags": [ + "Databases" + ], + "description": "Failovers a database.", + "operationId": "Databases_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to failover.", + "required": true, + "type": "string" + }, + { + "name": "replicaType", + "in": "query", + "description": "The type of replica to be failed over.", + "required": false, + "type": "string", + "enum": [ + "Primary", + "ReadableSecondary" + ], + "x-ms-enum": { + "name": "ReplicaType", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed database failover." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 DatabaseFailoverThrottled - There was a recent failover on the database or pool if database belongs in an elastic pool.\n\n * 400 DatabaseFailoverNotSupportedOnSKU - This type of customer initiated failover is not supported on the given SKU.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 DatabaseNotInStateToFailover - The database is currently in a state such that failover cannot be issued.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Database failover is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Failover an database": { + "$ref": "./examples/FailoverDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/import": { + "post": { + "tags": [ + "Databases" + ], + "description": "Imports a bacpac into a new database.", + "operationId": "Databases_Import", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The database import request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ImportExistingDatabaseDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully imported the database.", + "schema": { + "$ref": "#/definitions/ImportExportOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 InvalidImportExportInputParameter - The import/export request failed due to an invalid input parameter.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 InvalidImportExportOperationResourceLocks - The Import/Export request is invalid due to locks on the Private Link resources.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidImportExportParameter - The Import/Export request failed due to an invalid input parameter.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 400 InvalidImportExportStorageCredentials - Import/Export operation failed due to invalid storage credentials\n\n * 400 InvalidImportExportStorageAuthType - Import/Export operation failed due to invalid storage auth type\n\n * 400 InvalidImportExportStorageKeyFormat - Import/Export operation failed due to invalid storage key format\n\n * 400 LongImportExportStorageUri - Import/Export operation failed due to long storage URI\n\n * 400 LargeExportDatabaseSize - Export operation failed because database is larger than max supported size\n\n * 400 UnSupportedImportExportEdition - ImportExport operation failed because it is targeting a invalid edition\n\n * 400 InvalidImportExportStorageURI - ImportExport operation failed because storage URI is invalid\n\n * 400 InvalidSqlAuthType - ImportExport operation failed because the sql authentication type is invalid\n\n * 400 BlobAlreadyExist - ImportExport operation failed because the storage blob is already exists\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Importing the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Imports to an existing empty database.": { + "$ref": "./examples/ImportDatabase.json" + }, + "Imports to an existing empty database, using private link to communicate with SQL server and storage account.": { + "$ref": "./examples/ImportDatabaseWithNetworkIsolation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move": { + "post": { + "tags": [ + "Databases" + ], + "description": "Renames a database.", + "operationId": "Databases_Rename", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to rename.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The resource move definition for renaming this database.", + "required": true, + "schema": { + "$ref": "#/definitions/ResourceMoveDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully renamed the database." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceMoveRequest - The resource move request is invalid.\n\n * 400 InvalidMoveTargetResourceId - The target resource identifier in move request is invalid.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DatabaseNameInUse - Database already exists. Choose a different database name.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship." + } + }, + "x-ms-examples": { + "Renames a database.": { + "$ref": "./examples/RenameDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause": { + "post": { + "tags": [ + "Databases" + ], + "description": "Pauses a database.", + "operationId": "Databases_Pause", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to be paused.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully paused the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 CannotDeactivateWhenDeactivatingInProgress - Deactivation workflow failed because there is a deactivate workflow already running.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Pausing the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Pauses a database.": { + "$ref": "./examples/PauseDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume": { + "post": { + "tags": [ + "Databases" + ], + "description": "Resumes a database.", + "operationId": "Databases_Resume", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to be resumed.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully resumed the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Resuming the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Resumes a database.": { + "$ref": "./examples/ResumeDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/upgradeDataWarehouse": { + "post": { + "tags": [ + "Databases" + ], + "description": "Upgrades a data warehouse.", + "operationId": "Databases_UpgradeDataWarehouse", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to be upgraded.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully upgraded the data warehouse." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 IsLedgerDatabaseIsNotSupportedOnResourceType - Changing the ledger property is not supported for this resource type.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 UnableToCreateGeoChain - User attempted to create secondary database (chaining) even though automatic upload of ledger digests has been configured\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 DatabaseNameInUse - Database already exists. Choose a different database name.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 UnsupportedBackupStorageRedundancyForEdition - The requested backup storage redundancy is not supported for edition\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 InvalidIdentityId - One or more identity id(s) provided are not valid ARM resource id(s). Please input valid id(s) and try again.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 InvalidNumberOfIdentities - Only one user assigned managed identity is supported at the Database Level.\n\n * 400 NoRestorePointAvailable - The source database has not yet accomplished its first backup in order to support restore operations. Please retry the restore request later.\n\n * 400 DatabaseNamedReplicaChainingNotAllowed - User tried to create a named replica of a named replica which is not allowed.\n\n * 400 DatabaseNamedReplicaInvalidOperation - User attempted an unsupported operation on a named replica.\n\n * 400 DatabaseNamedReplicaInvalidSourceDatabase - User attempted to create a named replica in a different subscription or region than the source database.\n\n * 400 CannotAssignIdentityToMaster - Cannot assign an identity to a system database. Database identity cannot be assigned to 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 MissingThumbprintCrm - The restore operation of a CRM database failed because a required TDE certificate was missing. Please retry the restore operation to an existing elastic pool.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RestoreTargetEditionSizeInsufficientV2 - User attempted to restore a database to an edition that is a smaller size than the allocated size of the restored database.\n\n * 400 ResourcePoolStorageLimitHitDuringRestore - The restored database can't be restored into the resource pool due to the remaining storage capacity in the pool.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 PerDatabaseCMKGeoReplicationNotSupported - Geo Replication and Database Copy is not supported when Database-level CMK is configured in preview.\n\n * 400 InvalidStandbyGeoEdition - User attempted to create a DTU based standby geo.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 GeoRestoreBackupStorageTypeNotSupported - Database recovery requests are invalid when issued against a database that is not configured to use geo-redundant backup storage.\n\n * 400 RestoreHyperscaleToNonHyperscale - Restoring a Hyperscale database backup to a non-Hyperscale service tier or vice versa is not supported.\n\n * 400 SubscriptionDoesNotHaveAccessToServer - The subscription does not have access to the specified server(s)\n\n * 400 RecoveryPointDoesNotExist - The specified recovery point either does not exist or is not valid.\n\n * 400 LtrBackupNotFound - The specified long term retention backup does not exist.\n\n * 400 InvalidPointInTime - The specified point in time is not valid for the database.\n\n * 400 GeoRestoreCannotResolveTargetCluster - Cannot resolve target cluster for server\n\n * 400 CannotSpecifyEditionOrSloWhenRestoringToPool - Specifying the target service level objective or edition is not supported when restoring to an elastic pool.\n\n * 400 RestoreNotSupportedForGeoDrSecondary - Point-in-time restore and database recovery operations are not supported on databases that are currently configured as geo-secondaries.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 GeoRedundantBackupsNotPermittedForSubscription - Geo-redundant backup storage is blocked for all databases under subscription '{0}' by preview feature 'Azure SQL Database Block Geo-redundant Backup Storage'. Please select a different backup storage redundancy.\n\n * 400 RestoreHyperscaleToNonHyperscaleElasticPool - Restoring a Hyperscale database to an elastic pool which is not Hyperscale or restoring a database which is not Hyperscale to a Hyperscale elastic pool is not supported.\n\n * 400 RestoreIneligibleDatabaseName - The specified target database name, '{0}', is reserved and cannot be used in a restore operation.\n\n * 400 RestoreNotSupportedForSystemDb - Restore and database recovery are not supported for system databases.\n\n * 400 RestoreIneligibleDroppedDatabaseShortLifespan - The source database, '{0}', dropped on '{1}', has not existed long enough to support restores.\n\n * 400 RestoreIneligibleLiveDatabaseShortLifespan - The source database, '{0}', has not yet accomplished its first backup in order to support restore operations. Please wait until at least the indicated earliest restore date '{1}' and resubmit the request.\n\n * 400 RestoreCrossServerDisabled - For point-in-time restores, the target logical server must be the same as the source logical server. Consider restoring to the source database's server, or using database copy or database recovery.\n\n * 400 RestoreSameServerRecoveryDisabled - Same-server recovery is currently not supported. Consider using point-in-time restore or recovering to a different server.\n\n * 400 RestoreNotSupportedFromLtrBackupToEdition - Restore from long-term retention backup to '{0}' edition not supported.\n\n * 400 RestoreNotSupportedFromExternalBackupToEdition - Restore from external backup to '{0}' edition not supported.\n\n * 400 UpdateToServerlessIfLtrIsNotDisabled - Enabling auto-pause for a serverless database is not supported if long-term backup retention is enabled.\n\n * 400 DuplicateRestoreOperation - A restore request with the same target database name '{0}' on server '{1}' already exists.\n\n * 400 ExternalBackupUriMalformed - The external backup storage container URI is malformed.\n\n * 400 ExternalBackupUriHostNotAllowed - The host name for the external backup storage container URI is not allowed.\n\n * 400 ExternalBackupUriInvalidSchemeOrPort - The external backup storage container URI uses an invalid scheme or port. Please use https and port 443.\n\n * 400 ExternalBackupVldbUnsupported - Hyperscale does not support external backup restore requests.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 InvalidPitrPriorToVldbMigration - For database '{0}', specified point-in-time '{1}' is prior to the Hyperscale migration time of '{2}'. Please specify a target edition or service level objective which is not Hyperscale when restoring to a point earlier than the Hyperscale migration.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 BlockRestoreOnVldbGeoSecondary - Restore of Hyperscale database where source database is geo-secondary is not allowed.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 MaintenanceWindowNotSupportedForNamedReplica - User tried to create or update named replica with non-default maintenance window which is not supported.\n\n * 400 InvalidStandbyGeoReadScale - User attempted to enable read scale on a standby geo database that does not support it.\n\n * 400 PerDatabaseCMKKeyRotationAttemptedWhileOldThumbprintInUse - Key Rotation for the TDE Protector at the database level is blocked when active transactions are holding up the log encrypted with old keys. Please refer to aka.ms/azuresqldbkeyrotation for possible strategies to workaround this issue.\n\n * 400 PerDBCMKNotSupportedWithLTR - Database-level CMK is not supported when Long-term Backup Retention is enabled on the database.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutDatabaseLevelEncryptionProtector - Database-level encryption protector must be set on the target database while attempting to copy or replicate a database encrypted with a database level key.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeys - While attempting to replicate a database configured with database level encryption protector, the current keys being used by the primary must be passed to the secondary database.\n\n * 400 PerDatabaseCMKGeoPrimaryIsNotConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must be configured with a database level encryption protector before setting a database level encryption protector on the geo-secondary.\n\n * 400 PerDatabaseCMKGeoPrimaryIsConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must not be configured with a database level encryption protector when failing over to a geo-secondary without a database level encryption protector.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 MissingAsymmetricKeyOnTargetServer - Target server does not have access to an asymmetric key.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MultipleDroppedDatabasesWithTheSameName - Found multiple dropped databases with the same name on server.\n\n * 400 AzureKeyVaultClientError - The Azure Key Vault client encountered an error.\n\n * 400 AzureKeyVaultClientInfoError - An error occurred while obtaining information for the Azure Key Vault client.\n\n * 400 UnsupportedBackupStorageRedundancy - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LTRSterlingToVldbMigrationNotSupported - Cannot change service objective for database to Hyperscale as long-term retention is not yet supported on Hyperscale. Please disable long-term retention on the database and retry.\n\n * 400 UpgradeOnlyAllowedOnDataWarehouseInstances - User attempted to upgrade non-datawarehouse instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\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 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\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 * 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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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": "Upgrading the data warehouse is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Upgrades a data warehouse.": { + "$ref": "./examples/UpgradeDataWarehouse.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases": { + "get": { + "tags": [ + "Databases" + ], + "description": "Gets a list of databases in an elastic pool.", + "operationId": "Databases_ListByElasticPool", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a list of databases in an elastic pool.", + "schema": { + "$ref": "#/definitions/DatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\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": { + "Gets a list of databases in an elastic pool.": { + "$ref": "./examples/ListDatabasesByElasticPool.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/inaccessibleDatabases": { + "get": { + "tags": [ + "Databases" + ], + "description": "Gets a list of inaccessible databases in a logical server", + "operationId": "Databases_ListInaccessibleByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of inaccessible databases in a logical server", + "schema": { + "$ref": "#/definitions/DatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of inaccessible databases in a logical server": { + "$ref": "./examples/ListVCoreInaccessibleDatabasesByServer.json" + } + } + } + } + }, + "definitions": { + "Database": { + "description": "A database resource.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The database SKU.\r\n\r\nThe list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:\r\n\r\n```azurecli\r\naz sql db list-editions -l -o table\r\n````\r\n\r\n```powershell\r\nGet-AzSqlServerServiceObjective -Location \r\n````\r\n" + }, + "kind": { + "description": "Kind of database. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "managedBy": { + "description": "Resource that manages the database.", + "type": "string", + "readOnly": true + }, + "identity": { + "$ref": "#/definitions/DatabaseIdentity", + "description": "The Azure Active Directory identity of the database.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "properties": { + "$ref": "#/definitions/DatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseIdentity": { + "description": "Azure Active Directory identity configuration for a resource.", + "type": "object", + "properties": { + "type": { + "description": "The identity type", + "enum": [ + "None", + "UserAssigned" + ], + "type": "string", + "x-ms-enum": { + "name": "DatabaseIdentityType", + "modelAsString": true + } + }, + "tenantId": { + "format": "uuid", + "description": "The Azure Active Directory tenant id.", + "type": "string", + "readOnly": true + }, + "userAssignedIdentities": { + "description": "The resource ids of the user assigned identities to use", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DatabaseUserIdentity" + } + } + } + }, + "DatabaseKey": { + "description": "Database level key used for encryption at rest.", + "type": "object", + "properties": { + "type": { + "description": "The database key type. Only supported value is 'AzureKeyVault'.", + "enum": [ + "AzureKeyVault" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "DatabaseKeyType", + "modelAsString": true + } + }, + "thumbprint": { + "description": "Thumbprint of the database key.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The database key creation date.", + "type": "string", + "readOnly": true + }, + "subregion": { + "description": "Subregion of the server key.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseListResult": { + "description": "A list of databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Database" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseProperties": { + "description": "The database's properties.", + "type": "object", + "properties": { + "createMode": { + "description": "Specifies the mode of database creation.\r\n\r\nDefault: regular database creation.\r\n\r\nCopy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.\r\n\r\nSecondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.\r\n\r\nPointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.\r\n\r\nRecovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.\r\n\r\nRestore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.\r\n\r\nRestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.\r\n\r\nCopy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.", + "enum": [ + "Default", + "Copy", + "Secondary", + "PointInTimeRestore", + "Restore", + "Recovery", + "RestoreExternalBackup", + "RestoreExternalBackupSecondary", + "RestoreLongTermRetentionBackup", + "OnlineSecondary" + ], + "type": "string", + "x-ms-enum": { + "name": "CreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "collation": { + "description": "The collation of the database.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "maxSizeBytes": { + "format": "int64", + "description": "The max size of the database expressed in bytes.", + "type": "integer" + }, + "sampleName": { + "description": "The name of the sample schema to apply when creating this database.", + "enum": [ + "AdventureWorksLT", + "WideWorldImportersStd", + "WideWorldImportersFull" + ], + "type": "string", + "x-ms-enum": { + "name": "SampleName", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "elasticPoolId": { + "description": "The resource identifier of the elastic pool containing this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Sql/servers/elasticPools" + } + ] + } + }, + "sourceDatabaseId": { + "description": "The resource identifier of the source database associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "status": { + "description": "The status of the database.", + "enum": [ + "Online", + "Restoring", + "RecoveryPending", + "Recovering", + "Suspect", + "Offline", + "Standby", + "Shutdown", + "EmergencyMode", + "AutoClosed", + "Copying", + "Creating", + "Inaccessible", + "OfflineSecondary", + "Pausing", + "Paused", + "Resuming", + "Scaling", + "OfflineChangingDwPerformanceTiers", + "OnlineChangingDwPerformanceTiers", + "Disabled", + "Stopping", + "Stopped", + "Starting" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "DatabaseStatus", + "modelAsString": true + } + }, + "databaseId": { + "format": "uuid", + "description": "The ID of the database.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The creation date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "currentServiceObjectiveName": { + "description": "The current service level objective name of the database.", + "type": "string", + "readOnly": true + }, + "requestedServiceObjectiveName": { + "description": "The requested service level objective name of the database.", + "type": "string", + "readOnly": true + }, + "defaultSecondaryLocation": { + "description": "The default secondary region for this database.", + "type": "string", + "readOnly": true + }, + "failoverGroupId": { + "description": "Failover Group resource identifier that this database belongs to.", + "type": "string", + "readOnly": true + }, + "restorePointInTime": { + "format": "date-time", + "description": "Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "sourceDatabaseDeletionDate": { + "format": "date-time", + "description": "Specifies the time that the database was deleted.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "recoveryServicesRecoveryPointId": { + "description": "The resource identifier of the recovery point associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "longTermRetentionBackupResourceId": { + "description": "The resource identifier of the long term retention backup associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Sql/locations/longTermRetentionBackups" + } + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "recoverableDatabaseId": { + "description": "The resource identifier of the recoverable database associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "restorableDroppedDatabaseId": { + "description": "The resource identifier of the restorable dropped database associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "catalogCollation": { + "description": "Collation of the metadata catalog.", + "enum": [ + "DATABASE_DEFAULT", + "SQL_Latin1_General_CP1_CI_AS" + ], + "type": "string", + "x-ms-enum": { + "name": "CatalogCollationType", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "zoneRedundant": { + "description": "Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.", + "type": "boolean" + }, + "licenseType": { + "description": "The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit.", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "DatabaseLicenseType", + "modelAsString": true + } + }, + "maxLogSizeBytes": { + "format": "int64", + "description": "The max log size for this database.", + "type": "integer", + "readOnly": true + }, + "earliestRestoreDate": { + "format": "date-time", + "description": "This records the earliest start date and time that restore is available for this database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "readScale": { + "description": "The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "DatabaseReadScale", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "update" + ] + }, + "highAvailabilityReplicaCount": { + "format": "int32", + "description": "The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool.", + "type": "integer" + }, + "secondaryType": { + "description": "The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby.", + "enum": [ + "Geo", + "Named", + "Standby" + ], + "type": "string", + "x-ms-enum": { + "name": "SecondaryType", + "modelAsString": true + } + }, + "currentSku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU.", + "readOnly": true + }, + "autoPauseDelay": { + "format": "int32", + "description": "Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled", + "type": "integer" + }, + "currentBackupStorageRedundancy": { + "description": "The storage account type used to store backups for this database.", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "requestedBackupStorageRedundancy": { + "description": "The storage account type to be used to store backups for this database.", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "minCapacity": { + "format": "double", + "description": "Minimal capacity that database will always have allocated, if not paused", + "type": "number" + }, + "pausedDate": { + "format": "date-time", + "description": "The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.", + "type": "string", + "readOnly": true + }, + "resumedDate": { + "format": "date-time", + "description": "The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.", + "type": "string", + "readOnly": true + }, + "maintenanceConfigurationId": { + "description": "Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.", + "type": "string" + }, + "isLedgerOn": { + "description": "Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created.", + "type": "boolean" + }, + "isInfraEncryptionEnabled": { + "description": "Infra encryption is enabled for this database.", + "type": "boolean", + "readOnly": true + }, + "federatedClientId": { + "format": "uuid", + "description": "The Client id used for cross tenant per database CMK scenario", + "type": "string" + }, + "keys": { + "description": "The resource ids of the user assigned identities to use", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DatabaseKey" + } + }, + "encryptionProtector": { + "description": "The azure key vault URI of the database if it's configured with per Database Customer Managed Keys.", + "type": "string" + }, + "preferredEnclaveType": { + "description": "Type of enclave requested on the database i.e. Default or VBS enclaves.", + "enum": [ + "Default", + "VBS" + ], + "type": "string", + "x-ms-enum": { + "name": "AlwaysEncryptedEnclaveType", + "modelAsString": true + } + }, + "useFreeLimit": { + "description": "Whether or not the database uses free monthly limits. Allowed on one database in a subscription.", + "type": "boolean" + }, + "freeLimitExhaustionBehavior": { + "description": "Specifies the behavior when monthly free limits are exhausted for the free database.\r\n\r\nAutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.\r\n\r\nBillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed.", + "enum": [ + "AutoPause", + "BillOverUsage" + ], + "type": "string", + "x-ms-enum": { + "name": "FreeLimitExhaustionBehavior", + "modelAsString": true + } + }, + "sourceResourceId": { + "description": "The resource identifier of the source associated with the create operation of this database.\r\n\r\nThis property is only supported for DataWarehouse edition and allows to restore across subscriptions.\r\n\r\nWhen sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover.\r\n\r\nWhen createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified.\r\n\r\nWhen createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool.\r\n\r\nWhen createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool.\r\n\r\nWhen source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant ", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "manualCutover": { + "description": "Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier.\r\n\r\nThis property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier.\r\n\r\nWhen manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database.\r\n\r\nTo trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state.", + "type": "boolean" + }, + "performCutover": { + "description": "To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress.\r\n\r\nThis property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter.\r\n\r\nThis property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress.\r\n\r\nWhen performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database.", + "type": "boolean" + }, + "availabilityZone": { + "description": "Specifies the availability zone the database is pinned to.", + "enum": [ + "NoPreference", + "1", + "2", + "3" + ], + "type": "string", + "x-ms-enum": { + "name": "AvailabilityZoneType", + "modelAsString": true + } + }, + "encryptionProtectorAutoRotation": { + "description": "The flag to enable or disable auto rotation of database encryption protector AKV key.", + "type": "boolean" + } + } + }, + "DatabaseUpdate": { + "description": "A database update resource.", + "type": "object", + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU." + }, + "identity": { + "$ref": "#/definitions/DatabaseIdentity", + "description": "Database identity" + }, + "properties": { + "$ref": "#/definitions/DatabaseUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "DatabaseUpdateProperties": { + "description": "A database update properties.", + "type": "object", + "properties": { + "createMode": { + "description": "Specifies the mode of database creation.\r\n\r\nDefault: regular database creation.\r\n\r\nCopy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.\r\n\r\nSecondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.\r\n\r\nPointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.\r\n\r\nRecovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.\r\n\r\nRestore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.\r\n\r\nRestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.\r\n\r\nCopy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.", + "enum": [ + "Default", + "Copy", + "Secondary", + "PointInTimeRestore", + "Restore", + "Recovery", + "RestoreExternalBackup", + "RestoreExternalBackupSecondary", + "RestoreLongTermRetentionBackup", + "OnlineSecondary" + ], + "type": "string", + "x-ms-enum": { + "name": "CreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "collation": { + "description": "The collation of the database.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "maxSizeBytes": { + "format": "int64", + "description": "The max size of the database expressed in bytes.", + "type": "integer" + }, + "sampleName": { + "description": "The name of the sample schema to apply when creating this database.", + "enum": [ + "AdventureWorksLT", + "WideWorldImportersStd", + "WideWorldImportersFull" + ], + "type": "string", + "x-ms-enum": { + "name": "SampleName", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "elasticPoolId": { + "description": "The resource identifier of the elastic pool containing this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Sql/servers/elasticPools" + } + ] + } + }, + "sourceDatabaseId": { + "description": "The resource identifier of the source database associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "status": { + "description": "The status of the database.", + "enum": [ + "Online", + "Restoring", + "RecoveryPending", + "Recovering", + "Suspect", + "Offline", + "Standby", + "Shutdown", + "EmergencyMode", + "AutoClosed", + "Copying", + "Creating", + "Inaccessible", + "OfflineSecondary", + "Pausing", + "Paused", + "Resuming", + "Scaling", + "OfflineChangingDwPerformanceTiers", + "OnlineChangingDwPerformanceTiers", + "Disabled", + "Stopping", + "Stopped", + "Starting" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "DatabaseStatus", + "modelAsString": true + } + }, + "databaseId": { + "format": "uuid", + "description": "The ID of the database.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The creation date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "currentServiceObjectiveName": { + "description": "The current service level objective name of the database.", + "type": "string", + "readOnly": true + }, + "requestedServiceObjectiveName": { + "description": "The requested service level objective name of the database.", + "type": "string", + "readOnly": true + }, + "defaultSecondaryLocation": { + "description": "The default secondary region for this database.", + "type": "string", + "readOnly": true + }, + "failoverGroupId": { + "description": "Failover Group resource identifier that this database belongs to.", + "type": "string", + "readOnly": true + }, + "restorePointInTime": { + "format": "date-time", + "description": "Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "sourceDatabaseDeletionDate": { + "format": "date-time", + "description": "Specifies the time that the database was deleted.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "recoveryServicesRecoveryPointId": { + "description": "The resource identifier of the recovery point associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "longTermRetentionBackupResourceId": { + "description": "The resource identifier of the long term retention backup associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Sql/locations/longTermRetentionBackups" + } + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "recoverableDatabaseId": { + "description": "The resource identifier of the recoverable database associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "restorableDroppedDatabaseId": { + "description": "The resource identifier of the restorable dropped database associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "catalogCollation": { + "description": "Collation of the metadata catalog.", + "enum": [ + "DATABASE_DEFAULT", + "SQL_Latin1_General_CP1_CI_AS" + ], + "type": "string", + "x-ms-enum": { + "name": "CatalogCollationType", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "zoneRedundant": { + "description": "Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.", + "type": "boolean" + }, + "licenseType": { + "description": "The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit.", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "DatabaseLicenseType", + "modelAsString": true + } + }, + "maxLogSizeBytes": { + "format": "int64", + "description": "The max log size for this database.", + "type": "integer", + "readOnly": true + }, + "earliestRestoreDate": { + "format": "date-time", + "description": "This records the earliest start date and time that restore is available for this database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "readScale": { + "description": "The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "DatabaseReadScale", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "update" + ] + }, + "highAvailabilityReplicaCount": { + "format": "int32", + "description": "The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool.", + "type": "integer" + }, + "secondaryType": { + "description": "The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby.", + "enum": [ + "Geo", + "Named", + "Standby" + ], + "type": "string", + "x-ms-enum": { + "name": "SecondaryType", + "modelAsString": true + } + }, + "currentSku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU.", + "readOnly": true + }, + "autoPauseDelay": { + "format": "int32", + "description": "Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled", + "type": "integer" + }, + "currentBackupStorageRedundancy": { + "description": "The storage account type used to store backups for this database.", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "requestedBackupStorageRedundancy": { + "description": "The storage account type to be used to store backups for this database.", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "minCapacity": { + "format": "double", + "description": "Minimal capacity that database will always have allocated, if not paused", + "type": "number" + }, + "pausedDate": { + "format": "date-time", + "description": "The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.", + "type": "string", + "readOnly": true + }, + "resumedDate": { + "format": "date-time", + "description": "The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.", + "type": "string", + "readOnly": true + }, + "maintenanceConfigurationId": { + "description": "Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.", + "type": "string" + }, + "isLedgerOn": { + "description": "Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created.", + "type": "boolean" + }, + "isInfraEncryptionEnabled": { + "description": "Infra encryption is enabled for this database.", + "type": "boolean", + "readOnly": true + }, + "federatedClientId": { + "format": "uuid", + "description": "The Client id used for cross tenant per database CMK scenario", + "type": "string" + }, + "keys": { + "description": "The resource ids of the user assigned identities to use", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DatabaseKey" + } + }, + "encryptionProtector": { + "description": "The azure key vault URI of the database if it's configured with per Database Customer Managed Keys.", + "type": "string" + }, + "preferredEnclaveType": { + "description": "Type of enclave requested on the database i.e. Default or VBS enclaves.", + "enum": [ + "Default", + "VBS" + ], + "type": "string", + "x-ms-enum": { + "name": "AlwaysEncryptedEnclaveType", + "modelAsString": true + } + }, + "useFreeLimit": { + "description": "Whether or not the database uses free monthly limits. Allowed on one database in a subscription.", + "type": "boolean" + }, + "freeLimitExhaustionBehavior": { + "description": "Specifies the behavior when monthly free limits are exhausted for the free database.\r\n\r\nAutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.\r\n\r\nBillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed.", + "enum": [ + "AutoPause", + "BillOverUsage" + ], + "type": "string", + "x-ms-enum": { + "name": "FreeLimitExhaustionBehavior", + "modelAsString": true + } + }, + "manualCutover": { + "description": "Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier.\r\n\r\nThis property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier.\r\n\r\nWhen manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database.\r\n\r\nTo trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state.", + "type": "boolean" + }, + "performCutover": { + "description": "To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress.\r\n\r\nThis property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter.\r\n\r\nThis property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress.\r\n\r\nWhen performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database.", + "type": "boolean" + }, + "encryptionProtectorAutoRotation": { + "description": "The flag to enable or disable auto rotation of database encryption protector AKV key.", + "type": "boolean" + } + } + }, + "DatabaseUserIdentity": { + "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 + }, + "clientId": { + "format": "uuid", + "description": "The Azure Active Directory client id.", + "type": "string", + "readOnly": true + } + } + }, + "ExportDatabaseDefinition": { + "description": "Contains the information necessary to perform export database operation.", + "required": [ + "storageKeyType", + "storageKey", + "storageUri", + "administratorLogin", + "administratorLoginPassword" + ], + "type": "object", + "properties": { + "storageKeyType": { + "description": "Storage key type.", + "enum": [ + "SharedAccessKey", + "StorageAccessKey" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageKey": { + "description": "Storage key.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageUri": { + "description": "Storage Uri.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLogin": { + "description": "Administrator login name.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLoginPassword": { + "description": "Administrator login password.", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create" + ] + }, + "authenticationType": { + "description": "Authentication type.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "networkIsolation": { + "$ref": "#/definitions/NetworkIsolationSettings", + "description": "Optional resource information to enable network isolation for request.", + "x-ms-mutability": [ + "create" + ] + } + } + }, + "ImportExistingDatabaseDefinition": { + "description": "Contains the information necessary to perform import operation for existing database.", + "required": [ + "storageKeyType", + "storageKey", + "storageUri", + "administratorLogin", + "administratorLoginPassword" + ], + "type": "object", + "properties": { + "storageKeyType": { + "description": "Storage key type.", + "enum": [ + "SharedAccessKey", + "StorageAccessKey" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageKey": { + "description": "Storage key.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageUri": { + "description": "Storage Uri.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLogin": { + "description": "Administrator login name.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLoginPassword": { + "description": "Administrator login password.", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create" + ] + }, + "authenticationType": { + "description": "Authentication type.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "networkIsolation": { + "$ref": "#/definitions/NetworkIsolationSettings", + "description": "Optional resource information to enable network isolation for request.", + "x-ms-mutability": [ + "create" + ] + } + } + }, + "ImportExportOperationResult": { + "description": "An ImportExport operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ImportExportOperationResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ImportExportOperationResultProperties": { + "description": "Contains the operation result properties for import/export operation.", + "type": "object", + "properties": { + "requestId": { + "format": "uuid", + "description": "Request Id.", + "type": "string", + "readOnly": true + }, + "requestType": { + "description": "Request type.", + "type": "string", + "readOnly": true + }, + "queuedTime": { + "description": "Queued time.", + "type": "string", + "readOnly": true + }, + "lastModifiedTime": { + "description": "Last modified time.", + "type": "string", + "readOnly": true + }, + "blobUri": { + "description": "Blob Uri.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "Database name.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Operation status.", + "type": "string", + "readOnly": true + }, + "errorMessage": { + "description": "Error message.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnections": { + "description": "Gets the status of private endpoints associated with this request.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnectionRequestStatus" + }, + "readOnly": true + } + } + }, + "NetworkIsolationSettings": { + "description": "Contains the ARM resources for which to create private endpoint connection.", + "type": "object", + "properties": { + "storageAccountResourceId": { + "description": "The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "sqlServerResourceId": { + "description": "The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + } + } + }, + "PrivateEndpointConnectionRequestStatus": { + "description": "Contains the private endpoint connection requests status.", + "type": "object", + "properties": { + "privateLinkServiceId": { + "description": "Resource id for which the private endpoint is created.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnectionName": { + "description": "The connection name for the private endpoint.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Status of this private endpoint connection.", + "type": "string", + "readOnly": true + } + } + }, + "ResourceMoveDefinition": { + "description": "Contains the information necessary to perform a resource move (rename).", + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "description": "The target ID for the resource", + "type": "string" + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DeletedServers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DeletedServers.json new file mode 100644 index 000000000000..07fbf7c07075 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DeletedServers.json @@ -0,0 +1,273 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers": { + "get": { + "tags": [ + "DeletedServers" + ], + "description": "Gets a list of all deleted servers in a subscription.", + "operationId": "DeletedServers_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of deleted servers.", + "schema": { + "$ref": "#/definitions/DeletedServerListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List deleted servers in a subscription": { + "$ref": "./examples/DeletedServerListBySubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers": { + "get": { + "tags": [ + "DeletedServers" + ], + "description": "Gets a list of deleted servers for a location.", + "operationId": "DeletedServers_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of deleted servers.", + "schema": { + "$ref": "#/definitions/DeletedServerListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 404 SubscriptionNotFound - The requested subscription was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List deleted servers": { + "$ref": "./examples/DeletedServerList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}": { + "get": { + "tags": [ + "DeletedServers" + ], + "description": "Gets a deleted server.", + "operationId": "DeletedServers_Get", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "deletedServerName", + "in": "path", + "description": "The name of the deleted server.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified deleted server.", + "schema": { + "$ref": "#/definitions/DeletedServer" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get deleted server": { + "$ref": "./examples/DeletedServerGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}/recover": { + "post": { + "tags": [ + "DeletedServers" + ], + "description": "Recovers a deleted server.", + "operationId": "DeletedServers_Recover", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "deletedServerName", + "in": "path", + "description": "The name of the deleted server.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully recover the deleted server.", + "schema": { + "$ref": "#/definitions/DeletedServer" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Recover deleted server.": { + "$ref": "./examples/DeletedServerRecover.json" + } + } + } + } + }, + "definitions": { + "DeletedServer": { + "description": "A deleted server.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DeletedServerProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DeletedServerListResult": { + "description": "A list of deleted servers.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DeletedServer" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DeletedServerProperties": { + "description": "The properties of a deleted server.", + "type": "object", + "properties": { + "version": { + "description": "The version of the deleted server.", + "type": "string", + "readOnly": true + }, + "deletionTime": { + "format": "date-time", + "description": "The deletion time of the deleted server.", + "type": "string", + "readOnly": true + }, + "originalId": { + "description": "The original ID of the server before deletion.", + "type": "string", + "readOnly": true + }, + "fullyQualifiedDomainName": { + "description": "The fully qualified domain name of the server.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DistributedAvailabilityGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DistributedAvailabilityGroups.json new file mode 100644 index 000000000000..1c8901ef8844 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/DistributedAvailabilityGroups.json @@ -0,0 +1,687 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups": { + "get": { + "tags": [ + "DistributedAvailabilityGroups" + ], + "description": "Gets a list of a distributed availability groups in instance.", + "operationId": "DistributedAvailabilityGroups_ListByInstance", + "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 distributed availability groups.", + "schema": { + "$ref": "#/definitions/DistributedAvailabilityGroupsListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 GatewayInternalServerError - The server encountered an unexpected exception.\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": { + "Lists all distributed availability groups in instance.": { + "$ref": "./examples/DistributedAvailabilityGroupsListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}": { + "get": { + "tags": [ + "DistributedAvailabilityGroups" + ], + "description": "Gets a distributed availability group info.", + "operationId": "DistributedAvailabilityGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "distributedAvailabilityGroupName", + "in": "path", + "description": "The distributed availability group name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the distributed availability group.", + "schema": { + "$ref": "#/definitions/DistributedAvailabilityGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 GatewayInternalServerError - The server encountered an unexpected exception.\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-examples": { + "Gets the distributed availability group info.": { + "$ref": "./examples/DistributedAvailabilityGroupsGet.json" + } + } + }, + "put": { + "tags": [ + "DistributedAvailabilityGroups" + ], + "description": "Creates a distributed availability group between Sql On-Prem and Sql Managed Instance.", + "operationId": "DistributedAvailabilityGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "distributedAvailabilityGroupName", + "in": "path", + "description": "The distributed availability group name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The distributed availability group info.", + "required": true, + "schema": { + "$ref": "#/definitions/DistributedAvailabilityGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Distributed availability group is already created.", + "schema": { + "$ref": "#/definitions/DistributedAvailabilityGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 InvalidDistributedAvailabilityGroupsCreateOrUpdateRequest - Distributed Availability Group Create or Update request body is empty or invalid.\n\n * 400 InvalidDistributedAvailabilityGroupsCreateOrUpdateRequestInstanceAvailabilityGroupName - Distributed Availability Group Create or Update request body has empty or Invalid Instance Availability Group Name.\n\n * 400 InvalidDistributedAvailabilityGroupsCreateOrUpdateRequestPartnerAvailabilityGroupName - Distributed Availability Group Create or Update request body has empty or Invalid Partner Availability Group Name.\n\n * 400 InvalidDistributedAvailabilityGroupsCreateOrUpdateRequestPartnerEndpoint - Distributed Availability Group Create or Update request body has empty or Invalid Partner Endpoint.\n\n * 400 InvalidDistributedAvailabilityGroupsCreateOrUpdateRequestDatabases - Distributed Availability Group Create or Update request body has empty or Invalid Databases.\n\n * 400 InstanceAvailabilityGroupNamePartnerAvailabilityGroupNameMatch - Distributed Availability Group Create or Update request body has equal Instance and Partner Availability Group Names.\n\n * 400 InvalidDistributedAvailabilityGroupsCreateOrUpdateRequestSeedingMode - Distributed Availability Group Create or Update request body has empty or Invalid Seeding Mode. Currently, only the 'Automatic' mode is supported.\n\n * 400 ManagedInstanceLinkConnectivityIsNotEstablished - Operation was aborted as replication to Azure SQL Managed Instance did not start within %u minutes since it was initiated. Please verify the network connectivity and firewall rules are configured according to the guidelines described at https://aka.ms/mi-link-troubleshooting, and retry the operation.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 ManagedInstanceLinkCertificateNotFoundOnManagedInstance - Managed instance link connection can not be established due to certificate missing on the managed instance.\n\n * 400 ManagedInstanceLinkForProvidedAvailabilityGroupsAlreadyExists - It is not possible to add an additional database to an existing Managed Instance link as a single link can contain only one database. Please use a different distributed availability group name and try again.\n\n * 400 ManagedInstanceLinkCertificateNotFoundOnSqlServer - Managed instance link connection can not be established due to certificate missing on the on-prem sql server.\n\n * 400 ManagedInstanceLinkTdeCertificateMissing - Azure SQL Managed Instance link cannot be created with source database on SQL Server, because the database is using Transparent Data Encryption (TDE) and the destination managed instance does not have the encryption key for this database. Ensure that the database encryption key from SQL Server is exported and uploaded to Azure Key vault, then selected for use in managed instance TDE configuration and try again.\n\n * 400 ManagedInstanceLinkSourceDbHasHekatonFile - Memory-optimized filegroup must be empty on the SQL Server source database when replicated to Azure SQL Managed Instance General Purpose service tier. Consider emptying the memory optimized filegroup on the source database and try again. Alternatively consider using Managed Instance Business Critical service tier without making any changes.\n\n * 400 ManagedInstanceLinkSourceDbHasMultipleLogFiles - Source database on SQL Server needs to have a single log file instead of multiple log files for data replication to Azure SQL Managed Instance. Consider using a single log file on the source database and try again.\n\n * 400 ManagedInstanceLinkIsNotFound - The link with Managed Instance was not successfully created or was deleted before data copy operation has completed.\n\n * 400 ManagedInstanceLinkUnsupportedNumberOfFilesOnSourceDb - Maximum number of '{0}' files was reached on Azure SQL Managed Instance preventing data replication. Consider reducing the number of files on the source and try again.\n\n * 400 ManagedInstanceLinkIsNotInTheCatchupState - The link with Managed Instance is not in the catchup state after the data copy link operation completed.\n\n * 400 ManagedInstanceLinkSourceDbHasFilestream - Source database on SQL Server must not use FileStream or FileTables for data replication to Azure SQL Managed Instance. Consider removing FileStream and FileTables on the source database on SQL Server and try again.\n\n * 400 ManagedInstanceLinkSourceDbHasDefunctFiles - Source database '{0}' on SQL Server must not contain files in DEFUNCT state for data replication to Azure SQL Managed Instance to work.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - 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 * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted request for creating the distributed availability group." + }, + "201": { + "description": "Successfully created the distributed availability group.", + "schema": { + "$ref": "#/definitions/DistributedAvailabilityGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a distributed availability group with minimal properties.": { + "$ref": "./examples/DistributedAvailabilityGroupsCreateMin.json" + }, + "Create a distributed availability group with all properties.": { + "$ref": "./examples/DistributedAvailabilityGroupsCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "DistributedAvailabilityGroups" + ], + "description": "Drops a distributed availability group between Sql On-Prem and Sql Managed Instance.", + "operationId": "DistributedAvailabilityGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "distributedAvailabilityGroupName", + "in": "path", + "description": "The distributed availability group name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted distributed availability group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - 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 * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted request for deleting the distributed availability group." + }, + "204": { + "description": "Distributed availability group was not found." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Initiate a distributed availability group drop.": { + "$ref": "./examples/DistributedAvailabilityGroupsDelete.json" + } + } + }, + "patch": { + "tags": [ + "DistributedAvailabilityGroups" + ], + "description": "Updates a distributed availability group replication mode.", + "operationId": "DistributedAvailabilityGroups_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "distributedAvailabilityGroupName", + "in": "path", + "description": "The distributed availability group name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The distributed availability group info.", + "required": true, + "schema": { + "$ref": "#/definitions/DistributedAvailabilityGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully initiated the distributed availability group replication mode update.", + "schema": { + "$ref": "#/definitions/DistributedAvailabilityGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - 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 * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted request for updating the distributed availability group replication mode." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the distributed availability group replication mode before deleting it.": { + "$ref": "./examples/DistributedAvailabilityGroupsUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}/setRole": { + "post": { + "tags": [ + "DistributedAvailabilityGroups" + ], + "description": "Sets the role for managed instance in a distributed availability group.", + "operationId": "DistributedAvailabilityGroups_SetRole", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "distributedAvailabilityGroupName", + "in": "path", + "description": "The distributed availability group name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The distributed availability group set role request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/DistributedAvailabilityGroupSetRole" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully initiated the distributed availability group replica role change.", + "schema": { + "$ref": "#/definitions/DistributedAvailabilityGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDistributedAvailabilityGroupSetRoleRequest - Distributed Availability Group Set Role request body is empty or invalid.\n\n * 400 InvalidDistributedAvailabilityGroupRole - Invalid value for instance role parameter, must be either 'Primary' or 'Secondary'.\n\n * 400 InvalidDistributedAvailabilityGroupChangeType - Invalid value for change type parameter, must be either 'Forced' or 'Planned'.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 DistributedAvailabilityGroupSetRoleInstanceAlreadyInRequestedRole - User attempted to perform setRole operation while managed instance link is already in requested role.\n\n * 409 DistributedAvailabilityGroupSetRoleChangeRoleAlreadyInProgress - Changing the server role cannot be executed at this time as there exist a previous role change in progress on Azure SQL Managed Instance. Only when the previous role change completes, a new request could be submitted. Please wait for the previous role change to complete and retry again.\n\n * 409 DistributedAvailabilityGroupSetRoleFailed - Setting the role has failed due to an unknown reason. Please check the error log file. If the issue persists, contact Azure support.\n\n * 409 DistributedAvailabilityGroupSetRolePrimaryPlannedNotSupported - User attempted to perform setRole operation to primary in planned fashion and that is not supported.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - 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 * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted request for setting the mi replica role in a distributed availability group." + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Set distributed availability group primary replica to managed instance.": { + "$ref": "./examples/DistributedAvailabilityGroupsSetRole.json" + } + } + } + } + }, + "definitions": { + "CertificateInfo": { + "description": "Certificate information", + "type": "object", + "properties": { + "certificateName": { + "description": "The certificate name", + "type": "string", + "readOnly": true + }, + "expiryDate": { + "format": "date-time", + "description": "The certificate expiry date", + "type": "string", + "readOnly": true + } + } + }, + "DistributedAvailabilityGroup": { + "description": "Distributed availability group between box and Sql Managed Instance.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DistributedAvailabilityGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DistributedAvailabilityGroupDatabase": { + "description": "Database specific information", + "type": "object", + "properties": { + "databaseName": { + "description": "The name of the database in link", + "type": "string" + }, + "instanceReplicaId": { + "format": "uuid", + "description": "Managed instance replica id", + "type": "string", + "readOnly": true + }, + "partnerReplicaId": { + "format": "uuid", + "description": "SQL server replica id", + "type": "string", + "readOnly": true + }, + "replicaState": { + "description": "Current link state", + "type": "string", + "readOnly": true + }, + "synchronizationHealth": { + "description": "Link health state", + "enum": [ + "NOT_HEALTHY", + "PARTIALLY_HEALTHY", + "HEALTHY" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicaSynchronizationHealth", + "modelAsString": true + } + }, + "connectedState": { + "description": "Link connected state", + "enum": [ + "DISCONNECTED", + "CONNECTED" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicaConnectedState", + "modelAsString": true + } + }, + "lastReceivedLsn": { + "description": "Last received LSN", + "type": "string", + "readOnly": true + }, + "lastReceivedTime": { + "format": "date-time", + "description": "Last received LSN time", + "type": "string", + "readOnly": true + }, + "lastSentLsn": { + "description": "Last sent LSN", + "type": "string", + "readOnly": true + }, + "lastSentTime": { + "format": "date-time", + "description": "Last sent LSN time", + "type": "string", + "readOnly": true + }, + "lastCommitLsn": { + "description": "Last commit LSN", + "type": "string", + "readOnly": true + }, + "lastCommitTime": { + "format": "date-time", + "description": "Last commit LSN time", + "type": "string", + "readOnly": true + }, + "lastHardenedLsn": { + "description": "Last hardened LSN", + "type": "string", + "readOnly": true + }, + "lastHardenedTime": { + "format": "date-time", + "description": "Last hardened LSN time", + "type": "string", + "readOnly": true + }, + "lastBackupLsn": { + "description": "Last backup LSN", + "type": "string", + "readOnly": true + }, + "lastBackupTime": { + "format": "date-time", + "description": "Last backup LSN time", + "type": "string", + "readOnly": true + }, + "mostRecentLinkError": { + "description": "The most recent link connection error description", + "type": "string", + "readOnly": true + }, + "partnerAuthCertValidity": { + "$ref": "#/definitions/CertificateInfo", + "description": "SQL server certificate validity", + "readOnly": true + }, + "instanceSendReplicationLagSeconds": { + "format": "int32", + "description": "Replication lag when Managed Instance link side is primary", + "type": "integer", + "readOnly": true + }, + "instanceRedoReplicationLagSeconds": { + "format": "int32", + "description": "Redo lag when Managed Instance link side is primary", + "type": "integer", + "readOnly": true + } + } + }, + "DistributedAvailabilityGroupProperties": { + "description": "The properties of a distributed availability group.", + "type": "object", + "properties": { + "distributedAvailabilityGroupName": { + "description": "Name of the distributed availability group", + "type": "string", + "readOnly": true + }, + "distributedAvailabilityGroupId": { + "format": "uuid", + "description": "ID of the distributed availability group", + "type": "string", + "readOnly": true + }, + "replicationMode": { + "description": "Replication mode of the link", + "enum": [ + "Async", + "Sync" + ], + "type": "string", + "x-ms-enum": { + "name": "ReplicationModeType", + "modelAsString": true + } + }, + "partnerLinkRole": { + "description": "SQL server side link role", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "LinkRole", + "modelAsString": true + } + }, + "partnerAvailabilityGroupName": { + "description": "SQL server side availability group name", + "type": "string" + }, + "partnerEndpoint": { + "description": "SQL server side endpoint - IP or DNS resolvable name", + "type": "string" + }, + "instanceLinkRole": { + "description": "Managed instance side link role", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "x-ms-enum": { + "name": "LinkRole", + "modelAsString": true + } + }, + "instanceAvailabilityGroupName": { + "description": "Managed instance side availability group name", + "type": "string" + }, + "failoverMode": { + "description": "The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure.", + "enum": [ + "None", + "Manual" + ], + "type": "string", + "x-ms-enum": { + "name": "FailoverModeType", + "modelAsString": true + } + }, + "seedingMode": { + "description": "Database seeding mode – can be Automatic (default), or Manual for supported scenarios.", + "enum": [ + "Automatic", + "Manual" + ], + "type": "string", + "x-ms-enum": { + "name": "SeedingModeType", + "modelAsString": true + } + }, + "databases": { + "description": "Databases in the distributed availability group", + "type": "array", + "items": { + "$ref": "#/definitions/DistributedAvailabilityGroupDatabase" + }, + "x-ms-identifiers": [] + } + } + }, + "DistributedAvailabilityGroupSetRole": { + "description": "Distributed availability group failover request.", + "required": [ + "instanceRole", + "roleChangeType" + ], + "type": "object", + "properties": { + "instanceRole": { + "description": "New role of managed instance in a distributed availability group, can be Primary or Secondary.", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "x-ms-enum": { + "name": "InstanceRole", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "roleChangeType": { + "description": "The type of the role change, can be Planned or Forced.", + "enum": [ + "Forced", + "Planned" + ], + "type": "string", + "x-ms-enum": { + "name": "RoleChangeType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update" + ] + } + } + }, + "DistributedAvailabilityGroupsListResult": { + "description": "A list of distributed availability groups in instance.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DistributedAvailabilityGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ElasticPoolOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ElasticPoolOperations.json new file mode 100644 index 000000000000..8c24cbad39aa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ElasticPoolOperations.json @@ -0,0 +1,257 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations": { + "get": { + "tags": [ + "ElasticPoolOperations" + ], + "description": "Gets a list of operations performed on the elastic pool.", + "operationId": "ElasticPoolOperations_ListByElasticPool", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for getting elastic pool operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/ElasticPoolOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the elastic pool management operations": { + "$ref": "./examples/ListElasticPoolOperations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel": { + "post": { + "tags": [ + "ElasticPoolOperations" + ], + "description": "Cancels the asynchronous operation on the elastic pool.", + "operationId": "ElasticPoolOperations_Cancel", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "The operation identifier.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for cancel has been executed successfully." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Cancel the elastic pool management operation": { + "$ref": "./examples/CancelElasticPoolOperation.json" + } + } + } + } + }, + "definitions": { + "ElasticPoolOperation": { + "description": "A elastic pool operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ElasticPoolOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ElasticPoolOperationListResult": { + "description": "The response to a list elastic pool operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPoolOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ElasticPoolOperationProperties": { + "description": "The properties of a elastic pool operation.", + "type": "object", + "properties": { + "elasticPoolName": { + "description": "The name of the elastic pool the operation is being performed on.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "serverName": { + "description": "The name of the server.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "type": "string", + "readOnly": true + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ElasticPools.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ElasticPools.json new file mode 100644 index 000000000000..aa1061ae7ca1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ElasticPools.json @@ -0,0 +1,678 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools": { + "get": { + "tags": [ + "ElasticPools" + ], + "description": "Gets all elastic pools in a server.", + "operationId": "ElasticPools_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Succeeded", + "schema": { + "$ref": "#/definitions/ElasticPoolListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 ElasticPoolScaleNotSupportedWithInaccessibleDatabases - The elastic pool contains inaccessible databases which have lost Azure Key Vault access required for TDE configuration. Please move the accessible databases to a different pool for scaling or restore the lost Azure Key Vault access for the inaccessible databases.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 ElasticPoolFailedMoveDbToElasticPool - Failed to move the database into elastic pool due to internal resource constraints. This may be a transient condition, please retry.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all elastic pools in a server": { + "$ref": "./examples/ElasticPoolListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}": { + "get": { + "tags": [ + "ElasticPools" + ], + "description": "Gets an elastic pool.", + "operationId": "ElasticPools_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Succeeded", + "schema": { + "$ref": "#/definitions/ElasticPool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 ElasticPoolScaleNotSupportedWithInaccessibleDatabases - The elastic pool contains inaccessible databases which have lost Azure Key Vault access required for TDE configuration. Please move the accessible databases to a different pool for scaling or restore the lost Azure Key Vault access for the inaccessible databases.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 ElasticPoolFailedMoveDbToElasticPool - Failed to move the database into elastic pool due to internal resource constraints. This may be a transient condition, please retry.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Get an elastic pool": { + "$ref": "./examples/ElasticPoolGet.json" + }, + "Get a Hyperscale elastic pool": { + "$ref": "./examples/HyperscaleElasticPoolGet.json" + }, + "Get an elastic pool with preferred enclave type parameter": { + "$ref": "./examples/ElasticPoolGetWithPreferredEnclaveType.json" + }, + "Get an elastic pool with Availability Zone": { + "$ref": "./examples/GetElasticPoolWithAvailabilityZone.json" + }, + "Get an elastic pool with serverless properties": { + "$ref": "./examples/GetElasticPoolWithServerlessProperties.json" + } + } + }, + "put": { + "tags": [ + "ElasticPools" + ], + "description": "Creates or updates an elastic pool.", + "operationId": "ElasticPools_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The elastic pool parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ElasticPool" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Updated the elastic pool", + "schema": { + "$ref": "#/definitions/ElasticPool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 ElasticPoolScaleNotSupportedWithInaccessibleDatabases - The elastic pool contains inaccessible databases which have lost Azure Key Vault access required for TDE configuration. Please move the accessible databases to a different pool for scaling or restore the lost Azure Key Vault access for the inaccessible databases.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSkuName - Invalid SKU name.\n\n * 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.\n\n * 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.\n\n * 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 AvailabilityZoneNotSupported - Requested availability zones for databases and elastic pools is not valid.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 ElasticPoolScaleNotSupportedWithInaccessibleDatabases - The elastic pool contains inaccessible databases which have lost Azure Key Vault access required for TDE configuration. Please move the accessible databases to a different pool for scaling or restore the lost Azure Key Vault access for the inaccessible databases.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 VBSEnclaveResourcePoolInvalidCombination - Elastic pool {0} and the preferred enclave type {1} combination is invalid.\n\n * 400 VBSEnclaveNotSupportedForDW - The preferredEnclaveType is not supported in Synapse SQL.\n\n * 400 VBSEnclaveNotSupportedForDCSeriesSLO - Configuring the 'VBS' preferredEnclaveType for databases using the DC-series hardware configuration is not supported. DC-series databases are pre-configured with Intel SGX enclaves. Virtualization based security (VBS) enclaves are not supported.\n\n * 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary {0} database on the {1} server uses the {2} preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary {3} database on the {4} server is {5}.\n\n * 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 ElasticPoolFailedMoveDbToElasticPool - Failed to move the database into elastic pool due to internal resource constraints. This may be a transient condition, please retry.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ElasticPoolFailedMoveDbToElasticPool - Failed to move the database into elastic pool due to internal resource constraints. This may be a transient condition, please retry.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Created the elastic pool", + "schema": { + "$ref": "#/definitions/ElasticPool" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Create or update elastic pool with minimum parameters": { + "$ref": "./examples/ElasticPoolCreateOrUpdateMin.json" + }, + "Create or update elastic pool with all parameter": { + "$ref": "./examples/ElasticPoolCreateOrUpdateMax.json" + }, + "Create or update elastic pool with maintenance configuration parameter": { + "$ref": "./examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json" + }, + "Create or update Hyperscale elastic pool with high availability replica count parameter": { + "$ref": "./examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json" + }, + "Create or update elastic pool with preferred enclave type parameter as Default": { + "$ref": "./examples/ElasticPoolCreateWithDefaultPreferredEnclaveType.json" + }, + "Create or update elastic pool with preferred enclave type parameter as VBS": { + "$ref": "./examples/ElasticPoolCreateWithVBSPreferredEnclaveType.json" + }, + "Create or Update an elastic pool with Availability Zone": { + "$ref": "./examples/CreateElasticPoolWithAvailabilityZone.json" + }, + "Create or Update an elastic pool with serverless properties": { + "$ref": "./examples/ElasticPoolCreateOrUpdateServerlessProperties.json" + } + } + }, + "delete": { + "tags": [ + "ElasticPools" + ], + "description": "Deletes an elastic pool.", + "operationId": "ElasticPools_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Deleted the elastic pool" + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 ElasticPoolScaleNotSupportedWithInaccessibleDatabases - The elastic pool contains inaccessible databases which have lost Azure Key Vault access required for TDE configuration. Please move the accessible databases to a different pool for scaling or restore the lost Azure Key Vault access for the inaccessible databases.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 ElasticPoolFailedMoveDbToElasticPool - Failed to move the database into elastic pool due to internal resource constraints. This may be a transient condition, please retry.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Deleting the elastic pool is in progress." + }, + "204": { + "description": "Elastic pool did not exist" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Delete an elastic pool": { + "$ref": "./examples/ElasticPoolDelete.json" + } + } + }, + "patch": { + "tags": [ + "ElasticPools" + ], + "description": "Updates an elastic pool.", + "operationId": "ElasticPools_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The elastic pool update parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ElasticPoolUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Updated the elastic pool", + "schema": { + "$ref": "#/definitions/ElasticPool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 ElasticPoolScaleNotSupportedWithInaccessibleDatabases - The elastic pool contains inaccessible databases which have lost Azure Key Vault access required for TDE configuration. Please move the accessible databases to a different pool for scaling or restore the lost Azure Key Vault access for the inaccessible databases.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSkuName - Invalid SKU name.\n\n * 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.\n\n * 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.\n\n * 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 AvailabilityZoneNotSupported - Requested availability zones for databases and elastic pools is not valid.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 ElasticPoolScaleNotSupportedWithInaccessibleDatabases - The elastic pool contains inaccessible databases which have lost Azure Key Vault access required for TDE configuration. Please move the accessible databases to a different pool for scaling or restore the lost Azure Key Vault access for the inaccessible databases.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 ServerQuotaExceeded - The server reached its limit for allowed Database Throughput Unit.\n\n * 400 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.\n\n * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.\n\n * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.\n\n * 400 InvalidMaxSize - Invalid max size.\n\n * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 ElasticPoolDtuUnsupported - User tried to create or update an elastic pool with a DTU capacity that is not supported.\n\n * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.\n\n * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.\n\n * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.\n\n * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolCapacityStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.\n\n * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 ElasticPoolDbDtuMinBelowLimit - The requested per database DTU min is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxBelowLimit - The requested per database VCore max is too low for the requested elastic pool service tier.\n\n * 400 ElasticPoolDbVcoreMaxAboveLimit - The requested per database VCore max is too high for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMax - Attempting to set the VCore max per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 ElasticPoolDbVcoreMinBelowLimit - The requested per database VCore min is too low for the requested elastic pool service tier.\n\n * 400 InvalidInputValueForDatabaseVcoreMin - Attempting to set the VCore min per database for the Resource Pool which doesn't match the allowed values.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 InvalidInputValueDatabaseVcoreMinLargerThanMax - Attempting to set the VCore min per database higher than the VCore max per database.\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 VBSEnclaveResourcePoolInvalidCombination - Elastic pool {0} and the preferred enclave type {1} combination is invalid.\n\n * 400 VBSEnclaveNotSupportedForDW - The preferredEnclaveType is not supported in Synapse SQL.\n\n * 400 VBSEnclaveNotSupportedForDCSeriesSLO - Configuring the 'VBS' preferredEnclaveType for databases using the DC-series hardware configuration is not supported. DC-series databases are pre-configured with Intel SGX enclaves. Virtualization based security (VBS) enclaves are not supported.\n\n * 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary {0} database on the {1} server uses the {2} preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary {3} database on the {4} server is {5}.\n\n * 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 ElasticPoolUpdateLinksNotInCatchup - Cannot update elastic pool while one of its databases is performing a copy or geo-replication failover operation.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 ElasticPoolFailedMoveDbToElasticPool - Failed to move the database into elastic pool due to internal resource constraints. This may be a transient condition, please retry.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 ElasticPoolFailedMoveDbToElasticPool - Failed to move the database into elastic pool due to internal resource constraints. This may be a transient condition, please retry.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Update an elastic pool with minimum parameters": { + "$ref": "./examples/ElasticPoolUpdateMin.json" + }, + "Update an elastic pool with all parameter": { + "$ref": "./examples/ElasticPoolUpdateMax.json" + }, + "Assigns maintenance configuration to an elastic pool.": { + "$ref": "./examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json" + }, + "Resets maintenance configuration of an elastic pool to default.": { + "$ref": "./examples/ElasticPoolUpdateResetMaintenanceConfiguration.json" + }, + "Update high availability replica count of a Hyperscale elastic pool.": { + "$ref": "./examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json" + }, + "Update an elastic pool with preferred enclave type parameter as Default": { + "$ref": "./examples/ElasticPoolUpdateWithDefaultPreferredEnclaveType.json" + }, + "Update an elastic pool with preferred enclave type parameter as VBS": { + "$ref": "./examples/ElasticPoolUpdateWithVBSPreferredEnclaveType.json" + }, + "Update an elastic pool with serverless properties": { + "$ref": "./examples/ElasticPoolUpdateServerlessProperties.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover": { + "post": { + "tags": [ + "ElasticPools" + ], + "description": "Failovers an elastic pool.", + "operationId": "ElasticPools_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "elasticPoolName", + "in": "path", + "description": "The name of the elastic pool to failover.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed elastic pool failover." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticPoolFailoverNotSupportedOnSKU - This type of customer initiated failover is not supported on the given SKU.\n\n * 400 ElasticPoolFailoverThrottled - There was a recent failover on the elastic pool.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ElasticPoolNotInStateToFailover - The elastic pool or a database within the elastic pool is currently in a state such that failover cannot be issued.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Elastic pool failover is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Failover an elastic pool": { + "$ref": "./examples/FailoverElasticPool.json" + } + } + } + } + }, + "definitions": { + "ElasticPool": { + "description": "An elastic pool.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The elastic pool SKU.\r\n\r\nThe list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command:\r\n\r\n```azurecli\r\naz sql elastic-pool list-editions -l -o table\r\n````\r\n" + }, + "kind": { + "description": "Kind of elastic pool. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ElasticPoolProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ElasticPoolListResult": { + "description": "The result of an elastic pool list request.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPool" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ElasticPoolPerDatabaseSettings": { + "description": "Per database settings of an elastic pool.", + "type": "object", + "properties": { + "minCapacity": { + "format": "double", + "description": "The minimum capacity all databases are guaranteed.", + "type": "number" + }, + "maxCapacity": { + "format": "double", + "description": "The maximum capacity any one database can consume.", + "type": "number" + }, + "autoPauseDelay": { + "format": "int32", + "description": "Auto Pause Delay for per database within pool", + "type": "integer" + } + } + }, + "ElasticPoolProperties": { + "description": "Properties of an elastic pool", + "type": "object", + "properties": { + "state": { + "description": "The state of the elastic pool.", + "enum": [ + "Creating", + "Ready", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ElasticPoolState", + "modelAsString": true + } + }, + "creationDate": { + "format": "date-time", + "description": "The creation date of the elastic pool (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "maxSizeBytes": { + "format": "int64", + "description": "The storage limit for the database elastic pool in bytes.", + "type": "integer" + }, + "minCapacity": { + "format": "double", + "description": "Minimal capacity that serverless pool will not shrink below, if not paused", + "type": "number" + }, + "perDatabaseSettings": { + "$ref": "#/definitions/ElasticPoolPerDatabaseSettings", + "description": "The per database settings for the elastic pool." + }, + "zoneRedundant": { + "description": "Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones.", + "type": "boolean" + }, + "licenseType": { + "description": "The license type to apply for this elastic pool.", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "ElasticPoolLicenseType", + "modelAsString": true + } + }, + "maintenanceConfigurationId": { + "description": "Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur.", + "type": "string" + }, + "highAvailabilityReplicaCount": { + "format": "int32", + "description": "The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools.", + "type": "integer" + }, + "autoPauseDelay": { + "format": "int32", + "description": "Time in minutes after which elastic pool is automatically paused. A value of -1 means that automatic pause is disabled", + "type": "integer" + }, + "preferredEnclaveType": { + "description": "Type of enclave requested on the elastic pool.", + "enum": [ + "Default", + "VBS" + ], + "type": "string", + "x-ms-enum": { + "name": "AlwaysEncryptedEnclaveType", + "modelAsString": true + } + }, + "availabilityZone": { + "description": "Specifies the availability zone the pool's primary replica is pinned to.", + "enum": [ + "NoPreference", + "1", + "2", + "3" + ], + "type": "string", + "x-ms-enum": { + "name": "AvailabilityZoneType", + "modelAsString": true + } + } + } + }, + "ElasticPoolUpdate": { + "description": "An elastic pool update.", + "type": "object", + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku" + }, + "properties": { + "$ref": "#/definitions/ElasticPoolUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ElasticPoolUpdateProperties": { + "description": "Properties of an elastic pool", + "type": "object", + "properties": { + "maxSizeBytes": { + "format": "int64", + "description": "The storage limit for the database elastic pool in bytes.", + "type": "integer" + }, + "minCapacity": { + "format": "double", + "description": "Minimal capacity that serverless pool will not shrink below, if not paused", + "type": "number" + }, + "perDatabaseSettings": { + "$ref": "#/definitions/ElasticPoolPerDatabaseSettings", + "description": "The per database settings for the elastic pool." + }, + "zoneRedundant": { + "description": "Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones.", + "type": "boolean" + }, + "licenseType": { + "description": "The license type to apply for this elastic pool.", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "ElasticPoolLicenseType", + "modelAsString": true + } + }, + "maintenanceConfigurationId": { + "description": "Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur.", + "type": "string" + }, + "highAvailabilityReplicaCount": { + "format": "int32", + "description": "The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools.", + "type": "integer" + }, + "autoPauseDelay": { + "format": "int32", + "description": "Time in minutes after which elastic pool is automatically paused. A value of -1 means that automatic pause is disabled", + "type": "integer" + }, + "preferredEnclaveType": { + "description": "Type of enclave requested on the elastic pool.", + "enum": [ + "Default", + "VBS" + ], + "type": "string", + "x-ms-enum": { + "name": "AlwaysEncryptedEnclaveType", + "modelAsString": true + } + }, + "availabilityZone": { + "description": "Specifies the availability zone the pool's primary replica is pinned to.", + "enum": [ + "NoPreference", + "1", + "2", + "3" + ], + "type": "string", + "x-ms-enum": { + "name": "AvailabilityZoneType", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/EncryptionProtectors.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/EncryptionProtectors.json new file mode 100644 index 000000000000..54d4b765bfdb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/EncryptionProtectors.json @@ -0,0 +1,348 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector": { + "get": { + "tags": [ + "EncryptionProtectors" + ], + "description": "Gets a list of server encryption protectors", + "operationId": "EncryptionProtectors_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of server encryption protector.", + "schema": { + "$ref": "#/definitions/EncryptionProtectorListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List encryption protectors by server": { + "$ref": "./examples/EncryptionProtectorList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}": { + "get": { + "tags": [ + "EncryptionProtectors" + ], + "description": "Gets a server encryption protector.", + "operationId": "EncryptionProtectors_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be retrieved.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified server encryption protector.", + "schema": { + "$ref": "#/definitions/EncryptionProtector" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the encryption protector": { + "$ref": "./examples/EncryptionProtectorGet.json" + } + } + }, + "put": { + "tags": [ + "EncryptionProtectors" + ], + "description": "Updates an existing encryption protector.", + "operationId": "EncryptionProtectors_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be updated.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested encryption protector resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/EncryptionProtector" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the encryption protector.", + "schema": { + "$ref": "#/definitions/EncryptionProtector" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerKeyNotFound - The requested server key was not found on the current subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 EncryptionProtectorChangeInProgress - Cannot update database encryption key protector while protector change is already in progress\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 * 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the encryption protector to key vault": { + "$ref": "./examples/EncryptionProtectorCreateOrUpdateKeyVault.json" + }, + "Update the encryption protector to service managed": { + "$ref": "./examples/EncryptionProtectorCreateOrUpdateServiceManaged.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}/revalidate": { + "post": { + "tags": [ + "EncryptionProtectors" + ], + "description": "Revalidates an existing encryption protector.", + "operationId": "EncryptionProtectors_Revalidate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be updated.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully revalidated the encryption protector." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 DatabaseLevelEncryptionProtectorDoesNotExist - Database-level encryption protector does not exist.\n\n * 400 RevertDatabaseLevelKeyOnlySupportedWithSMK - Database-level encryption protector can only be reverted to the server level encryption when the server is configured with Microsoft Managed Key.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerKeyNotFound - The requested server key was not found on the current subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 EncryptionProtectorChangeInProgress - Cannot update database encryption key protector while protector change is already in progress\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 * 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Revalidates the encryption protector": { + "$ref": "./examples/EncryptionProtectorRevalidate.json" + } + } + } + } + }, + "definitions": { + "EncryptionProtector": { + "description": "The server encryption protector.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Kind of encryption protector. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/EncryptionProtectorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "EncryptionProtectorListResult": { + "description": "A list of server encryption protectors.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/EncryptionProtector" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "EncryptionProtectorProperties": { + "description": "Properties for an encryption protector execution.", + "required": [ + "serverKeyType" + ], + "type": "object", + "properties": { + "subregion": { + "description": "Subregion of the encryption protector.", + "type": "string", + "readOnly": true + }, + "serverKeyName": { + "description": "The name of the server key.", + "type": "string" + }, + "serverKeyType": { + "description": "The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.", + "enum": [ + "ServiceManaged", + "AzureKeyVault" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerKeyType", + "modelAsString": true + } + }, + "uri": { + "description": "The URI of the server key.", + "type": "string", + "readOnly": true + }, + "thumbprint": { + "description": "Thumbprint of the server key.", + "type": "string", + "readOnly": true + }, + "autoRotationEnabled": { + "description": "Key auto rotation opt-in flag. Either true or false.", + "type": "boolean" + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/EndpointCertificates.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/EndpointCertificates.json new file mode 100644 index 000000000000..5114164d7f53 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/EndpointCertificates.json @@ -0,0 +1,176 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates": { + "get": { + "tags": [ + "EndpointCertificates" + ], + "description": "List certificates used on endpoints on the target instance.", + "operationId": "EndpointCertificates_ListByInstance", + "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 a list of endpoint certificates.", + "schema": { + "$ref": "#/definitions/EndpointCertificateListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a list of endpoint certificates.": { + "$ref": "./examples/EndpointCertificatesListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}": { + "get": { + "tags": [ + "EndpointCertificates" + ], + "description": "Gets a certificate used on the endpoint with the given id.", + "operationId": "EndpointCertificates_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "endpointType", + "in": "path", + "description": "Type of the endpoint whose certificate the customer is looking for.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved an endpoint certificate.", + "schema": { + "$ref": "#/definitions/EndpointCertificate" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Gets an endpoint certificate.": { + "$ref": "./examples/EndpointCertificatesGet.json" + } + } + } + } + }, + "definitions": { + "EndpointCertificate": { + "description": "Certificate used on an endpoint on the Managed Instance.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/EndpointCertificateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "EndpointCertificateListResult": { + "description": "A list of endpoint certificates on the target instance.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/EndpointCertificate" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "EndpointCertificateProperties": { + "description": "The properties of an endpoint certificate.", + "type": "object", + "properties": { + "publicBlob": { + "description": "The certificate public blob", + "type": "string" + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/FailoverGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/FailoverGroups.json new file mode 100644 index 000000000000..19120c03a555 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/FailoverGroups.json @@ -0,0 +1,777 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups": { + "get": { + "tags": [ + "FailoverGroups" + ], + "description": "Lists the failover groups in a server.", + "operationId": "FailoverGroups_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the failover groups.", + "schema": { + "$ref": "#/definitions/FailoverGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadOnlyEndpointTargetServer - The property targetServer of the read-only endpoint must be a valid server present among the partnerServers configured for the failover group.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCountForStandby - Only one partner server for Failover Group is supported for secondaryType standby. Please modify your request accordingly.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List failover group": { + "$ref": "./examples/FailoverGroupList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}": { + "get": { + "tags": [ + "FailoverGroups" + ], + "description": "Gets a failover group.", + "operationId": "FailoverGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified failover group.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadOnlyEndpointTargetServer - The property targetServer of the read-only endpoint must be a valid server present among the partnerServers configured for the failover group.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCountForStandby - Only one partner server for Failover Group is supported for secondaryType standby. Please modify your request accordingly.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Get failover group": { + "$ref": "./examples/FailoverGroupGet.json" + } + } + }, + "put": { + "tags": [ + "FailoverGroups" + ], + "description": "Creates or updates a failover group.", + "operationId": "FailoverGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The failover group parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the failover group.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadOnlyEndpointTargetServer - The property targetServer of the read-only endpoint must be a valid server present among the partnerServers configured for the failover group.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCountForStandby - Only one partner server for Failover Group is supported for secondaryType standby. Please modify your request accordingly.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 FailoverGroupCreateOrUpdatePartiallySucceeded - Some databases could not be added or removed.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 FailoverGroupUnableToPerformGroupOperationOnDatabases - The list of databases to add/remove to/from Failover Group contains errors that are preventing operation to complete.\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 * 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the failover group.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create failover group": { + "$ref": "./examples/FailoverGroupCreateOrUpdate.json" + }, + "Create failover group with standby secondary database on partner server.": { + "$ref": "./examples/FailoverGroupCreateOrUpdateStandbySecondary.json" + } + } + }, + "delete": { + "tags": [ + "FailoverGroups" + ], + "description": "Deletes a failover group.", + "operationId": "FailoverGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the failover group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadOnlyEndpointTargetServer - The property targetServer of the read-only endpoint must be a valid server present among the partnerServers configured for the failover group.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCountForStandby - Only one partner server for Failover Group is supported for secondaryType standby. Please modify your request accordingly.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 * 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified failover group does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete failover group": { + "$ref": "./examples/FailoverGroupDelete.json" + } + } + }, + "patch": { + "tags": [ + "FailoverGroups" + ], + "description": "Updates a failover group.", + "operationId": "FailoverGroups_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The failover group parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/FailoverGroupUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the failover group.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadOnlyEndpointTargetServer - The property targetServer of the read-only endpoint must be a valid server present among the partnerServers configured for the failover group.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCountForStandby - Only one partner server for Failover Group is supported for secondaryType standby. Please modify your request accordingly.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 FailoverGroupCreateOrUpdatePartiallySucceeded - Some databases could not be added or removed.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 FailoverGroupUnableToPerformGroupOperationOnDatabases - The list of databases to add/remove to/from Failover Group contains errors that are preventing operation to complete.\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 * 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update failover group": { + "$ref": "./examples/FailoverGroupUpdate.json" + }, + "Add database to failover group with standby secondary on partner server.": { + "$ref": "./examples/FailoverGroupUpdateStandbySecondary.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover": { + "post": { + "tags": [ + "FailoverGroups" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "FailoverGroups_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadOnlyEndpointTargetServer - The property targetServer of the read-only endpoint must be a valid server present among the partnerServers configured for the failover group.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCountForStandby - Only one partner server for Failover Group is supported for secondaryType standby. Please modify your request accordingly.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 * 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a failover group": { + "$ref": "./examples/FailoverGroupFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "FailoverGroups" + ], + "description": "Fails over from the current primary server to this server. This operation might result in data loss.", + "operationId": "FailoverGroups_ForceFailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server containing the failover group.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadOnlyEndpointTargetServer - The property targetServer of the read-only endpoint must be a valid server present among the partnerServers configured for the failover group.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCountForStandby - Only one partner server for Failover Group is supported for secondaryType standby. Please modify your request accordingly.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 * 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a failover group allowing data loss": { + "$ref": "./examples/FailoverGroupForceFailoverAllowDataLoss.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/tryPlannedBeforeForcedFailover": { + "post": { + "tags": [ + "FailoverGroups" + ], + "description": "Fails over from the current primary server to this server. This operation tries planned before forced failover but might still result in data loss.", + "operationId": "FailoverGroups_TryPlannedBeforeForcedFailover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/FailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabases - The provided databases IDs are not properly constructed database resource IDs. For the example of proper formatting see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update failover group request body is empty or invalid. Please provide a valid value of this field. For examples of properly formatted requests see \r\nhttps://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidDatabaseServer - One or more of the provided databases do not exist on the primary server of the failover group. Please make sure that all the databases exist on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner server for Failover Group is supported. Please modify your request accordingly. For examples of valid requests see https://docs.microsoft.com/en-us/rest/api/sql/failovergroups/createorupdate \n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalid - The create or update failover group request body is empty or invalid.\n\n * 400 FailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 FailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 FailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint. Please remove it from request.\n\n * 400 FailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update failover group request body should not modify the read-only property '{0}'.\n\n * 400 FailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of failover group.\n\n * 400 FailoverGroupPartnerServerFromDifferentSubscription - Primary server and the partner servers of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupCreateOrUpdateRequestInvalidReadOnlyEndpointTargetServer - The property targetServer of the read-only endpoint must be a valid server present among the partnerServers configured for the failover group.\n\n * 400 FailoverGroupCreateOrUpdateRequestUnsupportedPartnerCountForStandby - Only one partner server for Failover Group is supported for secondaryType standby. Please modify your request accordingly.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in a Failover Group need to reside in different regions to provide isolation.\n\n * 400 FailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 FailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a Failover Group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 DatabaseInFailoverGroupNotPrimary - GeoDR link for the database already exists, but its role is not 'Primary' or it is not continuous copy link.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 UnableToCreateFailoverGroupDueToTableAuditing - Failover Group cannot be created for server that has table auditing turned on.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 UnableToAddDbWithTableAuditingToFailoverGroup - Database with Table Auditing enabled will not be accessible through Failover Group endpoint.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 LimitOfFailoverGroupsPerServerExceeded - Creating new Failover Group will exceed the allowed number of Failover Groups per server.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 FailoverGroupWithVirtualNetworkRulesNotSupported - Failover Groups configured with an automatic failover policy are currently not supported on servers configured with virtual network firewall rules. Please configure the failover group with manual failover policy.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 FailoverGroupAlreadyExists - Failover group already exists on a given server. Please use different Failover Group name.\n\n * 409 FailoverGroupBusy - Failover Group is busy with another operation.\n\n * 409 DatabaseBelongsToOtherFailoverGroup - Database belongs to other Failover Group and cannot be consider a part of this one.\n\n * 409 DatabaseBeingAddedToFailoverGroup - The database is currently being added to Failover Group, customer needs to wait for this operation to finish to issue remove.\n\n * 409 DatabaseBeingRemovedFromFailoverGroup - The database is currently being removed from failover group, customer needs to wait for this operation to finish to issue add.\n\n * 409 FailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 * 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Try planned before forced failover of a failover group": { + "$ref": "./examples/FailoverGroupTryPlannedBeforeForcedFailover.json" + } + } + } + } + }, + "definitions": { + "FailoverGroup": { + "description": "A failover group.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/FailoverGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "FailoverGroupListResult": { + "description": "A list of failover groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/FailoverGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "FailoverGroupProperties": { + "description": "Properties of a failover group.", + "required": [ + "readWriteEndpoint", + "partnerServers" + ], + "type": "object", + "properties": { + "readWriteEndpoint": { + "$ref": "#/definitions/FailoverGroupReadWriteEndpoint", + "description": "Read-write endpoint of the failover group instance." + }, + "readOnlyEndpoint": { + "$ref": "#/definitions/FailoverGroupReadOnlyEndpoint", + "description": "Read-only endpoint of the failover group instance." + }, + "replicationRole": { + "description": "Local replication role of the failover group instance.", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "FailoverGroupReplicationRole", + "modelAsString": true + } + }, + "replicationState": { + "description": "Replication state of the failover group instance.", + "type": "string", + "readOnly": true + }, + "partnerServers": { + "description": "List of partner server information for the failover group.", + "type": "array", + "items": { + "$ref": "#/definitions/PartnerInfo" + } + }, + "databases": { + "description": "List of databases in the failover group.", + "type": "array", + "items": { + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Sql/servers/databases" + } + ] + } + } + }, + "secondaryType": { + "description": "Databases secondary type on partner server.", + "enum": [ + "Geo", + "Standby" + ], + "type": "string", + "x-ms-enum": { + "name": "FailoverGroupDatabasesSecondaryType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update" + ] + } + } + }, + "FailoverGroupReadOnlyEndpoint": { + "description": "Read-only endpoint of the failover group instance.", + "type": "object", + "properties": { + "failoverPolicy": { + "description": "Failover policy of the read-only endpoint for the failover group.", + "enum": [ + "Disabled", + "Enabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ReadOnlyEndpointFailoverPolicy", + "modelAsString": true + } + }, + "targetServer": { + "description": "The target partner server where the read-only endpoint points to.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Sql/servers" + } + ] + } + } + } + }, + "FailoverGroupReadWriteEndpoint": { + "description": "Read-write endpoint of the failover group instance.", + "required": [ + "failoverPolicy" + ], + "type": "object", + "properties": { + "failoverPolicy": { + "description": "Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.", + "enum": [ + "Manual", + "Automatic" + ], + "type": "string", + "x-ms-enum": { + "name": "ReadWriteEndpointFailoverPolicy", + "modelAsString": true + } + }, + "failoverWithDataLossGracePeriodMinutes": { + "format": "int32", + "description": "Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.", + "type": "integer" + } + } + }, + "FailoverGroupUpdate": { + "description": "A failover group update request.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/FailoverGroupUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "FailoverGroupUpdateProperties": { + "description": "Properties of a failover group update.", + "type": "object", + "properties": { + "readWriteEndpoint": { + "$ref": "#/definitions/FailoverGroupReadWriteEndpoint", + "description": "Read-write endpoint of the failover group instance." + }, + "readOnlyEndpoint": { + "$ref": "#/definitions/FailoverGroupReadOnlyEndpoint", + "description": "Read-only endpoint of the failover group instance." + }, + "databases": { + "description": "List of databases in the failover group.", + "type": "array", + "items": { + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Sql/servers/databases" + } + ] + } + } + }, + "partnerServers": { + "description": "List of partner server information for the failover group.", + "type": "array", + "items": { + "$ref": "#/definitions/PartnerInfo" + } + }, + "secondaryType": { + "description": "Databases secondary type on partner server.", + "enum": [ + "Geo", + "Standby" + ], + "type": "string", + "x-ms-enum": { + "name": "FailoverGroupDatabasesSecondaryType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update" + ] + } + } + }, + "PartnerInfo": { + "description": "Partner server information for the failover group.", + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "description": "Resource identifier of the partner server.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Sql/servers" + } + ] + } + }, + "location": { + "description": "Geo location of the partner server.", + "type": "string", + "readOnly": true + }, + "replicationRole": { + "description": "Replication role of the partner server.", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "FailoverGroupReplicationRole", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/FirewallRules.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/FirewallRules.json new file mode 100644 index 000000000000..ddfa666df2b5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/FirewallRules.json @@ -0,0 +1,377 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules": { + "get": { + "tags": [ + "FirewallRules" + ], + "description": "Gets a list of firewall rules.", + "operationId": "FirewallRules_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of firewall rules.", + "schema": { + "$ref": "#/definitions/FirewallRuleListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ServerDisabled - Server is disabled." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List Firewall Rules": { + "$ref": "./examples/FirewallRuleList.json" + } + } + }, + "put": { + "tags": [ + "FirewallRules" + ], + "description": "Replaces all firewall rules on the server.", + "operationId": "FirewallRules_Replace", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/FirewallRuleList" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the firewall rules.", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidServerFirewallRuleResourceRequest - The server firewall rule resource request is invalid.\n\n * 400 InvalidServerFirewallRuleResourceParameters - The server firewall rule resource parameter is invalid.\n\n * 400 TooManyFirewallRules - The provided firewall rules are over the limit.\n\n * 400 DenyPublicEndpointEnabled - Unable to create or modify firewall rules when public network interface for the server is disabled. To manage server or database level firewall rules, please enable the public network interface.\n\n * 400 FirewallRuleInvalidRange - The specified firewall rule range is invalid.\n\n * 400 FirewallRuleNameTooLong - The provided firewall rule name is too long\n\n * 400 FirewallRuleNameEmpty - The provided firewall rule name is empty\n\n * 400 FirewallRuleNotIPv4Address - The provided firewall rule address is not IPv4\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Creating or updating the Server Firewall Rules is in progress." + } + }, + "x-ms-examples": { + "Replace firewall rules": { + "$ref": "./examples/FirewallRuleReplace.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}": { + "get": { + "tags": [ + "FirewallRules" + ], + "description": "Gets a firewall rule.", + "operationId": "FirewallRules_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the firewall rule.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified firewall rule.", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ServerDisabled - Server is disabled." + } + }, + "x-ms-examples": { + "Get Firewall Rule": { + "$ref": "./examples/FirewallRuleGet.json" + } + } + }, + "put": { + "tags": [ + "FirewallRules" + ], + "description": "Creates or updates a firewall rule.", + "operationId": "FirewallRules_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the firewall rule.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating a firewall rule.", + "required": true, + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the firewall rule.", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidServerFirewallRuleResourceRequest - The server firewall rule resource request is invalid.\n\n * 400 InvalidServerFirewallRuleResourceParameters - The server firewall rule resource parameter is invalid.\n\n * 400 TooManyFirewallRules - The provided firewall rules are over the limit.\n\n * 400 DenyPublicEndpointEnabled - Unable to create or modify firewall rules when public network interface for the server is disabled. To manage server or database level firewall rules, please enable the public network interface.\n\n * 400 FirewallRuleInvalidRange - The specified firewall rule range is invalid.\n\n * 400 FirewallRuleNameTooLong - The provided firewall rule name is too long\n\n * 400 FirewallRuleNameEmpty - The provided firewall rule name is empty\n\n * 400 FirewallRuleNotIPv4Address - The provided firewall rule address is not IPv4\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\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." + }, + "201": { + "description": "Successfully created the firewall rule.", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + } + }, + "x-ms-examples": { + "Create a firewall rule max/min": { + "$ref": "./examples/FirewallRuleCreate.json" + }, + "Update a firewall rule max/min": { + "$ref": "./examples/FirewallRuleUpdate.json" + } + } + }, + "delete": { + "tags": [ + "FirewallRules" + ], + "description": "Deletes a firewall rule.", + "operationId": "FirewallRules_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the firewall rule.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the firewall rule." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidServerFirewallRuleResourceRequest - The server firewall rule resource request is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "204": { + "description": "The specified firewall rule does not exist." + } + }, + "x-ms-examples": { + "Delete a firewall rule": { + "$ref": "./examples/FirewallRuleDelete.json" + } + } + } + } + }, + "definitions": { + "FirewallRule": { + "description": "A server firewall rule.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResourceWithWritableName" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerFirewallRuleProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "FirewallRuleList": { + "description": "A list of server firewall rules.", + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + } + } + } + }, + "FirewallRuleListResult": { + "description": "The response to a list firewall rules request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ProxyResourceWithWritableName": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ResourceWithWritableName" + } + ], + "properties": {} + }, + "ResourceWithWritableName": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string" + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ServerFirewallRuleProperties": { + "description": "The properties of a server firewall rule.", + "type": "object", + "properties": { + "startIpAddress": { + "description": "The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses.", + "type": "string" + }, + "endIpAddress": { + "description": "The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses.", + "type": "string" + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/GeoBackupPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/GeoBackupPolicies.json new file mode 100644 index 000000000000..28bbb319a5ad --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/GeoBackupPolicies.json @@ -0,0 +1,292 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies": { + "get": { + "tags": [ + "GeoBackupPolicies" + ], + "description": "Gets a list of Geo backup policies for the given database resource.", + "operationId": "GeoBackupPolicies_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of Geo backup policy configurations.", + "schema": { + "$ref": "#/definitions/GeoBackupPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List Geo backup policies for the given database resource.": { + "$ref": "./examples/GeoBackupPoliciesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}": { + "get": { + "tags": [ + "GeoBackupPolicies" + ], + "description": "Gets a Geo backup policy for the given database resource.", + "operationId": "GeoBackupPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "geoBackupPolicyName", + "in": "path", + "description": "The name of the Geo backup policy. This should always be 'Default'.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "GeoBackupPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified Geo backup policy.", + "schema": { + "$ref": "#/definitions/GeoBackupPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets the specified Geo backup policy.": { + "$ref": "./examples/GeoBackupPoliciesGet.json" + } + } + }, + "put": { + "tags": [ + "GeoBackupPolicies" + ], + "description": "Create or update a database default Geo backup policy.", + "operationId": "GeoBackupPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "geoBackupPolicyName", + "in": "path", + "description": "The name of the Geo backup policy. This should always be 'Default'.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "GeoBackupPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating the geo backup policy.", + "required": true, + "schema": { + "$ref": "#/definitions/GeoBackupPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the default Geo backup policy.", + "schema": { + "$ref": "#/definitions/GeoBackupPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "201": { + "description": "Updated the Geo backup policy is in progress.", + "schema": { + "$ref": "#/definitions/GeoBackupPolicy" + } + } + }, + "x-ms-examples": { + "Create or update a database default Geo backup policy.": { + "$ref": "./examples/GeoBackupPoliciesCreateOrUpdate.json" + } + } + } + } + }, + "definitions": { + "GeoBackupPolicy": { + "description": "A Geo backup policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "location": { + "description": "Backup policy location.", + "type": "string", + "readOnly": true + }, + "kind": { + "description": "Kind of geo backup policy. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/GeoBackupPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "GeoBackupPolicyListResult": { + "description": "The list of geo backup policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/GeoBackupPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "GeoBackupPolicyProperties": { + "description": "The properties of the geo backup policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "The state of the geo backup policy.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "GeoBackupPolicyState", + "modelAsString": false + } + }, + "storageType": { + "description": "The storage type of the geo backup policy.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/IPv6FirewallRules.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/IPv6FirewallRules.json new file mode 100644 index 000000000000..4043a046a9e7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/IPv6FirewallRules.json @@ -0,0 +1,317 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules": { + "get": { + "tags": [ + "IPv6FirewallRules" + ], + "description": "Gets a list of IPv6 firewall rules.", + "operationId": "IPv6FirewallRules_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of IPv6 firewall rules.", + "schema": { + "$ref": "#/definitions/IPv6FirewallRuleListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List IPv6 Firewall Rules": { + "$ref": "./examples/IPv6FirewallRuleList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}": { + "get": { + "tags": [ + "IPv6FirewallRules" + ], + "description": "Gets an IPv6 firewall rule.", + "operationId": "IPv6FirewallRules_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the firewall rule.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified IPv6 firewall rule.", + "schema": { + "$ref": "#/definitions/IPv6 FirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get IPv6 Firewall Rule": { + "$ref": "./examples/IPv6FirewallRuleGet.json" + } + } + }, + "put": { + "tags": [ + "IPv6FirewallRules" + ], + "description": "Creates or updates an IPv6 firewall rule.", + "operationId": "IPv6FirewallRules_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the firewall rule.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating an IPv6 firewall rule.", + "required": true, + "schema": { + "$ref": "#/definitions/IPv6 FirewallRule" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the IPv6 firewall rule.", + "schema": { + "$ref": "#/definitions/IPv6 FirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidIPv6ServerFirewallRuleResourceRequest - The IPv6 server firewall rule resource request is invalid.\n\n * 400 InvalidIPv6ServerFirewallRuleResourceParameters - The IPv6 server firewall rule resource parameter is invalid.\n\n * 400 DenyPublicEndpointEnabled - Unable to create or modify firewall rules when public network interface for the server is disabled. To manage server or database level firewall rules, please enable the public network interface.\n\n * 400 IPv6FirewallRuleNameEmpty - The provided IPv6 firewall rule name is empty\n\n * 400 FirewallRuleNotIPv6Address - The provided firewall rule address is not IPv6\n\n * 400 IPv6FirewallRuleNameTooLong - The provided IPv6 firewall rule name is too long\n\n * 400 IPv6FirewallRuleInvalidRange - The specified IPv6 firewall rule range is invalid.\n\n * 400 TooManyIPv6FirewallRules - The provided IPv6 firewall rules are over the limit.\n\n * 400 IPv6EndpointDisabled - The IPv6 endpoint is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "201": { + "description": "Successfully created the IPv6 firewall rule.", + "schema": { + "$ref": "#/definitions/IPv6 FirewallRule" + } + } + }, + "x-ms-examples": { + "Create an IPv6 firewall rule max/min": { + "$ref": "./examples/IPv6FirewallRuleCreate.json" + }, + "Update an IPv6 firewall rule max/min": { + "$ref": "./examples/IPv6FirewallRuleUpdate.json" + } + } + }, + "delete": { + "tags": [ + "IPv6FirewallRules" + ], + "description": "Deletes an IPv6 firewall rule.", + "operationId": "IPv6FirewallRules_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "firewallRuleName", + "in": "path", + "description": "The name of the firewall rule.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the IPv6 firewall rule." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidIPv6ServerFirewallRuleResourceRequest - The IPv6 server firewall rule resource request is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "204": { + "description": "The specified IPv6 firewall rule does not exist." + } + }, + "x-ms-examples": { + "Delete an IPv6 firewall rule": { + "$ref": "./examples/IPv6FirewallRuleDelete.json" + } + } + } + } + }, + "definitions": { + "IPv6 FirewallRule": { + "description": "An IPv6 server firewall rule.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResourceWithWritableName" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/IPv6ServerFirewallRuleProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "IPv6FirewallRuleListResult": { + "description": "The response to a list IPv6 firewall rules request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/IPv6 FirewallRule" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "IPv6ServerFirewallRuleProperties": { + "description": "The properties of an IPv6 server firewall rule.", + "type": "object", + "properties": { + "startIPv6Address": { + "description": "The start IP address of the firewall rule. Must be IPv6 format.", + "type": "string" + }, + "endIPv6Address": { + "description": "The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress.", + "type": "string" + } + } + }, + "ProxyResourceWithWritableName": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ResourceWithWritableName" + } + ], + "properties": {} + }, + "ResourceWithWritableName": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string" + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/InstanceFailoverGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/InstanceFailoverGroups.json new file mode 100644 index 000000000000..ff5aee782d45 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/InstanceFailoverGroups.json @@ -0,0 +1,540 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups": { + "get": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Lists the failover groups in a location.", + "operationId": "InstanceFailoverGroups_ListByLocation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the failover groups.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List failover group": { + "$ref": "./examples/InstanceFailoverGroupList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}": { + "get": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Gets a failover group.", + "operationId": "InstanceFailoverGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified failover group.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Get failover group": { + "$ref": "./examples/InstanceFailoverGroupGet.json" + } + } + }, + "put": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Creates or updates a failover group.", + "operationId": "InstanceFailoverGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The failover group parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the failover group.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\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 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\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 * 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the failover group.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create failover group": { + "$ref": "./examples/InstanceFailoverGroupCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Deletes a failover group.", + "operationId": "InstanceFailoverGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the failover group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\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 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\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 * 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified failover group does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete failover group": { + "$ref": "./examples/InstanceFailoverGroupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover": { + "post": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Fails over from the current primary managed instance to this managed instance.", + "operationId": "InstanceFailoverGroups_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\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 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\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 * 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a failover group": { + "$ref": "./examples/InstanceFailoverGroupFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "InstanceFailoverGroups" + ], + "description": "Fails over from the current primary managed instance to this managed instance. This operation might result in data loss.", + "operationId": "InstanceFailoverGroups_ForceFailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "failoverGroupName", + "in": "path", + "description": "The name of the failover group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/InstanceFailoverGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\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 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\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 * 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a failover group allowing data loss": { + "$ref": "./examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json" + } + } + } + } + }, + "definitions": { + "InstanceFailoverGroup": { + "description": "An instance failover group.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/InstanceFailoverGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "InstanceFailoverGroupListResult": { + "description": "A list of instance failover groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/InstanceFailoverGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "InstanceFailoverGroupProperties": { + "description": "Properties of a instance failover group.", + "required": [ + "readWriteEndpoint", + "partnerRegions", + "managedInstancePairs" + ], + "type": "object", + "properties": { + "secondaryType": { + "description": "Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only.", + "enum": [ + "Geo", + "Standby" + ], + "type": "string", + "x-ms-enum": { + "name": "SecondaryInstanceType", + "modelAsString": true + } + }, + "readWriteEndpoint": { + "$ref": "#/definitions/InstanceFailoverGroupReadWriteEndpoint", + "description": "Read-write endpoint of the failover group instance." + }, + "readOnlyEndpoint": { + "$ref": "#/definitions/InstanceFailoverGroupReadOnlyEndpoint", + "description": "Read-only endpoint of the failover group instance." + }, + "replicationRole": { + "description": "Local replication role of the failover group instance.", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "InstanceFailoverGroupReplicationRole", + "modelAsString": true + } + }, + "replicationState": { + "description": "Replication state of the failover group instance.", + "type": "string", + "readOnly": true + }, + "partnerRegions": { + "description": "Partner region information for the failover group.", + "type": "array", + "items": { + "$ref": "#/definitions/PartnerRegionInfo" + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "managedInstancePairs": { + "description": "List of managed instance pairs in the failover group.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstancePairInfo" + } + } + } + }, + "InstanceFailoverGroupReadOnlyEndpoint": { + "description": "Read-only endpoint of the failover group instance.", + "type": "object", + "properties": { + "failoverPolicy": { + "description": "Failover policy of the read-only endpoint for the failover group.", + "enum": [ + "Disabled", + "Enabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ReadOnlyEndpointFailoverPolicy", + "modelAsString": true + } + } + } + }, + "InstanceFailoverGroupReadWriteEndpoint": { + "description": "Read-write endpoint of the failover group instance.", + "required": [ + "failoverPolicy" + ], + "type": "object", + "properties": { + "failoverPolicy": { + "description": "Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.", + "enum": [ + "Manual", + "Automatic" + ], + "type": "string", + "x-ms-enum": { + "name": "ReadWriteEndpointFailoverPolicy", + "modelAsString": true + } + }, + "failoverWithDataLossGracePeriodMinutes": { + "format": "int32", + "description": "Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.", + "type": "integer" + } + } + }, + "ManagedInstancePairInfo": { + "description": "Pairs of Managed Instances in the failover group.", + "type": "object", + "properties": { + "primaryManagedInstanceId": { + "description": "Id of Primary Managed Instance in pair.", + "type": "string" + }, + "partnerManagedInstanceId": { + "description": "Id of Partner Managed Instance in pair.", + "type": "string" + } + } + }, + "PartnerRegionInfo": { + "description": "Partner region information for the failover group.", + "type": "object", + "properties": { + "location": { + "description": "Geo location of the partner managed instances.", + "type": "string" + }, + "replicationRole": { + "description": "Replication role of the partner managed instances.", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "InstanceFailoverGroupReplicationRole", + "modelAsString": true + } + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/InstancePools.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/InstancePools.json new file mode 100644 index 000000000000..a009f252b67f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/InstancePools.json @@ -0,0 +1,431 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools": { + "get": { + "tags": [ + "InstancePools" + ], + "description": "Gets a list of all instance pools in the subscription.", + "operationId": "InstancePools_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of instance pools in a subscription.", + "schema": { + "$ref": "#/definitions/InstancePoolListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\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." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List instance pools in the subscription": { + "$ref": "./examples/ListInstancePoolsBySubscriptionId.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools": { + "get": { + "tags": [ + "InstancePools" + ], + "description": "Gets a list of instance pools in the resource group", + "operationId": "InstancePools_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of instance pools.", + "schema": { + "$ref": "#/definitions/InstancePoolListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\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." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List instance pools by resource group": { + "$ref": "./examples/ListInstancePoolsByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}": { + "get": { + "tags": [ + "InstancePools" + ], + "description": "Gets an instance pool.", + "operationId": "InstancePools_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the instance pool to be retrieved.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified instance pool.", + "schema": { + "$ref": "#/definitions/InstancePool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\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." + } + }, + "x-ms-examples": { + "Get an instance pool": { + "$ref": "./examples/GetInstancePool.json" + } + } + }, + "put": { + "tags": [ + "InstancePools" + ], + "description": "Creates or updates an instance pool.", + "operationId": "InstancePools_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the instance pool to be created or updated.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested instance pool resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/InstancePool" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the instance pool.", + "schema": { + "$ref": "#/definitions/InstancePool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 MissingSkuName - Sku name is required.\n\n * 400 InstancePoolRequestedVcoreCountIsInvalid - Requested vcore count for instance pool is invalid\n\n * 400 InstancePoolRequestMissingSku - Instance pool request is missing sku\n\n * 400 InstancePoolRequestMissingSkuTier - Instance pool request is missing sku tier\n\n * 400 InstancePoolRequestMissingSkuFamily - Instance pool request is missing sku family\n\n * 400 InstancePoolRequestedSubnetResourceIdIsInvalid - Subnet id for instance pool is null or empty\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 InstancePoolBusy - An instance pool is busy with another ongoing operation\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the instance pool.", + "schema": { + "$ref": "#/definitions/InstancePool" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create an instance pool with all properties.": { + "$ref": "./examples/CreateOrUpdateInstancePoolMax.json" + }, + "Create an instance pool with min properties.": { + "$ref": "./examples/CreateOrUpdateInstancePoolMin.json" + } + } + }, + "delete": { + "tags": [ + "InstancePools" + ], + "description": "Deletes an instance pool", + "operationId": "InstancePools_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the instance pool to be deleted", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the instance pool." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 InstancePoolNotEmpty - An instance pool is not empty\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 InstancePoolBusy - An instance pool is busy with another ongoing operation\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified instance pool does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete an instance pool": { + "$ref": "./examples/DeleteInstancePool.json" + } + } + }, + "patch": { + "tags": [ + "InstancePools" + ], + "description": "Updates an instance pool.", + "operationId": "InstancePools_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the instance pool to be updated.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested instance pool resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/InstancePoolUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the instance pool.", + "schema": { + "$ref": "#/definitions/InstancePool" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Patch an instance pool": { + "$ref": "./examples/PatchInstancePool.json" + } + } + } + } + }, + "definitions": { + "InstancePool": { + "description": "An Azure SQL instance pool.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU." + }, + "properties": { + "$ref": "#/definitions/InstancePoolProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "InstancePoolListResult": { + "description": "A list of Azure SQL instance pools.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/InstancePool" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "InstancePoolProperties": { + "description": "Properties of an instance pool.", + "required": [ + "subnetId", + "vCores", + "licenseType" + ], + "type": "object", + "properties": { + "subnetId": { + "description": "Resource ID of the subnet to place this instance pool in.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "vCores": { + "format": "int32", + "description": "Count of vCores belonging to this instance pool.", + "type": "integer" + }, + "licenseType": { + "description": "The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price).", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "InstancePoolLicenseType", + "modelAsString": true + } + }, + "dnsZone": { + "description": "The Dns Zone that the managed instance pool is in.", + "type": "string", + "readOnly": true + }, + "maintenanceConfigurationId": { + "description": "Specifies maintenance configuration id to apply to this managed instance.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Maintenance/publicMaintenanceConfigurations" + } + ] + } + } + } + }, + "InstancePoolUpdate": { + "description": "An update to an Instance pool.", + "type": "object", + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU." + }, + "properties": { + "$ref": "#/definitions/InstancePoolProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobAgents.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobAgents.json new file mode 100644 index 000000000000..7ea81210f6f5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobAgents.json @@ -0,0 +1,470 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents": { + "get": { + "tags": [ + "JobAgents" + ], + "description": "Gets a list of job agents in a server.", + "operationId": "JobAgents_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job agents.", + "schema": { + "$ref": "#/definitions/JobAgentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 409 ServerDisabled - Server is disabled." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job agents in a server": { + "$ref": "./examples/ListJobAgentsByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}": { + "get": { + "tags": [ + "JobAgents" + ], + "description": "Gets a job agent.", + "operationId": "JobAgents_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be retrieved.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 409 ServerDisabled - Server is disabled." + } + }, + "x-ms-examples": { + "Get a job agent": { + "$ref": "./examples/GetJobAgent.json" + } + } + }, + "put": { + "tags": [ + "JobAgents" + ], + "description": "Creates or updates a job agent.", + "operationId": "JobAgents_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be created or updated.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested job agent resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 MissingSkuName - Sku name is required.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 InvalidIdentityTenantId - tenantId cannot be specified on a create or update request.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MissingUserAssignedIdentities - identity.userAssignedIdentities must be provided when identity.type is equal to \"UserAssigned\".\n\n * 400 MissingIdentityType - Please specify the identity type.\n\n * 400 MultipleIdentitiesOnJobAgent - Please specify only one user managed identity per job agent.\n\n * 400 InvalidIdentityType - Please specify only \"None\" or \"UserAssigned\" identity types.\n\n * 400 SkuMismatchingNameCapacity - The SKU capacity provided does not match with provided SKU name.\n\n * 400 DatabaseDoesNotExist - The requested database was not found\n\n * 400 JobAgentExceededQuota - Could not create job agent because it would exceed the quota.\n\n * 400 JobAgentAlreadyExists - The job agent already exists on the server.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 JobAgentDatabaseSecondary - A job agent cannot be linked to a geo-secondary database.\n\n * 400 JobAgentDatabaseAlreadyLinked - The specified database is already linked to another job agent.\n\n * 400 ElasticJobsNotSupportedOnAutoPauseEnabledDatabase - Auto-pause enabled serverless database is not supported as an Elastic Jobs database because job agent would prevent that database from pausing. You can either disable auto-pause on this serverless database or delete the job agent that is using this database. See here for more details: https://docs.microsoft.com/azure/azure-sql/database/serverless-tier-overview#auto-pausing\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 PropertyChangeUnsupported - Property cannot be modified.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or update a job agent": { + "$ref": "./examples/CreateOrUpdateJobAgent.json" + }, + "Create or update a job agent with identity": { + "$ref": "./examples/CreateOrUpdateJobAgentWithIdentity.json" + }, + "Create or update a job agent with sku.": { + "$ref": "./examples/CreateOrUpdateJobAgentWithSku.json" + } + } + }, + "delete": { + "tags": [ + "JobAgents" + ], + "description": "Deletes a job agent.", + "operationId": "JobAgents_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be deleted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the job agent." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified job agent does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a job agent": { + "$ref": "./examples/DeleteJobAgent.json" + } + } + }, + "patch": { + "tags": [ + "JobAgents" + ], + "description": "Updates a job agent.", + "operationId": "JobAgents_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be updated.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The update to the job agent.", + "required": true, + "schema": { + "$ref": "#/definitions/JobAgentUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 MissingIdentityType - Please specify the identity type.\n\n * 400 MultipleIdentitiesOnJobAgent - Please specify only one user managed identity per job agent.\n\n * 400 InvalidIdentityTenantId - tenantId cannot be specified on a create or update request.\n\n * 400 InvalidIdentityType - Please specify only \"None\" or \"UserAssigned\" identity types.\n\n * 400 SkuMismatchingNameCapacity - The SKU capacity provided does not match with provided SKU name.\n\n * 400 ElasticJobsNotSupportedOnAutoPauseEnabledDatabase - Auto-pause enabled serverless database is not supported as an Elastic Jobs database because job agent would prevent that database from pausing. You can either disable auto-pause on this serverless database or delete the job agent that is using this database. See here for more details: https://docs.microsoft.com/azure/azure-sql/database/serverless-tier-overview#auto-pausing\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 PropertyChangeUnsupported - Property cannot be modified.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a job agent's tags.": { + "$ref": "./examples/UpdateJobAgent.json" + }, + "Update a job agent's identity.": { + "$ref": "./examples/UpdateJobAgentWithIdentity.json" + }, + "Update a job agent's sku.": { + "$ref": "./examples/UpdateJobAgentWithSku.json" + } + } + } + } + }, + "definitions": { + "JobAgent": { + "description": "An Azure SQL job agent.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU." + }, + "identity": { + "$ref": "#/definitions/JobAgentIdentity", + "description": "The identity of the job agent." + }, + "properties": { + "$ref": "#/definitions/JobAgentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobAgentIdentity": { + "description": "Azure Active Directory identity configuration for a resource.", + "required": [ + "type" + ], + "type": "object", + "properties": { + "tenantId": { + "format": "uuid", + "description": "The job agent identity tenant id", + "type": "string" + }, + "type": { + "description": "The job agent identity type", + "enum": [ + "None", + "SystemAssigned", + "UserAssigned", + "SystemAssignedUserAssigned" + ], + "type": "string", + "x-ms-enum": { + "name": "JobAgentIdentityType", + "modelAsString": true + } + }, + "userAssignedIdentities": { + "description": "The resource ids of the user assigned identities to use", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/JobAgentUserAssignedIdentity" + } + } + } + }, + "JobAgentListResult": { + "description": "A list of Azure SQL job agents.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobAgent" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobAgentProperties": { + "description": "Properties of a job agent.", + "required": [ + "databaseId" + ], + "type": "object", + "properties": { + "databaseId": { + "description": "Resource ID of the database to store job metadata in.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "state": { + "description": "The state of the job agent.", + "enum": [ + "Creating", + "Ready", + "Updating", + "Deleting", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobAgentState", + "modelAsString": true + } + } + } + }, + "JobAgentUpdate": { + "description": "An update to an Azure SQL job agent.", + "type": "object", + "properties": { + "identity": { + "$ref": "#/definitions/JobAgentIdentity", + "description": "Managed identity assigned to job agent" + }, + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU." + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "JobAgentUserAssignedIdentity": { + "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 + }, + "clientId": { + "format": "uuid", + "description": "The Azure Active Directory client id.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobCredentials.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobCredentials.json new file mode 100644 index 000000000000..ead1fc6c8965 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobCredentials.json @@ -0,0 +1,319 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials": { + "get": { + "tags": [ + "JobCredentials" + ], + "description": "Gets a list of jobs credentials.", + "operationId": "JobCredentials_ListByAgent", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job credentials.", + "schema": { + "$ref": "#/definitions/JobCredentialListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List credentials in a job agent": { + "$ref": "./examples/ListJobCredentialsByAgent.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}": { + "get": { + "tags": [ + "JobCredentials" + ], + "description": "Gets a jobs credential.", + "operationId": "JobCredentials_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "credentialName", + "in": "path", + "description": "The name of the credential.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job credential.", + "schema": { + "$ref": "#/definitions/JobCredential" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a credential": { + "$ref": "./examples/GetJobCredential.json" + } + } + }, + "put": { + "tags": [ + "JobCredentials" + ], + "description": "Creates or updates a job credential.", + "operationId": "JobCredentials_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "credentialName", + "in": "path", + "description": "The name of the credential.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested job credential state.", + "required": true, + "schema": { + "$ref": "#/definitions/JobCredential" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the credential.", + "schema": { + "$ref": "#/definitions/JobCredential" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidJobCredentialUsername - Invalid credential username.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 JobCredentialPermissionError - Azure Resource Manager does not have permission to use or manage the credential." + }, + "201": { + "description": "Successfully created the credential.", + "schema": { + "$ref": "#/definitions/JobCredential" + } + } + }, + "x-ms-examples": { + "Create or update a credential": { + "$ref": "./examples/CreateOrUpdateJobCredential.json" + } + } + }, + "delete": { + "tags": [ + "JobCredentials" + ], + "description": "Deletes a job credential.", + "operationId": "JobCredentials_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "credentialName", + "in": "path", + "description": "The name of the credential.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the credential." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 JobCredentialPermissionError - Azure Resource Manager does not have permission to use or manage the credential." + }, + "204": { + "description": "A credential with the specified name does not exist." + } + }, + "x-ms-examples": { + "Delete a credential": { + "$ref": "./examples/DeleteJobCredential.json" + } + } + } + } + }, + "definitions": { + "JobCredential": { + "description": "A stored credential that can be used by a job to connect to target databases.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobCredentialProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobCredentialListResult": { + "description": "A list of job credentials.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobCredential" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobCredentialProperties": { + "description": "Properties of a job credential.", + "required": [ + "username", + "password" + ], + "type": "object", + "properties": { + "username": { + "description": "The credential user name.", + "type": "string" + }, + "password": { + "description": "The credential password.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobExecutions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobExecutions.json new file mode 100644 index 000000000000..15bdd14c3cf9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobExecutions.json @@ -0,0 +1,678 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions": { + "get": { + "tags": [ + "JobExecutions" + ], + "description": "Lists all executions in a job agent.", + "operationId": "JobExecutions_ListByAgent", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "createTimeMin", + "in": "query", + "description": "If specified, only job executions created at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "createTimeMax", + "in": "query", + "description": "If specified, only job executions created before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMin", + "in": "query", + "description": "If specified, only job executions completed at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMax", + "in": "query", + "description": "If specified, only job executions completed before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "isActive", + "in": "query", + "description": "If specified, only active or only completed job executions are included.", + "required": false, + "type": "boolean" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved job executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List all job executions in a job agent.": { + "$ref": "./examples/ListJobExecutionsByAgent.json" + }, + "List all job executions in a job agent with filtering.": { + "$ref": "./examples/ListJobExecutionsByAgentWithFilter.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions": { + "get": { + "tags": [ + "JobExecutions" + ], + "description": "Lists a job's executions.", + "operationId": "JobExecutions_ListByJob", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "createTimeMin", + "in": "query", + "description": "If specified, only job executions created at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "createTimeMax", + "in": "query", + "description": "If specified, only job executions created before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMin", + "in": "query", + "description": "If specified, only job executions completed at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMax", + "in": "query", + "description": "If specified, only job executions completed before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "isActive", + "in": "query", + "description": "If specified, only active or only completed job executions are included.", + "required": false, + "type": "boolean" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved job executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List a job's executions.": { + "$ref": "./examples/ListJobExecutionsByJob.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}": { + "get": { + "tags": [ + "JobExecutions" + ], + "description": "Gets a job execution.", + "operationId": "JobExecutions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get a job execution.": { + "$ref": "./examples/GetJobExecution.json" + } + } + }, + "put": { + "tags": [ + "JobExecutions" + ], + "description": "Creates or updates a job execution.", + "operationId": "JobExecutions_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The job execution id to create the job execution under.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A job execution for the job with the given id already existed.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully started an execution for the job.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create job execution.": { + "$ref": "./examples/CreateOrUpdateJobExecution.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel": { + "post": { + "tags": [ + "JobExecutions" + ], + "description": "Requests cancellation of a job execution.", + "operationId": "JobExecutions_Cancel", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution to cancel.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully requested cancellation of the job execution." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Cancel a job execution.": { + "$ref": "./examples/CancelJobExecution.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start": { + "post": { + "tags": [ + "JobExecutions" + ], + "description": "Starts an elastic job execution.", + "operationId": "JobExecutions_Create", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully started an execution for the job.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Start a job execution.": { + "$ref": "./examples/CreateJobExecution.json" + } + } + } + } + }, + "definitions": { + "JobExecution": { + "description": "An execution of a job", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobExecutionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobExecutionListResult": { + "description": "A list of job executions.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecution" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecutionProperties": { + "description": "Properties for an Azure SQL Database Elastic job execution.", + "type": "object", + "properties": { + "jobVersion": { + "format": "int32", + "description": "The job version number.", + "type": "integer", + "readOnly": true + }, + "stepName": { + "description": "The job step name.", + "type": "string", + "readOnly": true + }, + "stepId": { + "format": "int32", + "description": "The job step id.", + "type": "integer", + "readOnly": true + }, + "jobExecutionId": { + "format": "uuid", + "description": "The unique identifier of the job execution.", + "type": "string", + "readOnly": true + }, + "lifecycle": { + "description": "The detailed state of the job execution.", + "enum": [ + "Created", + "InProgress", + "WaitingForChildJobExecutions", + "WaitingForRetry", + "Succeeded", + "SucceededWithSkipped", + "Failed", + "TimedOut", + "Canceled", + "Skipped" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobExecutionLifecycle", + "modelAsString": true + } + }, + "provisioningState": { + "description": "The ARM provisioning state of the job execution.", + "enum": [ + "Created", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "createTime": { + "format": "date-time", + "description": "The time that the job execution was created.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The time that the job execution started.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The time that the job execution completed.", + "type": "string", + "readOnly": true + }, + "currentAttempts": { + "format": "int32", + "description": "Number of times the job execution has been attempted.", + "type": "integer" + }, + "currentAttemptStartTime": { + "format": "date-time", + "description": "Start time of the current attempt.", + "type": "string", + "readOnly": true + }, + "lastMessage": { + "description": "The last status or error message.", + "type": "string", + "readOnly": true + }, + "target": { + "$ref": "#/definitions/JobExecutionTarget", + "description": "The target that this execution is executed on.", + "readOnly": true + } + } + }, + "JobExecutionTarget": { + "description": "The target that a job execution is executed on.", + "type": "object", + "properties": { + "type": { + "description": "The type of the target.", + "enum": [ + "TargetGroup", + "SqlDatabase", + "SqlElasticPool", + "SqlShardMap", + "SqlServer" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobTargetType", + "modelAsString": true + } + }, + "serverName": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The database name.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json new file mode 100644 index 000000000000..8e3550efc473 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json @@ -0,0 +1,337 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints": { + "get": { + "tags": [ + "JobPrivateEndpoints" + ], + "description": "Gets a list of job agent private endpoints.", + "operationId": "JobPrivateEndpoints_ListByAgent", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of private endpoints.", + "schema": { + "$ref": "#/definitions/JobPrivateEndpointListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 409 ServerDisabled - Server is disabled." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List private endpoints in a job agent": { + "$ref": "./examples/ListJobPrivateEndpointsByAgent.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName}": { + "get": { + "tags": [ + "JobPrivateEndpoints" + ], + "description": "Gets a private endpoint.", + "operationId": "JobPrivateEndpoints_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "privateEndpointName", + "in": "path", + "description": "The name of the private endpoint to get.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the private endpoint.", + "schema": { + "$ref": "#/definitions/JobPrivateEndpoint" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ServerDisabled - Server is disabled." + } + }, + "x-ms-examples": { + "Get a private endpoint.": { + "$ref": "./examples/GetJobPrivateEndpoint.json" + } + } + }, + "put": { + "tags": [ + "JobPrivateEndpoints" + ], + "description": "Creates or updates a private endpoint.", + "operationId": "JobPrivateEndpoints_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "privateEndpointName", + "in": "path", + "description": "The name of the private endpoint.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested private endpoint state.", + "required": true, + "schema": { + "$ref": "#/definitions/JobPrivateEndpoint" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the private endpoint.", + "schema": { + "$ref": "#/definitions/JobPrivateEndpoint" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 ElasticJobAgentIsBusy - The Elastic Job Agent '{0}' is currently busy processing another request. Please retry operation later.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 ElasticJobAgentInvalidOperationParameter - An invalid operation parameter was identified for this Elastic Job Agent operation. {0}\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 ElasticJobAgentResourceAlreadyExists - Elastic job agent '{0}' already contains the resource '{1}'\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 PropertyChangeUnsupported - Property cannot be modified.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the private endpoint.", + "schema": { + "$ref": "#/definitions/JobPrivateEndpoint" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Create a private endpoint.": { + "$ref": "./examples/CreateOrUpdateJobPrivateEndpoint.json" + } + } + }, + "delete": { + "tags": [ + "JobPrivateEndpoints" + ], + "description": "Deletes a private endpoint.", + "operationId": "JobPrivateEndpoints_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "privateEndpointName", + "in": "path", + "description": "The name of the private endpoint to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the private endpoint." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobAgentInvalidOperationParameter - An invalid operation parameter was identified for this Elastic Job Agent operation. {0}\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 ElasticJobAgentIsBusy - The Elastic Job Agent '{0}' is currently busy processing another request. Please retry operation later.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified private endpoint does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Delete a private endpoint": { + "$ref": "./examples/DeleteJobPrivateEndpoint.json" + } + } + } + } + }, + "definitions": { + "JobPrivateEndpoint": { + "description": "A job agent private endpoint.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobPrivateEndpointProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobPrivateEndpointListResult": { + "description": "A list of job agent private endpoints.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobPrivateEndpoint" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobPrivateEndpointProperties": { + "description": "Properties of job agent private endpoint.", + "required": [ + "targetServerAzureResourceId" + ], + "type": "object", + "properties": { + "targetServerAzureResourceId": { + "description": "ARM resource id of the server the private endpoint will target.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Sql/servers" + } + ] + } + }, + "privateEndpointId": { + "description": "Private endpoint id of the private endpoint.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobStepExecutions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobStepExecutions.json new file mode 100644 index 000000000000..b38c954e2b24 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobStepExecutions.json @@ -0,0 +1,402 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps": { + "get": { + "tags": [ + "JobStepExecutions" + ], + "description": "Lists the step executions of a job execution.", + "operationId": "JobStepExecutions_ListByJobExecution", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "createTimeMin", + "in": "query", + "description": "If specified, only job executions created at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "createTimeMax", + "in": "query", + "description": "If specified, only job executions created before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMin", + "in": "query", + "description": "If specified, only job executions completed at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMax", + "in": "query", + "description": "If specified, only job executions completed before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "isActive", + "in": "query", + "description": "If specified, only active or only completed job executions are included.", + "required": false, + "type": "boolean" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the step executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job step executions": { + "$ref": "./examples/ListJobExecutionSteps.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}": { + "get": { + "tags": [ + "JobStepExecutions" + ], + "description": "Gets a step execution of a job execution.", + "operationId": "JobStepExecutions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The unique id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the step.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the step execution.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a job step execution": { + "$ref": "./examples/GetJobExecutionStep.json" + } + } + } + } + }, + "definitions": { + "JobExecution": { + "description": "An execution of a job", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobExecutionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobExecutionListResult": { + "description": "A list of job executions.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecution" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecutionProperties": { + "description": "Properties for an Azure SQL Database Elastic job execution.", + "type": "object", + "properties": { + "jobVersion": { + "format": "int32", + "description": "The job version number.", + "type": "integer", + "readOnly": true + }, + "stepName": { + "description": "The job step name.", + "type": "string", + "readOnly": true + }, + "stepId": { + "format": "int32", + "description": "The job step id.", + "type": "integer", + "readOnly": true + }, + "jobExecutionId": { + "format": "uuid", + "description": "The unique identifier of the job execution.", + "type": "string", + "readOnly": true + }, + "lifecycle": { + "description": "The detailed state of the job execution.", + "enum": [ + "Created", + "InProgress", + "WaitingForChildJobExecutions", + "WaitingForRetry", + "Succeeded", + "SucceededWithSkipped", + "Failed", + "TimedOut", + "Canceled", + "Skipped" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobExecutionLifecycle", + "modelAsString": true + } + }, + "provisioningState": { + "description": "The ARM provisioning state of the job execution.", + "enum": [ + "Created", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "createTime": { + "format": "date-time", + "description": "The time that the job execution was created.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The time that the job execution started.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The time that the job execution completed.", + "type": "string", + "readOnly": true + }, + "currentAttempts": { + "format": "int32", + "description": "Number of times the job execution has been attempted.", + "type": "integer" + }, + "currentAttemptStartTime": { + "format": "date-time", + "description": "Start time of the current attempt.", + "type": "string", + "readOnly": true + }, + "lastMessage": { + "description": "The last status or error message.", + "type": "string", + "readOnly": true + }, + "target": { + "$ref": "#/definitions/JobExecutionTarget", + "description": "The target that this execution is executed on.", + "readOnly": true + } + } + }, + "JobExecutionTarget": { + "description": "The target that a job execution is executed on.", + "type": "object", + "properties": { + "type": { + "description": "The type of the target.", + "enum": [ + "TargetGroup", + "SqlDatabase", + "SqlElasticPool", + "SqlShardMap", + "SqlServer" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobTargetType", + "modelAsString": true + } + }, + "serverName": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The database name.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobSteps.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobSteps.json new file mode 100644 index 000000000000..4ec839f9421d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobSteps.json @@ -0,0 +1,621 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets all job steps for a job's current version.", + "operationId": "JobSteps_ListByJob", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job steps.", + "schema": { + "$ref": "#/definitions/JobStepListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job steps for the latest version of a job.": { + "$ref": "./examples/ListJobStepsByJob.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets a job step in a job's current version.", + "operationId": "JobSteps_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get the latest version of a job step.": { + "$ref": "./examples/GetJobStepByJob.json" + } + } + }, + "put": { + "tags": [ + "JobSteps" + ], + "description": "Creates or updates a job step. This will implicitly create a new job version.", + "operationId": "JobSteps_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested state of the job step.", + "required": true, + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 JobStepIdMismatch - Step Id in the specified Job Step URI does not match step id in provided Job Step Resource.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingJobAccountNameWithUrl - The provided job account name did not match the name in the Url.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "201": { + "description": "Successfully added the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + } + }, + "x-ms-examples": { + "Create or update a job step with minimal properties specified.": { + "$ref": "./examples/CreateOrUpdateJobStepMin.json" + }, + "Create or update a job step with all properties specified.": { + "$ref": "./examples/CreateOrUpdateJobStepMax.json" + } + } + }, + "delete": { + "tags": [ + "JobSteps" + ], + "description": "Deletes a job step. This will implicitly create a new job version.", + "operationId": "JobSteps_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the job step." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "The specified job step does not exist." + } + }, + "x-ms-examples": { + "Delete a job step.": { + "$ref": "./examples/DeleteJobStep.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets all job steps in the specified job version.", + "operationId": "JobSteps_ListByVersion", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobVersion", + "in": "path", + "description": "The version of the job to get.", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job steps.", + "schema": { + "$ref": "#/definitions/JobStepListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job steps for the specified version of a job.": { + "$ref": "./examples/ListJobStepsByVersion.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets the specified version of a job step.", + "operationId": "JobSteps_GetByVersion", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobVersion", + "in": "path", + "description": "The version of the job to get.", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get the specified version of a job step.": { + "$ref": "./examples/GetJobStepByVersion.json" + } + } + } + } + }, + "definitions": { + "JobStep": { + "description": "A job step.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobStepProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobStepAction": { + "description": "The action to be executed by a job step.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "type": { + "description": "Type of action being executed by the job step.", + "default": "TSql", + "enum": [ + "TSql" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStepActionType", + "modelAsString": true + } + }, + "source": { + "description": "The source of the action to execute.", + "default": "Inline", + "enum": [ + "Inline" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStepActionSource", + "modelAsString": true + } + }, + "value": { + "description": "The action value, for example the text of the T-SQL script to execute.", + "type": "string" + } + } + }, + "JobStepExecutionOptions": { + "description": "The execution options of a job step.", + "type": "object", + "properties": { + "timeoutSeconds": { + "format": "int32", + "description": "Execution timeout for the job step.", + "default": 43200, + "type": "integer" + }, + "retryAttempts": { + "format": "int32", + "description": "Maximum number of times the job step will be reattempted if the first attempt fails.", + "default": 10, + "type": "integer" + }, + "initialRetryIntervalSeconds": { + "format": "int32", + "description": "Initial delay between retries for job step execution.", + "default": 1, + "type": "integer" + }, + "maximumRetryIntervalSeconds": { + "format": "int32", + "description": "The maximum amount of time to wait between retries for job step execution.", + "default": 120, + "type": "integer" + }, + "retryIntervalBackoffMultiplier": { + "format": "float", + "description": "The backoff multiplier for the time between retries.", + "default": 2.0, + "type": "number" + } + } + }, + "JobStepListResult": { + "description": "A list of job steps.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobStep" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobStepOutput": { + "description": "The output configuration of a job step.", + "required": [ + "serverName", + "databaseName", + "tableName" + ], + "type": "object", + "properties": { + "type": { + "description": "The output destination type.", + "default": "SqlDatabase", + "enum": [ + "SqlDatabase" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStepOutputType", + "modelAsString": true + } + }, + "subscriptionId": { + "format": "uuid", + "description": "The output destination subscription id.", + "type": "string" + }, + "resourceGroupName": { + "description": "The output destination resource group.", + "type": "string" + }, + "serverName": { + "description": "The output destination server name.", + "type": "string" + }, + "databaseName": { + "description": "The output destination database.", + "type": "string" + }, + "schemaName": { + "description": "The output destination schema.", + "default": "dbo", + "type": "string" + }, + "tableName": { + "description": "The output destination table.", + "type": "string" + }, + "credential": { + "description": "The resource ID of the credential to use to connect to the output destination.", + "type": "string" + } + } + }, + "JobStepProperties": { + "description": "Properties of a job step.", + "required": [ + "targetGroup", + "action" + ], + "type": "object", + "properties": { + "stepId": { + "format": "int32", + "description": "The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified.", + "type": "integer" + }, + "targetGroup": { + "description": "The resource ID of the target group that the job step will be executed on.", + "type": "string" + }, + "credential": { + "description": "The resource ID of the job credential that will be used to connect to the targets.", + "type": "string" + }, + "action": { + "$ref": "#/definitions/JobStepAction", + "description": "The action payload of the job step." + }, + "output": { + "$ref": "#/definitions/JobStepOutput", + "description": "Output destination properties of the job step." + }, + "executionOptions": { + "$ref": "#/definitions/JobStepExecutionOptions", + "description": "Execution options for the job step." + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobTargetExecutions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobTargetExecutions.json new file mode 100644 index 000000000000..ac349e709cb1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobTargetExecutions.json @@ -0,0 +1,536 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets": { + "get": { + "tags": [ + "JobTargetExecutions" + ], + "description": "Lists the target executions of a job step execution.", + "operationId": "JobTargetExecutions_ListByStep", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the step.", + "required": true, + "type": "string" + }, + { + "name": "createTimeMin", + "in": "query", + "description": "If specified, only job executions created at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "createTimeMax", + "in": "query", + "description": "If specified, only job executions created before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMin", + "in": "query", + "description": "If specified, only job executions completed at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMax", + "in": "query", + "description": "If specified, only job executions completed before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "isActive", + "in": "query", + "description": "If specified, only active or only completed job executions are included.", + "required": false, + "type": "boolean" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the target executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job step target executions": { + "$ref": "./examples/ListJobExecutionTargetsByStep.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}": { + "get": { + "tags": [ + "JobTargetExecutions" + ], + "description": "Gets a target execution.", + "operationId": "JobTargetExecutions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The unique id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the step.", + "required": true, + "type": "string" + }, + { + "name": "targetId", + "in": "path", + "description": "The target id.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the target execution.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a job step target execution": { + "$ref": "./examples/GetJobExecutionTarget.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets": { + "get": { + "tags": [ + "JobTargetExecutions" + ], + "description": "Lists target executions for all steps of a job execution.", + "operationId": "JobTargetExecutions_ListByJobExecution", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "createTimeMin", + "in": "query", + "description": "If specified, only job executions created at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "createTimeMax", + "in": "query", + "description": "If specified, only job executions created before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMin", + "in": "query", + "description": "If specified, only job executions completed at or after the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeMax", + "in": "query", + "description": "If specified, only job executions completed before the specified time are included.", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "isActive", + "in": "query", + "description": "If specified, only active or only completed job executions are included.", + "required": false, + "type": "boolean" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the target executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job step target executions": { + "$ref": "./examples/ListJobExecutionTargetsByExecution.json" + } + } + } + } + }, + "definitions": { + "JobExecution": { + "description": "An execution of a job", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobExecutionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobExecutionListResult": { + "description": "A list of job executions.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecution" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecutionProperties": { + "description": "Properties for an Azure SQL Database Elastic job execution.", + "type": "object", + "properties": { + "jobVersion": { + "format": "int32", + "description": "The job version number.", + "type": "integer", + "readOnly": true + }, + "stepName": { + "description": "The job step name.", + "type": "string", + "readOnly": true + }, + "stepId": { + "format": "int32", + "description": "The job step id.", + "type": "integer", + "readOnly": true + }, + "jobExecutionId": { + "format": "uuid", + "description": "The unique identifier of the job execution.", + "type": "string", + "readOnly": true + }, + "lifecycle": { + "description": "The detailed state of the job execution.", + "enum": [ + "Created", + "InProgress", + "WaitingForChildJobExecutions", + "WaitingForRetry", + "Succeeded", + "SucceededWithSkipped", + "Failed", + "TimedOut", + "Canceled", + "Skipped" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobExecutionLifecycle", + "modelAsString": true + } + }, + "provisioningState": { + "description": "The ARM provisioning state of the job execution.", + "enum": [ + "Created", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "createTime": { + "format": "date-time", + "description": "The time that the job execution was created.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The time that the job execution started.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The time that the job execution completed.", + "type": "string", + "readOnly": true + }, + "currentAttempts": { + "format": "int32", + "description": "Number of times the job execution has been attempted.", + "type": "integer" + }, + "currentAttemptStartTime": { + "format": "date-time", + "description": "Start time of the current attempt.", + "type": "string", + "readOnly": true + }, + "lastMessage": { + "description": "The last status or error message.", + "type": "string", + "readOnly": true + }, + "target": { + "$ref": "#/definitions/JobExecutionTarget", + "description": "The target that this execution is executed on.", + "readOnly": true + } + } + }, + "JobExecutionTarget": { + "description": "The target that a job execution is executed on.", + "type": "object", + "properties": { + "type": { + "description": "The type of the target.", + "enum": [ + "TargetGroup", + "SqlDatabase", + "SqlElasticPool", + "SqlShardMap", + "SqlServer" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobTargetType", + "modelAsString": true + } + }, + "serverName": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The database name.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobTargetGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobTargetGroups.json new file mode 100644 index 000000000000..22eb75c2f128 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobTargetGroups.json @@ -0,0 +1,373 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups": { + "get": { + "tags": [ + "JobTargetGroups" + ], + "description": "Gets all target groups in an agent.", + "operationId": "JobTargetGroups_ListByAgent", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of target groups.", + "schema": { + "$ref": "#/definitions/JobTargetGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all target groups in an agent.": { + "$ref": "./examples/ListJobTargetGroups.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}": { + "get": { + "tags": [ + "JobTargetGroups" + ], + "description": "Gets a target group.", + "operationId": "JobTargetGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "targetGroupName", + "in": "path", + "description": "The name of the target group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the target group.", + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a target group.": { + "$ref": "./examples/GetJobTargetGroup.json" + } + } + }, + "put": { + "tags": [ + "JobTargetGroups" + ], + "description": "Creates or updates a target group.", + "operationId": "JobTargetGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "targetGroupName", + "in": "path", + "description": "The name of the target group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested state of the target group.", + "required": true, + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the target group.", + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingJobAccountNameWithUrl - The provided job account name did not match the name in the Url.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + }, + "201": { + "description": "Successfully created the target group.", + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + } + }, + "x-ms-examples": { + "Create or update a target group with minimal properties.": { + "$ref": "./examples/CreateOrUpdateJobTargetGroupMin.json" + }, + "Create or update a target group with all properties.": { + "$ref": "./examples/CreateOrUpdateJobTargetGroupMax.json" + } + } + }, + "delete": { + "tags": [ + "JobTargetGroups" + ], + "description": "Deletes a target group.", + "operationId": "JobTargetGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "targetGroupName", + "in": "path", + "description": "The name of the target group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the target group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "A target group with the specified name does not exist." + } + }, + "x-ms-examples": { + "Delete a target group.": { + "$ref": "./examples/DeleteJobTargetGroup.json" + } + } + } + } + }, + "definitions": { + "JobTarget": { + "description": "A job target, for example a specific database or a container of databases that is evaluated during job execution.", + "required": [ + "type" + ], + "type": "object", + "properties": { + "membershipType": { + "description": "Whether the target is included or excluded from the group.", + "default": "Include", + "enum": [ + "Include", + "Exclude" + ], + "type": "string", + "x-ms-enum": { + "name": "JobTargetGroupMembershipType", + "modelAsString": false + } + }, + "type": { + "description": "The target type.", + "enum": [ + "TargetGroup", + "SqlDatabase", + "SqlElasticPool", + "SqlShardMap", + "SqlServer" + ], + "type": "string", + "x-ms-enum": { + "name": "JobTargetType", + "modelAsString": true + } + }, + "serverName": { + "description": "The target server name.", + "type": "string" + }, + "databaseName": { + "description": "The target database name.", + "type": "string" + }, + "elasticPoolName": { + "description": "The target elastic pool name.", + "type": "string" + }, + "shardMapName": { + "description": "The target shard map.", + "type": "string" + }, + "refreshCredential": { + "description": "The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target.", + "type": "string" + } + } + }, + "JobTargetGroup": { + "description": "A group of job targets.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobTargetGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobTargetGroupListResult": { + "description": "A list of target groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobTargetGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobTargetGroupProperties": { + "description": "Properties of job target group.", + "required": [ + "members" + ], + "type": "object", + "properties": { + "members": { + "description": "Members of the target group.", + "type": "array", + "items": { + "$ref": "#/definitions/JobTarget" + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobVersions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobVersions.json new file mode 100644 index 000000000000..0cdd14740816 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobVersions.json @@ -0,0 +1,189 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions": { + "get": { + "tags": [ + "JobVersions" + ], + "description": "Gets all versions of a job.", + "operationId": "JobVersions_ListByJob", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of versions.", + "schema": { + "$ref": "#/definitions/JobVersionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all versions of a job.": { + "$ref": "./examples/ListJobVersions.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}": { + "get": { + "tags": [ + "JobVersions" + ], + "description": "Gets a job version.", + "operationId": "JobVersions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobVersion", + "in": "path", + "description": "The version of the job to get.", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job version.", + "schema": { + "$ref": "#/definitions/JobVersion" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Get a version of a job.": { + "$ref": "./examples/GetJobVersion.json" + } + } + } + } + }, + "definitions": { + "JobVersion": { + "description": "A job version.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": {} + }, + "JobVersionListResult": { + "description": "A list of job versions.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobVersion" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Jobs.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Jobs.json new file mode 100644 index 000000000000..9e9e5d6cffde --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Jobs.json @@ -0,0 +1,360 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs": { + "get": { + "tags": [ + "Jobs" + ], + "description": "Gets a list of jobs.", + "operationId": "Jobs_ListByAgent", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of jobs.", + "schema": { + "$ref": "#/definitions/JobListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List jobs in a job agent": { + "$ref": "./examples/ListJobsByAgent.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}": { + "get": { + "tags": [ + "Jobs" + ], + "description": "Gets a job.", + "operationId": "Jobs_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job.", + "schema": { + "$ref": "#/definitions/Job" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a job": { + "$ref": "./examples/GetJob.json" + } + } + }, + "put": { + "tags": [ + "Jobs" + ], + "description": "Creates or updates a job.", + "operationId": "Jobs_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested job state.", + "required": true, + "schema": { + "$ref": "#/definitions/Job" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job.", + "schema": { + "$ref": "#/definitions/Job" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidDuration - Invalid duration.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + }, + "201": { + "description": "Successfully created the job.", + "schema": { + "$ref": "#/definitions/Job" + } + } + }, + "x-ms-examples": { + "Create a job with default properties": { + "$ref": "./examples/CreateOrUpdateJobMin.json" + }, + "Create a job with all properties specified": { + "$ref": "./examples/CreateOrUpdateJobMax.json" + } + } + }, + "delete": { + "tags": [ + "Jobs" + ], + "description": "Deletes a job.", + "operationId": "Jobs_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the job." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "The specified job does not exist." + } + }, + "x-ms-examples": { + "Delete a job": { + "$ref": "./examples/DeleteJob.json" + } + } + } + } + }, + "definitions": { + "Job": { + "description": "A job.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobListResult": { + "description": "A list of jobs.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Job" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobProperties": { + "description": "Properties of a job.", + "type": "object", + "properties": { + "description": { + "description": "User-defined description of the job.", + "default": "", + "type": "string" + }, + "version": { + "format": "int32", + "description": "The job version number.", + "type": "integer", + "readOnly": true + }, + "schedule": { + "$ref": "#/definitions/JobSchedule", + "description": "Schedule properties of the job." + } + } + }, + "JobSchedule": { + "description": "Scheduling properties of a job.", + "type": "object", + "properties": { + "startTime": { + "format": "date-time", + "description": "Schedule start time.", + "default": "0001-01-01T16:00:00-08:00", + "type": "string" + }, + "endTime": { + "format": "date-time", + "description": "Schedule end time.", + "default": "9999-12-31T03:59:59-08:00", + "type": "string" + }, + "type": { + "description": "Schedule interval type", + "default": "Once", + "enum": [ + "Once", + "Recurring" + ], + "type": "string", + "x-ms-enum": { + "name": "JobScheduleType", + "modelAsString": false + } + }, + "enabled": { + "description": "Whether or not the schedule is enabled.", + "type": "boolean" + }, + "interval": { + "description": "Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format.", + "type": "string" + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LedgerDigestUploads.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LedgerDigestUploads.json new file mode 100644 index 000000000000..5b76f1c44c54 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LedgerDigestUploads.json @@ -0,0 +1,333 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads": { + "get": { + "tags": [ + "LedgerDigestUploads" + ], + "description": "Gets all ledger digest upload settings on a database.", + "operationId": "LedgerDigestUploads_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved ledger upload settings.", + "schema": { + "$ref": "#/definitions/LedgerDigestUploadsListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of ledger digest upload settings on a database.": { + "$ref": "./examples/LedgerDigestUploadsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}": { + "get": { + "tags": [ + "LedgerDigestUploads" + ], + "description": "Gets the current ledger digest upload configuration for a database.", + "operationId": "LedgerDigestUploads_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "ledgerDigestUploads", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "LedgerDigestUploadsName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the ledger digest configuration.", + "schema": { + "$ref": "#/definitions/LedgerDigestUploads" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Gets the current ledger digest upload configuration for a database.": { + "$ref": "./examples/LedgerDigestUploadsGet.json" + } + } + }, + "put": { + "tags": [ + "LedgerDigestUploads" + ], + "description": "Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance.", + "operationId": "LedgerDigestUploads_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "ledgerDigestUploads", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "LedgerDigestUploadsName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LedgerDigestUploads" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the ledger digest upload configuration", + "schema": { + "$ref": "#/definitions/LedgerDigestUploads" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 400 LedgerMissingDigestStorageEndPoint - User attempted to configure ledger digest storage without providing an endpoint\n\n * 400 LedgerException - The server encountered an unexpected exception\n\n * 400 LedgerDigestOutboundFirewallRuleException - Failed to update ledger digest due to outbound firewall rules\n\n * 400 LedgerDigestUploadsNotSupportedOnGeoSecondary - The ledger digest storage cannot be configured on secondary databases.\n\n * 400 InsufficientStorageAccountPermissions - Read or write operations are not allowed on the storage account.\n\n * 400 StorageAccountIsDisabled - The storage account is disabled.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 400 PreviousOperationInProgress - Uploading ledger digests is being enabled or disabled for database. Please wait for the previous request to complete.\n\n * 400 NoServerIdentity - No identity is configured for specified server. For information on how to configure an identity for the server see https://go.microsoft.com/fwlink/?linkid=2156804\n\n * 400 SubscriptionDoesNotHaveServer - Subscription does not contain server.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered. The error message from Active Directory Authentication library (ADAL) is {0}.\n\n * 400 LedgerDigestUploadIsNotSupportedOnResourceType - Uploading ledger digests is currently not supported for this resource type.\n\n * 400 InvalidOperationOnNamedReplicas - The ledger digest storage cannot be configured on a named replica.\n\n * 400 LedgerDigestUploadsNotSupportedOnGeoChaining - User attempted to set automatic upload of ledger digest in database configured with secondaries of secondaries.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SourceDatabaseNotFound - Specified database does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Updating the ledger digest upload configuration is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Enables ledger digest upload configuration for a database": { + "$ref": "./examples/LedgerDigestUploadsEnable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable": { + "post": { + "tags": [ + "LedgerDigestUploads" + ], + "description": "Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance.", + "operationId": "LedgerDigestUploads_Disable", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "ledgerDigestUploads", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "LedgerDigestUploadsName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled uploading ledger digests", + "schema": { + "$ref": "#/definitions/LedgerDigestUploads" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 400 LedgerMissingDigestStorageEndPoint - User attempted to configure ledger digest storage without providing an endpoint\n\n * 400 LedgerException - The server encountered an unexpected exception\n\n * 400 LedgerDigestOutboundFirewallRuleException - Failed to update ledger digest due to outbound firewall rules\n\n * 400 LedgerDigestUploadsNotSupportedOnGeoSecondary - The ledger digest storage cannot be configured on secondary databases.\n\n * 400 InsufficientStorageAccountPermissions - Read or write operations are not allowed on the storage account.\n\n * 400 StorageAccountIsDisabled - The storage account is disabled.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 400 PreviousOperationInProgress - Uploading ledger digests is being enabled or disabled for database. Please wait for the previous request to complete.\n\n * 400 NoServerIdentity - No identity is configured for specified server. For information on how to configure an identity for the server see https://go.microsoft.com/fwlink/?linkid=2156804\n\n * 400 SubscriptionDoesNotHaveServer - Subscription does not contain server.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered. The error message from Active Directory Authentication library (ADAL) is {0}.\n\n * 400 LedgerDigestUploadIsNotSupportedOnResourceType - Uploading ledger digests is currently not supported for this resource type.\n\n * 400 InvalidOperationOnNamedReplicas - The ledger digest storage cannot be configured on a named replica.\n\n * 400 LedgerDigestUploadsNotSupportedOnGeoChaining - User attempted to set automatic upload of ledger digest in database configured with secondaries of secondaries.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SourceDatabaseNotFound - Specified database does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Disabling the ledger digest upload is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Disables uploading ledger digests for a database": { + "$ref": "./examples/LedgerDigestUploadsDisable.json" + } + } + } + } + }, + "definitions": { + "LedgerDigestUploads": { + "description": "Azure SQL Database ledger digest upload settings.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/LedgerDigestUploadsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "LedgerDigestUploadsListResult": { + "description": "A list of ledger digest upload settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/LedgerDigestUploads" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "LedgerDigestUploadsProperties": { + "description": "The properties of a database ledger digest upload settings.", + "type": "object", + "properties": { + "digestStorageEndpoint": { + "description": "The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger.", + "type": "string" + }, + "state": { + "description": "Specifies the state of ledger digest upload.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "LedgerDigestUploadsState", + "modelAsString": false + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LocationCapabilities.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LocationCapabilities.json new file mode 100644 index 000000000000..009b1b0b7546 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LocationCapabilities.json @@ -0,0 +1,1616 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/capabilities": { + "get": { + "tags": [ + "LocationCapabilities" + ], + "description": "Gets the subscription capabilities available for the specified location.", + "operationId": "Capabilities_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location name whose capabilities are retrieved.", + "required": true, + "type": "string" + }, + { + "name": "include", + "in": "query", + "description": "If specified, restricts the response to only include the selected item.", + "required": false, + "type": "string", + "enum": [ + "supportedEditions", + "supportedElasticPoolEditions", + "supportedManagedInstanceVersions", + "supportedInstancePoolEditions", + "supportedManagedInstanceEditions", + "supportedJobAgentVersions" + ], + "x-ms-enum": { + "name": "CapabilityGroup", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the subscription location capabilities.", + "schema": { + "$ref": "#/definitions/LocationCapabilities" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 404 SubscriptionNotFound - The requested subscription was not found." + } + }, + "x-ms-examples": { + "List subscription capabilities in the given location.": { + "$ref": "./examples/LocationCapabilityListByLocation.json" + } + } + } + } + }, + "definitions": { + "AutoPauseDelayTimeRange": { + "description": "Supported auto pause delay time range", + "type": "object", + "properties": { + "minValue": { + "format": "int32", + "description": "Minimum value", + "type": "integer", + "readOnly": true + }, + "maxValue": { + "format": "int32", + "description": "Maximum value", + "type": "integer", + "readOnly": true + }, + "stepSize": { + "format": "int32", + "description": "Step value for discrete values between the minimum value and the maximum value.", + "type": "integer", + "readOnly": true + }, + "default": { + "format": "int32", + "description": "Default value is no value is provided", + "type": "integer", + "readOnly": true + }, + "unit": { + "description": "Unit of time that delay is expressed in", + "enum": [ + "Minutes" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PauseDelayTimeUnit", + "modelAsString": true + } + }, + "doNotPauseValue": { + "format": "int32", + "description": "Value that is used to not pause (infinite delay before pause)", + "type": "integer", + "readOnly": true + } + } + }, + "EditionCapability": { + "description": "The edition capability.", + "type": "object", + "properties": { + "name": { + "description": "The database edition name.", + "type": "string", + "readOnly": true + }, + "supportedServiceLevelObjectives": { + "description": "The list of supported service objectives for the edition.", + "type": "array", + "items": { + "$ref": "#/definitions/ServiceObjectiveCapability" + }, + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the edition.", + "type": "boolean", + "readOnly": true + }, + "readScale": { + "$ref": "#/definitions/ReadScaleCapability", + "description": "The read scale capability for the edition.", + "readOnly": true + }, + "supportedStorageCapabilities": { + "description": "The list of supported storage capabilities for this edition", + "type": "array", + "items": { + "$ref": "#/definitions/StorageCapability" + }, + "readOnly": true + }, + "zonePinning": { + "description": "Whether or not zone pinning is supported for the edition.", + "type": "boolean", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ElasticPoolEditionCapability": { + "description": "The elastic pool edition capability.", + "type": "object", + "properties": { + "name": { + "description": "The elastic pool edition name.", + "type": "string", + "readOnly": true + }, + "supportedElasticPoolPerformanceLevels": { + "description": "The list of supported elastic pool DTU levels for the edition.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPoolPerformanceLevelCapability" + }, + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the edition.", + "type": "boolean", + "readOnly": true + }, + "zonePinning": { + "description": "Whether or not zone pinning is supported for the edition.", + "type": "boolean", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ElasticPoolPerDatabaseMaxPerformanceLevelCapability": { + "description": "The max per-database performance level capability.", + "type": "object", + "properties": { + "limit": { + "format": "double", + "description": "The maximum performance level per database.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit type used to measure performance level.", + "enum": [ + "DTU", + "VCores" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PerformanceLevelUnit", + "modelAsString": true + } + }, + "supportedPerDatabaseMinPerformanceLevels": { + "description": "The list of supported min database performance levels.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPoolPerDatabaseMinPerformanceLevelCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ElasticPoolPerDatabaseMinPerformanceLevelCapability": { + "description": "The minimum per-database performance level capability.", + "type": "object", + "properties": { + "limit": { + "format": "double", + "description": "The minimum performance level per database.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit type used to measure performance level.", + "enum": [ + "DTU", + "VCores" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PerformanceLevelUnit", + "modelAsString": true + } + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ElasticPoolPerformanceLevelCapability": { + "description": "The Elastic Pool performance level capability.", + "type": "object", + "properties": { + "performanceLevel": { + "$ref": "#/definitions/PerformanceLevelCapability", + "description": "The performance level for the pool.", + "readOnly": true + }, + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The sku.", + "readOnly": true + }, + "supportedLicenseTypes": { + "description": "List of supported license types.", + "type": "array", + "items": { + "$ref": "#/definitions/LicenseTypeCapability" + }, + "readOnly": true + }, + "maxDatabaseCount": { + "format": "int32", + "description": "The maximum number of databases supported.", + "type": "integer", + "readOnly": true + }, + "includedMaxSize": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "The included (free) max size for this performance level.", + "readOnly": true + }, + "supportedMaxSizes": { + "description": "The list of supported max sizes.", + "type": "array", + "items": { + "$ref": "#/definitions/MaxSizeRangeCapability" + }, + "readOnly": true + }, + "supportedPerDatabaseMaxSizes": { + "description": "The list of supported per database max sizes.", + "type": "array", + "items": { + "$ref": "#/definitions/MaxSizeRangeCapability" + }, + "readOnly": true + }, + "supportedPerDatabaseMaxPerformanceLevels": { + "description": "The list of supported per database max performance levels.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPoolPerDatabaseMaxPerformanceLevelCapability" + }, + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the performance level.", + "type": "boolean", + "readOnly": true + }, + "supportedMaintenanceConfigurations": { + "description": "List of supported maintenance configurations", + "type": "array", + "items": { + "$ref": "#/definitions/MaintenanceConfigurationCapability" + }, + "readOnly": true + }, + "supportedMinCapacities": { + "description": "List of supported min capacities", + "type": "array", + "items": { + "$ref": "#/definitions/MinCapacityCapability" + }, + "readOnly": true, + "x-ms-identifiers": [] + }, + "supportedAutoPauseDelay": { + "$ref": "#/definitions/AutoPauseDelayTimeRange", + "description": "Supported time range for auto pause delay", + "readOnly": true + }, + "supportedPerDatabaseAutoPauseDelay": { + "$ref": "#/definitions/PerDatabaseAutoPauseDelayTimeRange", + "description": "Supported time range for per database auto pause delay", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "FreeLimitExhaustionBehaviorCapability": { + "description": "Supported free limit exhaustion behavior options", + "type": "object", + "properties": { + "exhaustionBehaviorType": { + "description": "Free limit exhaustion behavior type", + "enum": [ + "AutoPause", + "BillOverUsage" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "FreeLimitExhaustionBehavior", + "modelAsString": true + } + }, + "status": { + "description": "Free limit exhaustion behavior status", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + } + } + }, + "InstancePoolEditionCapability": { + "description": "The instance pool capability", + "type": "object", + "properties": { + "name": { + "description": "The instance pool version name.", + "type": "string", + "readOnly": true + }, + "supportedFamilies": { + "description": "The supported families.", + "type": "array", + "items": { + "$ref": "#/definitions/InstancePoolFamilyCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "InstancePoolFamilyCapability": { + "description": "The instance pool family capability.", + "type": "object", + "properties": { + "name": { + "description": "Family name.", + "type": "string", + "readOnly": true + }, + "supportedLicenseTypes": { + "description": "List of supported license types.", + "type": "array", + "items": { + "$ref": "#/definitions/LicenseTypeCapability" + }, + "readOnly": true + }, + "supportedVcoresValues": { + "description": "List of supported virtual cores values.", + "type": "array", + "items": { + "$ref": "#/definitions/InstancePoolVcoresCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "InstancePoolVcoresCapability": { + "description": "The managed instance virtual cores capability.", + "type": "object", + "properties": { + "name": { + "description": "The virtual cores identifier.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "int32", + "description": "The virtual cores value.", + "type": "integer", + "readOnly": true + }, + "storageLimit": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "Storage limit.", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "JobAgentEditionCapability": { + "description": "The job agent edition capability.", + "type": "object", + "properties": { + "name": { + "description": "The job agent edition name.", + "type": "string", + "readOnly": true + }, + "supportedServiceLevelObjectives": { + "description": "The list of supported service level objectives for the edition.", + "type": "array", + "items": { + "$ref": "#/definitions/JobAgentServiceLevelObjectiveCapability" + }, + "readOnly": true, + "x-ms-identifiers": [] + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "JobAgentServiceLevelObjectiveCapability": { + "description": "The job agent service level objective capability.", + "type": "object", + "properties": { + "name": { + "description": "The service objective name.", + "type": "string", + "readOnly": true + }, + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The sku.", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "JobAgentVersionCapability": { + "description": "The job agent version capability.", + "type": "object", + "properties": { + "name": { + "description": "The job agent version name.", + "type": "string", + "readOnly": true + }, + "supportedEditions": { + "description": "The list of supported editions.", + "type": "array", + "items": { + "$ref": "#/definitions/JobAgentEditionCapability" + }, + "readOnly": true, + "x-ms-identifiers": [] + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "LicenseTypeCapability": { + "description": "The license type capability", + "type": "object", + "properties": { + "name": { + "description": "License type identifier.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "LocationCapabilities": { + "description": "The location capability.", + "type": "object", + "properties": { + "name": { + "description": "The location name.", + "type": "string", + "readOnly": true + }, + "supportedServerVersions": { + "description": "The list of supported server versions.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerVersionCapability" + }, + "readOnly": true + }, + "supportedManagedInstanceVersions": { + "description": "The list of supported managed instance versions.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceVersionCapability" + }, + "readOnly": true + }, + "supportedJobAgentVersions": { + "description": "The list of supported job agent versions.", + "type": "array", + "items": { + "$ref": "#/definitions/JobAgentVersionCapability" + }, + "readOnly": true, + "x-ms-identifiers": [] + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "LogSizeCapability": { + "description": "The log size capability.", + "type": "object", + "properties": { + "limit": { + "format": "int32", + "description": "The log size limit (see 'unit' for the units).", + "type": "integer", + "readOnly": true + }, + "unit": { + "description": "The units that the limit is expressed in.", + "enum": [ + "Megabytes", + "Gigabytes", + "Terabytes", + "Petabytes", + "Percent" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "LogSizeUnit", + "modelAsString": true + } + } + } + }, + "MaintenanceConfigurationCapability": { + "description": "The maintenance configuration capability", + "type": "object", + "properties": { + "name": { + "description": "Maintenance configuration name", + "type": "string", + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the maintenance configuration.", + "type": "boolean", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ManagedInstanceEditionCapability": { + "description": "The managed server capability", + "type": "object", + "properties": { + "name": { + "description": "The managed server version name.", + "type": "string", + "readOnly": true + }, + "isGeneralPurposeV2": { + "description": "Whether or not this is a GPv2 variant of General Purpose edition.", + "type": "boolean", + "readOnly": true + }, + "supportedFamilies": { + "description": "The supported families.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceFamilyCapability" + }, + "readOnly": true + }, + "supportedStorageCapabilities": { + "description": "The list of supported storage capabilities for this edition", + "type": "array", + "items": { + "$ref": "#/definitions/StorageCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ManagedInstanceFamilyCapability": { + "description": "The managed server family capability.", + "type": "object", + "properties": { + "name": { + "description": "Family name.", + "type": "string", + "readOnly": true + }, + "sku": { + "description": "SKU name.", + "type": "string", + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the family.", + "type": "boolean", + "readOnly": true + }, + "supportedLicenseTypes": { + "description": "List of supported license types.", + "type": "array", + "items": { + "$ref": "#/definitions/LicenseTypeCapability" + }, + "readOnly": true + }, + "supportedVcoresValues": { + "description": "List of supported virtual cores values.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceVcoresCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ManagedInstanceMaintenanceConfigurationCapability": { + "description": "The maintenance configuration capability", + "type": "object", + "properties": { + "name": { + "description": "Maintenance configuration name", + "type": "string", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ManagedInstanceVcoresCapability": { + "description": "The managed instance virtual cores capability.", + "type": "object", + "properties": { + "name": { + "description": "The virtual cores identifier.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "int32", + "description": "The virtual cores value.", + "type": "integer", + "readOnly": true + }, + "includedMaxSize": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "Included size.", + "readOnly": true + }, + "supportedStorageSizes": { + "description": "Storage size ranges.", + "type": "array", + "items": { + "$ref": "#/definitions/MaxSizeRangeCapability" + }, + "readOnly": true + }, + "includedStorageIOps": { + "format": "int64", + "description": "Included storage IOps.", + "type": "integer", + "readOnly": true + }, + "supportedStorageIOps": { + "$ref": "#/definitions/MaxLimitRangeCapability", + "description": "Storage IOps ranges.", + "readOnly": true + }, + "iopsMinValueOverrideFactorPerSelectedStorageGB": { + "format": "double", + "description": "Min IOps override factor per selected storage GB.", + "type": "number", + "readOnly": true + }, + "iopsIncludedValueOverrideFactorPerSelectedStorageGB": { + "format": "double", + "description": "Included IOps override factor per selected storage GB.", + "type": "number", + "readOnly": true + }, + "includedStorageThroughputMBps": { + "format": "int64", + "description": "Included storage throughput MBps.", + "type": "integer", + "readOnly": true + }, + "supportedStorageThroughputMBps": { + "$ref": "#/definitions/MaxLimitRangeCapability", + "description": "Storage throughput MBps ranges.", + "readOnly": true + }, + "throughputMBpsMinValueOverrideFactorPerSelectedStorageGB": { + "format": "double", + "description": "Min throughput MBps override factor per selected storage GB.", + "type": "number", + "readOnly": true + }, + "throughputMBpsIncludedValueOverrideFactorPerSelectedStorageGB": { + "format": "double", + "description": "Included throughput MBps override factor per selected storage GB.", + "type": "number", + "readOnly": true + }, + "instancePoolSupported": { + "description": "True if this service objective is supported for managed instances in an instance pool.", + "type": "boolean", + "readOnly": true + }, + "standaloneSupported": { + "description": "True if this service objective is supported for standalone managed instances.", + "type": "boolean", + "readOnly": true + }, + "supportedMaintenanceConfigurations": { + "description": "List of supported maintenance configurations", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceMaintenanceConfigurationCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ManagedInstanceVersionCapability": { + "description": "The managed instance capability", + "type": "object", + "properties": { + "name": { + "description": "The server version name.", + "type": "string", + "readOnly": true + }, + "supportedEditions": { + "description": "The list of supported managed instance editions.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceEditionCapability" + }, + "readOnly": true + }, + "supportedInstancePoolEditions": { + "description": "The list of supported instance pool editions.", + "type": "array", + "items": { + "$ref": "#/definitions/InstancePoolEditionCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "MaxLimitRangeCapability": { + "description": "The maximum limit range capability.", + "type": "object", + "properties": { + "minValue": { + "format": "int64", + "description": "Minimum value.", + "type": "integer", + "readOnly": true + }, + "maxValue": { + "format": "int64", + "description": "Maximum value.", + "type": "integer", + "readOnly": true + }, + "scaleSize": { + "format": "int64", + "description": "Scale/step size for discrete values between the minimum value and the maximum value.", + "type": "integer", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "MaxSizeCapability": { + "description": "The maximum size capability.", + "type": "object", + "properties": { + "limit": { + "format": "int32", + "description": "The maximum size limit (see 'unit' for the units).", + "type": "integer", + "readOnly": true + }, + "unit": { + "description": "The units that the limit is expressed in.", + "enum": [ + "Megabytes", + "Gigabytes", + "Terabytes", + "Petabytes" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "MaxSizeUnit", + "modelAsString": true + } + } + } + }, + "MaxSizeRangeCapability": { + "description": "The maximum size range capability.", + "type": "object", + "properties": { + "minValue": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "Minimum value.", + "readOnly": true + }, + "maxValue": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "Maximum value.", + "readOnly": true + }, + "scaleSize": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "Scale/step size for discrete values between the minimum value and the maximum value.", + "readOnly": true + }, + "logSize": { + "$ref": "#/definitions/LogSizeCapability", + "description": "Size of transaction log.", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "MinCapacityCapability": { + "description": "The min capacity capability", + "type": "object", + "properties": { + "value": { + "format": "double", + "description": "Min capacity value", + "type": "number", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "PerDatabaseAutoPauseDelayTimeRange": { + "description": "Supported auto pause delay time range", + "type": "object", + "properties": { + "minValue": { + "format": "int32", + "description": "Minimum value", + "type": "integer", + "readOnly": true + }, + "maxValue": { + "format": "int32", + "description": "Maximum value", + "type": "integer", + "readOnly": true + }, + "stepSize": { + "format": "int32", + "description": "Step value for discrete values between the minimum value and the maximum value.", + "type": "integer", + "readOnly": true + }, + "default": { + "format": "int32", + "description": "Default value if no value is provided", + "type": "integer", + "readOnly": true + }, + "unit": { + "description": "Unit of time that delay is expressed in", + "enum": [ + "Minutes" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PauseDelayTimeUnit", + "modelAsString": true + } + }, + "doNotPauseValue": { + "format": "int32", + "description": "Value that is used to not pause (infinite delay before pause)", + "type": "integer", + "readOnly": true + } + } + }, + "PerformanceLevelCapability": { + "description": "The performance level capability.", + "type": "object", + "properties": { + "value": { + "format": "double", + "description": "Performance level value.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit type used to measure performance level.", + "enum": [ + "DTU", + "VCores" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PerformanceLevelUnit", + "modelAsString": true + } + } + } + }, + "ReadScaleCapability": { + "description": "The read scale capability.", + "type": "object", + "properties": { + "maxNumberOfReplicas": { + "format": "int32", + "description": "The maximum number of read scale replicas.", + "type": "integer", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ServerVersionCapability": { + "description": "The server capability", + "type": "object", + "properties": { + "name": { + "description": "The server version name.", + "type": "string", + "readOnly": true + }, + "supportedEditions": { + "description": "The list of supported database editions.", + "type": "array", + "items": { + "$ref": "#/definitions/EditionCapability" + }, + "readOnly": true + }, + "supportedElasticPoolEditions": { + "description": "The list of supported elastic pool editions.", + "type": "array", + "items": { + "$ref": "#/definitions/ElasticPoolEditionCapability" + }, + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "ServiceObjectiveCapability": { + "description": "The service objectives capability.", + "type": "object", + "properties": { + "id": { + "format": "uuid", + "description": "The unique ID of the service objective.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The service objective name.", + "type": "string", + "readOnly": true + }, + "supportedMaxSizes": { + "description": "The list of supported maximum database sizes.", + "type": "array", + "items": { + "$ref": "#/definitions/MaxSizeRangeCapability" + }, + "readOnly": true + }, + "performanceLevel": { + "$ref": "#/definitions/PerformanceLevelCapability", + "description": "The performance level.", + "readOnly": true + }, + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The sku.", + "readOnly": true + }, + "supportedLicenseTypes": { + "description": "List of supported license types.", + "type": "array", + "items": { + "$ref": "#/definitions/LicenseTypeCapability" + }, + "readOnly": true + }, + "includedMaxSize": { + "$ref": "#/definitions/MaxSizeCapability", + "description": "The included (free) max size.", + "readOnly": true + }, + "zoneRedundant": { + "description": "Whether or not zone redundancy is supported for the service objective.", + "type": "boolean", + "readOnly": true + }, + "supportedAutoPauseDelay": { + "$ref": "#/definitions/AutoPauseDelayTimeRange", + "description": "Supported time range for auto pause delay", + "readOnly": true + }, + "supportedMinCapacities": { + "description": "List of supported min capacities", + "type": "array", + "items": { + "$ref": "#/definitions/MinCapacityCapability" + }, + "readOnly": true + }, + "computeModel": { + "description": "The compute model", + "type": "string", + "readOnly": true + }, + "supportedMaintenanceConfigurations": { + "description": "List of supported maintenance configurations", + "type": "array", + "items": { + "$ref": "#/definitions/MaintenanceConfigurationCapability" + }, + "readOnly": true + }, + "zonePinning": { + "description": "Whether or not zone pinning is supported.", + "type": "boolean", + "readOnly": true + }, + "supportedFreeLimitExhaustionBehaviors": { + "description": "List of supported free limit exhaustion behaviors", + "type": "array", + "items": { + "$ref": "#/definitions/FreeLimitExhaustionBehaviorCapability" + }, + "readOnly": true, + "x-ms-identifiers": [] + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + }, + "StorageCapability": { + "description": "The storage account type capability.", + "type": "object", + "properties": { + "storageAccountType": { + "description": "The storage account type for the database's backups.", + "enum": [ + "GRS", + "LRS", + "ZRS", + "GZRS" + ], + "type": "string", + "readOnly": true + }, + "status": { + "description": "The status of the capability.", + "enum": [ + "Visible", + "Available", + "Default", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CapabilityStatus", + "modelAsString": false + } + }, + "reason": { + "description": "The reason for the capability not being available.", + "type": "string" + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionBackups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionBackups.json new file mode 100644 index 000000000000..c519e9b5b58d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionBackups.json @@ -0,0 +1,1492 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists the long term retention backups for a given location.", + "operationId": "LongTermRetentionBackups_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the location.": { + "$ref": "./examples/LongTermRetentionBackupListByLocation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists the long term retention backups for a given server.", + "operationId": "LongTermRetentionBackups_ListByServer", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the server.": { + "$ref": "./examples/LongTermRetentionBackupListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists all long term retention backups for a database.", + "operationId": "LongTermRetentionBackups_ListByDatabase", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the database.": { + "$ref": "./examples/LongTermRetentionBackupListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Gets a long term retention backup.", + "operationId": "LongTermRetentionBackups_Get", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 DeleteLtrSubscriptionMissing - The subscription ID is required to delete a long-term retention backup.\n\n * 400 DeleteLtrServerMissing - The server name is required to delete a long-term retention backup.\n\n * 400 DeleteLtrDatabaseMissing - The database name is required to delete a long-term retention backup.\n\n * 400 LtrBackupResourceIdIncorrect - The provided long-term retention backup resource ID or backup name is incorrect.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the long term retention backup.": { + "$ref": "./examples/LongTermRetentionBackupGet.json" + } + } + }, + "delete": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Deletes a long term retention backup.", + "operationId": "LongTermRetentionBackups_Delete", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the backup." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 DeleteLtrSubscriptionMissing - The subscription ID is required to delete a long-term retention backup.\n\n * 400 DeleteLtrServerMissing - The server name is required to delete a long-term retention backup.\n\n * 400 DeleteLtrDatabaseMissing - The database name is required to delete a long-term retention backup.\n\n * 400 LtrBackupResourceIdIncorrect - The provided long-term retention backup resource ID or backup name is incorrect.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the long term retention backup.": { + "$ref": "./examples/LongTermRetentionBackupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/changeAccessTier": { + "post": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Change a long term retention backup access tier.", + "operationId": "LongTermRetentionBackups_ChangeAccessTier", + "parameters": [ + { + "name": "locationName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ChangeLongTermRetentionBackupAccessTierParameters" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully changed the long term retention backup access tier.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 DeleteLtrSubscriptionMissing - The subscription ID is required to delete a long-term retention backup.\n\n * 400 DeleteLtrServerMissing - The server name is required to delete a long-term retention backup.\n\n * 400 DeleteLtrDatabaseMissing - The database name is required to delete a long-term retention backup.\n\n * 400 LtrBackupResourceIdIncorrect - The provided long-term retention backup resource ID or backup name is incorrect.\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LtrOperationFailedBackupImmutable - Deleting Long Term Retention backup failed because the backup is immutable.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 400 LongTermRetentionMigrationBackupStorageRedundancyNotAllowed - Changing backup storage redundancy is not allowed for LTR Copy operations.\n\n * 400 LongTermRetentionMigrationSubscriptionNotFound - The subscription could not be found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Change the long term retention backup storage access tier.": { + "$ref": "./examples/ChangeLongTermRetentionBackupAccessTier.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy": { + "post": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Copy an existing long term retention backup.", + "operationId": "LongTermRetentionBackups_Copy", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters needed for long term retention copy request", + "required": true, + "schema": { + "$ref": "#/definitions/CopyLongTermRetentionBackupParameters" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully copied the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 DeleteLtrSubscriptionMissing - The subscription ID is required to delete a long-term retention backup.\n\n * 400 DeleteLtrServerMissing - The server name is required to delete a long-term retention backup.\n\n * 400 DeleteLtrDatabaseMissing - The database name is required to delete a long-term retention backup.\n\n * 400 LtrBackupResourceIdIncorrect - The provided long-term retention backup resource ID or backup name is incorrect.\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LtrOperationFailedBackupImmutable - Deleting Long Term Retention backup failed because the backup is immutable.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 400 LongTermRetentionMigrationBackupStorageRedundancyNotAllowed - Changing backup storage redundancy is not allowed for LTR Copy operations.\n\n * 400 LongTermRetentionMigrationSubscriptionNotFound - The subscription could not be found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Copying the backup is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Copy the long term retention backup.": { + "$ref": "./examples/LongTermRetentionBackupCopy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update": { + "post": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Updates an existing long term retention backup.", + "operationId": "LongTermRetentionBackups_Update", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested backup resource state", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateLongTermRetentionBackupParameters" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 DeleteLtrSubscriptionMissing - The subscription ID is required to delete a long-term retention backup.\n\n * 400 DeleteLtrServerMissing - The server name is required to delete a long-term retention backup.\n\n * 400 DeleteLtrDatabaseMissing - The database name is required to delete a long-term retention backup.\n\n * 400 LtrBackupResourceIdIncorrect - The provided long-term retention backup resource ID or backup name is incorrect.\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LtrOperationFailedBackupImmutable - Deleting Long Term Retention backup failed because the backup is immutable.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 400 LongTermRetentionMigrationBackupStorageRedundancyNotAllowed - Changing backup storage redundancy is not allowed for LTR Copy operations.\n\n * 400 LongTermRetentionMigrationSubscriptionNotFound - The subscription could not be found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Updating the backup is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the long term retention backup.": { + "$ref": "./examples/LongTermRetentionBackupUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists the long term retention backups for a given location based on resource group.", + "operationId": "LongTermRetentionBackups_ListByResourceGroupLocation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the location based on resource group.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists the long term retention backups for a given server based on resource groups.", + "operationId": "LongTermRetentionBackups_ListByResourceGroupServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the server based on resource group.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Lists all long term retention backups for a database based on a particular resource group.", + "operationId": "LongTermRetentionBackups_ListByResourceGroupDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the database.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}": { + "get": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Gets a long term retention backup.", + "operationId": "LongTermRetentionBackups_GetByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 DeleteLtrSubscriptionMissing - The subscription ID is required to delete a long-term retention backup.\n\n * 400 DeleteLtrServerMissing - The server name is required to delete a long-term retention backup.\n\n * 400 DeleteLtrDatabaseMissing - The database name is required to delete a long-term retention backup.\n\n * 400 LtrBackupResourceIdIncorrect - The provided long-term retention backup resource ID or backup name is incorrect.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupGet.json" + } + } + }, + "delete": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Deletes a long term retention backup.", + "operationId": "LongTermRetentionBackups_DeleteByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the backup." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 DeleteLtrSubscriptionMissing - The subscription ID is required to delete a long-term retention backup.\n\n * 400 DeleteLtrServerMissing - The server name is required to delete a long-term retention backup.\n\n * 400 DeleteLtrDatabaseMissing - The database name is required to delete a long-term retention backup.\n\n * 400 LtrBackupResourceIdIncorrect - The provided long-term retention backup resource ID or backup name is incorrect.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/changeAccessTier": { + "post": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Change a long term retention backup access tier.", + "operationId": "LongTermRetentionBackups_ChangeAccessTierByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ChangeLongTermRetentionBackupAccessTierParameters" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully changed the long term retention backup access tier.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 DeleteLtrSubscriptionMissing - The subscription ID is required to delete a long-term retention backup.\n\n * 400 DeleteLtrServerMissing - The server name is required to delete a long-term retention backup.\n\n * 400 DeleteLtrDatabaseMissing - The database name is required to delete a long-term retention backup.\n\n * 400 LtrBackupResourceIdIncorrect - The provided long-term retention backup resource ID or backup name is incorrect.\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LtrOperationFailedBackupImmutable - Deleting Long Term Retention backup failed because the backup is immutable.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 400 LongTermRetentionMigrationBackupStorageRedundancyNotAllowed - Changing backup storage redundancy is not allowed for LTR Copy operations.\n\n * 400 LongTermRetentionMigrationSubscriptionNotFound - The subscription could not be found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Change the long term retention backup storage access tier for a resource group.": { + "$ref": "./examples/ResourceGroupBasedChangeLongTermRetentionBackupAccessTier.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy": { + "post": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Copy an existing long term retention backup to a different server.", + "operationId": "LongTermRetentionBackups_CopyByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters needed for long term retention copy request", + "required": true, + "schema": { + "$ref": "#/definitions/CopyLongTermRetentionBackupParameters" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully Copied the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 DeleteLtrSubscriptionMissing - The subscription ID is required to delete a long-term retention backup.\n\n * 400 DeleteLtrServerMissing - The server name is required to delete a long-term retention backup.\n\n * 400 DeleteLtrDatabaseMissing - The database name is required to delete a long-term retention backup.\n\n * 400 LtrBackupResourceIdIncorrect - The provided long-term retention backup resource ID or backup name is incorrect.\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LtrOperationFailedBackupImmutable - Deleting Long Term Retention backup failed because the backup is immutable.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 400 LongTermRetentionMigrationBackupStorageRedundancyNotAllowed - Changing backup storage redundancy is not allowed for LTR Copy operations.\n\n * 400 LongTermRetentionMigrationSubscriptionNotFound - The subscription could not be found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Copying the backup is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Copy the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupCopy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update": { + "post": { + "tags": [ + "LongTermRetentionBackups" + ], + "description": "Updates an existing long term retention backup.", + "operationId": "LongTermRetentionBackups_UpdateByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionServerName", + "in": "path", + "description": "The name of the server", + "required": true, + "type": "string" + }, + { + "name": "longTermRetentionDatabaseName", + "in": "path", + "description": "The name of the database", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested backup resource state", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateLongTermRetentionBackupParameters" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the backup.", + "schema": { + "$ref": "#/definitions/LongTermRetentionBackupOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionBackupId - Invalid long term retention backup identifier for SQL DBs.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMismatchingSubscriptionId - The provided subscription id did not match the id in the other input\n\n * 400 LongTermRetentionMismatchingResourceGroupName - The provided resource group name did not match the name in the other input\n\n * 400 LongTermRetentionMismatchingServerName - The provided server name did not match the name in the other input\n\n * 400 DeleteLtrSubscriptionMissing - The subscription ID is required to delete a long-term retention backup.\n\n * 400 DeleteLtrServerMissing - The server name is required to delete a long-term retention backup.\n\n * 400 DeleteLtrDatabaseMissing - The database name is required to delete a long-term retention backup.\n\n * 400 LtrBackupResourceIdIncorrect - The provided long-term retention backup resource ID or backup name is incorrect.\n\n * 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.\n\n * 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.\n\n * 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.\n\n * 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.\n\n * 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.\n\n * 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.\n\n * 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.\n\n * 400 LtrOperationFailedBackupImmutable - Deleting Long Term Retention backup failed because the backup is immutable.\n\n * 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.\n\n * 400 LongTermRetentionMigrationBackupStorageRedundancyNotAllowed - Changing backup storage redundancy is not allowed for LTR Copy operations.\n\n * 400 LongTermRetentionMigrationSubscriptionNotFound - The subscription could not be found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.\n\n * 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.\n\n * 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.\n\n * 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.\n\n * 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Updating the backup is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json" + } + } + } + } + }, + "definitions": { + "ChangeLongTermRetentionBackupAccessTierParameters": { + "description": "Contains the information necessary to change long term retention backup access tier and related operation mode.", + "required": [ + "backupStorageAccessTier", + "operationMode" + ], + "type": "object", + "properties": { + "backupStorageAccessTier": { + "description": "The long term retention backup storage access tier", + "type": "string" + }, + "operationMode": { + "description": "The operation mode when updating ltr backup storage access tier", + "type": "string" + } + } + }, + "CopyLongTermRetentionBackupParameters": { + "description": "Contains the information necessary to perform long term retention backup copy operation.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/CopyLongTermRetentionBackupParametersProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "CopyLongTermRetentionBackupParametersProperties": { + "description": "Contains the properties to perform long term retention backup copy operation.", + "type": "object", + "properties": { + "targetSubscriptionId": { + "description": "The subscription that owns the target server", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "targetResourceGroup": { + "description": "The resource group that owns the target server", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "targetServerResourceId": { + "description": "The resource Id of the target server that owns the database", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "targetServerFullyQualifiedDomainName": { + "description": "The fully qualified domain name of the target server", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "targetDatabaseName": { + "description": "The name of the database owns the copied backup.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "targetBackupStorageRedundancy": { + "description": "The storage redundancy type of the copied backup", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + } + } + }, + "LongTermRetentionBackup": { + "description": "A long term retention backup.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/LongTermRetentionBackupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "LongTermRetentionBackupListResult": { + "description": "A list of long term retention backups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/LongTermRetentionBackup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "LongTermRetentionBackupOperationResult": { + "description": "A LongTermRetentionBackup operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/LongTermRetentionOperationResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "LongTermRetentionBackupProperties": { + "description": "Properties of a long term retention backup", + "type": "object", + "properties": { + "serverName": { + "description": "The server name that the backup database belong to.", + "type": "string", + "readOnly": true + }, + "serverCreateTime": { + "format": "date-time", + "description": "The create time of the server.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The name of the database the backup belong to", + "type": "string", + "readOnly": true + }, + "databaseDeletionTime": { + "format": "date-time", + "description": "The delete time of the database", + "type": "string", + "readOnly": true + }, + "backupTime": { + "format": "date-time", + "description": "The time the backup was taken", + "type": "string", + "readOnly": true + }, + "backupExpirationTime": { + "format": "date-time", + "description": "The time the long term retention backup will expire.", + "type": "string", + "readOnly": true + }, + "backupStorageRedundancy": { + "description": "The storage redundancy type of the backup", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "requestedBackupStorageRedundancy": { + "description": "The storage redundancy type of the backup", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "isBackupImmutable": { + "description": "The setting whether the LTR backup is immutable", + "type": "boolean" + }, + "backupStorageAccessTier": { + "description": "The BackupStorageAccessTier for the LTR backup", + "enum": [ + "Hot", + "Archive" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageAccessTier", + "modelAsString": true + } + } + } + }, + "LongTermRetentionOperationResultProperties": { + "description": "Contains the operation result properties for long term retention backup operation.", + "type": "object", + "properties": { + "requestId": { + "format": "uuid", + "description": "Request Id.", + "type": "string", + "readOnly": true + }, + "operationType": { + "description": "Operation type.", + "type": "string", + "readOnly": true + }, + "fromBackupResourceId": { + "description": "Source backup resource id", + "type": "string", + "readOnly": true + }, + "toBackupResourceId": { + "description": "Target backup resource id", + "type": "string", + "readOnly": true + }, + "targetBackupStorageRedundancy": { + "description": "The storage redundancy type of the copied backup", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "status": { + "description": "Operation status", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Progress message", + "type": "string", + "readOnly": true + } + } + }, + "UpdateLongTermRetentionBackupParameters": { + "description": "Contains the information necessary to perform long term retention backup update operation.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/UpdateLongTermRetentionBackupParametersProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "UpdateLongTermRetentionBackupParametersProperties": { + "description": "Contains the properties to perform long term retention backup copy operation.", + "type": "object", + "properties": { + "requestedBackupStorageRedundancy": { + "description": "The storage redundancy type of the copied backup", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionManagedInstanceBackups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionManagedInstanceBackups.json new file mode 100644 index 000000000000..0aff7c805200 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionManagedInstanceBackups.json @@ -0,0 +1,886 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists the long term retention backups for managed databases in a given location.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "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 backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-odata": "#/definitions/ManagedInstanceLongTermRetentionBackup", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the location.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupListByLocation.json" + }, + "Get all long term retention backups under the location with maximal parameters.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupListByLocationMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists all long term retention backups for a managed database.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByDatabase", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Gets a long term retention backup for a managed database.", + "operationId": "LongTermRetentionManagedInstanceBackups_Get", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the backup.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionManagedInstanceBackupId - Invalid long term retention backup identifier for Managed Instances.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the long term retention backup of a managed database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupGet.json" + } + } + }, + "delete": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Deletes a long term retention backup.", + "operationId": "LongTermRetentionManagedInstanceBackups_Delete", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the backup." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionManagedInstanceBackupId - Invalid long term retention backup identifier for Managed Instances.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the long term retention backup.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists the long term retention backups for a given managed instance.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByInstance", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the managed instance.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionBackupListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists the long term retention backups for managed databases in a given location.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByResourceGroupLocation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "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 backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-odata": "#/definitions/ManagedInstanceLongTermRetentionBackup", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the location.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json" + }, + "Get all long term retention backups under the location with maximal parameters.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocationMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists all long term retention backups for a managed database.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByResourceGroupDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the database.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Gets a long term retention backup for a managed database.", + "operationId": "LongTermRetentionManagedInstanceBackups_GetByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the backup.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionManagedInstanceBackupId - Invalid long term retention backup identifier for Managed Instances.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json" + } + } + }, + "delete": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Deletes a long term retention backup.", + "operationId": "LongTermRetentionManagedInstanceBackups_DeleteByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database.", + "required": true, + "type": "string" + }, + { + "name": "backupName", + "in": "path", + "description": "The backup name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the backup." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidLongTermRetentionManagedInstanceBackupId - Invalid long term retention backup identifier for Managed Instances.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the long term retention backup.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups": { + "get": { + "tags": [ + "LongTermRetentionManagedInstanceBackups" + ], + "description": "Lists the long term retention backups for a given managed instance.", + "operationId": "LongTermRetentionManagedInstanceBackups_ListByResourceGroupInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The location of the database.", + "required": true, + "type": "string" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest backup for each database.", + "required": false, + "type": "boolean" + }, + { + "name": "databaseState", + "in": "query", + "description": "Whether to query against just live databases, just deleted databases, or all databases.", + "required": false, + "type": "string", + "enum": [ + "All", + "Live", + "Deleted" + ], + "x-ms-enum": { + "name": "databaseState", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of backups.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all long term retention backups under the managed instance.": { + "$ref": "./examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceLongTermRetentionBackup": { + "description": "A long term retention backup for a managed database.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceLongTermRetentionBackupListResult": { + "description": "A list of long term retention backups for managed database(s).", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionBackup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceLongTermRetentionBackupProperties": { + "description": "Properties of a long term retention backup", + "type": "object", + "properties": { + "managedInstanceName": { + "description": "The managed instance that the backup database belongs to.", + "type": "string", + "readOnly": true + }, + "managedInstanceCreateTime": { + "format": "date-time", + "description": "The create time of the instance.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The name of the database the backup belong to", + "type": "string", + "readOnly": true + }, + "databaseDeletionTime": { + "format": "date-time", + "description": "The delete time of the database", + "type": "string", + "readOnly": true + }, + "backupTime": { + "format": "date-time", + "description": "The time the backup was taken", + "type": "string", + "readOnly": true + }, + "backupExpirationTime": { + "format": "date-time", + "description": "The time the long term retention backup will expire.", + "type": "string", + "readOnly": true + }, + "backupStorageRedundancy": { + "description": "The storage redundancy type of the backup", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "backupStorageAccessTier": { + "description": "The BackupStorageAccessTier for the LTR backup", + "enum": [ + "Hot", + "Archive" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageAccessTier", + "modelAsString": true + } + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionPolicies.json new file mode 100644 index 000000000000..d50c559fe1de --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionPolicies.json @@ -0,0 +1,277 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies": { + "get": { + "tags": [ + "LongTermRetentionPolicies" + ], + "description": "Gets a database's long term retention policy.", + "operationId": "LongTermRetentionPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get the policy.", + "schema": { + "$ref": "#/definitions/LongTermRetentionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRHyperscaleSetPolicyError - An error has occurred while enabling Long-term backup retention for this database. Please reach out to Microsoft support to enable long-term backup retention.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later.\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." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the long term retention policy for the database.": { + "$ref": "./examples/LongTermRetentionPolicyListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "LongTermRetentionPolicies" + ], + "description": "Gets a database's long term retention policy.", + "operationId": "LongTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be Default.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "LongTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get the policy.", + "schema": { + "$ref": "#/definitions/LongTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRHyperscaleSetPolicyError - An error has occurred while enabling Long-term backup retention for this database. Please reach out to Microsoft support to enable long-term backup retention.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later.\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." + } + }, + "x-ms-examples": { + "Get the long term retention policy for the database.": { + "$ref": "./examples/LongTermRetentionPolicyGet.json" + } + } + }, + "put": { + "tags": [ + "LongTermRetentionPolicies" + ], + "description": "Sets a database's long term retention policy.", + "operationId": "LongTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be Default.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "LongTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The long term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/LongTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the policy.", + "schema": { + "$ref": "#/definitions/LongTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMissingWeekOfYear - WeekOfYear is required to be set between 1 and 52 in order to set yearly retention.\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRHyperscaleSetPolicyError - An error has occurred while enabling Long-term backup retention for this database. Please reach out to Microsoft support to enable long-term backup retention.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or update the long term retention policy for the database.": { + "$ref": "./examples/LongTermRetentionPolicyCreateOrUpdate.json" + } + } + } + } + }, + "definitions": { + "BaseLongTermRetentionPolicyProperties": { + "description": "Properties of a long term retention policy", + "type": "object", + "properties": { + "weeklyRetention": { + "description": "The weekly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "monthlyRetention": { + "description": "The monthly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "yearlyRetention": { + "description": "The yearly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "weekOfYear": { + "format": "int32", + "description": "The week of year to take the yearly backup in an ISO 8601 format.", + "type": "integer" + } + } + }, + "LongTermRetentionPolicy": { + "description": "A long term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/BaseLongTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "LongTermRetentionPolicyListResult": { + "description": "A list of long term retention policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/LongTermRetentionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/MaintenanceWindowOptions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/MaintenanceWindowOptions.json new file mode 100644 index 000000000000..a67db47d70bc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/MaintenanceWindowOptions.json @@ -0,0 +1,184 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindowOptions/current": { + "get": { + "tags": [ + "MaintenanceWindowOptions" + ], + "description": "Gets a list of available maintenance windows.", + "operationId": "MaintenanceWindowOptions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to get maintenance windows options for.", + "required": true, + "type": "string" + }, + { + "name": "maintenanceWindowOptionsName", + "in": "query", + "description": "Maintenance window options name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of maintenance windows options.", + "schema": { + "$ref": "#/definitions/MaintenanceWindowOptions" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-examples": { + "Gets a list of available maintenance windows for a selected database.": { + "$ref": "./examples/GetMaintenanceWindowOptions.json" + } + } + } + } + }, + "definitions": { + "MaintenanceWindowOptions": { + "description": "Maintenance window options.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/MaintenanceWindowOptionsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "MaintenanceWindowOptionsProperties": { + "description": "Maintenance window options properties.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Whether maintenance windows are enabled for the database.", + "type": "boolean" + }, + "maintenanceWindowCycles": { + "description": "Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}.", + "type": "array", + "items": { + "$ref": "#/definitions/MaintenanceWindowTimeRange" + } + }, + "minDurationInMinutes": { + "format": "int32", + "description": "Minimum duration of maintenance window.", + "type": "integer" + }, + "defaultDurationInMinutes": { + "format": "int32", + "description": "Default duration for maintenance window.", + "type": "integer" + }, + "minCycles": { + "format": "int32", + "description": "Minimum number of maintenance windows cycles to be set on the database.", + "type": "integer" + }, + "timeGranularityInMinutes": { + "format": "int32", + "description": "Time granularity in minutes for maintenance windows.", + "type": "integer" + }, + "allowMultipleMaintenanceWindowsPerCycle": { + "description": "Whether we allow multiple maintenance windows per cycle.", + "type": "boolean" + } + } + }, + "MaintenanceWindowTimeRange": { + "description": "Maintenance window time range.", + "type": "object", + "properties": { + "dayOfWeek": { + "description": "Day of maintenance window.", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": true + } + }, + "startTime": { + "description": "Start time minutes offset from 12am.", + "type": "string" + }, + "duration": { + "description": "Duration of maintenance window in minutes.", + "type": "string" + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/MaintenanceWindows.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/MaintenanceWindows.json new file mode 100644 index 000000000000..b047a2170917 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/MaintenanceWindows.json @@ -0,0 +1,211 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindows/current": { + "get": { + "tags": [ + "MaintenanceWindows" + ], + "description": "Gets maintenance windows settings for a database.", + "operationId": "MaintenanceWindows_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to get maintenance windows for.", + "required": true, + "type": "string" + }, + { + "name": "maintenanceWindowName", + "in": "query", + "description": "Maintenance window name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved maintenance windows settings.", + "schema": { + "$ref": "#/definitions/MaintenanceWindows" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-examples": { + "Gets maintenance window settings for a selected database.": { + "$ref": "./examples/GetMaintenanceWindows.json" + } + } + }, + "put": { + "tags": [ + "MaintenanceWindows" + ], + "description": "Sets maintenance windows settings for a database.", + "operationId": "MaintenanceWindows_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database to set maintenance windows for.", + "required": true, + "type": "string" + }, + { + "name": "maintenanceWindowName", + "in": "query", + "description": "Maintenance window name.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MaintenanceWindows" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set maintenance windows settings." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidMaintenanceWindowSelection - Invalid maintenance window selection." + } + }, + "x-ms-examples": { + "Sets maintenance window settings for a selected database.": { + "$ref": "./examples/CreateOrUpdateMaintenanceWindows.json" + } + } + } + } + }, + "definitions": { + "MaintenanceWindows": { + "description": "Maintenance windows.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/MaintenanceWindowsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "MaintenanceWindowsProperties": { + "description": "Maintenance windows resource properties.", + "type": "object", + "properties": { + "timeRanges": { + "type": "array", + "items": { + "$ref": "#/definitions/MaintenanceWindowTimeRange" + } + } + } + }, + "MaintenanceWindowTimeRange": { + "description": "Maintenance window time range.", + "type": "object", + "properties": { + "dayOfWeek": { + "description": "Day of maintenance window.", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": true + } + }, + "startTime": { + "description": "Start time minutes offset from 12am.", + "type": "string" + }, + "duration": { + "description": "Duration of maintenance window in minutes.", + "type": "string" + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedBackupShortTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedBackupShortTermRetentionPolicies.json new file mode 100644 index 000000000000..bf04fbe76106 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedBackupShortTermRetentionPolicies.json @@ -0,0 +1,332 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies": { + "get": { + "tags": [ + "ManagedBackupShortTermRetentionPolicies" + ], + "description": "Gets a managed database's short term retention policy list.", + "operationId": "ManagedBackupShortTermRetentionPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the short term retention policy list for the database.": { + "$ref": "./examples/GetListManagedShortTermRetentionPolicy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "ManagedBackupShortTermRetentionPolicies" + ], + "description": "Gets a managed database's short term retention policy.", + "operationId": "ManagedBackupShortTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/GetManagedShortTermRetentionPolicy.json" + } + } + }, + "put": { + "tags": [ + "ManagedBackupShortTermRetentionPolicies" + ], + "description": "Updates a managed database's short term retention policy.", + "operationId": "ManagedBackupShortTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the database.": { + "$ref": "./examples/UpdateManagedShortTermRetentionPolicy.json" + } + } + }, + "patch": { + "tags": [ + "ManagedBackupShortTermRetentionPolicies" + ], + "description": "Updates a managed database's short term retention policy.", + "operationId": "ManagedBackupShortTermRetentionPolicies_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the database.": { + "$ref": "./examples/UpdateManagedShortTermRetentionPolicy.json" + } + } + } + } + }, + "definitions": { + "ManagedBackupShortTermRetentionPolicy": { + "description": "A short term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedBackupShortTermRetentionPolicyListResult": { + "description": "A list of short term retention policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedBackupShortTermRetentionPolicyProperties": { + "description": "Properties of a short term retention policy", + "type": "object", + "properties": { + "retentionDays": { + "format": "int32", + "description": "The backup retention period in days. This is how many days Point-in-Time Restore will be supported.", + "type": "integer" + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseAdvancedThreatProtectionSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseAdvancedThreatProtectionSettings.json new file mode 100644 index 000000000000..86516dbb4a4a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseAdvancedThreatProtectionSettings.json @@ -0,0 +1,292 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/advancedThreatProtectionSettings": { + "get": { + "tags": [ + "ManagedDatabaseAdvancedThreatProtectionSettings" + ], + "description": "Gets a list of managed database's Advanced Threat Protection states.", + "operationId": "ManagedDatabaseAdvancedThreatProtectionSettings_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed database Advanced Threat Protection states.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseAdvancedThreatProtectionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidDatabaseAdvancedThreatProtectionCreateRequest - The create database Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 409 DatabaseAdvancedThreatProtectionInProgress - Setting the database Advanced Threat Protection is already in progress\n\n * 409 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 GetDatabaseAdvancedThreatProtectionFailed - Failed to get Advanced Threat Protection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a list of the managed database's Advanced Threat Protection settings.": { + "$ref": "./examples/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}": { + "get": { + "tags": [ + "ManagedDatabaseAdvancedThreatProtectionSettings" + ], + "description": "Gets a managed database's Advanced Threat Protection state.", + "operationId": "ManagedDatabaseAdvancedThreatProtectionSettings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advancedThreatProtectionName", + "in": "path", + "description": "The name of the Advanced Threat Protection state.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AdvancedThreatProtectionName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed database's Advanced Threat Protection state.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseAdvancedThreatProtection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidDatabaseAdvancedThreatProtectionCreateRequest - The create database Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 409 DatabaseAdvancedThreatProtectionInProgress - Setting the database Advanced Threat Protection is already in progress\n\n * 409 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 GetDatabaseAdvancedThreatProtectionFailed - Failed to get Advanced Threat Protection settings" + } + }, + "x-ms-examples": { + "Get a managed database's Advanced Threat Protection settings.": { + "$ref": "./examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseAdvancedThreatProtectionSettings" + ], + "description": "Creates or updates a managed database's Advanced Threat Protection state.", + "operationId": "ManagedDatabaseAdvancedThreatProtectionSettings_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "advancedThreatProtectionName", + "in": "path", + "description": "The name of the Advanced Threat Protection state.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AdvancedThreatProtectionName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The managed database Advanced Threat Protection state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabaseAdvancedThreatProtection" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the managed database Advanced Threat Protection state.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseAdvancedThreatProtection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidDatabaseAdvancedThreatProtectionCreateRequest - The create database Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 409 DatabaseAdvancedThreatProtectionInProgress - Setting the database Advanced Threat Protection is already in progress\n\n * 409 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later\n\n * 500 GetDatabaseAdvancedThreatProtectionFailed - Failed to get Advanced Threat Protection settings" + }, + "201": { + "description": "Successfully created the managed database Advanced Threat Protection state.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseAdvancedThreatProtection" + } + } + }, + "x-ms-examples": { + "Update a managed database's Advanced Threat Protection settings with minimal parameters": { + "$ref": "./examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMin.json" + }, + "Update a managed database's Advanced Threat Protection settings with all parameters": { + "$ref": "./examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMax.json" + } + } + } + } + }, + "definitions": { + "AdvancedThreatProtectionProperties": { + "description": "Properties of an Advanced Threat Protection state.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.", + "enum": [ + "New", + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "AdvancedThreatProtectionState", + "modelAsString": false + } + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedDatabaseAdvancedThreatProtection": { + "description": "A managed database Advanced Threat Protection.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of AdvancedThreatProtectionResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/AdvancedThreatProtectionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseAdvancedThreatProtectionListResult": { + "description": "A list of the managed database's Advanced Threat Protection settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseAdvancedThreatProtection" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseColumns.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseColumns.json new file mode 100644 index 000000000000..5af5df54595f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseColumns.json @@ -0,0 +1,390 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/columns": { + "get": { + "tags": [ + "ManagedDatabaseColumns" + ], + "description": "List managed database columns", + "operationId": "ManagedDatabaseColumns_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schema", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "table", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "column", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "$skiptoken", + "in": "query", + "description": "An opaque token that identifies a starting point in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database columns.", + "schema": { + "$ref": "#/definitions/DatabaseColumnListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UnsupportedColumnOrderByProperty - The order-by property '{0}' is not supported. Allowed properties are: {1}.\n\n * 400 UnsupportedColumnSortDirection - The column sort direction '{0}' is not supported. Allowed values are: {1}.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database columns": { + "$ref": "./examples/ManagedColumnsListByDatabaseMin.json" + }, + "Filter managed database columns": { + "$ref": "./examples/ManagedColumnsListByDatabaseMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns": { + "get": { + "tags": [ + "ManagedDatabaseColumns" + ], + "description": "List managed database columns", + "operationId": "ManagedDatabaseColumns_ListByTable", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database columns.", + "schema": { + "$ref": "#/definitions/DatabaseColumnListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseColumn", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database columns": { + "$ref": "./examples/ManagedDatabaseColumnListByTable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}": { + "get": { + "tags": [ + "ManagedDatabaseColumns" + ], + "description": "Get managed database column", + "operationId": "ManagedDatabaseColumns_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database column.", + "schema": { + "$ref": "#/definitions/DatabaseColumn" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get managed database column": { + "$ref": "./examples/ManagedDatabaseColumnGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseColumn": { + "description": "A database column resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseColumnProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseColumnListResult": { + "description": "A list of database columns.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseColumn" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseColumnProperties": { + "description": "Database column properties.", + "type": "object", + "properties": { + "columnType": { + "description": "The column data type.", + "enum": [ + "image", + "text", + "uniqueidentifier", + "date", + "time", + "datetime2", + "datetimeoffset", + "tinyint", + "smallint", + "int", + "smalldatetime", + "real", + "money", + "datetime", + "float", + "sql_variant", + "ntext", + "bit", + "decimal", + "numeric", + "smallmoney", + "bigint", + "hierarchyid", + "geometry", + "geography", + "varbinary", + "varchar", + "binary", + "char", + "timestamp", + "nvarchar", + "nchar", + "xml", + "sysname" + ], + "type": "string", + "x-ms-enum": { + "name": "ColumnDataType", + "modelAsString": true + } + }, + "temporalType": { + "description": "The table temporal type.", + "enum": [ + "NonTemporalTable", + "HistoryTable", + "SystemVersionedTemporalTable" + ], + "type": "string", + "x-ms-enum": { + "name": "TableTemporalType", + "modelAsString": true + } + }, + "memoryOptimized": { + "description": "Whether or not the column belongs to a memory optimized table.", + "type": "boolean" + }, + "isComputed": { + "description": "Whether or not the column is computed.", + "type": "boolean" + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseMoveOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseMoveOperations.json new file mode 100644 index 000000000000..11f0dec86854 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseMoveOperations.json @@ -0,0 +1,293 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseMoveOperationResults": { + "get": { + "tags": [ + "ManagedDatabaseMoveOperations" + ], + "description": "Lists managed database move operations.", + "operationId": "ManagedDatabaseMoveOperations_ListByLocation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "onlyLatestPerDatabase", + "in": "query", + "description": "Whether or not to only get the latest operation for each database. Has higher priority than $filter.", + "required": false, + "type": "boolean" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved move operation results.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseMoveOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 SystemDatabaseUnsupportedOperation - Unsupported operation for system database.\n\n * 400 XtpServerStateMismatch - Both source and target servers do not support memory optimized data.\n\n * 400 ManagedDatabaseGPFileSizeLimitExceeded - Creating a copy of a managed database on different SQL Managed Instance with General Purpose service tier would violate data file size limit. See: 'https://docs.microsoft.com/azure/azure-sql/managed-instance/resource-limits#service-tier-characteristics'.\n\n * 400 ManagedInstanceGPStorageAccountLimitExceeded - Creating a copy of a database on different SQL Managed Instance with General Purpose service tier would violate storage account size limit. See: 'https://docs.microsoft.com/azure/azure-sql/managed-instance/resource-limits#service-tier-characteristics'.\n\n * 400 TargetInsufficientStorage - Attempt to move/restore/copy database on the destination instance with insufficient space.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 CrossResourceOperationNotSupported - Cross resource operation is not supported.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 ManagedDatabaseMoveOperationResultsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 CrossManagedInstanceDatabaseMovementNotExist - Database movement does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\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 * 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 * 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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-odata": "#/definitions/ManagedDatabaseMoveOperationResult", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets all managed database move operations for specified subscription, resource group and location.": { + "$ref": "./examples/ManagedDatabaseMoveOperationResultList.json" + }, + "Gets the latest managed database move operations for each database under specified subscription, resource group and location.": { + "$ref": "./examples/ManagedDatabaseMoveOperationResultListLastOperations.json" + }, + "Gets the latest managed database move operations for each database under specified subscription, resource group and location, filtered by operation type ": { + "$ref": "./examples/ManagedDatabaseMoveOperationResultListMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseMoveOperationResults/{operationId}": { + "get": { + "tags": [ + "ManagedDatabaseMoveOperations" + ], + "description": "Gets a managed database move operation.", + "operationId": "ManagedDatabaseMoveOperations_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved move operation result.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseMoveOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 SystemDatabaseUnsupportedOperation - Unsupported operation for system database.\n\n * 400 XtpServerStateMismatch - Both source and target servers do not support memory optimized data.\n\n * 400 ManagedDatabaseGPFileSizeLimitExceeded - Creating a copy of a managed database on different SQL Managed Instance with General Purpose service tier would violate data file size limit. See: 'https://docs.microsoft.com/azure/azure-sql/managed-instance/resource-limits#service-tier-characteristics'.\n\n * 400 ManagedInstanceGPStorageAccountLimitExceeded - Creating a copy of a database on different SQL Managed Instance with General Purpose service tier would violate storage account size limit. See: 'https://docs.microsoft.com/azure/azure-sql/managed-instance/resource-limits#service-tier-characteristics'.\n\n * 400 TargetInsufficientStorage - Attempt to move/restore/copy database on the destination instance with insufficient space.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 CrossResourceOperationNotSupported - Cross resource operation is not supported.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 UnsupportedBackupStorageRedundancy - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 LTRSterlingToVldbMigrationNotSupported - Cannot change service objective for database to Hyperscale as long-term retention is not yet supported on Hyperscale. Please disable long-term retention on the database and retry.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 MaintenanceWindowNotSupportedForNamedReplica - User tried to create or update named replica with non-default maintenance window which is not supported.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 InvalidStandbyGeoReadScale - User attempted to enable read scale on a standby geo database that does not support it.\n\n * 400 PerDatabaseCMKKeyRotationAttemptedWhileOldThumbprintInUse - Key Rotation for the TDE Protector at the database level is blocked when active transactions are holding up the log encrypted with old keys. Please refer to aka.ms/azuresqldbkeyrotation for possible strategies to workaround this issue.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 PerDBCMKNotSupportedWithLTR - Database-level CMK is not supported when Long-term Backup Retention is enabled on the database.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutDatabaseLevelEncryptionProtector - Database-level encryption protector must be set on the target database while attempting to copy or replicate a database encrypted with a database level key.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeys - While attempting to replicate a database configured with database level encryption protector, the current keys being used by the primary must be passed to the secondary database.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 PerDatabaseCMKGeoPrimaryIsNotConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must be configured with a database level encryption protector before setting a database level encryption protector on the geo-secondary.\n\n * 400 PerDatabaseCMKGeoPrimaryIsConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must not be configured with a database level encryption protector when failing over to a geo-secondary without a database level encryption protector.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 MissingAsymmetricKeyOnTargetServer - Target server does not have access to an asymmetric key.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MultipleDroppedDatabasesWithTheSameName - Found multiple dropped databases with the same name on server.\n\n * 400 AzureKeyVaultClientError - The Azure Key Vault client encountered an error.\n\n * 400 AzureKeyVaultClientInfoError - An error occurred while obtaining information for the Azure Key Vault client.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 IsLedgerDatabaseIsNotSupportedOnResourceType - Changing the ledger property is not supported for this resource type.\n\n * 400 DatabaseNameInUse - Database already exists. Choose a different database name.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 UnableToCreateGeoChain - User attempted to create secondary database (chaining) even though automatic upload of ledger digests has been configured\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 UnsupportedBackupStorageRedundancyForEdition - The requested backup storage redundancy is not supported for edition\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidIdentityId - One or more identity id(s) provided are not valid ARM resource id(s). Please input valid id(s) and try again.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 InvalidNumberOfIdentities - Only one user assigned managed identity is supported at the Database Level.\n\n * 400 NoRestorePointAvailable - The source database has not yet accomplished its first backup in order to support restore operations. Please retry the restore request later.\n\n * 400 DatabaseNamedReplicaChainingNotAllowed - User tried to create a named replica of a named replica which is not allowed.\n\n * 400 DatabaseNamedReplicaInvalidOperation - User attempted an unsupported operation on a named replica.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 DatabaseNamedReplicaInvalidSourceDatabase - User attempted to create a named replica in a different subscription or region than the source database.\n\n * 400 CannotAssignIdentityToMaster - Cannot assign an identity to a system database. Database identity cannot be assigned to 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 MissingThumbprintCrm - The restore operation of a CRM database failed because a required TDE certificate was missing. Please retry the restore operation to an existing elastic pool.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RestoreTargetEditionSizeInsufficientV2 - User attempted to restore a database to an edition that is a smaller size than the allocated size of the restored database.\n\n * 400 ResourcePoolStorageLimitHitDuringRestore - The restored database can't be restored into the resource pool due to the remaining storage capacity in the pool.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 PerDatabaseCMKGeoReplicationNotSupported - Geo Replication and Database Copy is not supported when Database-level CMK is configured in preview.\n\n * 400 InvalidStandbyGeoEdition - User attempted to create a DTU based standby geo.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 GeoRestoreBackupStorageTypeNotSupported - Database recovery requests are invalid when issued against a database that is not configured to use geo-redundant backup storage.\n\n * 400 RestoreHyperscaleToNonHyperscale - Restoring a Hyperscale database backup to a non-Hyperscale service tier or vice versa is not supported.\n\n * 400 SubscriptionDoesNotHaveAccessToServer - The subscription does not have access to the specified server(s)\n\n * 400 RecoveryPointDoesNotExist - The specified recovery point either does not exist or is not valid.\n\n * 400 LtrBackupNotFound - The specified long term retention backup does not exist.\n\n * 400 InvalidPointInTime - The specified point in time is not valid for the database.\n\n * 400 GeoRestoreCannotResolveTargetCluster - Cannot resolve target cluster for server\n\n * 400 CannotSpecifyEditionOrSloWhenRestoringToPool - Specifying the target service level objective or edition is not supported when restoring to an elastic pool.\n\n * 400 RestoreNotSupportedForGeoDrSecondary - Point-in-time restore and database recovery operations are not supported on databases that are currently configured as geo-secondaries.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 GeoRedundantBackupsNotPermittedForSubscription - Geo-redundant backup storage is blocked for all databases under subscription '{0}' by preview feature 'Azure SQL Database Block Geo-redundant Backup Storage'. Please select a different backup storage redundancy.\n\n * 400 RestoreHyperscaleToNonHyperscaleElasticPool - Restoring a Hyperscale database to an elastic pool which is not Hyperscale or restoring a database which is not Hyperscale to a Hyperscale elastic pool is not supported.\n\n * 400 RestoreIneligibleDatabaseName - The specified target database name, '{0}', is reserved and cannot be used in a restore operation.\n\n * 400 RestoreNotSupportedForSystemDb - Restore and database recovery are not supported for system databases.\n\n * 400 RestoreIneligibleDroppedDatabaseShortLifespan - The source database, '{0}', dropped on '{1}', has not existed long enough to support restores.\n\n * 400 RestoreIneligibleLiveDatabaseShortLifespan - The source database, '{0}', has not yet accomplished its first backup in order to support restore operations. Please wait until at least the indicated earliest restore date '{1}' and resubmit the request.\n\n * 400 RestoreCrossServerDisabled - For point-in-time restores, the target logical server must be the same as the source logical server. Consider restoring to the source database's server, or using database copy or database recovery.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 RestoreSameServerRecoveryDisabled - Same-server recovery is currently not supported. Consider using point-in-time restore or recovering to a different server.\n\n * 400 RestoreNotSupportedFromLtrBackupToEdition - Restore from long-term retention backup to '{0}' edition not supported.\n\n * 400 RestoreNotSupportedFromExternalBackupToEdition - Restore from external backup to '{0}' edition not supported.\n\n * 400 UpdateToServerlessIfLtrIsNotDisabled - Enabling auto-pause for a serverless database is not supported if long-term backup retention is enabled.\n\n * 400 DuplicateRestoreOperation - A restore request with the same target database name '{0}' on server '{1}' already exists.\n\n * 400 ExternalBackupUriMalformed - The external backup storage container URI is malformed.\n\n * 400 ExternalBackupUriHostNotAllowed - The host name for the external backup storage container URI is not allowed.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 ExternalBackupUriInvalidSchemeOrPort - The external backup storage container URI uses an invalid scheme or port. Please use https and port 443.\n\n * 400 ExternalBackupVldbUnsupported - Hyperscale does not support external backup restore requests.\n\n * 400 InvalidPitrPriorToVldbMigration - For database '{0}', specified point-in-time '{1}' is prior to the Hyperscale migration time of '{2}'. Please specify a target edition or service level objective which is not Hyperscale when restoring to a point earlier than the Hyperscale migration.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 BlockRestoreOnVldbGeoSecondary - Restore of Hyperscale database where source database is geo-secondary is not allowed.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 CrossManagedInstanceDatabaseMovementNotExist - Database movement does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\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 * 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 * 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 * 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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Gets a managed database move operation.": { + "$ref": "./examples/ManagedDatabaseMoveOperationResultGet.json" + } + } + } + } + }, + "definitions": { + "ManagedDatabaseMoveOperationListResult": { + "description": "List of managed database move operations.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseMoveOperationResult" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedDatabaseMoveOperationResult": { + "description": "A managed database move operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseMoveOperationResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseMoveOperationResultProperties": { + "description": "Contains the operation result properties for managed database move operation.", + "type": "object", + "properties": { + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagementOperationState", + "modelAsString": true + } + }, + "operationMode": { + "description": "Operation mode.", + "enum": [ + "Move", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "MoveOperationMode", + "modelAsString": true + } + }, + "sourceManagedInstanceName": { + "description": "Source Managed Instance name.", + "type": "string", + "readOnly": true + }, + "targetManagedInstanceName": { + "description": "Target Managed Instance name.", + "type": "string", + "readOnly": true + }, + "sourceManagedInstanceId": { + "description": "Source Managed Instance resource id.", + "type": "string", + "readOnly": true + }, + "targetManagedInstanceId": { + "description": "Target Managed instance resource id.", + "type": "string", + "readOnly": true + }, + "sourceDatabaseName": { + "description": "Source database name.", + "type": "string", + "readOnly": true + }, + "targetDatabaseName": { + "description": "Target database name.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Is move operation cancellable.", + "type": "boolean", + "readOnly": true + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseQueries.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseQueries.json new file mode 100644 index 000000000000..764b86dab2f6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseQueries.json @@ -0,0 +1,382 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}": { + "get": { + "tags": [ + "ManagedDatabaseQueries" + ], + "description": "Get query by query id.", + "operationId": "ManagedDatabaseQueries_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "queryId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved query text.", + "schema": { + "$ref": "#/definitions/ManagedInstanceQuery" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Obtain query properties": { + "$ref": "./examples/ManagedInstanceQueryGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}/statistics": { + "get": { + "tags": [ + "ManagedDatabaseQueries" + ], + "description": "Get query execution statistics by query id.", + "operationId": "ManagedDatabaseQueries_ListByQuery", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "queryId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "startTime", + "in": "query", + "description": "Start time for observed period.", + "required": false, + "type": "string" + }, + { + "name": "endTime", + "in": "query", + "description": "End time for observed period.", + "required": false, + "type": "string" + }, + { + "name": "interval", + "in": "query", + "description": "The time step to be used to summarize the metric values.", + "required": false, + "type": "string", + "enum": [ + "PT1H", + "P1D" + ], + "x-ms-enum": { + "name": "QueryTimeGrainType", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved query text.", + "schema": { + "$ref": "#/definitions/ManagedInstanceQueryStatistics" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Obtain query execution statistics. Minimal example with only mandatory request parameters.": { + "$ref": "./examples/ManagedInstanceQueryStatisticsListMin.json" + }, + "Obtain query execution statistics": { + "$ref": "./examples/ManagedInstanceQueryStatisticsList.json" + }, + "Obtain query execution statistics. Example with all request parameters.": { + "$ref": "./examples/ManagedInstanceQueryStatisticsListMax.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceQuery": { + "description": "Database query.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/QueryProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceQueryStatistics": { + "description": "Execution statistics for one particular query", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/QueryStatistics" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "QueryMetricInterval": { + "description": "Properties of a query metrics interval.", + "type": "object", + "properties": { + "intervalStartTime": { + "description": "The start time for the metric interval (ISO-8601 format).", + "type": "string", + "readOnly": true + }, + "intervalType": { + "description": "Interval type (length).", + "enum": [ + "PT1H", + "P1D" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "QueryTimeGrainType", + "modelAsString": true + } + }, + "executionCount": { + "format": "int64", + "description": "Execution count of a query in this interval.", + "type": "integer", + "readOnly": true + }, + "metrics": { + "description": "List of metric objects for this interval", + "type": "array", + "items": { + "$ref": "#/definitions/QueryMetricProperties" + } + } + } + }, + "QueryMetricProperties": { + "description": "Properties of a topquery metric in one interval.", + "type": "object", + "properties": { + "name": { + "description": "The name information for the metric.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "The UI appropriate name for the metric.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "The unit of the metric.", + "enum": [ + "percentage", + "KB", + "microseconds", + "count" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "QueryMetricUnitType", + "modelAsString": true + } + }, + "value": { + "format": "double", + "description": "The value of the metric.", + "type": "number", + "readOnly": true + }, + "min": { + "format": "double", + "description": "Metric value when min() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "max": { + "format": "double", + "description": "Metric value when max() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "avg": { + "format": "double", + "description": "Metric value when avg() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "sum": { + "format": "double", + "description": "Metric value when sum() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "stdev": { + "format": "double", + "description": "Metric value when stdev aggregate function is used over the interval.", + "type": "number", + "readOnly": true + } + } + }, + "QueryProperties": { + "description": "Properties of a database query.", + "type": "object", + "properties": { + "queryText": { + "description": "Query text.", + "type": "string" + } + } + }, + "QueryStatistics": { + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/QueryStatisticsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "QueryStatisticsProperties": { + "description": "Properties of a query execution statistics.", + "type": "object", + "properties": { + "databaseName": { + "description": "Database name of the database in which this query was executed.", + "type": "string", + "readOnly": true + }, + "queryId": { + "description": "Unique query id (unique within one database).", + "type": "string", + "readOnly": 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 + }, + "intervals": { + "description": "List of intervals with appropriate metric data", + "type": "array", + "items": { + "$ref": "#/definitions/QueryMetricInterval" + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseRestoreDetails.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseRestoreDetails.json new file mode 100644 index 000000000000..b71c4737a376 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseRestoreDetails.json @@ -0,0 +1,313 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails/{restoreDetailsName}": { + "get": { + "tags": [ + "ManagedDatabaseRestoreDetails" + ], + "description": "Gets managed database restore details.", + "operationId": "ManagedDatabaseRestoreDetails_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "restoreDetailsName", + "in": "path", + "description": "The name of the restore details to retrieve.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "RestoreDetailsName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved restore details.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseRestoreDetailsResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 RestoreDetailsNotAvailableOrExpired - Requested restore details are not available, or have expired.\n\n * 400 AutoCompleteMissingLastBackupName - Auto complete restore request must have lastBackupName parameter provided.\n\n * 400 MissingThumbprint - Can not find server certificate.\n\n * 400 BlobStorageServerFailure - Blob storage server failure has occurred.\n\n * 400 BackupSetNotFound - No backups were found to restore the database. Please contact support to restore the database.\n\n * 400 FullBackupNotFound - Full backup can not be found.\n\n * 400 RestoreFromStripedBackupsNotEnabled - Restoring from striped backups is not supported.\n\n * 400 BrokenRestorePlanNoFullBackup - The restore plan is broken because there is no full backup.\n\n * 400 BrokenRestorePlanWrongLogBackupLSN - The restore plan is broken because firstLsn of current log backup is not <= lastLsn of next log backup.\n\n * 400 BrokenRestorePlanWrongDiffBackupLSN - The restore plan is broken because firstLsn of diff backup is not >= firstLsn of full backup.\n\n * 400 BrokenRestorePlanGapInLogBackups - The restore plan is broken because firstLsn of current log backup is not equal to lastLsn of prev log backup.\n\n * 400 TargetServerDoesNotExist - The target server {0} does not exist or is not ready yet. Please check that it exists and retry the restore request.\n\n * 400 TargetServerRestoreNotAllowed - The target server {0} is currently not in a state that allows a restore to be started.\n\n * 400 XtpInitializedDuringRestore - Memory-optimized filegroup must be empty in order to be restored on General Purpose tier of SQL Database Managed Instance.\n\n * 400 FullBackupMissingChecksum - Provided full backup is missing checksum.\n\n * 400 FullBackupDamaged - Provided full backup is damaged.\n\n * 400 MissingStripeInBackupSet - Provided backup set has one or more missing stripes.\n\n * 400 BackupsFromMultipleDatabasesDetectedInTheContainerWhileRestoreInProgress - There are backups from multiple databases in the container folder. Please make sure the container folder has backups from a single database.{0}\n\n * 400 BrokenRestorePlanWrongDiffBaseGUID - The restore plan is broken because DifferentialBaseGuid of diff backup does not match BackupSetGuid of full backup.\n\n * 400 CorruptedPagesInBackupSet - Operation was aborted because RESTORE detected one or more corrupted pages in the backup set.\n\n * 400 ManagedIdentityIssueDetectedWhileRestoreInProgress - Managed identity is not set up properly. Please verify and try again.\n\n * 400 CorruptedPagesListMaintenance - Operation was aborted because an internal error occurred while processing the backup taken without checksum.\n\n * 400 PartiallyContainedDatabaseUnsupported - \"Backup for a partially contained database is not supported.\"\n\n * 400 RequiredBackupIsNotLastRestored - Migration cannot be completed because provided backup file name is not the name of the last backup file that is restored.\n\n * 400 ManagedInstanceStorageLimitHit - The managed instance has reached its storage limit.\n\n * 400 IncompatiblePhysicalLayoutTooFewDataFiles - Database backup contains incompatible physical layout. No data files are found in the backup.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineDataFilesExist - Database backup contains incompatible physical layout. Non-online data files exist.\n\n * 400 IncompatiblePhysicalLayoutWrongNumberOfLogFiles - Database backup contains incompatible physical layout. Multiple log files are not supported.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineLogFilesExist - Database backup contains incompatible physical layout. Non-online log files exist.\n\n * 400 IncompatiblePhysicalLayoutTooManyNonDataLogFiles - Database backup contains incompatible physical layout. Too many non-data/log files.\n\n * 400 ExternalBackupAlreadySignaledToComplete - The restore request has already been signaled to complete.\n\n * 400 ExternalBackupRestoreHasNotBeenStarted - The restore request can only be completed once the restore has started.\n\n * 400 ExternalBackupUpgradeInProgress - The restore request cannot be completed, since upgrade is in progress.\n\n * 400 IncompatiblePhysicalLayoutTooManyXTPFiles - Database backup contains incompatible physical layout. Multiple files found in the filegroup that contains MEMORY_OPTIMIZED_DATA.\n\n * 400 BlobStorageFailure - Blob storage failure has occurred.\n\n * 400 BackupsFromMultipleDatabasesDetectedInTheContainerFromTheStart - There are backups from multiple databases in the container folder. Please make sure the container folder has backups from a single database.{0}\n\n * 400 ManagedIdentityIssueDetectedFromTheStart - Managed identity is not set up properly. Please verify and try again.\n\n * 400 BackupSetBroken - Backup set is broken.\n\n * 400 SqlRestoreError - Non retriable error occurred while restoring backup with index {0} - {1} {2}\n\n * 400 ManagedDatabaseNotInRestoringState - Managed database is not in Restoring state." + } + }, + "x-ms-examples": { + "Managed database restore details.": { + "$ref": "./examples/ManagedDatabaseRestoreDetails.json" + } + } + } + } + }, + "definitions": { + "ManagedDatabaseRestoreDetailsBackupSetProperties": { + "description": "The managed database's restore details backup set properties.", + "type": "object", + "properties": { + "status": { + "description": "Backup set status.", + "type": "string", + "readOnly": true + }, + "firstStripeName": { + "description": "First stripe name.", + "type": "string", + "readOnly": true + }, + "numberOfStripes": { + "format": "int32", + "description": "Number of stripes.", + "type": "integer", + "readOnly": true + }, + "backupSizeMB": { + "format": "int32", + "description": "Backup size.", + "type": "integer", + "readOnly": true + }, + "restoreStartedTimestampUtc": { + "format": "date-time", + "description": "Last restored file time.", + "type": "string", + "readOnly": true + }, + "restoreFinishedTimestampUtc": { + "format": "date-time", + "description": "Last restored file time.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedDatabaseRestoreDetailsProperties": { + "description": "The managed database's restore details properties.", + "type": "object", + "properties": { + "type": { + "description": "Restore type.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Restore status.", + "type": "string", + "readOnly": true + }, + "blockReason": { + "description": "The reason why restore is in Blocked state.", + "type": "string", + "readOnly": true + }, + "lastUploadedFileName": { + "description": "Last uploaded file name.", + "type": "string", + "readOnly": true + }, + "lastUploadedFileTime": { + "format": "date-time", + "description": "Last uploaded file time.", + "type": "string", + "readOnly": true + }, + "lastRestoredFileName": { + "description": "Last restored file name.", + "type": "string", + "readOnly": true + }, + "lastRestoredFileTime": { + "format": "date-time", + "description": "Last restored file time.", + "type": "string", + "readOnly": true + }, + "percentCompleted": { + "format": "int32", + "description": "Percent completed.", + "type": "integer", + "readOnly": true + }, + "currentRestoredSizeMB": { + "format": "int32", + "description": "Current restored size MB.", + "type": "integer", + "readOnly": true + }, + "currentRestorePlanSizeMB": { + "format": "int32", + "description": "Current restore plan size MB.", + "type": "integer", + "readOnly": true + }, + "currentBackupType": { + "description": "Current backup type.", + "type": "string", + "readOnly": true + }, + "currentRestoringFileName": { + "description": "Current restoring file name.", + "type": "string", + "readOnly": true + }, + "numberOfFilesDetected": { + "format": "int32", + "description": "Number of files detected.", + "type": "integer", + "readOnly": true + }, + "numberOfFilesQueued": { + "format": "int32", + "description": "Number of files queued.", + "type": "integer", + "readOnly": true + }, + "numberOfFilesSkipped": { + "format": "int32", + "description": "Number of files skipped.", + "type": "integer", + "readOnly": true + }, + "numberOfFilesRestoring": { + "format": "int32", + "description": "Number of files restoring.", + "type": "integer", + "readOnly": true + }, + "numberOfFilesRestored": { + "format": "int32", + "description": "Number of files restored.", + "type": "integer", + "readOnly": true + }, + "numberOfFilesUnrestorable": { + "format": "int32", + "description": "Number of files unrestorable.", + "type": "integer", + "readOnly": true + }, + "fullBackupSets": { + "description": "Full backup sets.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseRestoreDetailsBackupSetProperties" + }, + "readOnly": true + }, + "diffBackupSets": { + "description": "Diff backup sets.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseRestoreDetailsBackupSetProperties" + }, + "readOnly": true + }, + "logBackupSets": { + "description": "Log backup sets.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseRestoreDetailsBackupSetProperties" + }, + "readOnly": true + }, + "unrestorableFiles": { + "description": "Unrestorable files.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseRestoreDetailsUnrestorableFileProperties" + }, + "readOnly": true + } + } + }, + "ManagedDatabaseRestoreDetailsResult": { + "description": "A managed database restore details.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseRestoreDetailsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseRestoreDetailsUnrestorableFileProperties": { + "description": "The managed database's restore details unrestorable file properties.", + "type": "object", + "properties": { + "name": { + "description": "File name.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSchemas.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSchemas.json new file mode 100644 index 000000000000..7902e527db39 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSchemas.json @@ -0,0 +1,182 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas": { + "get": { + "tags": [ + "ManagedDatabaseSchemas" + ], + "description": "List managed database schemas", + "operationId": "ManagedDatabaseSchemas_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database schemas.", + "schema": { + "$ref": "#/definitions/DatabaseSchemaListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseSchema", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database schemas": { + "$ref": "./examples/ManagedDatabaseSchemaListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}": { + "get": { + "tags": [ + "ManagedDatabaseSchemas" + ], + "description": "Get managed database schema", + "operationId": "ManagedDatabaseSchemas_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database schema.", + "schema": { + "$ref": "#/definitions/DatabaseSchema" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get managed database schema": { + "$ref": "./examples/ManagedDatabaseSchemaGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseSchema": { + "description": "A database schema resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": {} + }, + "DatabaseSchemaListResult": { + "description": "A list of database schemas.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSchema" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSecurityAlertPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSecurityAlertPolicies.json new file mode 100644 index 000000000000..e1a8d679c58d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSecurityAlertPolicies.json @@ -0,0 +1,325 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies": { + "get": { + "tags": [ + "ManagedDatabaseSecurityAlertPolicies" + ], + "description": "Gets a list of managed database's security alert policies.", + "operationId": "ManagedDatabaseSecurityAlertPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the security alert policies are defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed database security alert policies.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a list of the database's threat detection policies.": { + "$ref": "./examples/ManagedDatabaseSecurityAlertListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}": { + "get": { + "tags": [ + "ManagedDatabaseSecurityAlertPolicies" + ], + "description": "Gets a managed database's security alert policy.", + "operationId": "ManagedDatabaseSecurityAlertPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed database security alert policy.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-examples": { + "Get a database's threat detection policy": { + "$ref": "./examples/ManagedDatabaseSecurityAlertGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseSecurityAlertPolicies" + ], + "description": "Creates or updates a database's security alert policy.", + "operationId": "ManagedDatabaseSecurityAlertPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The database security alert policy.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the managed database security alert policy.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***" + }, + "201": { + "description": "Successfully created the managed database security alert policy.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicy" + } + } + }, + "x-ms-examples": { + "Update a database's threat detection policy with minimal parameters": { + "$ref": "./examples/ManagedDatabaseSecurityAlertCreateMin.json" + }, + "Update a database's threat detection policy with all parameters": { + "$ref": "./examples/ManagedDatabaseSecurityAlertCreateMax.json" + } + } + } + } + }, + "definitions": { + "ManagedDatabaseSecurityAlertPolicy": { + "description": "A managed database security alert policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SecurityAlertPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseSecurityAlertPolicyListResult": { + "description": "A list of the managed database's security alert policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseSecurityAlertPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SecurityAlertPolicyProperties": { + "description": "Properties of a security alert policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.", + "enum": [ + "New", + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SecurityAlertPolicyState", + "modelAsString": false + } + }, + "disabledAlerts": { + "description": "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAddresses": { + "description": "Specifies an array of e-mail addresses to which the alert is sent.", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAccountAdmins": { + "description": "Specifies that the alert is sent to the account administrators.", + "type": "boolean" + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the Threat Detection audit storage account.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the Threat Detection audit logs.", + "type": "integer" + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSecurityEvents.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSecurityEvents.json new file mode 100644 index 000000000000..2274d48dcc6b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSecurityEvents.json @@ -0,0 +1,282 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityEvents": { + "get": { + "tags": [ + "ManagedDatabaseSecurityEvents" + ], + "description": "Gets a list of security events.", + "operationId": "ManagedDatabaseSecurityEvents_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the security events are retrieved.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$top", + "in": "query", + "description": "The number of elements to return from the collection.", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "$skiptoken", + "in": "query", + "description": "An opaque token that identifies a starting point in the collection.", + "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 security events.", + "schema": { + "$ref": "#/definitions/SecurityEventCollection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-odata": "#/definitions/SecurityEventsFilterParameters", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the managed database's security events with minimal parameters": { + "$ref": "./examples/ManagedDatabaseSecurityEventsGetMin.json" + }, + "Get the managed database's security events with maximal parameters": { + "$ref": "./examples/ManagedDatabaseSecurityEventsGetMax.json" + } + } + } + } + }, + "definitions": { + "SecurityEvent": { + "description": "A security event.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SecurityEventProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SecurityEventCollection": { + "description": "A list of security events.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SecurityEvent" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SecurityEventProperties": { + "description": "The properties of a security event.", + "type": "object", + "properties": { + "eventTime": { + "format": "date-time", + "description": "The time when the security event occurred.", + "type": "string", + "readOnly": true + }, + "securityEventType": { + "description": "The type of the security event.", + "enum": [ + "Undefined", + "SqlInjectionVulnerability", + "SqlInjectionExploit" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SecurityEventType", + "modelAsString": false + } + }, + "subscription": { + "description": "The subscription name", + "type": "string", + "readOnly": true + }, + "server": { + "description": "The server name", + "type": "string", + "readOnly": true + }, + "database": { + "description": "The database name", + "type": "string", + "readOnly": true + }, + "clientIp": { + "description": "The IP address of the client who executed the statement.", + "type": "string", + "readOnly": true + }, + "applicationName": { + "description": "The application used to execute the statement.", + "type": "string", + "readOnly": true + }, + "principalName": { + "description": "The principal user who executed the statement", + "type": "string", + "readOnly": true + }, + "securityEventSqlInjectionAdditionalProperties": { + "$ref": "#/definitions/SecurityEventSqlInjectionAdditionalProperties", + "description": "The sql injection additional properties, populated only if the type of the security event is sql injection.", + "readOnly": true + } + } + }, + "SecurityEventsFilterParameters": { + "description": "The properties that are supported in the $filter operation.", + "type": "object", + "properties": { + "eventTime": { + "format": "date-time", + "description": "Filter on the event time.", + "type": "string" + }, + "showServerRecords": { + "description": "Whether to show server records or not.", + "type": "boolean" + } + } + }, + "SecurityEventSqlInjectionAdditionalProperties": { + "description": "The properties of a security event sql injection additional properties.", + "type": "object", + "properties": { + "threatId": { + "description": "The threat ID.", + "type": "string", + "readOnly": true + }, + "statement": { + "description": "The statement", + "type": "string", + "readOnly": true + }, + "statementHighlightOffset": { + "format": "int32", + "description": "The statement highlight offset", + "type": "integer", + "readOnly": true + }, + "statementHighlightLength": { + "format": "int32", + "description": "The statement highlight length", + "type": "integer", + "readOnly": true + }, + "errorCode": { + "format": "int32", + "description": "The sql error code", + "type": "integer", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The sql error severity", + "type": "integer", + "readOnly": true + }, + "errorMessage": { + "description": "The sql error message", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSensitivityLabels.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSensitivityLabels.json new file mode 100644 index 000000000000..e4e4c9076dcc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSensitivityLabels.json @@ -0,0 +1,970 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels": { + "get": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Gets the sensitivity labels of a given database", + "operationId": "ManagedDatabaseSensitivityLabels_ListCurrentByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$count", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity labels.", + "schema": { + "$ref": "#/definitions/SensitivityLabelListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/SensitivityLabel", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the current sensitivity labels of a given database in a managed database": { + "$ref": "./examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json" + } + } + }, + "patch": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Update sensitivity labels of a given database using an operations batch.", + "operationId": "ManagedDatabaseSensitivityLabels_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SensitivityLabelUpdateList" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated sensitivity labels." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelsBatch - The specified sensitivity labels batch is not valid. Please provide batch operations\n\n * 400 SensitivityLabelsMissingSchema - Operation[{0}]: Missing schema information\n\n * 400 SensitivityLabelsMissingTable - Operation[{0}]: Missing table information\n\n * 400 SensitivityLabelsMissingColumn - Operation[{0}]: Missing column information\n\n * 400 SensitivityLabelsUpdateSameColumnMoreThanOnce - The column {0} can not be updated more than once in a single command\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Update sensitivity labels of a given database using an operations batch.": { + "$ref": "./examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels": { + "get": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Gets the sensitivity labels of a given database", + "operationId": "ManagedDatabaseSensitivityLabels_ListRecommendedByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "includeDisabledRecommendations", + "in": "query", + "description": "Specifies whether to include disabled recommendations or not.", + "required": false, + "type": "boolean" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity labels.", + "schema": { + "$ref": "#/definitions/SensitivityLabelListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/SensitivityLabel", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the recommended sensitivity labels of a given database in a managed database": { + "$ref": "./examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json" + } + } + }, + "patch": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Update recommended sensitivity labels states of a given database using an operations batch.", + "operationId": "ManagedDatabaseRecommendedSensitivityLabels_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdateList" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated recommended sensitivity labels." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidRecommendedSensitivityLabelsBatch - The specified recommended sensitivity labels operations are not valid\n\n * 400 SensitivityLabelsMissingSchema - Operation[{0}]: Missing schema information\n\n * 400 SensitivityLabelsMissingTable - Operation[{0}]: Missing table information\n\n * 400 SensitivityLabelsMissingColumn - Operation[{0}]: Missing column information\n\n * 400 SensitivityLabelsUpdateSameColumnMoreThanOnce - The column {0} can not be updated more than once in a single command\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Update recommended sensitivity labels of a given database using an operations batch.": { + "$ref": "./examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}": { + "get": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Gets the sensitivity label of a given column", + "operationId": "ManagedDatabaseSensitivityLabels_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current", + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + } + }, + "x-ms-examples": { + "Gets the sensitivity label of a given column in a managed database": { + "$ref": "./examples/ManagedDatabaseColumnSensitivityLabelGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Creates or updates the sensitivity label of a given column", + "operationId": "ManagedDatabaseSensitivityLabels_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "CurrentSensitivityLabelSource", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The column sensitivity label resource.", + "required": true, + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + }, + "201": { + "description": "Successfully created the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + } + }, + "x-ms-examples": { + "Updates or creates a sensitivity label of a given column with all parameters in a managed database": { + "$ref": "./examples/ManagedDatabaseColumnSensitivityLabelCreate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Deletes the sensitivity label of a given column", + "operationId": "ManagedDatabaseSensitivityLabels_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "CurrentSensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the sensitivity label." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + } + }, + "x-ms-examples": { + "Deletes the sensitivity label of a given column in a managed database": { + "$ref": "./examples/ManagedDatabaseColumnSensitivityLabelDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable": { + "post": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Disables sensitivity recommendations on a given column", + "operationId": "ManagedDatabaseSensitivityLabels_DisableRecommendation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "RecommendedSensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled the sensitivity recommendations on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\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-examples": { + "Disables the sensitivity recommendations on a given column": { + "$ref": "./examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable": { + "post": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns)", + "operationId": "ManagedDatabaseSensitivityLabels_EnableRecommendation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "RecommendedSensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully enabled the sensitivity recommendations on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\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-examples": { + "Enables the sensitivity recommendations on a given column": { + "$ref": "./examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/sensitivityLabels": { + "get": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Gets the sensitivity labels of a given database", + "operationId": "ManagedDatabaseSensitivityLabels_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity labels.", + "schema": { + "$ref": "#/definitions/SensitivityLabelListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/SensitivityLabel", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the current and recommended sensitivity labels of a given database": { + "$ref": "./examples/ManagedDatabaseSensitivityLabelsListByDatabase.json" + } + } + } + } + }, + "definitions": { + "RecommendedSensitivityLabelUpdate": { + "description": "A recommended sensitivity label update operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RecommendedSensitivityLabelUpdateList": { + "description": "A list of recommended sensitivity label update operations.", + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdate" + } + } + } + }, + "RecommendedSensitivityLabelUpdateProperties": { + "description": "Properties of an operation executed on a recommended sensitivity label.", + "required": [ + "op", + "schema", + "table", + "column" + ], + "type": "object", + "properties": { + "op": { + "enum": [ + "enable", + "disable" + ], + "type": "string", + "x-ms-enum": { + "name": "RecommendedSensitivityLabelUpdateKind", + "modelAsString": false + } + }, + "schema": { + "description": "Schema name of the column to update.", + "type": "string" + }, + "table": { + "description": "Table name of the column to update.", + "type": "string" + }, + "column": { + "description": "Column name to update.", + "type": "string" + } + } + }, + "SensitivityLabel": { + "description": "A sensitivity label.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "managedBy": { + "description": "Resource that manages the sensitivity label.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SensitivityLabelProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SensitivityLabelListResult": { + "description": "A list of sensitivity labels.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SensitivityLabel" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SensitivityLabelProperties": { + "description": "Properties of a sensitivity label.", + "type": "object", + "properties": { + "schemaName": { + "description": "The schema name.", + "type": "string", + "readOnly": true + }, + "tableName": { + "description": "The table name.", + "type": "string", + "readOnly": true + }, + "columnName": { + "description": "The column name.", + "type": "string", + "readOnly": true + }, + "labelName": { + "description": "The label name.", + "type": "string" + }, + "labelId": { + "description": "The label ID.", + "type": "string" + }, + "informationType": { + "description": "The information type.", + "type": "string" + }, + "informationTypeId": { + "description": "The information type ID.", + "type": "string" + }, + "isDisabled": { + "description": "Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.", + "type": "boolean", + "readOnly": true + }, + "rank": { + "enum": [ + "None", + "Low", + "Medium", + "High", + "Critical" + ], + "type": "string", + "x-ms-enum": { + "name": "SensitivityLabelRank", + "modelAsString": false + } + }, + "clientClassificationSource": { + "enum": [ + "None", + "Native", + "Recommended", + "MIP" + ], + "type": "string", + "x-ms-enum": { + "name": "ClientClassificationSource", + "modelAsString": true + } + } + } + }, + "SensitivityLabelUpdate": { + "description": "A sensitivity label update operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SensitivityLabelUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SensitivityLabelUpdateList": { + "description": "A list of sensitivity label update operations.", + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/SensitivityLabelUpdate" + } + } + } + }, + "SensitivityLabelUpdateProperties": { + "description": "Properties of an operation executed on a sensitivity label.", + "required": [ + "op", + "schema", + "table", + "column" + ], + "type": "object", + "properties": { + "op": { + "enum": [ + "set", + "remove" + ], + "type": "string", + "x-ms-enum": { + "name": "SensitivityLabelUpdateKind", + "modelAsString": false + } + }, + "schema": { + "description": "Schema name of the column to update.", + "type": "string" + }, + "table": { + "description": "Table name of the column to update.", + "type": "string" + }, + "column": { + "description": "Column name to update.", + "type": "string" + }, + "sensitivityLabel": { + "$ref": "#/definitions/SensitivityLabel", + "description": "The sensitivity label information to apply on a column." + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseTables.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseTables.json new file mode 100644 index 000000000000..667cc9d3f8f8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseTables.json @@ -0,0 +1,225 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables": { + "get": { + "tags": [ + "ManagedDatabaseTables" + ], + "description": "List managed database tables", + "operationId": "ManagedDatabaseTables_ListBySchema", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database tables.", + "schema": { + "$ref": "#/definitions/DatabaseTableListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/DatabaseTable", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database tables": { + "$ref": "./examples/ManagedDatabaseTableListBySchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}": { + "get": { + "tags": [ + "ManagedDatabaseTables" + ], + "description": "Get managed database table", + "operationId": "ManagedDatabaseTables_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database table.", + "schema": { + "$ref": "#/definitions/DatabaseTable" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Get managed database table": { + "$ref": "./examples/ManagedDatabaseTableGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseTable": { + "description": "A database table resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseTableProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseTableListResult": { + "description": "A list of database tables.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseTable" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseTableProperties": { + "description": "Database table properties.", + "type": "object", + "properties": { + "temporalType": { + "description": "The table temporal type.", + "enum": [ + "NonTemporalTable", + "HistoryTable", + "SystemVersionedTemporalTable" + ], + "type": "string", + "x-ms-enum": { + "name": "TableTemporalType", + "modelAsString": true + } + }, + "memoryOptimized": { + "description": "Whether or not the table is memory optimized.", + "type": "boolean" + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseTransparentDataEncryption.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseTransparentDataEncryption.json new file mode 100644 index 000000000000..344e767ab52b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseTransparentDataEncryption.json @@ -0,0 +1,284 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption": { + "get": { + "tags": [ + "ManagedDatabaseTransparentDataEncryption" + ], + "description": "Gets a list of managed database's transparent data encryptions.", + "operationId": "ManagedDatabaseTransparentDataEncryption_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the transparent data encryption is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed database transparent data encryptions.", + "schema": { + "$ref": "#/definitions/ManagedTransparentDataEncryptionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 AttemptedEncryptionOnSystemDatabase - Cannot encrypt a system database. Database encryption operations cannot be performed for 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a list of the database's transparent data encryptions": { + "$ref": "./examples/ManagedTransparentDataEncryptionList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}": { + "get": { + "tags": [ + "ManagedDatabaseTransparentDataEncryption" + ], + "description": "Gets a managed database's transparent data encryption.", + "operationId": "ManagedDatabaseTransparentDataEncryption_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the transparent data encryption is defined.", + "required": true, + "type": "string" + }, + { + "name": "tdeName", + "in": "path", + "description": "The name of the transparent data encryption configuration.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "TransparentDataEncryptionName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed database transparent data encryption.", + "schema": { + "$ref": "#/definitions/ManagedTransparentDataEncryption" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 AttemptedEncryptionOnSystemDatabase - Cannot encrypt a system database. Database encryption operations cannot be performed for 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + } + }, + "x-ms-examples": { + "Get a database's transparent data encryption": { + "$ref": "./examples/ManagedTransparentDataEncryptionGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseTransparentDataEncryption" + ], + "description": "Updates a database's transparent data encryption configuration.", + "operationId": "ManagedDatabaseTransparentDataEncryption_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the managed database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "tdeName", + "in": "path", + "description": "The name of the transparent data encryption configuration.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "TransparentDataEncryptionName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The database transparent data encryption.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedTransparentDataEncryption" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database Transparent Data Encryption state.", + "schema": { + "$ref": "#/definitions/ManagedTransparentDataEncryption" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 AttemptedEncryptionOnSystemDatabase - Cannot encrypt a system database. Database encryption operations cannot be performed for 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidTransparentDataEncryptionUpdateRequest - Please enter a valid state. Please use \"Enabled\" or \"Disabled\".\n\n * 400 InvalidTransparentDataEncryptionName - The transparent data encryption key name is not supported.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + }, + "201": { + "description": "Successfully created the database transparent data encryption state.", + "schema": { + "$ref": "#/definitions/ManagedTransparentDataEncryption" + } + } + }, + "x-ms-examples": { + "Update a database's Transparent Data Encryption state with minimal parameters": { + "$ref": "./examples/ManagedTransparentDataEncryptionUpdate.json" + } + } + } + } + }, + "definitions": { + "ManagedTransparentDataEncryption": { + "description": "A managed database transparent data encryption state.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedTransparentDataEncryptionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedTransparentDataEncryptionListResult": { + "description": "A list of managed transparent data encryptions", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedTransparentDataEncryption" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedTransparentDataEncryptionProperties": { + "description": "Properties of a transparent data encryption.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the transparent data encryption.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "TransparentDataEncryptionState", + "modelAsString": false + } + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.json new file mode 100644 index 000000000000..c440c9b5d715 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.json @@ -0,0 +1,342 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Gets a database's vulnerability assessment rule baseline.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Creates or updates a database's vulnerability assessment rule baseline.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Creates or updates a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentRuleBaselines" + ], + "description": "Removes the database's vulnerability assessment rule baseline.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).", + "required": true, + "type": "string", + "enum": [ + "master", + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment rule baseline." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Removes a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessmentRuleBaseline": { + "description": "A database vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseVulnerabilityAssessmentRuleBaselineItem": { + "description": "Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result.", + "required": [ + "result" + ], + "type": "object", + "properties": { + "result": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DatabaseVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Vulnerability Assessment rule baseline.", + "required": [ + "baselineResults" + ], + "type": "object", + "properties": { + "baselineResults": { + "description": "The rule baseline result", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineItem" + } + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessmentScans.json new file mode 100644 index 000000000000..4629e2f63f64 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessmentScans.json @@ -0,0 +1,466 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScans" + ], + "description": "Lists the vulnerability assessment scans of a database.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan records.", + "schema": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecordListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the list of a database vulnerability assessment scan records": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScans" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan record.", + "schema": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database vulnerability assessment scan record by scan ID": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export": { + "post": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScans" + ], + "description": "Convert an existing scan result to a human readable format. If already exists nothing happens", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_Export", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the scanned database.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Scan result was converted successfully.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 409 VulnerabilityAssessmentStoragelessIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Scan result was converted successfully.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" + } + } + }, + "x-ms-examples": { + "Export a database's vulnerability assessment scan results.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan": { + "post": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScans" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_InitiateScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidVulnerabilityAssessmentScanIdLength - The vulnerability assessment scan ID length must be below {0} characters.\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings. \n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 VulnerabilityAssessmentStoragelessIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\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 * 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 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessmentScanExportProperties": { + "description": "Properties of the export operation's result.", + "type": "object", + "properties": { + "exportedReportLocation": { + "description": "Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx).", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseVulnerabilityAssessmentScansExport": { + "description": "A database Vulnerability Assessment scan export resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScanExportProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VulnerabilityAssessmentScanError": { + "description": "Properties of a vulnerability assessment scan error.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanRecord": { + "description": "A vulnerability assessment scan record.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecordProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VulnerabilityAssessmentScanRecordListResult": { + "description": "A list of vulnerability assessment scan records.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanRecordProperties": { + "description": "Properties of a vulnerability assessment scan record.", + "type": "object", + "properties": { + "scanId": { + "description": "The scan ID.", + "type": "string", + "readOnly": true + }, + "triggerType": { + "description": "The scan trigger type.", + "enum": [ + "OnDemand", + "Recurring" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanTriggerType", + "modelAsString": true + } + }, + "state": { + "description": "The scan status.", + "enum": [ + "Passed", + "Failed", + "FailedToRun", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanState", + "modelAsString": true + } + }, + "startTime": { + "format": "date-time", + "description": "The scan start time (UTC).", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The scan end time (UTC).", + "type": "string", + "readOnly": true + }, + "errors": { + "description": "The scan errors.", + "type": "array", + "items": { + "$ref": "#/definitions/VulnerabilityAssessmentScanError" + }, + "readOnly": true + }, + "storageContainerPath": { + "description": "The scan results storage container path.", + "type": "string", + "readOnly": true + }, + "numberOfFailedSecurityChecks": { + "format": "int32", + "description": "The number of failed security checks.", + "type": "integer", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessments.json new file mode 100644 index 000000000000..a649e601d20f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessments.json @@ -0,0 +1,381 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessments" + ], + "description": "Lists the vulnerability assessments of a managed database.", + "operationId": "ManagedDatabaseVulnerabilityAssessments_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessments.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a database's vulnerability assessments list": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessments" + ], + "description": "Gets the database's vulnerability assessment.", + "operationId": "ManagedDatabaseVulnerabilityAssessments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a database's vulnerability assessment": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessments" + ], + "description": "Creates or updates the database's vulnerability assessment.", + "operationId": "ManagedDatabaseVulnerabilityAssessments_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 VulnerabilityAssessmentStoragelessIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a database's vulnerability assessment with minimal parameters": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json" + }, + "Create a database's vulnerability assessment with all parameters": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessments" + ], + "description": "Removes the database's vulnerability assessment.", + "operationId": "ManagedDatabaseVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Remove a database's vulnerability assessment": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessment": { + "description": "A database vulnerability assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseVulnerabilityAssessmentListResult": { + "description": "A list of the database's vulnerability assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseVulnerabilityAssessmentProperties": { + "description": "Properties of a database Vulnerability Assessment.", + "type": "object", + "properties": { + "storageContainerPath": { + "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn't set", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageContainerSasKey": { + "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "recurringScans": { + "$ref": "#/definitions/VulnerabilityAssessmentRecurringScansProperties", + "description": "The recurring scans settings" + } + } + }, + "VulnerabilityAssessmentRecurringScansProperties": { + "description": "Properties of a Vulnerability Assessment recurring scans.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Recurring scans state.", + "type": "boolean" + }, + "emailSubscriptionAdmins": { + "description": "Specifies that the schedule scan notification will be is sent to the subscription administrators.", + "default": true, + "type": "boolean" + }, + "emails": { + "description": "Specifies an array of e-mail addresses to which the scan notification is sent.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabases.json new file mode 100644 index 000000000000..f45df9872bb1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabases.json @@ -0,0 +1,880 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases": { + "get": { + "tags": [ + "ManagedDatabases" + ], + "description": "Gets a list of managed databases.", + "operationId": "ManagedDatabases_ListByInstance", + "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 databases.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List databases by managed instances": { + "$ref": "./examples/ManagedDatabaseListByManagedInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}": { + "get": { + "tags": [ + "ManagedDatabases" + ], + "description": "Gets a managed database.", + "operationId": "ManagedDatabases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a managed database": { + "$ref": "./examples/ManagedDatabaseGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabases" + ], + "description": "Creates a new database or updates an existing database.", + "operationId": "ManagedDatabases_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested database resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidCrossSubscriptionTargetManagedInstanceId - Invalid cross subscription target managed instance identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 400 CrossSubscriptionRestorableDroppedDatabaseIdGivenForRestoreWithCrossSubscriptionSourceDatabaseId - Cannot specify crossSubscriptionRestorableDroppedDatabaseId when crossSubscriptionSourceDatabaseId is already given.\n\n * 400 MissmatchingCrossSubscriptionTargetManagedInstanceIdWithUrl - The provided crossSubscriptionTargetManagedInstanceId must match the instance in the URL.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidLongTermRetentionManagedInstanceBackupId - Invalid long term retention backup identifier for Managed Instances.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 UpdatingInstanceAndBackupRedundancy - Instance zone redundancy and backup storage redundancy cannot be updated in the same request.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 AutoCompleteMissingLastBackupName - Auto complete restore request must have lastBackupName parameter provided.\n\n * 400 MissingThumbprint - Can not find server certificate.\n\n * 400 BlobStorageServerFailure - Blob storage server failure has occurred.\n\n * 400 BackupSetNotFound - No backups were found to restore the database. Please contact support to restore the database.\n\n * 400 FullBackupNotFound - Full backup can not be found.\n\n * 400 RestoreFromStripedBackupsNotEnabled - Restoring from striped backups is not supported.\n\n * 400 BrokenRestorePlanNoFullBackup - The restore plan is broken because there is no full backup.\n\n * 400 BrokenRestorePlanWrongLogBackupLSN - The restore plan is broken because firstLsn of current log backup is not <= lastLsn of next log backup.\n\n * 400 BrokenRestorePlanWrongDiffBackupLSN - The restore plan is broken because firstLsn of diff backup is not >= firstLsn of full backup.\n\n * 400 BrokenRestorePlanGapInLogBackups - The restore plan is broken because firstLsn of current log backup is not equal to lastLsn of prev log backup.\n\n * 400 TargetServerDoesNotExist - The target server {0} does not exist or is not ready yet. Please check that it exists and retry the restore request.\n\n * 400 TargetServerRestoreNotAllowed - The target server {0} is currently not in a state that allows a restore to be started.\n\n * 400 XtpInitializedDuringRestore - Memory-optimized filegroup must be empty in order to be restored on General Purpose tier of SQL Database Managed Instance.\n\n * 400 FullBackupMissingChecksum - Provided full backup is missing checksum.\n\n * 400 FullBackupDamaged - Provided full backup is damaged.\n\n * 400 MissingStripeInBackupSet - Provided backup set has one or more missing stripes.\n\n * 400 BackupsFromMultipleDatabasesDetectedInTheContainerWhileRestoreInProgress - There are backups from multiple databases in the container folder. Please make sure the container folder has backups from a single database.{0}\n\n * 400 BrokenRestorePlanWrongDiffBaseGUID - The restore plan is broken because DifferentialBaseGuid of diff backup does not match BackupSetGuid of full backup.\n\n * 400 CorruptedPagesInBackupSet - Operation was aborted because RESTORE detected one or more corrupted pages in the backup set.\n\n * 400 ManagedIdentityIssueDetectedWhileRestoreInProgress - Managed identity is not set up properly. Please verify and try again.\n\n * 400 CorruptedPagesListMaintenance - Operation was aborted because an internal error occurred while processing the backup taken without checksum.\n\n * 400 PartiallyContainedDatabaseUnsupported - \"Backup for a partially contained database is not supported.\"\n\n * 400 RequiredBackupIsNotLastRestored - Migration cannot be completed because provided backup file name is not the name of the last backup file that is restored.\n\n * 400 ManagedInstanceStorageLimitHit - The managed instance has reached its storage limit.\n\n * 400 IncompatiblePhysicalLayoutTooFewDataFiles - Database backup contains incompatible physical layout. No data files are found in the backup.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineDataFilesExist - Database backup contains incompatible physical layout. Non-online data files exist.\n\n * 400 IncompatiblePhysicalLayoutWrongNumberOfLogFiles - Database backup contains incompatible physical layout. Multiple log files are not supported.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineLogFilesExist - Database backup contains incompatible physical layout. Non-online log files exist.\n\n * 400 IncompatiblePhysicalLayoutTooManyNonDataLogFiles - Database backup contains incompatible physical layout. Too many non-data/log files.\n\n * 400 ExternalBackupAlreadySignaledToComplete - The restore request has already been signaled to complete.\n\n * 400 ExternalBackupRestoreHasNotBeenStarted - The restore request can only be completed once the restore has started.\n\n * 400 ExternalBackupUpgradeInProgress - The restore request cannot be completed, since upgrade is in progress.\n\n * 400 IncompatiblePhysicalLayoutTooManyXTPFiles - Database backup contains incompatible physical layout. Multiple files found in the filegroup that contains MEMORY_OPTIMIZED_DATA.\n\n * 400 BlobStorageFailure - Blob storage failure has occurred.\n\n * 400 BackupsFromMultipleDatabasesDetectedInTheContainerFromTheStart - There are backups from multiple databases in the container folder. Please make sure the container folder has backups from a single database.{0}\n\n * 400 ManagedIdentityIssueDetectedFromTheStart - Managed identity is not set up properly. Please verify and try again.\n\n * 400 BackupSetBroken - Backup set is broken.\n\n * 400 SqlRestoreError - Non retriable error occurred while restoring backup with index {0} - {1} {2}\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - The instance is multi-az but backup storage is being updated from zone redundant to non-zone redundant.\n\n * 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - Cannot update instance redundancy because backup storage redundancy update is in progress.\n\n * 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - The backup storage is non-zone redundant but instance redundancy is being updated to zone redundant.\n\n * 409 BackupRedundancyUpdateConflict - Cannot update backup storage redundancy because a backup storage redundancy update is already in progress.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\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 * 412 InstanceNotReadyForBackupRedundancyUpdate - Cannot update backup storage redundancy because the instance is not ready.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates a new managed database with minimal properties": { + "$ref": "./examples/ManagedDatabaseCreateMin.json" + }, + "Creates a new managed database with maximal properties": { + "$ref": "./examples/ManagedDatabaseCreateMax.json" + }, + "Creates a new managed database using point in time restore": { + "$ref": "./examples/ManagedDatabaseCreatePointInTimeRestore.json" + }, + "Creates a new managed database from restoring a geo-replicated backup": { + "$ref": "./examples/ManagedDatabaseCreateRecovery.json" + }, + "Creates a new managed database by restoring from an external backup": { + "$ref": "./examples/ManagedDatabaseCreateRestoreExternalBackup.json" + }, + "Creates a new managed database by restoring from an external backup using managed identity": { + "$ref": "./examples/ManagedDatabaseCreateRestoreExternalBackupManagedIdentity.json" + }, + "Creates a new managed database from restoring a long term retention backup": { + "$ref": "./examples/ManagedDatabaseCreateRestoreLtrBackup.json" + }, + "Creates a new managed database using cross subscription point in time restore": { + "$ref": "./examples/ManagedDatabaseCreateCrossSubscriptionPointInTimeRestore.json" + }, + "Creates a new managed database with ledger on.": { + "$ref": "./examples/CreateManagedDatabaseLedger.json" + } + } + }, + "delete": { + "tags": [ + "ManagedDatabases" + ], + "description": "Deletes a managed database.", + "operationId": "ManagedDatabases_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed database." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerNoDropPrimary - The Geo-primary database cannot be dropped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotDropDatabaseAKVError - The database {0} on server {1} cannot be safely dropped because it is encrypted with a customer managed key that is no longer accessible to take the last backup before drop. Please restore Azure Key Vault Access on the server and revalidate the keys to make this database accessible and then proceed with the drop. For details see https://aka.ms/tdecmkrestorability\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 GeoReplicationDatabaseNotPrimary - The operation cannot be performed since the database '{0}' is a replication target.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 DropDisallowedDuringFailover - Can not drop database because a failover operation is in progress on the failover group.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\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 * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 TooManyRequests - 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 * 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": "Deleting the managed database is in progress." + }, + "204": { + "description": "The specified managed database does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete managed database": { + "$ref": "./examples/ManagedDatabaseDelete.json" + } + } + }, + "patch": { + "tags": [ + "ManagedDatabases" + ], + "description": "Updates an existing database.", + "operationId": "ManagedDatabases_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested database resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabaseUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/ManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidCrossSubscriptionTargetManagedInstanceId - Invalid cross subscription target managed instance identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 400 CrossSubscriptionRestorableDroppedDatabaseIdGivenForRestoreWithCrossSubscriptionSourceDatabaseId - Cannot specify crossSubscriptionRestorableDroppedDatabaseId when crossSubscriptionSourceDatabaseId is already given.\n\n * 400 MissmatchingCrossSubscriptionTargetManagedInstanceIdWithUrl - The provided crossSubscriptionTargetManagedInstanceId must match the instance in the URL.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\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 * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - 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." + }, + "202": { + "description": "Updating the managed database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Updates a managed database with minimal properties": { + "$ref": "./examples/ManagedDatabaseUpdateMin.json" + }, + "Updates a managed database with maximal properties": { + "$ref": "./examples/ManagedDatabaseUpdateMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/cancelMove": { + "post": { + "tags": [ + "ManagedDatabases" + ], + "description": "Cancels a managed database move operation.", + "operationId": "ManagedDatabases_CancelMove", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "Parameters of the cancel managed database move operation.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabaseMoveDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully canceled move request." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceManagedDatabaseMoveRequest - Invalid Managed Instance database move request.\n\n * 400 InvalidManagedDatabaseMoveTargetResourceId - Invalid Managed Instance database move target resource ID in the properties.\n\n * 400 InvalidMoveTargetResourceId - The target resource identifier in move request is invalid.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 SystemDatabaseUnsupportedOperation - Unsupported operation for system database.\n\n * 400 XtpServerStateMismatch - Both source and target servers do not support memory optimized data.\n\n * 400 ManagedDatabaseGPFileSizeLimitExceeded - Creating a copy of a managed database on different SQL Managed Instance with General Purpose service tier would violate data file size limit. See: 'https://docs.microsoft.com/azure/azure-sql/managed-instance/resource-limits#service-tier-characteristics'.\n\n * 400 ManagedInstanceGPStorageAccountLimitExceeded - Creating a copy of a database on different SQL Managed Instance with General Purpose service tier would violate storage account size limit. See: 'https://docs.microsoft.com/azure/azure-sql/managed-instance/resource-limits#service-tier-characteristics'.\n\n * 400 TargetInsufficientStorage - Attempt to move/restore/copy database on the destination instance with insufficient space.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 CrossResourceOperationNotSupported - Cross resource operation is not supported.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 CrossManagedInstanceDatabaseMovementNotExist - Database movement does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 429 SubscriptionTooManyRequests - 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 * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Canceling move is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Cancels a managed database move.": { + "$ref": "./examples/ManagedDatabaseCancelMove.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeMove": { + "post": { + "tags": [ + "ManagedDatabases" + ], + "description": "Completes a managed database move operation.", + "operationId": "ManagedDatabases_CompleteMove", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "Parameters of the complete managed database move operation.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabaseMoveDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed move request." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceManagedDatabaseMoveRequest - Invalid Managed Instance database move request.\n\n * 400 InvalidManagedDatabaseMoveTargetResourceId - Invalid Managed Instance database move target resource ID in the properties.\n\n * 400 InvalidMoveTargetResourceId - The target resource identifier in move request is invalid.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 SystemDatabaseUnsupportedOperation - Unsupported operation for system database.\n\n * 400 XtpServerStateMismatch - Both source and target servers do not support memory optimized data.\n\n * 400 ManagedDatabaseGPFileSizeLimitExceeded - Creating a copy of a managed database on different SQL Managed Instance with General Purpose service tier would violate data file size limit. See: 'https://docs.microsoft.com/azure/azure-sql/managed-instance/resource-limits#service-tier-characteristics'.\n\n * 400 ManagedInstanceGPStorageAccountLimitExceeded - Creating a copy of a database on different SQL Managed Instance with General Purpose service tier would violate storage account size limit. See: 'https://docs.microsoft.com/azure/azure-sql/managed-instance/resource-limits#service-tier-characteristics'.\n\n * 400 TargetInsufficientStorage - Attempt to move/restore/copy database on the destination instance with insufficient space.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 CrossResourceOperationNotSupported - Cross resource operation is not supported.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 CrossManagedInstanceDatabaseMovementNotExist - Database movement does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 429 SubscriptionTooManyRequests - 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 * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Completing move is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Completes a managed database move.": { + "$ref": "./examples/ManagedDatabaseCompleteMove.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeRestore": { + "post": { + "tags": [ + "ManagedDatabases" + ], + "description": "Completes the restore operation on a managed database.", + "operationId": "ManagedDatabases_CompleteRestore", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The definition for completing the restore of this managed database.", + "required": true, + "schema": { + "$ref": "#/definitions/CompleteDatabaseRestoreDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed restore request." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseCompleteRestoreRequest - The complete database restore request is invalid\n\n * 400 InvalidDatabaseCompleteRestoreRequestLastBackupName - The last backup name is invalid\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 AutoCompleteMissingLastBackupName - Auto complete restore request must have lastBackupName parameter provided.\n\n * 400 MissingThumbprint - Can not find server certificate.\n\n * 400 BlobStorageServerFailure - Blob storage server failure has occurred.\n\n * 400 BackupSetNotFound - No backups were found to restore the database. Please contact support to restore the database.\n\n * 400 FullBackupNotFound - Full backup can not be found.\n\n * 400 RestoreFromStripedBackupsNotEnabled - Restoring from striped backups is not supported.\n\n * 400 BrokenRestorePlanNoFullBackup - The restore plan is broken because there is no full backup.\n\n * 400 BrokenRestorePlanWrongLogBackupLSN - The restore plan is broken because firstLsn of current log backup is not <= lastLsn of next log backup.\n\n * 400 BrokenRestorePlanWrongDiffBackupLSN - The restore plan is broken because firstLsn of diff backup is not >= firstLsn of full backup.\n\n * 400 BrokenRestorePlanGapInLogBackups - The restore plan is broken because firstLsn of current log backup is not equal to lastLsn of prev log backup.\n\n * 400 TargetServerDoesNotExist - The target server {0} does not exist or is not ready yet. Please check that it exists and retry the restore request.\n\n * 400 TargetServerRestoreNotAllowed - The target server {0} is currently not in a state that allows a restore to be started.\n\n * 400 XtpInitializedDuringRestore - Memory-optimized filegroup must be empty in order to be restored on General Purpose tier of SQL Database Managed Instance.\n\n * 400 FullBackupMissingChecksum - Provided full backup is missing checksum.\n\n * 400 FullBackupDamaged - Provided full backup is damaged.\n\n * 400 MissingStripeInBackupSet - Provided backup set has one or more missing stripes.\n\n * 400 BackupsFromMultipleDatabasesDetectedInTheContainerWhileRestoreInProgress - There are backups from multiple databases in the container folder. Please make sure the container folder has backups from a single database.{0}\n\n * 400 BrokenRestorePlanWrongDiffBaseGUID - The restore plan is broken because DifferentialBaseGuid of diff backup does not match BackupSetGuid of full backup.\n\n * 400 CorruptedPagesInBackupSet - Operation was aborted because RESTORE detected one or more corrupted pages in the backup set.\n\n * 400 ManagedIdentityIssueDetectedWhileRestoreInProgress - Managed identity is not set up properly. Please verify and try again.\n\n * 400 CorruptedPagesListMaintenance - Operation was aborted because an internal error occurred while processing the backup taken without checksum.\n\n * 400 PartiallyContainedDatabaseUnsupported - \"Backup for a partially contained database is not supported.\"\n\n * 400 RequiredBackupIsNotLastRestored - Migration cannot be completed because provided backup file name is not the name of the last backup file that is restored.\n\n * 400 ManagedInstanceStorageLimitHit - The managed instance has reached its storage limit.\n\n * 400 IncompatiblePhysicalLayoutTooFewDataFiles - Database backup contains incompatible physical layout. No data files are found in the backup.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineDataFilesExist - Database backup contains incompatible physical layout. Non-online data files exist.\n\n * 400 IncompatiblePhysicalLayoutWrongNumberOfLogFiles - Database backup contains incompatible physical layout. Multiple log files are not supported.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineLogFilesExist - Database backup contains incompatible physical layout. Non-online log files exist.\n\n * 400 IncompatiblePhysicalLayoutTooManyNonDataLogFiles - Database backup contains incompatible physical layout. Too many non-data/log files.\n\n * 400 ExternalBackupAlreadySignaledToComplete - The restore request has already been signaled to complete.\n\n * 400 ExternalBackupRestoreHasNotBeenStarted - The restore request can only be completed once the restore has started.\n\n * 400 ExternalBackupUpgradeInProgress - The restore request cannot be completed, since upgrade is in progress.\n\n * 400 IncompatiblePhysicalLayoutTooManyXTPFiles - Database backup contains incompatible physical layout. Multiple files found in the filegroup that contains MEMORY_OPTIMIZED_DATA.\n\n * 400 BlobStorageFailure - Blob storage failure has occurred.\n\n * 400 BackupsFromMultipleDatabasesDetectedInTheContainerFromTheStart - There are backups from multiple databases in the container folder. Please make sure the container folder has backups from a single database.{0}\n\n * 400 ManagedIdentityIssueDetectedFromTheStart - Managed identity is not set up properly. Please verify and try again.\n\n * 400 BackupSetBroken - Backup set is broken.\n\n * 400 SqlRestoreError - Non retriable error occurred while restoring backup with index {0} - {1} {2}\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 429 SubscriptionTooManyRequests - 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 * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Completing restore request is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Completes a managed database external backup restore.": { + "$ref": "./examples/ManagedDatabaseCompleteExternalRestore.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/startMove": { + "post": { + "tags": [ + "ManagedDatabases" + ], + "description": "Starts a managed database move operation.", + "operationId": "ManagedDatabases_StartMove", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "Parameters of the start managed database move operation.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedDatabaseStartMoveDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully started move request." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidManagedInstanceBackupMode - Invalid Managed Instance backup mode in the properties.\n\n * 400 InvalidManagedInstanceCompleteMode - Invalid Managed Instance complete mode in the properties.\n\n * 400 InvalidResourceManagedDatabaseMoveRequest - Invalid Managed Instance database move request.\n\n * 400 InvalidManagedDatabaseMoveTargetResourceId - Invalid Managed Instance database move target resource ID in the properties.\n\n * 400 InvalidMoveTargetResourceId - The target resource identifier in move request is invalid.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 ManagedDatabaseMoveSourceAndTargetNameDoNotMatch - The specified database name '{0}' at the source instance and the specified database name '{1}' at the destination instance must be the same.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPrimary - The given primary field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidPartner - The given partners field in create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestDuplicatePartner - One or more of the provided partner servers are already part of the instance failover group. Please make sure the primary server and all of the given partner servers are unique.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidManagedInstanceRegion - The provided partner managed instance region in the instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPartnerCount - Only one partner region is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestUnsupportedPairCount - Only one managed instance pair is supported.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpoint - The readWriteEndpoint field is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalid - The create or update instance failover group request body is empty or invalid.\n\n * 400 InstanceFailoverGroupUpdateOrDeleteRequestOnSecondary - Modifications to the instance failover group are not allowed on a secondary server. Execute the request on the primary server.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestNegativeGracePeriodValues - Grace period value for the read-write endpoint must be non-negative.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestLessThanMinimumGracePeriodValues - Grace period value for the instance failover group must be greater than or equal to the '{0}' minutes minimum grace period\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFields - The property failoverWithDataLossGracePeriodMinutes must be provided when failover policy Automatic is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteFailoverPolicy - The failoverPolicy field for the read-write endpoint is required for create or update requests.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestInvalidReadWriteEndpointFieldsForManualPolicy - Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint.\n\n * 400 InstanceFailoverGroupCreateOrUpdateRequestReadOnlyPropertyModified - The create or update instance failover group request body should not modify the read-only property '{0}'.\n\n * 400 InstanceFailoverGroupFailoverRequestOnPrimary - The failover request should be initiated on the secondary server of instance failover group.\n\n * 400 InstanceFailoverGroupPartnerManagedInstanceFromDifferentSubscription - Primary server and the partner server of failover group are from different subscriptions. Cross subscription for servers of failover group is not allowed.\n\n * 400 SystemDatabaseUnsupportedOperation - Unsupported operation for system database.\n\n * 400 XtpServerStateMismatch - Both source and target servers do not support memory optimized data.\n\n * 400 ManagedDatabaseGPFileSizeLimitExceeded - Creating a copy of a managed database on different SQL Managed Instance with General Purpose service tier would violate data file size limit. See: 'https://docs.microsoft.com/azure/azure-sql/managed-instance/resource-limits#service-tier-characteristics'.\n\n * 400 ManagedInstanceGPStorageAccountLimitExceeded - Creating a copy of a database on different SQL Managed Instance with General Purpose service tier would violate storage account size limit. See: 'https://docs.microsoft.com/azure/azure-sql/managed-instance/resource-limits#service-tier-characteristics'.\n\n * 400 TargetInsufficientStorage - Attempt to move/restore/copy database on the destination instance with insufficient space.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 CrossResourceOperationNotSupported - Cross resource operation is not supported.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ServerEditionMismatch - Edition must be the same as the primary server when creating a replica server.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 PlannedFailoverTimedOutForDatabase - User invoked planned failover, it timed out, and a specific database appears to be to blame.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidFailoverGroupRegion - Servers specified in an Instance Failover Group need to reside in different regions to provide isolation.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 InstanceFailoverGroupNotSecondary - Failover cannot be initiated from the primary server in a instance failover group.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 FailoverGroupRegionMismatch - Partner region specified in Failover Group need to match the region of the partner managed instance indicated.\n\n * 400 DnsZoneMismatch - The DNSZone on the partner server is different from the DNSZone on the source server. This breaks InstanceFailoverGroup functionality.\n\n * 400 GeoDrInstanceSizeMismatch - Primary managed instance and partner managed instance do not have the same storage size.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 GeoDrSecondaryInstanceNotEmpty - Secondary managed instance has user databases. To create an instance failover group the secondary managed instance needs to be empty.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 InstanceFailoverGroupIncorrectNetworkingConfiguration - Networking configuration is incorrect. Primary server's replication traffic cannot reach secondary server.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 StorageAccountFull - Managed Instance has reached the total capacity of underlying Azure storage account. Azure Premium Storage account is limited to 35TB of allocated space.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 UnsupportedBackupStorageRedundancy - Specified Backup Storage Redundancy is not supported in target region.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.\n\n * 400 LTRSterlingToVldbMigrationNotSupported - Cannot change service objective for database to Hyperscale as long-term retention is not yet supported on Hyperscale. Please disable long-term retention on the database and retry.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.\n\n * 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).\n\n * 400 MaintenanceWindowNotSupportedForNamedReplica - User tried to create or update named replica with non-default maintenance window which is not supported.\n\n * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.\n\n * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.\n\n * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.\n\n * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.\n\n * 400 InvalidStandbyGeoReadScale - User attempted to enable read scale on a standby geo database that does not support it.\n\n * 400 PerDatabaseCMKKeyRotationAttemptedWhileOldThumbprintInUse - Key Rotation for the TDE Protector at the database level is blocked when active transactions are holding up the log encrypted with old keys. Please refer to aka.ms/azuresqldbkeyrotation for possible strategies to workaround this issue.\n\n * 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.\n\n * 400 PerDBCMKNotSupportedWithLTR - Database-level CMK is not supported when Long-term Backup Retention is enabled on the database.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutDatabaseLevelEncryptionProtector - Database-level encryption protector must be set on the target database while attempting to copy or replicate a database encrypted with a database level key.\n\n * 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeys - While attempting to replicate a database configured with database level encryption protector, the current keys being used by the primary must be passed to the secondary database.\n\n * 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.\n\n * 400 PerDatabaseCMKGeoPrimaryIsNotConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must be configured with a database level encryption protector before setting a database level encryption protector on the geo-secondary.\n\n * 400 PerDatabaseCMKGeoPrimaryIsConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must not be configured with a database level encryption protector when failing over to a geo-secondary without a database level encryption protector.\n\n * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 InvalidDatabaseCreateMode - Invalid request to create a database.\n\n * 400 MissingAsymmetricKeyOnTargetServer - Target server does not have access to an asymmetric key.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MultipleDroppedDatabasesWithTheSameName - Found multiple dropped databases with the same name on server.\n\n * 400 AzureKeyVaultClientError - The Azure Key Vault client encountered an error.\n\n * 400 AzureKeyVaultClientInfoError - An error occurred while obtaining information for the Azure Key Vault client.\n\n * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 IsLedgerDatabaseIsNotSupportedOnResourceType - Changing the ledger property is not supported for this resource type.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.\n\n * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.\n\n * 400 UnableToCreateGeoChain - User attempted to create secondary database (chaining) even though automatic upload of ledger digests has been configured\n\n * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.\n\n * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.\n\n * 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.\n\n * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.\n\n * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.\n\n * 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.\n\n * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.\n\n * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.\n\n * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.\n\n * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.\n\n * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.\n\n * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.\n\n * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.\n\n * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.\n\n * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.\n\n * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.\n\n * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.\n\n * 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database\n\n * 400 UnsupportedBackupStorageRedundancyForEdition - The requested backup storage redundancy is not supported for edition\n\n * 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.\n\n * 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.\n\n * 400 InvalidIdentityId - One or more identity id(s) provided are not valid ARM resource id(s). Please input valid id(s) and try again.\n\n * 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.\n\n * 400 InvalidNumberOfIdentities - Only one user assigned managed identity is supported at the Database Level.\n\n * 400 DatabaseNamedReplicaChainingNotAllowed - User tried to create a named replica of a named replica which is not allowed.\n\n * 400 DatabaseNamedReplicaInvalidOperation - User attempted an unsupported operation on a named replica.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 DatabaseNamedReplicaInvalidSourceDatabase - User attempted to create a named replica in a different subscription or region than the source database.\n\n * 400 CannotAssignIdentityToMaster - Cannot assign an identity to a system database. Database identity cannot be assigned to 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 MissingThumbprintCrm - The restore operation of a CRM database failed because a required TDE certificate was missing. Please retry the restore operation to an existing elastic pool.\n\n * 400 ElasticPoolOverStorage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.\n\n * 400 RestoreTargetEditionSizeInsufficientV2 - User attempted to restore a database to an edition that is a smaller size than the allocated size of the restored database.\n\n * 400 ResourcePoolStorageLimitHitDuringRestore - The restored database can't be restored into the resource pool due to the remaining storage capacity in the pool.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 PerDatabaseCMKGeoReplicationNotSupported - Geo Replication and Database Copy is not supported when Database-level CMK is configured in preview.\n\n * 400 InvalidStandbyGeoEdition - User attempted to create a DTU based standby geo.\n\n * 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.\n\n * 400 GeoRestoreBackupStorageTypeNotSupported - Database recovery requests are invalid when issued against a database that is not configured to use geo-redundant backup storage.\n\n * 400 RestoreHyperscaleToNonHyperscale - Restoring a Hyperscale database backup to a non-Hyperscale service tier or vice versa is not supported.\n\n * 400 SubscriptionDoesNotHaveAccessToServer - The subscription does not have access to the specified server(s)\n\n * 400 RecoveryPointDoesNotExist - The specified recovery point either does not exist or is not valid.\n\n * 400 LtrBackupNotFound - The specified long term retention backup does not exist.\n\n * 400 InvalidPointInTime - The specified point in time is not valid for the database.\n\n * 400 GeoRestoreCannotResolveTargetCluster - Cannot resolve target cluster for server\n\n * 400 CannotSpecifyEditionOrSloWhenRestoringToPool - Specifying the target service level objective or edition is not supported when restoring to an elastic pool.\n\n * 400 RestoreNotSupportedForGeoDrSecondary - Point-in-time restore and database recovery operations are not supported on databases that are currently configured as geo-secondaries.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 GeoRedundantBackupsNotPermittedForSubscription - Geo-redundant backup storage is blocked for all databases under subscription '{0}' by preview feature 'Azure SQL Database Block Geo-redundant Backup Storage'. Please select a different backup storage redundancy.\n\n * 400 RestoreHyperscaleToNonHyperscaleElasticPool - Restoring a Hyperscale database to a non-Hyperscale elastic pool or restoring a non-Hyperscale database to a Hyperscale elastic pool is not supported.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 CrossManagedInstanceDatabaseMovementNotExist - Database movement does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ManagedInstanceContainsInaccessibleDatabases - The operation could not be completed because managed instance '{0}' contains databases that are in the Inaccessible state. Please either drop inaccessible databases or fix the issues with access to the customer-managed TDE protector key for managed instance before retrying operation. https://go.microsoft.com/fwlink/?linkid=2111623\n\n * 409 ManagedInstanceHasHybridLink - User tried to initiate operation that is not supported when managed instance has a hybrid link configured.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 InstanceFailoverGroupAlreadyExists - Failover group already exists on a given server.\n\n * 409 InstanceFailoverGroupBusy - Instance failover group is busy with another operation.\n\n * 409 InstanceFailoverGroupDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 InvalidFailoverGroupName - Invalid Instance Failover Group name was supplied.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidDatabaseStateForOperation - The operation is not allowed on the database in its current replication state.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.\n\n * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.\n\n * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.\n\n * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.\n\n * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool\n\n * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.\n\n * 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.\n\n * 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.\n\n * 409 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 429 SubscriptionTooManyRequests - 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 * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\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 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Starting move is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Starts a managed database move with no optional parameters specified.": { + "$ref": "./examples/ManagedDatabaseStartMoveMin.json" + }, + "Starts a managed database move with all optional parameters specified.": { + "$ref": "./examples/ManagedDatabaseStartMoveMax.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/inaccessibleManagedDatabases": { + "get": { + "tags": [ + "ManagedDatabases" + ], + "description": "Gets a list of inaccessible managed databases in a managed instance", + "operationId": "ManagedDatabases_ListInaccessibleByInstance", + "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 inaccessible managed databases in a managed instance.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List inaccessible managed databases by managed instances": { + "$ref": "./examples/InaccessibleManagedDatabaseListByManagedInstance.json" + } + } + } + } + }, + "definitions": { + "CompleteDatabaseRestoreDefinition": { + "description": "Contains the information necessary to perform a complete database restore operation.", + "required": [ + "lastBackupName" + ], + "type": "object", + "properties": { + "lastBackupName": { + "description": "The last backup name to apply", + "type": "string" + } + } + }, + "ManagedDatabase": { + "description": "A managed database resource.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseListResult": { + "description": "A list of managed databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedDatabaseMoveDefinition": { + "description": "Contains the information necessary to perform a managed database move.", + "required": [ + "destinationManagedDatabaseId" + ], + "type": "object", + "properties": { + "destinationManagedDatabaseId": { + "description": "The destination managed database ID", + "type": "string", + "format": "arm-id" + } + } + }, + "ManagedDatabaseProperties": { + "description": "The managed database's properties.", + "type": "object", + "properties": { + "collation": { + "description": "Collation of the managed database.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "status": { + "description": "Status of the database.", + "enum": [ + "Online", + "Offline", + "Shutdown", + "Creating", + "Inaccessible", + "Restoring", + "Updating", + "Stopping", + "Stopped", + "Starting", + "DbMoving", + "DbCopying" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagedDatabaseStatus", + "modelAsString": true + } + }, + "creationDate": { + "format": "date-time", + "description": "Creation date of the database.", + "type": "string", + "readOnly": true + }, + "earliestRestorePoint": { + "format": "date-time", + "description": "Earliest restore point in time for point in time restore.", + "type": "string", + "readOnly": true + }, + "restorePointInTime": { + "format": "date-time", + "description": "Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "defaultSecondaryLocation": { + "description": "Geo paired region.", + "type": "string", + "readOnly": true + }, + "catalogCollation": { + "description": "Collation of the metadata catalog.", + "enum": [ + "DATABASE_DEFAULT", + "SQL_Latin1_General_CP1_CI_AS" + ], + "type": "string", + "x-ms-enum": { + "name": "CatalogCollationType", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "createMode": { + "description": "Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).", + "enum": [ + "Default", + "RestoreExternalBackup", + "PointInTimeRestore", + "Recovery", + "RestoreLongTermRetentionBackup" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedDatabaseCreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageContainerUri": { + "description": "Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "sourceDatabaseId": { + "description": "The resource identifier of the source database associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-mutability": [ + "create" + ] + }, + "crossSubscriptionSourceDatabaseId": { + "description": "The resource identifier of the cross-subscription source database associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-mutability": [ + "create" + ] + }, + "restorableDroppedDatabaseId": { + "description": "The restorable dropped database resource id to restore when creating this database.", + "type": "string", + "format": "arm-id", + "x-ms-mutability": [ + "create" + ] + }, + "crossSubscriptionRestorableDroppedDatabaseId": { + "description": "The restorable cross-subscription dropped database resource id to restore when creating this database.", + "type": "string", + "format": "arm-id", + "x-ms-mutability": [ + "create" + ] + }, + "storageContainerIdentity": { + "description": "Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageContainerSasToken": { + "description": "Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "failoverGroupId": { + "description": "Instance Failover Group resource identifier that this managed database belongs to.", + "type": "string", + "readOnly": true + }, + "recoverableDatabaseId": { + "description": "The resource identifier of the recoverable database associated with create operation of this database.", + "type": "string", + "format": "arm-id", + "x-ms-mutability": [ + "create" + ] + }, + "longTermRetentionBackupResourceId": { + "description": "The name of the Long Term Retention backup to be used for restore of this managed database.", + "type": "string", + "format": "arm-id", + "x-ms-mutability": [ + "create" + ] + }, + "autoCompleteRestore": { + "description": "Whether to auto complete restore of this managed database.", + "type": "boolean", + "x-ms-mutability": [ + "create" + ] + }, + "lastBackupName": { + "description": "Last backup file name for restore of this managed database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "crossSubscriptionTargetManagedInstanceId": { + "description": "Target managed instance id used in cross-subscription restore.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "isLedgerOn": { + "description": "Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created.", + "type": "boolean", + "x-ms-mutability": [ + "read", + "create" + ] + } + } + }, + "ManagedDatabaseStartMoveDefinition": { + "description": "Contains the information necessary to start a managed database move.", + "required": [ + "destinationManagedDatabaseId" + ], + "type": "object", + "properties": { + "destinationManagedDatabaseId": { + "description": "The destination managed database ID", + "type": "string", + "format": "arm-id" + }, + "operationMode": { + "description": "The move operation mode.", + "default": "Move", + "enum": [ + "Move", + "Copy" + ], + "type": "string", + "x-ms-enum": { + "name": "MoveOperationMode", + "modelAsString": true + } + } + } + }, + "ManagedDatabaseUpdate": { + "description": "An managed database update.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAdministrators.json new file mode 100644 index 000000000000..b20f036a7133 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAdministrators.json @@ -0,0 +1,331 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators": { + "get": { + "tags": [ + "ManagedInstanceAdministrators" + ], + "description": "Gets a list of managed instance administrators.", + "operationId": "ManagedInstanceAdministrators_ListByInstance", + "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 managed instance administrators.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdministratorListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\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 administrators of managed instance": { + "$ref": "./examples/ManagedInstanceAdministratorListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}": { + "get": { + "tags": [ + "ManagedInstanceAdministrators" + ], + "description": "Gets a managed instance administrator.", + "operationId": "ManagedInstanceAdministrators_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the the specified managed instance administrator.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\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 * 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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\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-examples": { + "Get administrator of managed instance": { + "$ref": "./examples/ManagedInstanceAdministratorGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceAdministrators" + ], + "description": "Creates or updates a managed instance administrator.", + "operationId": "ManagedInstanceAdministrators_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested administrator parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceAdministrator" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance administrator.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\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 ServicePrincipalLookupInAadFailedIdentityForbidden - AzureAD Lookup failed because MSI was not granted read permissions on AAD.\n\n * 400 InvalidPrincipalType - This principal type is not supported in Windows Azure SQL Database.\n\n * 400 ServerPrincipalCreateLoginBadSyntax - There was an Syntax Error when executing Create Login statement for Azure AD Administrator.\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 SubscriptionNotFound - The requested subscription was not found.\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 * 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 * 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" + }, + "201": { + "description": "Successfully created the managed instance administrator.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdministrator" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create administrator of managed instance": { + "$ref": "./examples/ManagedInstanceAdministratorCreate.json" + }, + "Update administrator of managed instance": { + "$ref": "./examples/ManagedInstanceAdministratorUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstanceAdministrators" + ], + "description": "Deletes a managed instance administrator.", + "operationId": "ManagedInstanceAdministrators_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed instance administrator." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\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 ServicePrincipalLookupInAadFailedIdentityForbidden - AzureAD Lookup failed because MSI was not granted read permissions on AAD.\n\n * 400 InvalidPrincipalType - This principal type is not supported in Windows Azure SQL Database.\n\n * 400 ServerPrincipalCreateLoginBadSyntax - There was an Syntax Error when executing Create Login statement for Azure AD Administrator.\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 SubscriptionNotFound - The requested subscription was not found.\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 * 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 * 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" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete administrator of managed instance": { + "$ref": "./examples/ManagedInstanceAdministratorDelete.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceAdministrator": { + "description": "An Azure SQL managed instance administrator.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceAdministratorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceAdministratorListResult": { + "description": "A list of managed instance administrators.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceAdministrator" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceAdministratorProperties": { + "description": "The properties of a managed instance administrator.", + "required": [ + "administratorType", + "login", + "sid" + ], + "type": "object", + "properties": { + "administratorType": { + "description": "Type of the managed instance administrator.", + "enum": [ + "ActiveDirectory" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedInstanceAdministratorType", + "modelAsString": true + } + }, + "login": { + "description": "Login name of the managed instance administrator.", + "type": "string" + }, + "sid": { + "format": "uuid", + "description": "SID (object ID) of the managed instance administrator.", + "type": "string" + }, + "tenantId": { + "format": "uuid", + "description": "Tenant ID of the managed instance administrator.", + "type": "string" + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAdvancedThreatProtectionSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAdvancedThreatProtectionSettings.json new file mode 100644 index 000000000000..367ead069b5d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAdvancedThreatProtectionSettings.json @@ -0,0 +1,273 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/advancedThreatProtectionSettings": { + "get": { + "tags": [ + "ManagedInstanceAdvancedThreatProtectionSettings" + ], + "description": "Get the managed instance's Advanced Threat Protection settings.", + "operationId": "ManagedInstanceAdvancedThreatProtectionSettings_ListByInstance", + "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 managed instance Advanced Threat Protection states.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdvancedThreatProtectionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting the server Advanced Threat Protection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidServerAdvancedThreatProtectionCreateRequest - The create server Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 409 ServerAdvancedThreatProtectionInProgress - Setting the server Advanced Threat Protection settings is already in progress\n\n * 409 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 GetServerAdvancedThreatProtectionFailed - Failed to get the Advanced Threat Protection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the managed instance's Advanced Threat Protection settings.": { + "$ref": "./examples/ManagedInstanceAdvancedThreatProtectionSettingsListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}": { + "get": { + "tags": [ + "ManagedInstanceAdvancedThreatProtectionSettings" + ], + "description": "Get a managed instance's Advanced Threat Protection state.", + "operationId": "ManagedInstanceAdvancedThreatProtectionSettings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "advancedThreatProtectionName", + "in": "path", + "description": "The name of the Advanced Threat Protection state.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AdvancedThreatProtectionName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed instance Advanced Threat Protection state.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdvancedThreatProtection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting the server Advanced Threat Protection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidServerAdvancedThreatProtectionCreateRequest - The create server Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 409 ServerAdvancedThreatProtectionInProgress - Setting the server Advanced Threat Protection settings is already in progress\n\n * 409 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 GetServerAdvancedThreatProtectionFailed - Failed to get the Advanced Threat Protection settings" + } + }, + "x-ms-examples": { + "Get a managed instance's Advanced Threat Protection settings": { + "$ref": "./examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceAdvancedThreatProtectionSettings" + ], + "description": "Creates or updates Advanced Threat Protection settings.", + "operationId": "ManagedInstanceAdvancedThreatProtectionSettings_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "advancedThreatProtectionName", + "in": "path", + "description": "The name of the Advanced Threat Protection state.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AdvancedThreatProtectionName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The managed instance Advanced Threat Protection state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceAdvancedThreatProtection" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created or updated the Advanced Threat Protection state.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAdvancedThreatProtection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting the server Advanced Threat Protection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidServerAdvancedThreatProtectionCreateRequest - The create server Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerAdvancedThreatProtectionInProgress - Setting the server Advanced Threat Protection settings is already in progress\n\n * 409 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\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 * 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 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Created request to set the Advanced Threat Protection state." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a managed instance's Advanced Threat Protection settings with minimal parameters.": { + "$ref": "./examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMin.json" + }, + "Update a managed instance's Advanced Threat Protection settings with all parameters.": { + "$ref": "./examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMax.json" + } + } + } + } + }, + "definitions": { + "AdvancedThreatProtectionProperties": { + "description": "Properties of an Advanced Threat Protection state.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.", + "enum": [ + "New", + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "AdvancedThreatProtectionState", + "modelAsString": false + } + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceAdvancedThreatProtection": { + "description": "A managed instance Advanced Threat Protection.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of AdvancedThreatProtectionResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/AdvancedThreatProtectionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceAdvancedThreatProtectionListResult": { + "description": "A list of the managed instance's Advanced Threat Protection settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceAdvancedThreatProtection" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAzureADOnlyAuthentications.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAzureADOnlyAuthentications.json new file mode 100644 index 000000000000..cfc3982b5b72 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAzureADOnlyAuthentications.json @@ -0,0 +1,311 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications": { + "get": { + "tags": [ + "ManagedInstanceAzureADOnlyAuthentications" + ], + "description": "Gets a list of server Azure Active Directory only authentications.", + "operationId": "ManagedInstanceAzureADOnlyAuthentications_ListByInstance", + "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 Azure Active Directory only authentication objects.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\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": { + "Gets a list of Azure Active Directory only authentication object.": { + "$ref": "./examples/ManagedInstanceAzureADOnlyAuthListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}": { + "get": { + "tags": [ + "ManagedInstanceAzureADOnlyAuthentications" + ], + "description": "Gets a specific Azure Active Directory only authentication property.", + "operationId": "ManagedInstanceAzureADOnlyAuthentications_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified Azure Active Directory only authentication properties.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthentication" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidManagedServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\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-examples": { + "Gets a Azure Active Directory only authentication property.": { + "$ref": "./examples/ManagedInstanceAzureADOnlyAuthGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceAzureADOnlyAuthentications" + ], + "description": "Sets Server Active Directory only authentication property or updates an existing server Active Directory only authentication property.", + "operationId": "ManagedInstanceAzureADOnlyAuthentications_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating an Active Directory only authentication property.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthentication" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated a Azure Active Directory only authentication property.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthentication" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidManagedServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully updated Azure Active Directory only authentication property.", + "schema": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthentication" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates Azure Active Directory only authentication object.": { + "$ref": "./examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstanceAzureADOnlyAuthentications" + ], + "description": "Deletes an existing server Active Directory only authentication property.", + "operationId": "ManagedInstanceAzureADOnlyAuthentications_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the Azure Active Directory only property." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidManagedServerAADOnlyAuthTypePropertyName - Managed Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidManagedServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified Azure Active Directory only property does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes Azure Active Directory only authentication object.": { + "$ref": "./examples/ManagedInstanceAzureADOnlyAuthDelete.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceAzureADOnlyAuthentication": { + "description": "Azure Active Directory only authentication.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceAzureADOnlyAuthListResult": { + "description": "A list of active directory only authentications.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceAzureADOnlyAuthentication" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceAzureADOnlyAuthProperties": { + "description": "Properties of a active directory only authentication for Managed Instance.", + "required": [ + "azureADOnlyAuthentication" + ], + "type": "object", + "properties": { + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean" + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceDtcs.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceDtcs.json new file mode 100644 index 000000000000..1ca477afbaab --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceDtcs.json @@ -0,0 +1,325 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dtc": { + "get": { + "tags": [ + "ManagedInstanceDtcs" + ], + "description": "Gets a list of managed instance DTC settings.", + "operationId": "ManagedInstanceDtcs_ListByManagedInstance", + "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 specified managed instance DTC settings.", + "schema": { + "$ref": "#/definitions/ManagedInstanceDtcListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDtcVirtualClusterVersion - Virtual cluster version of the Azure SQL Managed Instance \"{0}\" is not supported.\n\n * 400 ManagementServiceManagedInstanceDtcFeatureDisabled - User tried to interact with Azure SQL Managed Instance DTC settings but DTC feature is currently not supported.\n\n * 404 ManagedInstanceDtcNotReady - DTC for Azure SQL Managed Instance not ready at the moment.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of managed instance DTC settings.": { + "$ref": "./examples/ManagedInstanceDtcList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dtc/{dtcName}": { + "get": { + "tags": [ + "ManagedInstanceDtcs" + ], + "description": "Gets managed instance DTC settings.", + "operationId": "ManagedInstanceDtcs_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "dtcName", + "in": "path", + "description": "The name of the managed instance DTC.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "DtcName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance DTC settings.", + "schema": { + "$ref": "#/definitions/ManagedInstanceDtc" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDtcName - User tried to interact with Azure SQL Managed Instance DTC settings with a DTC name different from 'current'.\n\n * 400 InvalidUpdateDtcOperationParameters - The provided set of parameters in the body of the request is either empty or invalid.\n\n * 400 InvalidDtcAuthenticationMethod - DTC authentication method \"{0}\" is not supported.\n\n * 400 InvalidDtcVirtualClusterVersion - Virtual cluster version of the Azure SQL Managed Instance \"{0}\" is not supported.\n\n * 400 ManagementServiceManagedInstanceDtcFeatureDisabled - User tried to interact with Azure SQL Managed Instance DTC settings but DTC feature is currently not supported.\n\n * 404 ManagedInstanceDtcNotReady - DTC for Azure SQL Managed Instance not ready at the moment.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets managed instance DTC settings.": { + "$ref": "./examples/ManagedInstanceDtcGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceDtcs" + ], + "description": "Updates managed instance DTC settings.", + "operationId": "ManagedInstanceDtcs_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "dtcName", + "in": "path", + "description": "The name of the managed instance DTC.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "DtcName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "Managed instance DTC settings.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceDtc" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Applying DTC settings is in progress", + "schema": { + "$ref": "#/definitions/ManagedInstanceDtc" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDtcName - User tried to interact with Azure SQL Managed Instance DTC settings with a DTC name different from 'current'.\n\n * 400 InvalidUpdateDtcOperationParameters - The provided set of parameters in the body of the request is either empty or invalid.\n\n * 400 InvalidDtcAuthenticationMethod - DTC authentication method \"{0}\" is not supported.\n\n * 400 InvalidDtcXaTransactionsDefaultTimeoutValue - Invalid DTC XA Transactions default timeout value.\n\n * 400 InvalidDtcXaTransactionsMaximumTimeoutValue - Invalid DTC XA Transactions maximum timeout value.\n\n * 400 InvalidDtcVirtualClusterVersion - Virtual cluster version of the Azure SQL Managed Instance \"{0}\" is not supported.\n\n * 400 ManagementServiceManagedInstanceDtcFeatureDisabled - User tried to interact with Azure SQL Managed Instance DTC settings but DTC feature is currently not supported.\n\n * 404 ManagedInstanceDtcNotReady - DTC for Azure SQL Managed Instance not ready at the moment.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Updates managed instance DTC settings with all optional parameters specified.": { + "$ref": "./examples/ManagedInstanceDtcUpdateMax.json" + }, + "Updates managed instance DTC settings by enabling DTC.": { + "$ref": "./examples/ManagedInstanceDtcUpdateEnableDtc.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceDtc": { + "description": "SQL Managed Instance DTC", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceDtcProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceDtcListResult": { + "description": "A list of managed instance's DTCs.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceDtc" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceDtcProperties": { + "description": "The properties of managed instance DTC.", + "type": "object", + "properties": { + "dtcEnabled": { + "description": "Active status of managed instance DTC.", + "type": "boolean" + }, + "securitySettings": { + "$ref": "#/definitions/ManagedInstanceDtcSecuritySettings", + "description": "Security settings of managed instance DTC." + }, + "externalDnsSuffixSearchList": { + "description": "External dns suffix search list of managed instance DTC.", + "type": "array", + "items": { + "type": "string" + } + }, + "dtcHostNameDnsSuffix": { + "description": "Host name dns suffix of managed instance DTC.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "description": "Provisioning state of managed instance DTC.", + "enum": [ + "Created", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + } + } + }, + "ManagedInstanceDtcSecuritySettings": { + "description": "The Security Settings of managed instance DTC.", + "type": "object", + "properties": { + "transactionManagerCommunicationSettings": { + "$ref": "#/definitions/ManagedInstanceDtcTransactionManagerCommunicationSettings", + "description": "Transaction Manager communication settings of managed instance DTC." + }, + "xaTransactionsEnabled": { + "description": "Allow XA Transactions to managed instance DTC.", + "type": "boolean" + }, + "snaLu6point2TransactionsEnabled": { + "description": "Allow SNA LU 6.2 Transactions to managed instance DTC.", + "type": "boolean" + }, + "xaTransactionsDefaultTimeout": { + "format": "int32", + "description": "Default timeout for XA Transactions (in seconds).", + "type": "integer" + }, + "xaTransactionsMaximumTimeout": { + "format": "int32", + "description": "Maximum timeout for XA Transactions (in seconds).", + "type": "integer" + } + } + }, + "ManagedInstanceDtcTransactionManagerCommunicationSettings": { + "description": "The Transaction Manager Communication Settings of managed instance DTC.", + "type": "object", + "properties": { + "allowInboundEnabled": { + "description": "Allow Inbound traffic to managed instance DTC.", + "type": "boolean" + }, + "allowOutboundEnabled": { + "description": "Allow Outbound traffic of managed instance DTC.", + "type": "boolean" + }, + "authentication": { + "description": "Authentication type of managed instance DTC.", + "type": "string" + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceEncryptionProtectors.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceEncryptionProtectors.json new file mode 100644 index 000000000000..4ce90d97cc7c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceEncryptionProtectors.json @@ -0,0 +1,338 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector": { + "get": { + "tags": [ + "ManagedInstanceEncryptionProtectors" + ], + "description": "Gets a list of managed instance encryption protectors", + "operationId": "ManagedInstanceEncryptionProtectors_ListByInstance", + "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 managed instance encryption protector.", + "schema": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtectorListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List encryption protectors by managed instance": { + "$ref": "./examples/ManagedInstanceEncryptionProtectorList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}": { + "get": { + "tags": [ + "ManagedInstanceEncryptionProtectors" + ], + "description": "Gets a managed instance encryption protector.", + "operationId": "ManagedInstanceEncryptionProtectors_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be retrieved.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance encryption protector.", + "schema": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtector" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the encryption protector": { + "$ref": "./examples/ManagedInstanceEncryptionProtectorGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceEncryptionProtectors" + ], + "description": "Updates an existing encryption protector.", + "operationId": "ManagedInstanceEncryptionProtectors_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be updated.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested encryption protector resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtector" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the encryption protector.", + "schema": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtector" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerKeyNotFound - The requested server key was not found on the current subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 EncryptionProtectorChangeInProgress - Cannot update database encryption key protector while protector change is already in progress\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 * 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the encryption protector to key vault": { + "$ref": "./examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json" + }, + "Update the encryption protector to service managed": { + "$ref": "./examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}/revalidate": { + "post": { + "tags": [ + "ManagedInstanceEncryptionProtectors" + ], + "description": "Revalidates an existing encryption protector.", + "operationId": "ManagedInstanceEncryptionProtectors_Revalidate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be updated.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "EncryptionProtectorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully revalidated the encryption protector." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 InvalidEncryptionProtectorName - The encryption protector key name is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerKeyNotFound - The requested server key was not found on the current subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 EncryptionProtectorChangeInProgress - Cannot update database encryption key protector while protector change is already in progress\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 * 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Revalidates the encryption protector": { + "$ref": "./examples/ManagedInstanceEncryptionProtectorRevalidate.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceEncryptionProtector": { + "description": "The managed instance encryption protector.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Kind of encryption protector. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtectorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceEncryptionProtectorListResult": { + "description": "A list of managed instance encryption protectors.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtector" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceEncryptionProtectorProperties": { + "description": "Properties for an encryption protector execution.", + "required": [ + "serverKeyType" + ], + "type": "object", + "properties": { + "serverKeyName": { + "description": "The name of the managed instance key.", + "type": "string" + }, + "serverKeyType": { + "description": "The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.", + "enum": [ + "ServiceManaged", + "AzureKeyVault" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerKeyType", + "modelAsString": true + } + }, + "uri": { + "description": "The URI of the server key.", + "type": "string", + "readOnly": true + }, + "thumbprint": { + "description": "Thumbprint of the server key.", + "type": "string", + "readOnly": true + }, + "autoRotationEnabled": { + "description": "Key auto rotation opt-in flag. Either true or false.", + "type": "boolean" + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceKeys.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceKeys.json new file mode 100644 index 000000000000..ecb6d7b0b425 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceKeys.json @@ -0,0 +1,336 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys": { + "get": { + "tags": [ + "ManagedInstanceKeys" + ], + "description": "Gets a list of managed instance keys.", + "operationId": "ManagedInstanceKeys_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "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 managed instance keys.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKeyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the keys for a managed instance.": { + "$ref": "./examples/ManagedInstanceKeyList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}": { + "get": { + "tags": [ + "ManagedInstanceKeys" + ], + "description": "Gets a managed instance key.", + "operationId": "ManagedInstanceKeys_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the managed instance key to be retrieved.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance key.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKey" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the managed instance key": { + "$ref": "./examples/ManagedInstanceKeyGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceKeys" + ], + "description": "Creates or updates a managed instance key.", + "operationId": "ManagedInstanceKeys_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the managed instance key to be operated on (updated or created).", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested managed instance key resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceKey" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance key.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKey" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 * 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the managed instance key.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKey" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates a managed instance key": { + "$ref": "./examples/ManagedInstanceKeyCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstanceKeys" + ], + "description": "Deletes the managed instance key with the given name.", + "operationId": "ManagedInstanceKeys_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the managed instance key to be deleted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed instance key." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 * 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified managed instance key does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the managed instance key": { + "$ref": "./examples/ManagedInstanceKeyDelete.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceKey": { + "description": "A managed instance key.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Kind of encryption protector. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ManagedInstanceKeyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceKeyListResult": { + "description": "A list of managed instance keys.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceKey" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceKeyProperties": { + "description": "Properties for a key execution.", + "required": [ + "serverKeyType" + ], + "type": "object", + "properties": { + "serverKeyType": { + "description": "The key type like 'ServiceManaged', 'AzureKeyVault'.", + "enum": [ + "ServiceManaged", + "AzureKeyVault" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "uri": { + "description": "The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "thumbprint": { + "description": "Thumbprint of the key.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The key creation date.", + "type": "string", + "readOnly": true + }, + "autoRotationEnabled": { + "description": "Key auto rotation opt-in flag. Either true or false.", + "type": "boolean", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceLongTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceLongTermRetentionPolicies.json new file mode 100644 index 000000000000..2b63520299e7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceLongTermRetentionPolicies.json @@ -0,0 +1,347 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies": { + "get": { + "tags": [ + "ManagedInstanceLongTermRetentionPolicies" + ], + "description": "Gets a database's long term retention policy.", + "operationId": "ManagedInstanceLongTermRetentionPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got LTR policy for managed database.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRHyperscaleSetPolicyError - An error has occurred while enabling Long-term backup retention for this database. Please reach out to Microsoft support to enable long-term backup retention.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the long term retention policies for the managed database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "ManagedInstanceLongTermRetentionPolicies" + ], + "description": "Gets a managed database's long term retention policy.", + "operationId": "ManagedInstanceLongTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be Default.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedInstanceLongTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got LTR policy for managed database.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRHyperscaleSetPolicyError - An error has occurred while enabling Long-term backup retention for this database. Please reach out to Microsoft support to enable long-term backup retention.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later." + } + }, + "x-ms-examples": { + "Get the long term retention policy for the managed database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionPolicyGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceLongTermRetentionPolicies" + ], + "description": "Sets a managed database's long term retention policy.", + "operationId": "ManagedInstanceLongTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be Default.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedInstanceLongTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The long term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set LTR policy for managed database.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMissingWeekOfYear - WeekOfYear is required to be set between 1 and 52 in order to set yearly retention.\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRHyperscaleSetPolicyError - An error has occurred while enabling Long-term backup retention for this database. Please reach out to Microsoft support to enable long-term backup retention.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or update the LTR policy for the managed database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstanceLongTermRetentionPolicies" + ], + "description": "Deletes a managed database's long term retention policy.", + "operationId": "ManagedInstanceLongTermRetentionPolicies_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be Default.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedInstanceLongTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted LTR policy for managed database.", + "schema": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMissingWeekOfYear - WeekOfYear is required to be set between 1 and 52 in order to set yearly retention.\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRHyperscaleSetPolicyError - An error has occurred while enabling Long-term backup retention for this database. Please reach out to Microsoft support to enable long-term backup retention.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes the LTR policy for the managed database.": { + "$ref": "./examples/ManagedInstanceLongTermRetentionPolicyDelete.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceLongTermRetentionPolicy": { + "description": "A long term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceLongTermRetentionPolicyListResult": { + "description": "A list of long term retention policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceLongTermRetentionPolicyProperties": { + "description": "Properties of a long term retention policy", + "type": "object", + "properties": { + "backupStorageAccessTier": { + "description": "The BackupStorageAccessTier for the LTR backups", + "enum": [ + "Hot", + "Archive" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupStorageAccessTier", + "modelAsString": true + } + }, + "weeklyRetention": { + "description": "The weekly retention policy for an LTR backup.", + "type": "string" + }, + "monthlyRetention": { + "description": "The monthly retention policy for an LTR backup.", + "type": "string" + }, + "yearlyRetention": { + "description": "The yearly retention policy for an LTR backup.", + "type": "string" + }, + "weekOfYear": { + "format": "int32", + "description": "The week of year to take the yearly backup.", + "type": "integer" + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceOperations.json new file mode 100644 index 000000000000..1d4050d174cf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceOperations.json @@ -0,0 +1,405 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations": { + "get": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Gets a list of operations performed on the managed instance.", + "operationId": "ManagedInstanceOperations_ListByManagedInstance", + "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": "The request for getting managed instance operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/ManagedInstanceOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the managed instance management operations": { + "$ref": "./examples/ListManagedInstanceOperations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}": { + "get": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Gets a management operation on a managed instance.", + "operationId": "ManagedInstanceOperations_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance operation.", + "schema": { + "$ref": "#/definitions/ManagedInstanceOperation" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets the managed instance management operation": { + "$ref": "./examples/GetManagedInstanceOperation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel": { + "post": { + "tags": [ + "ManagedInstanceOperations" + ], + "description": "Cancels the asynchronous operation on the managed instance.", + "operationId": "ManagedInstanceOperations_Cancel", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for cancel has been executed successfully." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 DeleteOfVersion2VirtualClusterIsDisabled - Delete of virtual cluster with version 2 is not enabled.\n\n * 400 DeleteOfVirtualClusterIsDisabled - Delete of virtual cluster is not enabled.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Cancel the managed instance management operation": { + "$ref": "./examples/CancelManagedInstanceOperation.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceOperation": { + "description": "A managed instance operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceOperationListResult": { + "description": "The response to a list managed instance operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceOperationParametersPair": { + "description": "The parameters of a managed instance operation.", + "type": "object", + "properties": { + "currentParameters": { + "$ref": "#/definitions/UpsertManagedServerOperationParameters", + "description": "The current parameters.", + "readOnly": true + }, + "requestedParameters": { + "$ref": "#/definitions/UpsertManagedServerOperationParameters", + "description": "The requested parameters.", + "readOnly": true + } + } + }, + "ManagedInstanceOperationProperties": { + "description": "The properties of a managed instance operation.", + "type": "object", + "properties": { + "managedInstanceName": { + "description": "The name of the managed instance the operation is being performed on.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagementOperationState", + "modelAsString": true + } + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + }, + "operationParameters": { + "$ref": "#/definitions/ManagedInstanceOperationParametersPair", + "description": "The operation parameters.", + "readOnly": true + }, + "operationSteps": { + "$ref": "#/definitions/ManagedInstanceOperationSteps", + "description": "The operation steps.", + "readOnly": true + } + } + }, + "ManagedInstanceOperationSteps": { + "description": "The steps of a managed instance operation.", + "type": "object", + "properties": { + "totalSteps": { + "description": "The total number of operation steps.", + "type": "string", + "readOnly": true + }, + "currentStep": { + "format": "int32", + "description": "The number of current operation steps.", + "type": "integer", + "readOnly": true + }, + "stepsList": { + "description": "The operation steps list.", + "type": "array", + "items": { + "$ref": "#/definitions/UpsertManagedServerOperationStepWithEstimatesAndDuration" + }, + "readOnly": true + } + } + }, + "UpsertManagedServerOperationParameters": { + "type": "object", + "properties": { + "family": { + "type": "string" + }, + "tier": { + "type": "string" + }, + "vCores": { + "format": "int32", + "type": "integer" + }, + "storageSizeInGB": { + "format": "int32", + "type": "integer" + } + } + }, + "UpsertManagedServerOperationStepWithEstimatesAndDuration": { + "type": "object", + "properties": { + "stepStartTime": { + "format": "date-time", + "type": "string" + }, + "stepEndTime": { + "format": "date-time", + "type": "string" + }, + "timeElapsed": { + "type": "string" + }, + "order": { + "format": "int32", + "type": "integer" + }, + "name": { + "type": "string" + }, + "status": { + "enum": [ + "NotStarted", + "InProgress", + "SlowedDown", + "Completed", + "Failed", + "Canceled" + ], + "type": "string", + "x-ms-enum": { + "name": "status", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstancePrivateEndpointConnections.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstancePrivateEndpointConnections.json new file mode 100644 index 000000000000..9f34a52c5bbd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstancePrivateEndpointConnections.json @@ -0,0 +1,318 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections": { + "get": { + "tags": [ + "ManagedInstancePrivateEndpointConnections" + ], + "description": "Gets all private endpoint connections on a server.", + "operationId": "ManagedInstancePrivateEndpointConnections_ListByManagedInstance", + "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 private endpoint connections.", + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of private endpoint connections on a server.": { + "$ref": "./examples/ManagedInstancePrivateEndpointConnectionList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "tags": [ + "ManagedInstancePrivateEndpointConnections" + ], + "description": "Gets a private endpoint connection.", + "operationId": "ManagedInstancePrivateEndpointConnections_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified private endpoint connection.", + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets private endpoint connection.": { + "$ref": "./examples/ManagedInstancePrivateEndpointConnectionGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstancePrivateEndpointConnections" + ], + "description": "Approve or reject a private endpoint connection with a given name.", + "operationId": "ManagedInstancePrivateEndpointConnections_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnection" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully approved or rejected private endpoint connection.", + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Approve or reject a private endpoint connection with a given name.": { + "$ref": "./examples/ManagedInstancePrivateEndpointConnectionUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstancePrivateEndpointConnections" + ], + "description": "Deletes a private endpoint connection with a given name.", + "operationId": "ManagedInstancePrivateEndpointConnections_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted private endpoint connection." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "Private endpoint connection does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes a private endpoint connection with a given name.": { + "$ref": "./examples/ManagedInstancePrivateEndpointConnectionDelete.json" + } + } + } + } + }, + "definitions": { + "ManagedInstancePrivateEndpointConnection": { + "description": "A private endpoint connection", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnectionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstancePrivateEndpointConnectionListResult": { + "description": "A list of private endpoint connections.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnection" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstancePrivateEndpointConnectionProperties": { + "description": "Properties of a private endpoint connection.", + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointProperty", + "description": "Private endpoint which the connection belongs to." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/ManagedInstancePrivateLinkServiceConnectionStateProperty", + "description": "Connection State of the Private Endpoint Connection." + }, + "provisioningState": { + "description": "State of the Private Endpoint Connection.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstancePrivateEndpointProperty": { + "type": "object", + "properties": { + "id": { + "description": "Resource id of the private endpoint.", + "type": "string" + } + } + }, + "ManagedInstancePrivateLinkServiceConnectionStateProperty": { + "required": [ + "status", + "description" + ], + "type": "object", + "properties": { + "status": { + "description": "The private link service connection status.", + "type": "string" + }, + "description": { + "description": "The private link service connection description.", + "type": "string" + }, + "actionsRequired": { + "description": "The private link service connection description.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstancePrivateLinkResources.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstancePrivateLinkResources.json new file mode 100644 index 000000000000..2732608d4c80 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstancePrivateLinkResources.json @@ -0,0 +1,193 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources": { + "get": { + "tags": [ + "ManagedInstancePrivateLinkResources" + ], + "description": "Gets the private link resources for SQL server.", + "operationId": "ManagedInstancePrivateLinkResources_ListByManagedInstance", + "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 private link resources.", + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateLinkListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets private link resources for SQL.": { + "$ref": "./examples/ManagedInstancePrivateLinkResourcesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources/{groupName}": { + "get": { + "tags": [ + "ManagedInstancePrivateLinkResources" + ], + "description": "Gets a private link resource for SQL server.", + "operationId": "ManagedInstancePrivateLinkResources_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "groupName", + "in": "path", + "description": "The name of the private link resource.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "#/definitions/ManagedInstancePrivateLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Gets a private link resource for SQL.": { + "$ref": "./examples/ManagedInstancePrivateLinkResourcesGet.json" + } + } + } + } + }, + "definitions": { + "ManagedInstancePrivateLink": { + "description": "A private link resource", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstancePrivateLinkProperties", + "description": "The private link resource group id.", + "readOnly": true + } + } + }, + "ManagedInstancePrivateLinkListResult": { + "description": "A list of private link resources", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstancePrivateLink" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstancePrivateLinkProperties": { + "description": "Properties of a private link resource.", + "type": "object", + "properties": { + "groupId": { + "description": "The private link resource group id.", + "type": "string", + "readOnly": true + }, + "requiredMembers": { + "description": "The private link resource required member names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "requiredZoneNames": { + "description": "The private link resource required zone names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceTdeCertificates.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceTdeCertificates.json new file mode 100644 index 000000000000..9715fa6fb4e9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceTdeCertificates.json @@ -0,0 +1,133 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates": { + "post": { + "tags": [ + "ManagedInstanceTdeCertificates" + ], + "description": "Creates a TDE certificate for a given server.", + "operationId": "ManagedInstanceTdeCertificates_Create", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested TDE certificate to be created or updated.", + "required": true, + "schema": { + "$ref": "#/definitions/TdeCertificate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created the TDE certificate." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 MissingPrivateBlob - The private blob is missing.\n\n * 400 InvalidPrivateBlobOrPassword - Invalid private blob or password specified.\n\n * 400 PrivateBlobWithoutPrivateKey - The provided blob does not contain private key.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Upload a TDE certificate": { + "$ref": "./examples/ManagedInstanceTdeCertificate.json" + } + } + } + } + }, + "definitions": { + "TdeCertificate": { + "description": "A TDE certificate that can be uploaded into a server.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/TdeCertificateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "TdeCertificateProperties": { + "description": "Properties of a TDE certificate.", + "required": [ + "privateBlob" + ], + "type": "object", + "properties": { + "privateBlob": { + "description": "The base64 encoded certificate private blob.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "certPassword": { + "description": "The certificate password.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceVulnerabilityAssessments.json new file mode 100644 index 000000000000..72aec027522a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceVulnerabilityAssessments.json @@ -0,0 +1,359 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments": { + "get": { + "tags": [ + "ManagedInstanceVulnerabilityAssessments" + ], + "description": "Gets the managed instance's vulnerability assessment policies.", + "operationId": "ManagedInstanceVulnerabilityAssessments_ListByInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance for which the vulnerability assessments is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed instance vulnerability assessment policies.", + "schema": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a managed instance's vulnerability assessment policies": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "ManagedInstanceVulnerabilityAssessments" + ], + "description": "Gets the managed instance's vulnerability assessment.", + "operationId": "ManagedInstanceVulnerabilityAssessments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed instance vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Get a managed instance's vulnerability assessment": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstanceVulnerabilityAssessments" + ], + "description": "Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability assessment with managed identity - https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage", + "operationId": "ManagedInstanceVulnerabilityAssessments_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 409 VulnerabilityAssessmentStoragelessIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation." + }, + "201": { + "description": "Successfully created the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a managed instance's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json" + }, + "Create a managed instance's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json" + }, + "Create a managed instance's vulnerability assessment with all parameters": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstanceVulnerabilityAssessments" + ], + "description": "Removes the managed instance's vulnerability assessment.", + "operationId": "ManagedInstanceVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the managed instance vulnerability assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Remove a managed instance's vulnerability assessment": { + "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentDelete.json" + } + } + } + } + }, + "definitions": { + "ManagedInstanceVulnerabilityAssessment": { + "description": "A managed instance vulnerability assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessmentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceVulnerabilityAssessmentListResult": { + "description": "A list of the ManagedInstance's vulnerability assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceVulnerabilityAssessmentProperties": { + "description": "Properties of a managed instance vulnerability assessment.", + "required": [ + "storageContainerPath" + ], + "type": "object", + "properties": { + "storageContainerPath": { + "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageContainerSasKey": { + "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "recurringScans": { + "$ref": "#/definitions/VulnerabilityAssessmentRecurringScansProperties", + "description": "The recurring scans settings" + } + } + }, + "VulnerabilityAssessmentRecurringScansProperties": { + "description": "Properties of a Vulnerability Assessment recurring scans.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Recurring scans state.", + "type": "boolean" + }, + "emailSubscriptionAdmins": { + "description": "Specifies that the schedule scan notification will be is sent to the subscription administrators.", + "default": true, + "type": "boolean" + }, + "emails": { + "description": "Specifies an array of e-mail addresses to which the scan notification is sent.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstances.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstances.json new file mode 100644 index 000000000000..11df27391c0b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedInstances.json @@ -0,0 +1,1707 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a list of all managed instances in the subscription.", + "operationId": "ManagedInstances_List", + "parameters": [ + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "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 managed instances.", + "schema": { + "$ref": "#/definitions/ManagedInstanceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed instances": { + "$ref": "./examples/ManagedInstanceList.json" + }, + "List managed instances with $expand=administrators/activedirectory": { + "$ref": "./examples/ManagedInstanceListWithExpandEqualsAdministrators.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a list of all managed instances in an instance pool.", + "operationId": "ManagedInstances_ListByInstancePool", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The instance pool name.", + "required": true, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "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 managed instances.", + "schema": { + "$ref": "#/definitions/ManagedInstanceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 InstancePoolNotFound - An instance pool cannot be found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed instances by instance pool": { + "$ref": "./examples/ManagedInstanceListByInstancePool.json" + }, + "List managed instances by instance pool with $expand=administrators/activedirectory": { + "$ref": "./examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a list of managed instances in a resource group.", + "operationId": "ManagedInstances_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "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 managed instances.", + "schema": { + "$ref": "#/definitions/ManagedInstanceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\n\n * 400 ManagementServiceManagedServerDisabled - Operation failed since Managed Instance '{0}' is disabled. Please enable Managed Instance and try again.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 UpdatingInstanceAndBackupRedundancy - Instance zone redundancy and backup storage redundancy cannot be updated in the same request.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 RequestCantLandOnPaaSv2Platform - Request needs to land on PaaSv2 platform but PaaSv2 is not enabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 DeleteOfVersion2VirtualClusterIsDisabled - Delete of virtual cluster with version 2 is not enabled.\n\n * 400 DeleteOfVirtualClusterIsDisabled - Delete of virtual cluster is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 DnsRefreshOnVirtualClusterIsDisabled - Refresh of DNS records on virtual cluster is not enabled.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - The instance is multi-az but backup storage is being updated from zone redundant to non-zone redundant.\n\n * 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - Cannot update instance redundancy because backup storage redundancy update is in progress.\n\n * 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - The backup storage is non-zone redundant but instance redundancy is being updated to zone redundant.\n\n * 409 BackupRedundancyUpdateConflict - Cannot update backup storage redundancy because a backup storage redundancy update is already in progress.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 412 InstanceNotReadyForBackupRedundancyUpdate - Cannot update backup storage redundancy because the instance is not ready.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 503 TooManyRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed instances by resource group": { + "$ref": "./examples/ManagedInstanceListByResourceGroup.json" + }, + "List managed instances by resource group with $expand=administrators/activedirectory": { + "$ref": "./examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets a managed instance.", + "operationId": "ManagedInstances_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\n\n * 400 ManagementServiceManagedServerDisabled - Operation failed since Managed Instance '{0}' is disabled. Please enable Managed Instance and try again.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 UpdatingInstanceAndBackupRedundancy - Instance zone redundancy and backup storage redundancy cannot be updated in the same request.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 RequestCantLandOnPaaSv2Platform - Request needs to land on PaaSv2 platform but PaaSv2 is not enabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 DeleteOfVersion2VirtualClusterIsDisabled - Delete of virtual cluster with version 2 is not enabled.\n\n * 400 DeleteOfVirtualClusterIsDisabled - Delete of virtual cluster is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 DnsRefreshOnVirtualClusterIsDisabled - Refresh of DNS records on virtual cluster is not enabled.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - The instance is multi-az but backup storage is being updated from zone redundant to non-zone redundant.\n\n * 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - Cannot update instance redundancy because backup storage redundancy update is in progress.\n\n * 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - The backup storage is non-zone redundant but instance redundancy is being updated to zone redundant.\n\n * 409 BackupRedundancyUpdateConflict - Cannot update backup storage redundancy because a backup storage redundancy update is already in progress.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 412 InstanceNotReadyForBackupRedundancyUpdate - Cannot update backup storage redundancy because the instance is not ready.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 503 TooManyRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Get managed instance": { + "$ref": "./examples/ManagedInstanceGet.json" + }, + "Get managed instance while resource is updating": { + "$ref": "./examples/ManagedInstanceGetWhileUpdating.json" + }, + "Get managed instance with $expand=administrators/activedirectory": { + "$ref": "./examples/ManagedInstanceGetWithExpandEqualsAdministrators.json" + } + } + }, + "put": { + "tags": [ + "ManagedInstances" + ], + "description": "Creates or updates a managed instance.", + "operationId": "ManagedInstances_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested managed instance resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ManagedInstanceFreemiumNotAvailableOnRegion - Creation of a freemium managed instance on a region that is not allowlisted for freemium.\n\n * 400 ManagementServiceSubnetMaintenanceInProgress - User tried to initiate managed instance create/update while incompatible maintenance is in progress.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceFreemiumNotAvailableForSubscription - Freemium is not enabled for this subscription type.\n\n * 400 ManagedInstanceInvalidEditionForInstancePool - User tried to select invalid service tier for managed instance inside an existing instance pool.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 ManagedInstanceInvalidSubnetForInstancePool - User tried to select invalid subnet for managed instance inside an existing instance pool.\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 ManagedInstanceInvalidHardwareFamilyForInstancePool - User tried to select invalid hardware family for managed instance inside an existing instance pool.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 ManagedInstanceInvalidLicenseTypeForInstancePool - User tried to select invalid license type for managed instance inside an existing instance pool.\n\n * 400 ManagedInstanceUpdateSloFromVersionlessToVersionedNotAllowed - Changing the database format from '{0}' to '{1}' is not supported. Check the database format property value specified and visit https://aka.ms/sqlmidatabaseformat for more details.\n\n * 400 ManagedInstanceUpdateSloFromNewerToOlderVersionEditionNotAllowed - Changing the database format from '{0}' to '{1}' is not supported. Check the database format property value specified and visit https://aka.ms/sqlmidatabaseformat for more details.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 ManagedInstanceUpdateSloFromVersionedToVersionlessWorkerCLNotAllowed - Changing the database format is not supported for this managed instance. Check the database format property value specified and visit https://aka.ms/sqlmi-fwnov2022 for more details.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 ManagedInstanceVersionEditionParameterNotAllowedForUsing - Specifying the database format property value is not supported at this time.\n\n * 400 ManagedInstanceFreemiumInvalidArchitecture - A freemium instance can not be created in the specified subnet '(0)'.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 InvalidManagedServerDnsZonePartner - The resource URI of the geo-primary managed instance specified in the create request is invalid. Please ensure that the property is of the format /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/managedInstances/{managedInstanceName}\n\n * 400 ManagementServiceManagedServerDisabled - Operation failed since Managed Instance '{0}' is disabled. Please enable Managed Instance and try again.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 UpdatingInstanceAndBackupRedundancy - Instance zone redundancy and backup storage redundancy cannot be updated in the same request.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 RequestCantLandOnPaaSv2Platform - Request needs to land on PaaSv2 platform but PaaSv2 is not enabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 DeleteOfVersion2VirtualClusterIsDisabled - Delete of virtual cluster with version 2 is not enabled.\n\n * 400 DeleteOfVirtualClusterIsDisabled - Delete of virtual cluster is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 DnsRefreshOnVirtualClusterIsDisabled - Refresh of DNS records on virtual cluster is not enabled.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 InvalidMaintenanceWindowSettings - Invalid maintenance window settings.\n\n * 400 InvalidMaintenanceWindowProperty - Invalid maintenance window property was specified.\n\n * 400 InvalidMaintenanceWindowPropertyNull - Invalid maintenance window with required properties null.\n\n * 400 InvalidMaintenanceWindowTypeWithPropertySpecified - Maintenance window type must not have certain properties specified.\n\n * 400 UpdateOfParameterNotSupported - Update of '{0}' is not supported.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidExternalAdministratorLogin - Invalid or missing external administrator login name.\n\n * 400 InvalidExternalAdministratorSid - Invalid or missing external administrator object id.\n\n * 400 InvalidExternalAdministratorTenantId - Invalid or missing external administrator tenant id.\n\n * 400 ExternalAdministratorPrincipalType - Invalid or missing external administrator principal type. Please select from User, Application or Group.\n\n * 400 MissingExternalAdministratorWithAadOnlyAuth - In order to use Azure AD Only Authentication, please provide details of an external administrator.\n\n * 400 ExternalAdministratorLoginSameAsSqlAdmin - The names of the Azure Active Directory administrator and of the server admin account must be different. Please provide different values.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - The instance is multi-az but backup storage is being updated from zone redundant to non-zone redundant.\n\n * 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - Cannot update instance redundancy because backup storage redundancy update is in progress.\n\n * 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - The backup storage is non-zone redundant but instance redundancy is being updated to zone redundant.\n\n * 409 BackupRedundancyUpdateConflict - Cannot update backup storage redundancy because a backup storage redundancy update is already in progress.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 412 InstanceNotReadyForBackupRedundancyUpdate - Cannot update backup storage redundancy because the instance is not ready.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 503 TooManyRequests - 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create managed instance with minimal properties": { + "$ref": "./examples/ManagedInstanceCreateMin.json" + }, + "Create managed instance with all properties": { + "$ref": "./examples/ManagedInstanceCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "ManagedInstances" + ], + "description": "Deletes a managed instance.", + "operationId": "ManagedInstances_Delete", + "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 deleted the managed instance." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\n\n * 400 ManagementServiceManagedServerDisabled - Operation failed since Managed Instance '{0}' is disabled. Please enable Managed Instance and try again.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 UpdatingInstanceAndBackupRedundancy - Instance zone redundancy and backup storage redundancy cannot be updated in the same request.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 RequestCantLandOnPaaSv2Platform - Request needs to land on PaaSv2 platform but PaaSv2 is not enabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 DeleteOfVersion2VirtualClusterIsDisabled - Delete of virtual cluster with version 2 is not enabled.\n\n * 400 DeleteOfVirtualClusterIsDisabled - Delete of virtual cluster is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 DnsRefreshOnVirtualClusterIsDisabled - Refresh of DNS records on virtual cluster is not enabled.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - The instance is multi-az but backup storage is being updated from zone redundant to non-zone redundant.\n\n * 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - Cannot update instance redundancy because backup storage redundancy update is in progress.\n\n * 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - The backup storage is non-zone redundant but instance redundancy is being updated to zone redundant.\n\n * 409 BackupRedundancyUpdateConflict - Cannot update backup storage redundancy because a backup storage redundancy update is already in progress.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 412 InstanceNotReadyForBackupRedundancyUpdate - Cannot update backup storage redundancy because the instance is not ready.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 * 503 TooManyRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Successfully initiated deletion of the managed instance." + }, + "204": { + "description": "The specified managed instance does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete managed instance": { + "$ref": "./examples/ManagedInstanceDelete.json" + } + } + }, + "patch": { + "tags": [ + "ManagedInstances" + ], + "description": "Updates a managed instance.", + "operationId": "ManagedInstances_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested managed instance resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedInstanceUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 ManagedInstanceFreemiumNotAvailableForInputParameters - Managed instance creation or update executed with SLO that is not allowed for freemium.\n\n * 400 ManagedInstanceFreemiumNotAvailableOnRegion - Creation of a freemium managed instance on a region that is not allowlisted for freemium.\n\n * 400 ManagementServiceSubnetMaintenanceInProgress - User tried to initiate managed instance create/update while incompatible maintenance is in progress.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceFreemiumNotAvailableForSubscription - Freemium is not enabled for this subscription type.\n\n * 400 ManagedInstanceInvalidEditionForInstancePool - User tried to select invalid service tier for managed instance inside an existing instance pool.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 ManagedInstanceInvalidSubnetForInstancePool - User tried to select invalid subnet for managed instance inside an existing instance pool.\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 ManagedInstanceInvalidHardwareFamilyForInstancePool - User tried to select invalid hardware family for managed instance inside an existing instance pool.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 ManagedInstanceInvalidLicenseTypeForInstancePool - User tried to select invalid license type for managed instance inside an existing instance pool.\n\n * 400 ManagedInstanceUpdateSloFromVersionlessToVersionedNotAllowed - Changing the database format from '{0}' to '{1}' is not supported. Check the database format property value specified and visit https://aka.ms/sqlmidatabaseformat for more details.\n\n * 400 ManagedInstanceUpdateSloFromNewerToOlderVersionEditionNotAllowed - Changing the database format from '{0}' to '{1}' is not supported. Check the database format property value specified and visit https://aka.ms/sqlmidatabaseformat for more details.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 ManagedInstanceUpdateSloFromVersionedToVersionlessWorkerCLNotAllowed - Changing the database format is not supported for this managed instance. Check the database format property value specified and visit https://aka.ms/sqlmi-fwnov2022 for more details.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 ManagedInstanceVersionEditionParameterNotAllowedForUsing - Specifying the database format property value is not supported at this time.\n\n * 400 ManagedInstanceFreemiumInvalidArchitecture - A freemium instance can not be created in the specified subnet '(0)'.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 ManagementServiceManagedServerDisabled - Operation failed since Managed Instance '{0}' is disabled. Please enable Managed Instance and try again.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 UpdatingInstanceAndBackupRedundancy - Instance zone redundancy and backup storage redundancy cannot be updated in the same request.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 RequestCantLandOnPaaSv2Platform - Request needs to land on PaaSv2 platform but PaaSv2 is not enabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 DeleteOfVersion2VirtualClusterIsDisabled - Delete of virtual cluster with version 2 is not enabled.\n\n * 400 DeleteOfVirtualClusterIsDisabled - Delete of virtual cluster is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 DnsRefreshOnVirtualClusterIsDisabled - Refresh of DNS records on virtual cluster is not enabled.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidExternalAdministratorLogin - Invalid or missing external administrator login name.\n\n * 400 InvalidExternalAdministratorSid - Invalid or missing external administrator object id.\n\n * 400 InvalidExternalAdministratorTenantId - Invalid or missing external administrator tenant id.\n\n * 400 ExternalAdministratorPrincipalType - Invalid or missing external administrator principal type. Please select from User, Application or Group.\n\n * 400 MissingExternalAdministratorWithAadOnlyAuth - In order to use Azure AD Only Authentication, please provide details of an external administrator.\n\n * 400 ExternalAdministratorLoginSameAsSqlAdmin - The names of the Azure Active Directory administrator and of the server admin account must be different. Please provide different values.\n\n * 400 InvalidMaintenanceWindowSettings - Invalid maintenance window settings.\n\n * 400 InvalidMaintenanceWindowProperty - Invalid maintenance window property was specified.\n\n * 400 InvalidMaintenanceWindowPropertyNull - Invalid maintenance window with required properties null.\n\n * 400 InvalidMaintenanceWindowTypeWithPropertySpecified - Maintenance window type must not have certain properties specified.\n\n * 400 UpdateOfParameterNotSupported - Update of '{0}' is not supported.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - The instance is multi-az but backup storage is being updated from zone redundant to non-zone redundant.\n\n * 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - Cannot update instance redundancy because backup storage redundancy update is in progress.\n\n * 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - The backup storage is non-zone redundant but instance redundancy is being updated to zone redundant.\n\n * 409 BackupRedundancyUpdateConflict - Cannot update backup storage redundancy because a backup storage redundancy update is already in progress.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 412 InstanceNotReadyForBackupRedundancyUpdate - Cannot update backup storage redundancy because the instance is not ready.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 500 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 503 TooManyRequests - 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 * 503 TooManyRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update managed instance with minimal properties": { + "$ref": "./examples/ManagedInstanceUpdateMin.json" + }, + "Update managed instance with all properties": { + "$ref": "./examples/ManagedInstanceUpdateMax.json" + }, + "Remove maintenance policy from managed instance (select default maintenance policy)": { + "$ref": "./examples/ManagedInstanceRemoveMaintenanceConfiguration.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover": { + "post": { + "tags": [ + "ManagedInstances" + ], + "description": "Failovers a managed instance.", + "operationId": "ManagedInstances_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance to failover.", + "required": true, + "type": "string" + }, + { + "name": "replicaType", + "in": "query", + "description": "The type of replica to be failed over.", + "required": false, + "type": "string", + "enum": [ + "Primary", + "ReadableSecondary" + ], + "x-ms-enum": { + "name": "ReplicaType", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed managed instance failover." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceFailoverThrottled - There was a recent failover on the managed instance.\n\n * 400 ManagedInstanceFailoverNotSupportedOnSKU - This type of customer initiated failover is not supported on the given SKU.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ManagedInstanceFailoverFullBackupMissing - Automated backup needs to complete the first full backup for a new database.\n\n * 409 ManagedInstanceNotInStateToFailover - The managed instance is currently in a state such that failover cannot be issued.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Managed instance failover is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Failover a managed instance.": { + "$ref": "./examples/FailoverManagedInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/outboundNetworkDependenciesEndpoints": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Gets the collection of outbound network dependencies for the given managed instance.", + "operationId": "ManagedInstances_ListOutboundNetworkDependenciesByManagedInstance", + "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 outbound network dependencies for this managed instance.", + "schema": { + "$ref": "#/definitions/OutboundEnvironmentEndpointCollection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the collection of outbound network dependencies for the given managed instance.": { + "$ref": "./examples/ListOutboundNetworkDependenciesByManagedInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/refreshExternalGovernanceStatus": { + "post": { + "tags": [ + "ManagedInstances" + ], + "description": "Refresh external governance enablement status.", + "operationId": "ManagedInstances_RefreshStatus", + "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 refreshed external governance enablement status.", + "schema": { + "$ref": "#/definitions/RefreshExternalGovernanceStatusOperationResultMI" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubnetMissingRequiredDelegation - Selected subnet is not delegated for SQL Managed Instance.\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 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 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 * 503 TooManyRequests - 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.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + }, + "202": { + "description": "Refreshing external governance enablement status." + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Refresh external governance enablement status.": { + "$ref": "./examples/ManagedInstanceRefreshExternalGovernanceStatus.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/start": { + "post": { + "tags": [ + "ManagedInstances" + ], + "description": "Starts the managed instance.", + "operationId": "ManagedInstances_Start", + "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 started the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 StartStopOfManagedInstanceIsDisabled - Start and stop operation on managed instance is not enabled.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 ManagementServiceStartStopManagedInstanceSubscriptionNotEnabledForFeature - User attempted to use Start/Stop feature without having the subscription allowlisted for the appropriate subscription feature.\n\n * 400 ManagementServiceStartManagedInstanceFeatureDisabled - User attempted to use the Start Azure SQL Managed Instance feature, which is disabled.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagementServiceStartManagedInstanceNotSupportedOnSKU - Start operation is not supported on the given SKU.\n\n * 400 ManagementServiceStartManagedInstanceTriggeredWhileStartInProgress - User attempted to Start Azure SQL Managed Instance that is not in Stopped state.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server 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 * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Starting the managed instance is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Starts the managed instance.": { + "$ref": "./examples/StartManagedInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/stop": { + "post": { + "tags": [ + "ManagedInstances" + ], + "description": "Stops the managed instance.", + "operationId": "ManagedInstances_Stop", + "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 stopped the managed instance.", + "schema": { + "$ref": "#/definitions/ManagedInstance" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagementServiceStopManagedInstanceZoneRedundant - Stop executed on instance with zone redundancy enabled.\n\n * 400 ManagementServiceStopManagedInstancePartOfFailoverGroup - Stop executed on the instance that is part of failover group.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 ManagementServiceStartStopManagedInstanceSubscriptionNotEnabledForFeature - User attempted to use Start/Stop feature without having the subscription allowlisted for the appropriate subscription feature.\n\n * 400 ManagementServiceStopManagedInstanceNotSupportedOnSKU - Stop operation is not supported on the given SKU.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 StartStopOfManagedInstanceIsDisabled - Start and stop operation on managed instance is not enabled.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 ManagementServiceStopManagedInstanceUsingMILink - Stop executed on the instance that has Managed Instance link configured.\n\n * 400 ManagementServiceStopManagedInstanceFeatureDisabled - User attempted to use the Stop Azure SQL Managed Instance feature, which is disabled.\n\n * 400 ManagementServiceStopManagedInstanceHostedOnRdfePlatform - Stop executed on the instance that is not running with Feature Wave November 2022\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ManagementServiceStopManagedInstanceAlreadyInProgress - Stop operation submitted for operation that is in stopping/stopped state.\n\n * 409 ManagementServiceStopManagedInstanceConflictingOperation - Stop Azure SQL Managed Instance conflicting operation message.\n\n * 409 ManagementServiceStopManagedInstanceDroppedDuringStop - Stop executed on instance that is in deleting state or removed in the meantime.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Stopping the managed instance is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Stops the managed instance.": { + "$ref": "./examples/StopManagedInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries": { + "get": { + "tags": [ + "ManagedInstances" + ], + "description": "Get top resource consuming queries of a managed instance.", + "operationId": "ManagedInstances_ListByManagedInstance", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "numberOfQueries", + "in": "query", + "description": "How many 'top queries' to return. Default is 5.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "databases", + "in": "query", + "description": "Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified.", + "required": false, + "type": "string" + }, + { + "name": "startTime", + "in": "query", + "description": "Start time for observed period.", + "required": false, + "type": "string" + }, + { + "name": "endTime", + "in": "query", + "description": "End time for observed period.", + "required": false, + "type": "string" + }, + { + "name": "interval", + "in": "query", + "description": "The time step to be used to summarize the metric values. Default value is PT1H", + "required": false, + "type": "string", + "enum": [ + "PT1H", + "P1D" + ], + "x-ms-enum": { + "name": "QueryTimeGrainType", + "modelAsString": true + } + }, + { + "name": "aggregationFunction", + "in": "query", + "description": "Aggregation function to be used, default value is 'sum'", + "required": false, + "type": "string", + "enum": [ + "avg", + "min", + "max", + "stdev", + "sum" + ], + "x-ms-enum": { + "name": "AggregationFunctionType", + "modelAsString": true + } + }, + { + "name": "observationMetric", + "in": "query", + "description": "Metric to be used for ranking top queries. Default is 'cpu'", + "required": false, + "type": "string", + "enum": [ + "cpu", + "io", + "logIo", + "duration", + "dtu" + ], + "x-ms-enum": { + "name": "MetricType", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved top queries for managed instance.", + "schema": { + "$ref": "#/definitions/TopQueriesListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Obtain list of instance's top resource consuming queries. Minimal request and response.": { + "$ref": "./examples/ManagedInstanceTopQueriesListMin.json" + }, + "Obtain list of instance's top resource consuming queries.": { + "$ref": "./examples/ManagedInstanceTopQueriesList.json" + }, + "Obtain list of instance's top resource consuming queries. Full-blown request and response.": { + "$ref": "./examples/ManagedInstanceTopQueriesListMax.json" + } + } + } + } + }, + "definitions": { + "EndpointDependency": { + "description": "A domain name that the managed instance service needs to communicate with, along with additional details.", + "type": "object", + "properties": { + "domainName": { + "description": "The domain name of the dependency.", + "type": "string", + "readOnly": true + }, + "endpointDetails": { + "description": "The IP Addresses and Ports used when connecting to DomainName.", + "type": "array", + "items": { + "$ref": "#/definitions/EndpointDetail" + }, + "readOnly": true, + "x-ms-identifiers": [] + } + } + }, + "EndpointDetail": { + "description": "A domain name that the managed instance service needs to communicate with, along with additional details.", + "type": "object", + "properties": { + "port": { + "format": "int32", + "description": "The port an endpoint is connected to.", + "type": "integer", + "readOnly": true + } + } + }, + "ManagedInstance": { + "description": "An Azure SQL managed instance.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "identity": { + "$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity", + "description": "The Azure Active Directory identity of the managed instance.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH" + }, + "properties": { + "$ref": "#/definitions/ManagedInstanceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedInstanceExternalAdministrator": { + "description": "Properties of a active directory administrator.", + "type": "object", + "properties": { + "administratorType": { + "description": "Type of the sever administrator.", + "enum": [ + "ActiveDirectory" + ], + "type": "string", + "x-ms-enum": { + "name": "AdministratorType", + "modelAsString": true + } + }, + "principalType": { + "description": "Principal Type of the sever administrator.", + "enum": [ + "User", + "Group", + "Application" + ], + "type": "string", + "x-ms-enum": { + "name": "PrincipalType", + "modelAsString": true + } + }, + "login": { + "description": "Login name of the server administrator.", + "type": "string" + }, + "sid": { + "format": "uuid", + "description": "SID (object ID) of the server administrator.", + "type": "string" + }, + "tenantId": { + "format": "uuid", + "description": "Tenant ID of the administrator.", + "type": "string" + }, + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean" + } + } + }, + "ManagedInstanceListResult": { + "description": "A list of managed instances.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstance" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstancePecProperty": { + "description": "A private endpoint connection under a managed instance", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointConnectionProperties", + "description": "Private endpoint connection properties", + "readOnly": true + } + } + }, + "ManagedInstancePrivateEndpointConnectionProperties": { + "description": "Properties of a private endpoint connection.", + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/ManagedInstancePrivateEndpointProperty", + "description": "Private endpoint which the connection belongs to." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/ManagedInstancePrivateLinkServiceConnectionStateProperty", + "description": "Connection State of the Private Endpoint Connection." + }, + "provisioningState": { + "description": "State of the Private Endpoint Connection.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstancePrivateEndpointProperty": { + "type": "object", + "properties": { + "id": { + "description": "Resource id of the private endpoint.", + "type": "string" + } + } + }, + "ManagedInstancePrivateLinkServiceConnectionStateProperty": { + "required": [ + "status", + "description" + ], + "type": "object", + "properties": { + "status": { + "description": "The private link service connection status.", + "type": "string" + }, + "description": { + "description": "The private link service connection description.", + "type": "string" + }, + "actionsRequired": { + "description": "The private link service connection description.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedInstanceProperties": { + "description": "The properties of a managed instance.", + "type": "object", + "properties": { + "provisioningState": { + "description": "Provisioning state of managed instance.", + "enum": [ + "Created", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "managedInstanceCreateMode": { + "description": "Specifies the mode of database creation.\r\n\r\nDefault: Regular instance creation.\r\n\r\nRestore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified.", + "enum": [ + "Default", + "PointInTimeRestore" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedServerCreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "fullyQualifiedDomainName": { + "description": "The fully qualified domain name of the managed instance.", + "type": "string", + "readOnly": true + }, + "isGeneralPurposeV2": { + "description": "Whether or not this is a GPv2 variant of General Purpose edition.", + "type": "boolean" + }, + "administratorLogin": { + "description": "Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation).", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "administratorLoginPassword": { + "description": "The administrator login password (required for managed instance creation).", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "subnetId": { + "description": "Subnet resource ID for the managed instance.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ] + } + }, + "state": { + "description": "The state of the managed instance.", + "type": "string", + "readOnly": true + }, + "licenseType": { + "description": "The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses).", + "enum": [ + "LicenseIncluded", + "BasePrice" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedInstanceLicenseType", + "modelAsString": true + } + }, + "hybridSecondaryUsage": { + "description": "Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR).", + "enum": [ + "Active", + "Passive" + ], + "type": "string", + "x-ms-enum": { + "name": "HybridSecondaryUsage", + "modelAsString": true + } + }, + "hybridSecondaryUsageDetected": { + "description": "Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR).", + "enum": [ + "Active", + "Passive" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "HybridSecondaryUsageDetected", + "modelAsString": true + } + }, + "vCores": { + "format": "int32", + "description": "The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80.", + "type": "integer" + }, + "storageSizeInGB": { + "format": "int32", + "description": "Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores.", + "type": "integer" + }, + "storageIOps": { + "format": "int32", + "description": "Storage IOps. Minimum value: 120. Maximum value: 120000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores.", + "type": "integer" + }, + "storageThroughputMBps": { + "format": "int32", + "description": "Storage throughput in MBps. Minimum value: 25. Maximum value: 4000. Increments of 1 MBps allowed only. Maximum value depends on the selected hardware family and number of vCores.", + "type": "integer" + }, + "collation": { + "description": "Collation of the managed instance.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "dnsZone": { + "description": "The Dns Zone that the managed instance is in.", + "type": "string", + "readOnly": true + }, + "dnsZonePartner": { + "description": "The resource id of another managed instance whose DNS zone this managed instance will share after creation.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "publicDataEndpointEnabled": { + "description": "Whether or not the public data endpoint is enabled.", + "type": "boolean" + }, + "sourceManagedInstanceId": { + "description": "The resource identifier of the source managed instance associated with create operation of this instance.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "restorePointInTime": { + "format": "date-time", + "description": "Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "proxyOverride": { + "description": "Connection type used for connecting to the instance.", + "enum": [ + "Proxy", + "Redirect", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedInstanceProxyOverride", + "modelAsString": true + } + }, + "timezoneId": { + "description": "Id of the timezone. Allowed values are timezones supported by Windows.\r\nWindows keeps details on supported timezones, including the id, in registry under\r\nKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones.\r\nYou can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.\r\nList of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.\r\nAn example of valid timezone id is \"Pacific Standard Time\" or \"W. Europe Standard Time\".", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "instancePoolId": { + "description": "The Id of the instance pool this managed server belongs to.", + "type": "string" + }, + "maintenanceConfigurationId": { + "description": "Specifies maintenance configuration id to apply to this managed instance.", + "type": "string" + }, + "privateEndpointConnections": { + "description": "List of private endpoint connections on a managed instance.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedInstancePecProperty" + }, + "readOnly": true + }, + "minimalTlsVersion": { + "description": "Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'", + "type": "string" + }, + "currentBackupStorageRedundancy": { + "description": "The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage)", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "requestedBackupStorageRedundancy": { + "description": "The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage)", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "zoneRedundant": { + "description": "Whether or not the multi-az is enabled.", + "type": "boolean" + }, + "primaryUserAssignedIdentityId": { + "description": "The resource id of a user assigned identity to be used by default.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.ManagedIdentity/userAssignedIdentities" + } + ] + } + }, + "keyId": { + "description": "A CMK URI of the key to use for encryption.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "administrators": { + "$ref": "#/definitions/ManagedInstanceExternalAdministrator", + "description": "The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "servicePrincipal": { + "$ref": "#/definitions/ServicePrincipal", + "description": "The managed instance's service principal." + }, + "virtualClusterId": { + "description": "Virtual cluster resource id for the Managed Instance.", + "type": "string", + "readOnly": true + }, + "externalGovernanceStatus": { + "description": "Status of external governance.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ExternalGovernanceStatus", + "modelAsString": true + } + }, + "pricingModel": { + "description": "Weather or not Managed Instance is freemium.", + "enum": [ + "Regular", + "Freemium" + ], + "type": "string", + "x-ms-enum": { + "name": "FreemiumType", + "modelAsString": true + } + }, + "createTime": { + "format": "date-time", + "description": "Specifies the point in time (ISO8601 format) of the Managed Instance creation.", + "type": "string", + "readOnly": true + }, + "authenticationMetadata": { + "description": "The managed instance's authentication metadata lookup mode.", + "enum": [ + "AzureAD", + "Paired", + "Windows" + ], + "type": "string", + "x-ms-enum": { + "name": "AuthMetadataLookupModes", + "modelAsString": true + } + }, + "databaseFormat": { + "description": "Specifies the internal format of instance databases specific to the SQL engine version.", + "enum": [ + "AlwaysUpToDate", + "SQLServer2022" + ], + "type": "string", + "x-ms-enum": { + "name": "ManagedInstanceDatabaseFormat", + "modelAsString": true + } + } + } + }, + "ManagedInstanceUpdate": { + "description": "An update request for an Azure SQL Database managed instance.", + "type": "object", + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "Managed instance sku" + }, + "identity": { + "$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity", + "description": "Managed instance identity" + }, + "properties": { + "$ref": "#/definitions/ManagedInstanceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "OutboundEnvironmentEndpoint": { + "description": "An endpoint that the managed instance service requires outbound network access to.", + "type": "object", + "properties": { + "category": { + "description": "The type of service accessed by the managed instance service, e.g., Azure Storage, Azure Active Directory, etc.", + "type": "string", + "readOnly": true + }, + "endpoints": { + "description": "The endpoints that the managed instance service communicates with in order to function correctly.", + "type": "array", + "items": { + "$ref": "#/definitions/EndpointDependency" + }, + "readOnly": true, + "x-ms-identifiers": [] + } + } + }, + "OutboundEnvironmentEndpointCollection": { + "description": "A collection of endpoints that the managed instance service requires outbound network access to.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/OutboundEnvironmentEndpoint" + }, + "readOnly": true, + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "QueryMetricInterval": { + "description": "Properties of a query metrics interval.", + "type": "object", + "properties": { + "intervalStartTime": { + "description": "The start time for the metric interval (ISO-8601 format).", + "type": "string", + "readOnly": true + }, + "intervalType": { + "description": "Interval type (length).", + "enum": [ + "PT1H", + "P1D" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "QueryTimeGrainType", + "modelAsString": true + } + }, + "executionCount": { + "format": "int64", + "description": "Execution count of a query in this interval.", + "type": "integer", + "readOnly": true + }, + "metrics": { + "description": "List of metric objects for this interval", + "type": "array", + "items": { + "$ref": "#/definitions/QueryMetricProperties" + }, + "x-ms-identifiers": [] + } + } + }, + "QueryMetricProperties": { + "description": "Properties of a topquery metric in one interval.", + "type": "object", + "properties": { + "name": { + "description": "The name information for the metric.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "The UI appropriate name for the metric.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "The unit of the metric.", + "enum": [ + "percentage", + "KB", + "microseconds", + "count" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "QueryMetricUnitType", + "modelAsString": true + } + }, + "value": { + "format": "double", + "description": "The value of the metric.", + "type": "number", + "readOnly": true + }, + "min": { + "format": "double", + "description": "Metric value when min() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "max": { + "format": "double", + "description": "Metric value when max() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "avg": { + "format": "double", + "description": "Metric value when avg() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "sum": { + "format": "double", + "description": "Metric value when sum() aggregate function is used over the interval.", + "type": "number", + "readOnly": true + }, + "stdev": { + "format": "double", + "description": "Metric value when stdev aggregate function is used over the interval.", + "type": "number", + "readOnly": true + } + } + }, + "QueryStatisticsProperties": { + "description": "Properties of a query execution statistics.", + "type": "object", + "properties": { + "databaseName": { + "description": "Database name of the database in which this query was executed.", + "type": "string", + "readOnly": true + }, + "queryId": { + "description": "Unique query id (unique within one database).", + "type": "string", + "readOnly": 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 + }, + "intervals": { + "description": "List of intervals with appropriate metric data", + "type": "array", + "items": { + "$ref": "#/definitions/QueryMetricInterval" + }, + "x-ms-identifiers": [] + } + } + }, + "RefreshExternalGovernanceStatusOperationResultMI": { + "description": "An RefreshExternalGovernanceStatus operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RefreshExternalGovernanceStatusOperationResultPropertiesMI", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RefreshExternalGovernanceStatusOperationResultPropertiesMI": { + "description": "Contains the operation result properties for refresh external governance status operation.", + "type": "object", + "properties": { + "requestId": { + "format": "uuid", + "description": "Request Id.", + "type": "string", + "readOnly": true + }, + "requestType": { + "description": "Request type.", + "type": "string", + "readOnly": true + }, + "queuedTime": { + "description": "Queued time.", + "type": "string", + "readOnly": true + }, + "managedInstanceName": { + "description": "Managed instance name.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Operation status.", + "type": "string", + "readOnly": true + }, + "errorMessage": { + "description": "Error message.", + "type": "string", + "readOnly": true + } + } + }, + "ServicePrincipal": { + "description": "The managed instance's service principal configuration for a resource.", + "type": "object", + "properties": { + "principalId": { + "description": "The Azure Active Directory application object id.", + "type": "string", + "readOnly": true + }, + "clientId": { + "description": "The Azure Active Directory application client id.", + "type": "string", + "readOnly": true + }, + "tenantId": { + "description": "The Azure Active Directory tenant id.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Service principal type.", + "enum": [ + "None", + "SystemAssigned" + ], + "type": "string", + "x-ms-enum": { + "name": "ServicePrincipalType", + "modelAsString": true + } + } + } + }, + "TopQueries": { + "type": "object", + "properties": { + "numberOfQueries": { + "format": "int32", + "description": "Requested number of top queries.", + "type": "integer", + "readOnly": true + }, + "aggregationFunction": { + "description": "Aggregation function used to calculate query metrics.", + "type": "string", + "readOnly": true + }, + "observationMetric": { + "description": "Metric used to rank queries.", + "type": "string", + "readOnly": true + }, + "intervalType": { + "description": "Interval type (length).", + "enum": [ + "PT1H", + "P1D" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "QueryTimeGrainType", + "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 + }, + "queries": { + "description": "List of top resource consuming queries with appropriate metric data", + "type": "array", + "items": { + "$ref": "#/definitions/QueryStatisticsProperties" + }, + "x-ms-identifiers": [] + } + } + }, + "TopQueriesListResult": { + "description": "A list of top resource consuming queries on managed instance", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/TopQueries" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "UserIdentity": { + "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 + }, + "clientId": { + "format": "uuid", + "description": "The Azure Active Directory client id.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedLedgerDigestUploads.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedLedgerDigestUploads.json new file mode 100644 index 000000000000..fc79e453ef51 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedLedgerDigestUploads.json @@ -0,0 +1,335 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads": { + "get": { + "tags": [ + "ManagedLedgerDigestUploads" + ], + "description": "Gets all ledger digest upload settings on a database.", + "operationId": "ManagedLedgerDigestUploads_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved ledger upload settings.", + "schema": { + "$ref": "#/definitions/ManagedLedgerDigestUploadsListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of ledger digest upload settings on a database.": { + "$ref": "./examples/ManagedLedgerDigestUploadsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}": { + "get": { + "tags": [ + "ManagedLedgerDigestUploads" + ], + "description": "Gets the current ledger digest upload configuration for a database.", + "operationId": "ManagedLedgerDigestUploads_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "ledgerDigestUploads", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "ManagedLedgerDigestUploadsName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the ledger digest configuration.", + "schema": { + "$ref": "#/definitions/ManagedLedgerDigestUploads" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Gets the current ledger digest upload configuration for a database.": { + "$ref": "./examples/ManagedLedgerDigestUploadsGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedLedgerDigestUploads" + ], + "description": "Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance.", + "operationId": "ManagedLedgerDigestUploads_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "ledgerDigestUploads", + "in": "path", + "description": "The name of the Ledger Digest Upload Configurations.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "ManagedLedgerDigestUploadsName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The Ledger Digest Storage Endpoint.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedLedgerDigestUploads" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the ledger digest upload configuration", + "schema": { + "$ref": "#/definitions/ManagedLedgerDigestUploads" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 400 LedgerMissingDigestStorageEndPoint - User attempted to configure ledger digest storage without providing an endpoint\n\n * 400 LedgerException - The server encountered an unexpected exception\n\n * 400 LedgerDigestUploadsNotSupportedOnGeoSecondary - The ledger digest storage cannot be configured on secondary databases.\n\n * 400 InsufficientStorageAccountPermissions - Read or write operations are not allowed on the storage account.\n\n * 400 StorageAccountIsDisabled - The storage account is disabled.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 400 PreviousOperationInProgress - Uploading ledger digests is being enabled or disabled for database. Please wait for the previous request to complete.\n\n * 400 NoServerIdentity - No identity is configured for specified server. For information on how to configure an identity for the server see https://go.microsoft.com/fwlink/?linkid=2156804\n\n * 400 SubscriptionDoesNotHaveServer - Subscription does not contain server.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered. The error message from Active Directory Authentication library (ADAL) is {0}.\n\n * 400 LedgerDigestUploadIsNotSupportedOnResourceType - Uploading ledger digests is currently not supported for this resource type.\n\n * 400 InvalidOperationOnNamedReplicas - The ledger digest storage cannot be configured on a named replica.\n\n * 400 LedgerDigestUploadsNotSupportedOnGeoChaining - User attempted to set automatic upload of ledger digest in database configured with secondaries of secondaries.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SourceDatabaseNotFound - Specified database does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Updating the ledger digest upload configuration is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Enables managed ledger digest upload configuration for a database": { + "$ref": "./examples/ManagedLedgerDigestUploadsEnable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable": { + "post": { + "tags": [ + "ManagedLedgerDigestUploads" + ], + "description": "Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance.", + "operationId": "ManagedLedgerDigestUploads_Disable", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "ledgerDigestUploads", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "ManagedLedgerDigestUploadsName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled uploading ledger digests", + "schema": { + "$ref": "#/definitions/ManagedLedgerDigestUploads" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 LedgerInvalidDigestStorageTargetUpdateRequest - The database ledger digest storage upload request does not exist or has no properties object.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 MalformedDigestStorageEndpoint - The specified digest storage endpoint is a malformed URI.\n\n * 400 InvalidLedgerDigestUploadsName - The ledger digest upload name is not supported. Please use the key name “current”.\n\n * 400 LedgerMissingDigestStorageEndPoint - User attempted to configure ledger digest storage without providing an endpoint\n\n * 400 LedgerException - The server encountered an unexpected exception\n\n * 400 LedgerDigestUploadsNotSupportedOnGeoSecondary - The ledger digest storage cannot be configured on secondary databases.\n\n * 400 InsufficientStorageAccountPermissions - Read or write operations are not allowed on the storage account.\n\n * 400 StorageAccountIsDisabled - The storage account is disabled.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 400 PreviousOperationInProgress - Uploading ledger digests is being enabled or disabled for database. Please wait for the previous request to complete.\n\n * 400 NoServerIdentity - No identity is configured for specified server. For information on how to configure an identity for the server see https://go.microsoft.com/fwlink/?linkid=2156804\n\n * 400 SubscriptionDoesNotHaveServer - Subscription does not contain server.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered. The error message from Active Directory Authentication library (ADAL) is {0}.\n\n * 400 LedgerDigestUploadIsNotSupportedOnResourceType - Uploading ledger digests is currently not supported for this resource type.\n\n * 400 InvalidOperationOnNamedReplicas - The ledger digest storage cannot be configured on a named replica.\n\n * 400 LedgerDigestUploadsNotSupportedOnGeoChaining - User attempted to set automatic upload of ledger digest in database configured with secondaries of secondaries.\n\n * 400 InvalidDigestStorageEndpoint - The specified digestStorageEndpoint is invalid. It must be an Azure blob storage or Azure Confidential Ledger endpoint.\n\n * 400 InvalidStorageAccountName - The specified storage account is not valid or does not exist.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SourceDatabaseNotFound - Specified database does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Disabling the ledger digest upload is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Disables uploading ledger digests for a database": { + "$ref": "./examples/ManagedLedgerDigestUploadsDisable.json" + } + } + } + } + }, + "definitions": { + "ManagedLedgerDigestUploads": { + "description": "Azure SQL Database ledger digest upload settings.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedLedgerDigestUploadsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedLedgerDigestUploadsListResult": { + "description": "A list of ledger digest upload settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedLedgerDigestUploads" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedLedgerDigestUploadsProperties": { + "description": "The properties of a database ledger digest upload settings.", + "type": "object", + "properties": { + "digestStorageEndpoint": { + "description": "The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger.", + "type": "string" + }, + "state": { + "description": "Specifies the state of ledger digest upload.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagedLedgerDigestUploadsState", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.json new file mode 100644 index 000000000000..c08f122a95e3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.json @@ -0,0 +1,336 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies": { + "get": { + "tags": [ + "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies" + ], + "description": "Gets a dropped database's short term retention policy list.", + "operationId": "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_ListByRestorableDroppedDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policies.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the short term retention policy list for the database.": { + "$ref": "./examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}": { + "get": { + "tags": [ + "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies" + ], + "description": "Gets a dropped database's short term retention policy.", + "operationId": "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the policies.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the short term retention policy for the database.": { + "$ref": "./examples/GetManagedShortTermRetentionPolicyRestorableDropped.json" + } + } + }, + "put": { + "tags": [ + "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies" + ], + "description": "Sets a database's short term retention policy.", + "operationId": "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the restorable dropped database.": { + "$ref": "./examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json" + } + } + }, + "patch": { + "tags": [ + "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies" + ], + "description": "Sets a database's short term retention policy.", + "operationId": "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "policyName", + "in": "path", + "description": "The policy name. Should always be \"default\".", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ManagedShortTermRetentionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The short term retention policy info.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the policy.", + "schema": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 InvalidBackupRetentionDays - The retention days of {0} is not a valid configuration. Valid backup retention must be in 7-day increments (7, 14, 21, etc.)\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update the short term retention policy for the restorable dropped database.": { + "$ref": "./examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json" + } + } + } + } + }, + "definitions": { + "ManagedBackupShortTermRetentionPolicy": { + "description": "A short term retention policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedBackupShortTermRetentionPolicyListResult": { + "description": "A list of short term retention policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedBackupShortTermRetentionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedBackupShortTermRetentionPolicyProperties": { + "description": "Properties of a short term retention policy", + "type": "object", + "properties": { + "retentionDays": { + "format": "int32", + "description": "The backup retention period in days. This is how many days Point-in-Time Restore will be supported.", + "type": "integer" + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedServerDnsAliases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedServerDnsAliases.json new file mode 100644 index 000000000000..7fb97c3604c0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedServerDnsAliases.json @@ -0,0 +1,370 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases": { + "get": { + "tags": [ + "ManagedServerDnsAliases" + ], + "description": "Gets a list of managed server DNS aliases for a managed server.", + "operationId": "ManagedServerDnsAliases_ListByManagedInstance", + "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 managed server DNS aliases.", + "schema": { + "$ref": "#/definitions/ManagedServerDnsAliasListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidManagedServerDnsAliasAcquireRequest - The acquire managed server DNS alias request body is empty or invalid.\n\n * 400 ManagedServerDnsAliasAcquireRequestInvalidOldManagedServerDnsAliasResourceId - The old managed server DNS alias id in request body is empty or invalid (it should have the format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}).\n\n * 400 ManagedServerDnsAliasAcquireRequestOldManagedServerDnsAliasSubscriptionMismatch - The old managed server DNS subscription id in request body is different than the one in request URI.\n\n * 400 ManagedServerDnsAliasAcquireRequestOldManagedServerDnsAliasNameMismatch - The old managed server DNS alias name in request body is different than the one in request URI.\n\n * 400 InvalidServerDnsAliasNameForNamedInstance - Invalid Server DNS Alias name was supplied.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ManagedServerAliasDnsZoneMismatch - Managed Server Alias Dns Zone Mismatch\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\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 managed server DNS aliases": { + "$ref": "./examples/ManagedServerDnsAliasList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}": { + "get": { + "tags": [ + "ManagedServerDnsAliases" + ], + "description": "Gets a server DNS alias.", + "operationId": "ManagedServerDnsAliases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "dnsAliasName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed server DNS alias.", + "schema": { + "$ref": "#/definitions/ManagedServerDnsAlias" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidManagedServerDnsAliasAcquireRequest - The acquire managed server DNS alias request body is empty or invalid.\n\n * 400 ManagedServerDnsAliasAcquireRequestInvalidOldManagedServerDnsAliasResourceId - The old managed server DNS alias id in request body is empty or invalid (it should have the format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}).\n\n * 400 ManagedServerDnsAliasAcquireRequestOldManagedServerDnsAliasSubscriptionMismatch - The old managed server DNS subscription id in request body is different than the one in request URI.\n\n * 400 ManagedServerDnsAliasAcquireRequestOldManagedServerDnsAliasNameMismatch - The old managed server DNS alias name in request body is different than the one in request URI.\n\n * 400 InvalidServerDnsAliasNameForNamedInstance - Invalid Server DNS Alias name was supplied.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ManagedServerAliasDnsZoneMismatch - Managed Server Alias Dns Zone Mismatch\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\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-examples": { + "Get managed server DNS alias": { + "$ref": "./examples/ManagedServerDnsAliasGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedServerDnsAliases" + ], + "description": "Creates a managed server DNS alias.", + "operationId": "ManagedServerDnsAliases_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "dnsAliasName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedServerDnsAliasCreation" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The managed server DNS alias already exists.", + "schema": { + "$ref": "#/definitions/ManagedServerDnsAlias" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidManagedServerDnsAliasAcquireRequest - The acquire managed server DNS alias request body is empty or invalid.\n\n * 400 ManagedServerDnsAliasAcquireRequestInvalidOldManagedServerDnsAliasResourceId - The old managed server DNS alias id in request body is empty or invalid (it should have the format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}).\n\n * 400 ManagedServerDnsAliasAcquireRequestOldManagedServerDnsAliasSubscriptionMismatch - The old managed server DNS subscription id in request body is different than the one in request URI.\n\n * 400 ManagedServerDnsAliasAcquireRequestOldManagedServerDnsAliasNameMismatch - The old managed server DNS alias name in request body is different than the one in request URI.\n\n * 400 InvalidServerDnsAliasNameForNamedInstance - Invalid Server DNS Alias name was supplied.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ManagedServerAliasDnsZoneMismatch - Managed Server Alias Dns Zone Mismatch\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created a managed server DNS alias.", + "schema": { + "$ref": "#/definitions/ManagedServerDnsAlias" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create managed server DNS alias": { + "$ref": "./examples/ManagedServerDnsAliasCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedServerDnsAliases" + ], + "description": "Deletes the managed server DNS alias with the given name.", + "operationId": "ManagedServerDnsAliases_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "dnsAliasName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed server DNS alias." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidManagedServerDnsAliasAcquireRequest - The acquire managed server DNS alias request body is empty or invalid.\n\n * 400 ManagedServerDnsAliasAcquireRequestInvalidOldManagedServerDnsAliasResourceId - The old managed server DNS alias id in request body is empty or invalid (it should have the format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}).\n\n * 400 ManagedServerDnsAliasAcquireRequestOldManagedServerDnsAliasSubscriptionMismatch - The old managed server DNS subscription id in request body is different than the one in request URI.\n\n * 400 ManagedServerDnsAliasAcquireRequestOldManagedServerDnsAliasNameMismatch - The old managed server DNS alias name in request body is different than the one in request URI.\n\n * 400 InvalidServerDnsAliasNameForNamedInstance - Invalid Server DNS Alias name was supplied.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ManagedServerAliasDnsZoneMismatch - Managed Server Alias Dns Zone Mismatch\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified managed server DNS alias does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete managed server DNS alias": { + "$ref": "./examples/ManagedServerDnsAliasDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}/acquire": { + "post": { + "tags": [ + "ManagedServerDnsAliases" + ], + "description": "Acquires managed server DNS alias from another managed server.", + "operationId": "ManagedServerDnsAliases_Acquire", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "dnsAliasName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedServerDnsAliasAcquisition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully acquired managed server DNS alias.", + "schema": { + "$ref": "#/definitions/ManagedServerDnsAlias" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidManagedServerDnsAliasAcquireRequest - The acquire managed server DNS alias request body is empty or invalid.\n\n * 400 ManagedServerDnsAliasAcquireRequestInvalidOldManagedServerDnsAliasResourceId - The old managed server DNS alias id in request body is empty or invalid (it should have the format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}).\n\n * 400 ManagedServerDnsAliasAcquireRequestOldManagedServerDnsAliasSubscriptionMismatch - The old managed server DNS subscription id in request body is different than the one in request URI.\n\n * 400 ManagedServerDnsAliasAcquireRequestOldManagedServerDnsAliasNameMismatch - The old managed server DNS alias name in request body is different than the one in request URI.\n\n * 400 InvalidServerDnsAliasNameForNamedInstance - Invalid Server DNS Alias name was supplied.\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\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 ManagedServerAliasDnsZoneMismatch - Managed Server Alias Dns Zone Mismatch\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Acquire managed server DNS alias.": { + "$ref": "./examples/ManagedServerDnsAliasAcquire.json" + } + } + } + } + }, + "definitions": { + "ManagedServerDnsAlias": { + "description": "A managed server DNS alias.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedServerDnsAliasProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedServerDnsAliasAcquisition": { + "description": "A managed server DNS alias acquisition request.", + "required": [ + "oldManagedServerDnsAliasResourceId" + ], + "type": "object", + "properties": { + "oldManagedServerDnsAliasResourceId": { + "description": "The resource ID of the managed server DNS alias that will be acquired to point to this managed server instead.", + "type": "string" + } + } + }, + "ManagedServerDnsAliasCreation": { + "description": "A managed server dns alias creation request.", + "type": "object", + "properties": { + "createDnsRecord": { + "description": "Whether or not DNS record should be created for this alias.", + "default": true, + "type": "boolean" + } + } + }, + "ManagedServerDnsAliasListResult": { + "description": "A list of managed server DNS aliases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedServerDnsAlias" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedServerDnsAliasProperties": { + "description": "Properties of a managed server DNS alias.", + "type": "object", + "properties": { + "azureDnsRecord": { + "description": "The fully qualified DNS record for managed server alias", + "type": "string", + "readOnly": true + }, + "publicAzureDnsRecord": { + "description": "The fully qualified public DNS record for managed server alias", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedServerSecurityAlertPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedServerSecurityAlertPolicies.json new file mode 100644 index 000000000000..9120c9ea6bec --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ManagedServerSecurityAlertPolicies.json @@ -0,0 +1,303 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies": { + "get": { + "tags": [ + "ManagedServerSecurityAlertPolicies" + ], + "description": "Get the managed server's threat detection policies.", + "operationId": "ManagedServerSecurityAlertPolicies_ListByInstance", + "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 managed server threat detection policies.", + "schema": { + "$ref": "#/definitions/ManagedServerSecurityAlertPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the managed server's threat detection policies": { + "$ref": "./examples/ManagedServerSecurityAlertListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}": { + "get": { + "tags": [ + "ManagedServerSecurityAlertPolicies" + ], + "description": "Get a managed server's threat detection policy.", + "operationId": "ManagedServerSecurityAlertPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the managed server threat detection policy.", + "schema": { + "$ref": "#/definitions/ManagedServerSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-examples": { + "Get a managed server's threat detection policy": { + "$ref": "./examples/ManagedServerSecurityAlertGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedServerSecurityAlertPolicies" + ], + "description": "Creates or updates a threat detection policy.", + "operationId": "ManagedServerSecurityAlertPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The managed server security alert policy.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagedServerSecurityAlertPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the threat detection policy.", + "schema": { + "$ref": "#/definitions/ManagedServerSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\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 * 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 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Created request to set the server threat detection policy." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a managed server's threat detection policy with minimal parameters": { + "$ref": "./examples/ManagedServerSecurityAlertCreateMin.json" + }, + "Update a managed server's threat detection policy with all parameters": { + "$ref": "./examples/ManagedServerSecurityAlertCreateMax.json" + } + } + } + } + }, + "definitions": { + "ManagedServerSecurityAlertPolicy": { + "description": "A managed server security alert policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SecurityAlertPolicyResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SecurityAlertsPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedServerSecurityAlertPolicyListResult": { + "description": "A list of the managed Server's security alert policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedServerSecurityAlertPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SecurityAlertsPolicyProperties": { + "description": "Properties of a security alert policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SecurityAlertsPolicyState", + "modelAsString": false + } + }, + "disabledAlerts": { + "description": "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAddresses": { + "description": "Specifies an array of e-mail addresses to which the alert is sent.", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAccountAdmins": { + "description": "Specifies that the alert is sent to the account administrators.", + "type": "boolean" + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the Threat Detection audit storage account.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the Threat Detection audit logs.", + "type": "integer" + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/NetworkSecurityPerimeterConfigurations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/NetworkSecurityPerimeterConfigurations.json new file mode 100644 index 000000000000..cc107d62cf04 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/NetworkSecurityPerimeterConfigurations.json @@ -0,0 +1,379 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/networkSecurityPerimeterConfigurations": { + "get": { + "tags": [ + "NetworkSecurityPerimeterConfigurations" + ], + "description": "Gets a list of NSP configurations for a server.", + "operationId": "NetworkSecurityPerimeterConfigurations_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of configs.", + "schema": { + "$ref": "#/definitions/NetworkSecurityPerimeterConfigurationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 NullResource - Request body is empty\n\n * 400 NullProperties - Properties collection is not included in request body\n\n * 400 NullNSP - NetworkSecurityPerimeter property is not present in request body\n\n * 400 NullNSPId - NetworkSecurityPerimeter is missing the ID property\n\n * 400 MalformedNSPId - NetworkSecurityPerimeter ID is not correctly formatted\n\n * 400 NullNSPImmutableId - NetworkSecurityPerimeter is missing the ImmutableId property\n\n * 400 MalformedNSPImmutableId - NetworkSecurityPerimeter Immutable ID is not a GUID\n\n * 400 NullLocation - NetworkSecurityPerimeter is missing the location property\n\n * 400 NullNetworkProfile - NetworkProfile is not present in the request body\n\n * 400 NullNetworkProfileName - NetworkProfile is missing the Name property\n\n * 400 NullAccessMode - Access Mode is not present in the request body\n\n * 400 InvalidAccessMode - Supported Access Modes are enforced, audit and learning\n\n * 400 InvalidClient - Client with id '{0}' is not allowed to interact with this resource\n\n * 400 TooManyAssociations - A SQL Server may only be associated with one NSP\n\n * 400 MalformedAssociationProxyName - AssociationProxy name is not formed like {perimeterGuid}.{associationName}\n\n * 404 AssociationNotFound - This SQL Server is not associated with any NSP\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 OnlyOneAssociationPerServer - A SQL Server may only be associated with one NSP" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List NSP configs by server": { + "$ref": "./examples/NetworkSecurityPerimeterConfigurationsListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/networkSecurityPerimeterConfigurations/{nspConfigName}": { + "get": { + "tags": [ + "NetworkSecurityPerimeterConfigurations" + ], + "description": "Gets a network security perimeter configuration.", + "operationId": "NetworkSecurityPerimeterConfigurations_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "nspConfigName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the config.", + "schema": { + "$ref": "#/definitions/NetworkSecurityPerimeterConfiguration" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 NullResource - Request body is empty\n\n * 400 NullProperties - Properties collection is not included in request body\n\n * 400 NullNSP - NetworkSecurityPerimeter property is not present in request body\n\n * 400 NullNSPId - NetworkSecurityPerimeter is missing the ID property\n\n * 400 MalformedNSPId - NetworkSecurityPerimeter ID is not correctly formatted\n\n * 400 NullNSPImmutableId - NetworkSecurityPerimeter is missing the ImmutableId property\n\n * 400 MalformedNSPImmutableId - NetworkSecurityPerimeter Immutable ID is not a GUID\n\n * 400 NullLocation - NetworkSecurityPerimeter is missing the location property\n\n * 400 NullNetworkProfile - NetworkProfile is not present in the request body\n\n * 400 NullNetworkProfileName - NetworkProfile is missing the Name property\n\n * 400 NullAccessMode - Access Mode is not present in the request body\n\n * 400 InvalidAccessMode - Supported Access Modes are enforced, audit and learning\n\n * 400 InvalidClient - Client with id '{0}' is not allowed to interact with this resource\n\n * 400 TooManyAssociations - A SQL Server may only be associated with one NSP\n\n * 400 MalformedAssociationProxyName - AssociationProxy name is not formed like {perimeterGuid}.{associationName}\n\n * 404 AssociationNotFound - This SQL Server is not associated with any NSP\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 OnlyOneAssociationPerServer - A SQL Server may only be associated with one NSP" + } + }, + "x-ms-examples": { + "Get an NSP config by name": { + "$ref": "./examples/NetworkSecurityPerimeterConfigurationsGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile": { + "post": { + "tags": [ + "NetworkSecurityPerimeterConfigurations" + ], + "description": "Reconcile network security perimeter configuration for SQL Resource Provider", + "operationId": "NetworkSecurityPerimeterConfigurations_Reconcile", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "nspConfigName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Reconcile NSP Configuration operation successful", + "schema": { + "$ref": "#/definitions/NetworkSecurityPerimeterConfiguration" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 AssociationNotFound - This SQL Server is not associated with any NSP\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 OnlyOneAssociationPerServer - A SQL Server may only be associated with one NSP\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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Reconcile NSP Configuration operation accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Reconcile NSP Config": { + "$ref": "./examples/NetworkSecurityPerimeterConfigurationsReconcile.json" + } + } + } + } + }, + "definitions": { + "NetworkSecurityPerimeterConfiguration": { + "description": "NSP Configuration for a server.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/NetworkSecurityPerimeterConfigurationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "NetworkSecurityPerimeterConfigurationListResult": { + "description": "A list of NSP configurations for a server.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/NetworkSecurityPerimeterConfiguration" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "NetworkSecurityPerimeterConfigurationProperties": { + "description": "The properties of an NSP config.", + "type": "object", + "properties": { + "provisioningState": { + "type": "string" + }, + "networkSecurityPerimeter": { + "$ref": "#/definitions/NSPConfigPerimeter" + }, + "resourceAssociation": { + "$ref": "#/definitions/NSPConfigAssociation" + }, + "profile": { + "$ref": "#/definitions/NSPConfigProfile" + }, + "provisioningIssues": { + "type": "array", + "items": { + "$ref": "#/definitions/NSPProvisioningIssue" + }, + "x-ms-identifiers": [] + } + } + }, + "NSPConfigAccessRule": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "properties": { + "$ref": "#/definitions/NSPConfigAccessRuleProperties" + } + } + }, + "NSPConfigAccessRuleProperties": { + "type": "object", + "properties": { + "direction": { + "type": "string" + }, + "addressPrefixes": { + "type": "array", + "items": { + "type": "string" + } + }, + "fullyQualifiedDomainNames": { + "type": "array", + "items": { + "type": "string" + } + }, + "subscriptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "networkSecurityPerimeters": { + "type": "array", + "items": { + "$ref": "#/definitions/NSPConfigNetworkSecurityPerimeterRule" + } + } + } + }, + "NSPConfigAssociation": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "accessMode": { + "type": "string" + } + } + }, + "NSPConfigNetworkSecurityPerimeterRule": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "perimeterGuid": { + "type": "string" + }, + "location": { + "type": "string" + } + } + }, + "NSPConfigPerimeter": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "perimeterGuid": { + "type": "string" + }, + "location": { + "type": "string" + } + } + }, + "NSPConfigProfile": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "accessRulesVersion": { + "type": "string" + }, + "accessRules": { + "type": "array", + "items": { + "$ref": "#/definitions/NSPConfigAccessRule" + }, + "x-ms-identifiers": [] + } + } + }, + "NSPProvisioningIssue": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "properties": { + "$ref": "#/definitions/NSPProvisioningIssueProperties" + } + } + }, + "NSPProvisioningIssueProperties": { + "type": "object", + "properties": { + "issueType": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "description": { + "type": "string" + }, + "suggestedResourceIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "suggestedAccessRules": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Operations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Operations.json new file mode 100644 index 000000000000..dd704b80f96b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Operations.json @@ -0,0 +1,150 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Sql/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available SQL Rest API operations.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved operations.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Lists all of the available SQL Rest API operations": { + "$ref": "./examples/ListOperations.json" + } + } + } + } + }, + "definitions": { + "Operation": { + "description": "SQL REST API operation definition.", + "type": "object", + "properties": { + "name": { + "description": "The name of the operation being performed on this particular object.", + "type": "string", + "readOnly": true + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "The localized display information for this particular operation / action.", + "readOnly": true + }, + "origin": { + "description": "The intended executor of the operation.", + "enum": [ + "user", + "system" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "OperationOrigin", + "modelAsString": true + } + }, + "properties": { + "description": "Additional descriptions for the operation.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true, + "x-ms-client-flatten": false + } + } + }, + "OperationDisplay": { + "description": "Display metadata associated with the operation.", + "type": "object", + "properties": { + "provider": { + "description": "The localized friendly form of the resource provider name.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The localized friendly form of the resource type related to this action/operation.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The localized friendly name for the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The localized friendly description for the operation.", + "type": "string", + "readOnly": true + } + } + }, + "OperationListResult": { + "description": "Result of the request to list SQL operations.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/OutboundFirewallRules.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/OutboundFirewallRules.json new file mode 100644 index 000000000000..22cf78a58ec8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/OutboundFirewallRules.json @@ -0,0 +1,276 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules": { + "get": { + "tags": [ + "OutboundFirewallRules" + ], + "description": "Gets all outbound firewall rules on a server.", + "operationId": "OutboundFirewallRules_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved outbound firewall rules.", + "schema": { + "$ref": "#/definitions/OutboundFirewallRuleListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 OutboundFirewallRuleOngoingOperation - The outbound firewall rule '{0}' for server '{1}' is currently busy with another operation: '{2}'\n\n * 409 OutboundFirewallRuleLimitReached - Limit of {1} Outbound Firewall Rules for Server {0} has been reached" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of outbound firewall rules on a server.": { + "$ref": "./examples/OutboundFirewallRuleList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}": { + "get": { + "tags": [ + "OutboundFirewallRules" + ], + "description": "Gets an outbound firewall rule.", + "operationId": "OutboundFirewallRules_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "outboundRuleFqdn", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified outbound firewall rule.", + "schema": { + "$ref": "#/definitions/OutboundFirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 OutboundFirewallRuleOngoingOperation - The outbound firewall rule '{0}' for server '{1}' is currently busy with another operation: '{2}'\n\n * 409 OutboundFirewallRuleLimitReached - Limit of {1} Outbound Firewall Rules for Server {0} has been reached" + } + }, + "x-ms-examples": { + "Gets outbound firewall rule.": { + "$ref": "./examples/OutboundFirewallRuleGet.json" + } + } + }, + "put": { + "tags": [ + "OutboundFirewallRules" + ], + "description": "Create a outbound firewall rule with a given name.", + "operationId": "OutboundFirewallRules_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "outboundRuleFqdn", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created outbound firewall rule.", + "schema": { + "$ref": "#/definitions/OutboundFirewallRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OutboundFirewallRuleOngoingOperation - The outbound firewall rule '{0}' for server '{1}' is currently busy with another operation: '{2}'\n\n * 409 OutboundFirewallRuleLimitReached - Limit of {1} Outbound Firewall Rules for Server {0} has been reached\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created outbound firewall rule.", + "schema": { + "$ref": "#/definitions/OutboundFirewallRule" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Approve or reject a outbound firewall rule with a given name.": { + "$ref": "./examples/OutboundFirewallRuleCreate.json" + } + } + }, + "delete": { + "tags": [ + "OutboundFirewallRules" + ], + "description": "Deletes a outbound firewall rule with a given name.", + "operationId": "OutboundFirewallRules_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "outboundRuleFqdn", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted outbound firewall rule." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 OutboundFirewallRuleOngoingOperation - The outbound firewall rule '{0}' for server '{1}' is currently busy with another operation: '{2}'\n\n * 409 OutboundFirewallRuleLimitReached - Limit of {1} Outbound Firewall Rules for Server {0} has been reached\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "Outbound firewall rule does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes a outbound firewall rule with a given name.": { + "$ref": "./examples/OutboundFirewallRuleDelete.json" + } + } + } + } + }, + "definitions": { + "OutboundFirewallRule": { + "description": "An Azure SQL DB Server Outbound Firewall Rule.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/OutboundFirewallRuleProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "OutboundFirewallRuleListResult": { + "description": "A list of outbound rules.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/OutboundFirewallRule" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "OutboundFirewallRuleProperties": { + "description": "The properties of an outbound firewall rule.", + "type": "object", + "properties": { + "provisioningState": { + "description": "The state of the outbound rule.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/PrivateEndpointConnections.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/PrivateEndpointConnections.json new file mode 100644 index 000000000000..fc0aaee2805b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/PrivateEndpointConnections.json @@ -0,0 +1,355 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets all private endpoint connections on a server.", + "operationId": "PrivateEndpointConnections_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private endpoint connections.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets list of private endpoint connections on a server.": { + "$ref": "./examples/PrivateEndpointConnectionList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets a private endpoint connection.", + "operationId": "PrivateEndpointConnections_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified private endpoint connection.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets private endpoint connection.": { + "$ref": "./examples/PrivateEndpointConnectionGet.json" + } + } + }, + "put": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Approve or reject a private endpoint connection with a given name.", + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully approved or rejected private endpoint connection.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 400 NetworkingSubscriptionNotRegisteredWithSqlRp - Subscription used for network-side Private Endpoint is not registered with SQL resource provider\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 PrivateEndpointConnectionDroppedByOtherWorkflow - {0}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Approve or reject a private endpoint connection with a given name.": { + "$ref": "./examples/PrivateEndpointConnectionUpdate.json" + } + } + }, + "delete": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Deletes a private endpoint connection with a given name.", + "operationId": "PrivateEndpointConnections_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted private endpoint connection." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 NetworkingSubscriptionNotRegisteredWithSqlRp - Subscription used for network-side Private Endpoint is not registered with SQL resource provider\n\n * 400 PrivateEndpointConnectionDoesNotExist - Private Endpoint Connection does not exist\n\n * 400 PrivateEndpointConnectionStatusNotPending - Private Endpoint Connection Status is not Pending\n\n * 400 NullRemotePrivateLinkServiceConnectionState - Remote Private Link Service Connection State is Null\n\n * 400 NullPrivateEndpointConnectionProperties - Private Endpoint Connection Properties is Null\n\n * 400 NullRemotePrivateLinkServiceConnectionStateStatus - Remote Private Link Service Connection State Status is Null\n\n * 400 IncorrectPrivateLinkServiceConnectionStateStatus - Private Link Service Connection State Status must be \"Approved\" or \"Rejected\"\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 PrivateEndpointConnectionDroppedByOtherWorkflow - {0}\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "Private endpoint connection does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes a private endpoint connection with a given name.": { + "$ref": "./examples/PrivateEndpointConnectionDelete.json" + } + } + } + } + }, + "definitions": { + "PrivateEndpointConnection": { + "description": "A private endpoint connection", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "PrivateEndpointConnectionListResult": { + "description": "A list of private endpoint connections.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "PrivateEndpointConnectionProperties": { + "description": "Properties of a private endpoint connection.", + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpointProperty", + "description": "Private endpoint which the connection belongs to." + }, + "groupIds": { + "description": "Group IDs.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionStateProperty", + "description": "Connection state of the private endpoint connection." + }, + "provisioningState": { + "description": "State of the private endpoint connection.", + "enum": [ + "Approving", + "Ready", + "Dropping", + "Failed", + "Rejecting" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PrivateEndpointProvisioningState", + "modelAsString": true + } + } + } + }, + "PrivateEndpointProperty": { + "type": "object", + "properties": { + "id": { + "description": "Resource id of the private endpoint.", + "type": "string" + } + }, + "x-ms-azure-resource": true + }, + "PrivateLinkServiceConnectionStateProperty": { + "required": [ + "status", + "description" + ], + "type": "object", + "properties": { + "status": { + "description": "The private link service connection status.", + "enum": [ + "Approved", + "Pending", + "Rejected", + "Disconnected" + ], + "type": "string", + "x-ms-enum": { + "name": "PrivateLinkServiceConnectionStateStatus", + "modelAsString": true + } + }, + "description": { + "description": "The private link service connection description.", + "type": "string" + }, + "actionsRequired": { + "description": "The actions required for private link service connection.", + "enum": [ + "None" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PrivateLinkServiceConnectionStateActionsRequire", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/PrivateLinkResources.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/PrivateLinkResources.json new file mode 100644 index 000000000000..55375b9c82ca --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/PrivateLinkResources.json @@ -0,0 +1,193 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "description": "Gets the private link resources for SQL server.", + "operationId": "PrivateLinkResources_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "#/definitions/PrivateLinkResourceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets private link resources for SQL.": { + "$ref": "./examples/PrivateLinkResourcesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources/{groupName}": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "description": "Gets a private link resource for SQL server.", + "operationId": "PrivateLinkResources_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "groupName", + "in": "path", + "description": "The name of the private link resource.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "#/definitions/PrivateLinkResource" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Gets a private link resource for SQL.": { + "$ref": "./examples/PrivateLinkResourcesGet.json" + } + } + } + } + }, + "definitions": { + "PrivateLinkResource": { + "description": "A private link resource", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/PrivateLinkResourceProperties", + "description": "The private link resource group id.", + "readOnly": true + } + } + }, + "PrivateLinkResourceListResult": { + "description": "A list of private link resources", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "PrivateLinkResourceProperties": { + "description": "Properties of a private link resource.", + "type": "object", + "properties": { + "groupId": { + "description": "The private link resource group id.", + "type": "string", + "readOnly": true + }, + "requiredMembers": { + "description": "The private link resource required member names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "requiredZoneNames": { + "description": "The private link resource required zone names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RecoverableDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RecoverableDatabases.json new file mode 100644 index 000000000000..de0f1ba0f2fa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RecoverableDatabases.json @@ -0,0 +1,256 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases": { + "get": { + "tags": [ + "RecoverableDatabases" + ], + "description": "Gets a list of recoverable databases.", + "operationId": "RecoverableDatabases_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of recoverable databases.", + "schema": { + "$ref": "#/definitions/RecoverableDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get list of recoverable databases.": { + "$ref": "./examples/RecoverableDatabaseList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}": { + "get": { + "tags": [ + "RecoverableDatabases" + ], + "description": "Gets a recoverable database.", + "operationId": "RecoverableDatabases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified recoverable database.", + "schema": { + "$ref": "#/definitions/RecoverableDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-odata": "#/definitions/RecoverableDatabase", + "x-ms-examples": { + "Get a recoverable database.": { + "$ref": "./examples/RecoverableDatabaseGet.json" + }, + "Gets a recoverable database with expand equals keys.": { + "$ref": "./examples/RecoverableDatabaseGetWithExpandEqualsKeys.json" + } + } + } + } + }, + "definitions": { + "DatabaseKey": { + "description": "Database level key used for encryption at rest.", + "type": "object", + "properties": { + "type": { + "description": "The database key type. Only supported value is 'AzureKeyVault'.", + "enum": [ + "AzureKeyVault" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "DatabaseKeyType", + "modelAsString": true + } + }, + "thumbprint": { + "description": "Thumbprint of the database key.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The database key creation date.", + "type": "string", + "readOnly": true + }, + "subregion": { + "description": "Subregion of the server key.", + "type": "string", + "readOnly": true + } + } + }, + "RecoverableDatabase": { + "description": "A recoverable database resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RecoverableDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RecoverableDatabaseListResult": { + "description": "A list of recoverable databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/RecoverableDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "RecoverableDatabaseProperties": { + "description": "The recoverable database's properties.", + "type": "object", + "properties": { + "edition": { + "description": "The edition of the database.", + "type": "string", + "readOnly": true + }, + "serviceLevelObjective": { + "description": "The service level objective name of the database.", + "type": "string", + "readOnly": true + }, + "elasticPoolName": { + "description": "The elastic pool name of the database", + "type": "string", + "readOnly": true + }, + "lastAvailableBackupDate": { + "format": "date-time", + "description": "The last available backup date.", + "type": "string", + "readOnly": true + }, + "keys": { + "description": "The resource ids of the user assigned identities to use", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DatabaseKey" + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RecoverableManagedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RecoverableManagedDatabases.json new file mode 100644 index 000000000000..9e3e8921dc0b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RecoverableManagedDatabases.json @@ -0,0 +1,176 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases": { + "get": { + "tags": [ + "RecoverableManagedDatabases" + ], + "description": "Gets a list of recoverable managed databases.", + "operationId": "RecoverableManagedDatabases_ListByInstance", + "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 recoverable managed databases.", + "schema": { + "$ref": "#/definitions/RecoverableManagedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 ManagementServiceManagedServerDisabled - Operation failed since Managed Instance '{0}' is disabled. Please enable Managed Instance and try again.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 UpdatingInstanceAndBackupRedundancy - Instance zone redundancy and backup storage redundancy cannot be updated in the same request.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 RequestCantLandOnPaaSv2Platform - Request needs to land on PaaSv2 platform but PaaSv2 is not enabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 DeleteOfVersion2VirtualClusterIsDisabled - Delete of virtual cluster with version 2 is not enabled.\n\n * 400 DeleteOfVirtualClusterIsDisabled - Delete of virtual cluster is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 DnsRefreshOnVirtualClusterIsDisabled - Refresh of DNS records on virtual cluster is not enabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - The instance is multi-az but backup storage is being updated from zone redundant to non-zone redundant.\n\n * 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - Cannot update instance redundancy because backup storage redundancy update is in progress.\n\n * 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - The backup storage is non-zone redundant but instance redundancy is being updated to zone redundant.\n\n * 409 BackupRedundancyUpdateConflict - Cannot update backup storage redundancy because a backup storage redundancy update is already in progress.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 412 InstanceNotReadyForBackupRedundancyUpdate - Cannot update backup storage redundancy because the instance is not ready.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 recoverable databases by managed instances": { + "$ref": "./examples/ListRecoverableManagedDatabasesByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases/{recoverableDatabaseName}": { + "get": { + "tags": [ + "RecoverableManagedDatabases" + ], + "description": "Gets a recoverable managed database.", + "operationId": "RecoverableManagedDatabases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "recoverableDatabaseName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified recoverable managed database.", + "schema": { + "$ref": "#/definitions/RecoverableManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.\n\n * 400 ManagementServiceManagedServerDisabled - Operation failed since Managed Instance '{0}' is disabled. Please enable Managed Instance and try again.\n\n * 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 UpdatingInstanceAndBackupRedundancy - Instance zone redundancy and backup storage redundancy cannot be updated in the same request.\n\n * 400 DeleteOfManagedInstanceIsDisabled - Delete operation of managed instance is disabled.\n\n * 400 RequestCantLandOnPaaSv2Platform - Request needs to land on PaaSv2 platform but PaaSv2 is not enabled.\n\n * 400 CustomMaintenanceWindowIsDisabled - Custom maintenance window is not enabled.\n\n * 400 DeleteOfVersion2VirtualClusterIsDisabled - Delete of virtual cluster with version 2 is not enabled.\n\n * 400 DeleteOfVirtualClusterIsDisabled - Delete of virtual cluster is not enabled.\n\n * 400 MICantBeMovedFromOrToInstancePool - Existing managed instance can't be moved to managed instance pool.\n\n * 400 DnsRefreshOnVirtualClusterIsDisabled - Refresh of DNS records on virtual cluster is not enabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.\n\n * 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.\n\n * 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - The instance is multi-az but backup storage is being updated from zone redundant to non-zone redundant.\n\n * 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - Cannot update instance redundancy because backup storage redundancy update is in progress.\n\n * 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - The backup storage is non-zone redundant but instance redundancy is being updated to zone redundant.\n\n * 409 BackupRedundancyUpdateConflict - Cannot update backup storage redundancy because a backup storage redundancy update is already in progress.\n\n * 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).\n\n * 412 InstanceNotReadyForBackupRedundancyUpdate - Cannot update backup storage redundancy because the instance is not ready.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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-examples": { + "Gets a recoverable databases by managed instances": { + "$ref": "./examples/GetRecoverableManagedDatabase.json" + } + } + } + } + }, + "definitions": { + "RecoverableManagedDatabase": { + "description": "A recoverable managed database resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RecoverableManagedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RecoverableManagedDatabaseListResult": { + "description": "A list of recoverable managed databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/RecoverableManagedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "RecoverableManagedDatabaseProperties": { + "description": "The recoverable managed database's properties.", + "type": "object", + "properties": { + "lastAvailableBackupDate": { + "description": "The last available backup date.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ReplicationLinks.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ReplicationLinks.json new file mode 100644 index 000000000000..53ac3083caa9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ReplicationLinks.json @@ -0,0 +1,640 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a list of replication links on database.", + "operationId": "ReplicationLinks_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of replication links.", + "schema": { + "$ref": "#/definitions/ReplicationLinkListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 ReplicationLinksReplicationLinkTypeIsInvalid - The LinkType is invalid. Valid values are STANDBY and GEO.\n\n * 400 ReplicationLinksCreateIsNotSupported - Creation of Replication Link is not supported.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List replication links on server on database.": { + "$ref": "./examples/ReplicationLinkListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a replication link.", + "operationId": "ReplicationLinks_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified replication link.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 ReplicationLinksReplicationLinkTypeIsInvalid - The LinkType is invalid. Valid values are STANDBY and GEO.\n\n * 400 ReplicationLinksCreateIsNotSupported - Creation of Replication Link is not supported.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-examples": { + "Gets the replication link.": { + "$ref": "./examples/ReplicationLinkGet.json" + } + } + }, + "put": { + "tags": [ + "ReplicationLinks" + ], + "description": "Updates the replication link type.", + "operationId": "ReplicationLinks_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the replication link.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 ReplicationLinksReplicationLinkTypeIsInvalid - The LinkType is invalid. Valid values are STANDBY and GEO.\n\n * 400 ReplicationLinksCreateIsNotSupported - Creation of Replication Link is not supported.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary {0} database on the {1} server uses the {2} preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary {3} database on the {4} server is {5}.\n\n * 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + }, + "202": { + "description": "Update operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Updates Replication Link": { + "$ref": "./examples/ReplicationLinkCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ReplicationLinks" + ], + "description": "Deletes the replication link.", + "operationId": "ReplicationLinks_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 ReplicationLinksReplicationLinkTypeIsInvalid - The LinkType is invalid. Valid values are STANDBY and GEO.\n\n * 400 ReplicationLinksCreateIsNotSupported - Creation of Replication Link is not supported.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary {0} database on the {1} server uses the {2} preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary {3} database on the {4} server is {5}.\n\n * 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Deletion operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete replication link on server": { + "$ref": "./examples/ReplicationLinkDelete.json" + } + } + }, + "patch": { + "tags": [ + "ReplicationLinks" + ], + "description": "Updates the replication link type.", + "operationId": "ReplicationLinks_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReplicationLinkUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the replication link.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 ReplicationLinksReplicationLinkTypeIsInvalid - The LinkType is invalid. Valid values are STANDBY and GEO.\n\n * 400 ReplicationLinksCreateIsNotSupported - Creation of Replication Link is not supported.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary {0} database on the {1} server uses the {2} preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary {3} database on the {4} server is {5}.\n\n * 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + }, + "202": { + "description": "Update operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update Replication Link": { + "$ref": "./examples/ReplicationLinkUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server.", + "operationId": "ReplicationLinks_Failover", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 ReplicationLinksReplicationLinkTypeIsInvalid - The LinkType is invalid. Valid values are STANDBY and GEO.\n\n * 400 ReplicationLinksCreateIsNotSupported - Creation of Replication Link is not supported.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary {0} database on the {1} server uses the {2} preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary {3} database on the {4} server is {5}.\n\n * 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Planned failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss": { + "post": { + "tags": [ + "ReplicationLinks" + ], + "description": "Fails over from the current primary server to this server allowing data loss.", + "operationId": "ReplicationLinks_FailoverAllowDataLoss", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "linkId", + "in": "path", + "description": "The name of the replication link.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully failed over.", + "schema": { + "$ref": "#/definitions/ReplicationLink" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 ReplicationLinksReplicationLinkTypeIsInvalid - The LinkType is invalid. Valid values are STANDBY and GEO.\n\n * 400 ReplicationLinksCreateIsNotSupported - Creation of Replication Link is not supported.\n\n * 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary {0} database on the {1} server uses the {2} preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary {3} database on the {4} server is {5}.\n\n * 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 PlannedFailoverTimedOut - User invoked planned failover, and it timed out while trying to contact the partner management service.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\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 InvalidOperationForDatabaseNotInReplicationRelationship - A replication operation was performed on a database that is not in a replication relationship.\n\n * 409 GeoReplicationCannotBecomePrimaryDuringUndo - User attempted to failover or force-terminate a geo-link while the secondary is in a state where it may not be physically consistent and so cannot enter the primary role.\n\n * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.\n\n * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 FailoverGroupAlreadySetup - The operation cannot be performed because the geo-replication link is part of a Failover Group. You must remove the database from the group in order to individually terminate or failover.\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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Failover operation is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Forced failover of a replication link": { + "$ref": "./examples/ReplicationLinkFailoverAllowDataLoss.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks": { + "get": { + "tags": [ + "ReplicationLinks" + ], + "description": "Gets a list of replication links.", + "operationId": "ReplicationLinks_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of replication links.", + "schema": { + "$ref": "#/definitions/ReplicationLinkListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.\n\n * 400 ReplicationLinksDeleteIsNotSupported - This action is not yet available, please use 2014-04-01 for this action.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List replication links on server": { + "$ref": "./examples/ReplicationLinkListByServer.json" + } + } + } + } + }, + "definitions": { + "ReplicationLink": { + "description": "A replication link.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ReplicationLinkListResult": { + "description": "A list of replication links.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ReplicationLink" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ReplicationLinkProperties": { + "description": "Properties of a replication link.", + "type": "object", + "properties": { + "partnerServer": { + "description": "Resource partner server.", + "type": "string", + "readOnly": true + }, + "partnerDatabase": { + "description": "Resource partner database.", + "type": "string", + "readOnly": true + }, + "partnerDatabaseId": { + "description": "Resource partner database Id.", + "type": "string", + "readOnly": true + }, + "partnerLocation": { + "description": "Resource partner location.", + "type": "string", + "readOnly": true + }, + "role": { + "description": "Local replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "partnerRole": { + "description": "Partner replication role.", + "enum": [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": false + } + }, + "replicationMode": { + "description": "Replication mode.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Time at which the link was created.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "Seeding completion percentage for the link.", + "type": "integer", + "readOnly": true + }, + "replicationState": { + "description": "Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).", + "enum": [ + "PENDING", + "SEEDING", + "CATCH_UP", + "SUSPENDED" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ReplicationState", + "modelAsString": true + } + }, + "isTerminationAllowed": { + "description": "Whether the user is currently allowed to terminate the link.", + "type": "boolean", + "readOnly": true + }, + "linkType": { + "description": "Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED.", + "enum": [ + "GEO", + "NAMED", + "STANDBY" + ], + "type": "string", + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } + } + } + }, + "ReplicationLinkUpdate": { + "description": "A replication link update request.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationLinkUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ReplicationLinkUpdateProperties": { + "description": "Properties of a replication link update.", + "type": "object", + "properties": { + "linkType": { + "description": "Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED.", + "enum": [ + "GEO", + "NAMED", + "STANDBY" + ], + "type": "string", + "x-ms-enum": { + "name": "ReplicationLinkType", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RestorableDroppedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RestorableDroppedDatabases.json new file mode 100644 index 000000000000..4efc6500f074 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RestorableDroppedDatabases.json @@ -0,0 +1,293 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases": { + "get": { + "tags": [ + "RestorableDroppedDatabases" + ], + "description": "Gets a list of restorable dropped databases.", + "operationId": "RestorableDroppedDatabases_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of restorable dropped databases.", + "schema": { + "$ref": "#/definitions/RestorableDroppedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of restorable dropped databases.": { + "$ref": "./examples/ListRestorableDroppedDatabasesByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}": { + "get": { + "tags": [ + "RestorableDroppedDatabases" + ], + "description": "Gets a restorable dropped database.", + "operationId": "RestorableDroppedDatabases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified restorable dropped database.", + "schema": { + "$ref": "#/definitions/RestorableDroppedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-odata": "#/definitions/RestorableDroppedDatabase", + "x-ms-examples": { + "Gets a restorable dropped database.": { + "$ref": "./examples/GetRestorableDroppedDatabase.json" + }, + "Gets a restorable dropped database with expand equals keys.": { + "$ref": "./examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json" + } + } + } + } + }, + "definitions": { + "DatabaseKey": { + "description": "Database level key used for encryption at rest.", + "type": "object", + "properties": { + "type": { + "description": "The database key type. Only supported value is 'AzureKeyVault'.", + "enum": [ + "AzureKeyVault" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "DatabaseKeyType", + "modelAsString": true + } + }, + "thumbprint": { + "description": "Thumbprint of the database key.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The database key creation date.", + "type": "string", + "readOnly": true + }, + "subregion": { + "description": "Subregion of the server key.", + "type": "string", + "readOnly": true + } + } + }, + "RestorableDroppedDatabase": { + "description": "A restorable dropped database resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and tier of the SKU." + }, + "location": { + "description": "Resource location.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/RestorableDroppedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RestorableDroppedDatabaseListResult": { + "description": "A list of restorable dropped databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/RestorableDroppedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "RestorableDroppedDatabaseProperties": { + "description": "The restorable dropped database's properties.", + "type": "object", + "properties": { + "databaseName": { + "description": "The name of the database.", + "type": "string", + "readOnly": true + }, + "maxSizeBytes": { + "format": "int64", + "description": "The max size of the database expressed in bytes.", + "type": "integer", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The creation date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "deletionDate": { + "format": "date-time", + "description": "The deletion date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "earliestRestoreDate": { + "format": "date-time", + "description": "The earliest restore date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "backupStorageRedundancy": { + "description": "The storage account type used to store backups for this database.", + "enum": [ + "Geo", + "Local", + "Zone", + "GeoZone" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BackupStorageRedundancy", + "modelAsString": true + } + }, + "keys": { + "description": "The resource ids of the user assigned identities to use", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DatabaseKey" + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RestorableDroppedManagedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RestorableDroppedManagedDatabases.json new file mode 100644 index 000000000000..307649ce81fc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RestorableDroppedManagedDatabases.json @@ -0,0 +1,197 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases": { + "get": { + "tags": [ + "RestorableDroppedManagedDatabases" + ], + "description": "Gets a list of restorable dropped managed databases.", + "operationId": "RestorableDroppedManagedDatabases_ListByInstance", + "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 restorable dropped databases.", + "schema": { + "$ref": "#/definitions/RestorableDroppedManagedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List restorable dropped databases by managed instances": { + "$ref": "./examples/RestorableDroppedManagedDatabaseListByManagedInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}": { + "get": { + "tags": [ + "RestorableDroppedManagedDatabases" + ], + "description": "Gets a restorable dropped managed database.", + "operationId": "RestorableDroppedManagedDatabases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "restorableDroppedDatabaseId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified restorable dropped database.", + "schema": { + "$ref": "#/definitions/RestorableDroppedManagedDatabase" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a restorable dropped managed database.": { + "$ref": "./examples/GetRestorableDroppedManagedDatabase.json" + } + } + } + } + }, + "definitions": { + "RestorableDroppedManagedDatabase": { + "description": "A restorable dropped managed database resource.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RestorableDroppedManagedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RestorableDroppedManagedDatabaseListResult": { + "description": "A list of restorable dropped managed databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/RestorableDroppedManagedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "RestorableDroppedManagedDatabaseProperties": { + "description": "The restorable dropped managed database's properties.", + "type": "object", + "properties": { + "databaseName": { + "description": "The name of the database.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The creation date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "deletionDate": { + "format": "date-time", + "description": "The deletion date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + }, + "earliestRestoreDate": { + "format": "date-time", + "description": "The earliest restore date of the database (ISO8601 format).", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RestorePoints.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RestorePoints.json new file mode 100644 index 000000000000..5cd51ecc421f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/RestorePoints.json @@ -0,0 +1,343 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints": { + "get": { + "tags": [ + "RestorePoints" + ], + "description": "Gets a list of database restore points.", + "operationId": "RestorePoints_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully returned restore points.", + "schema": { + "$ref": "#/definitions/RestorePointListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BackupNotAllowedOnDeactivatedDatabase - Cannot create restore point on a deactivated database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 RestorePointLimitReached - A restore point cannot be created because database would exceed the allowed quota of restore points.\n\n * 400 RestorePointAttemptToDeleteSystemBackup - Cannot delete system restore point.\n\n * 404 DatabaseRestorePointNotFound - Can not find database restore point.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 408 DatabaseRestorePointTimedOut - Create database restore point failed." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database restore points.": { + "$ref": "./examples/DatabaseRestorePointsListByDatabase.json" + }, + "List datawarehouse database restore points.": { + "$ref": "./examples/DataWarehouseRestorePointsListByDatabase.json" + } + } + }, + "post": { + "tags": [ + "RestorePoints" + ], + "description": "Creates a restore point for a data warehouse.", + "operationId": "RestorePoints_Create", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The definition for creating the restore point of this database.", + "required": true, + "schema": { + "$ref": "#/definitions/CreateDatabaseRestorePointDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created the restore point request.", + "schema": { + "$ref": "#/definitions/RestorePoint" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BackupNotAllowedOnDeactivatedDatabase - Cannot create restore point on a deactivated database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 RestorePointLimitReached - A restore point cannot be created because database would exceed the allowed quota of restore points.\n\n * 400 RestorePointAttemptToDeleteSystemBackup - Cannot delete system restore point.\n\n * 404 DatabaseRestorePointNotFound - Can not find database restore point.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 408 DatabaseRestorePointTimedOut - Create database restore point failed.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the restore point request.", + "schema": { + "$ref": "#/definitions/RestorePoint" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates datawarehouse database restore point.": { + "$ref": "./examples/DatabaseRestorePointsPost.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}": { + "get": { + "tags": [ + "RestorePoints" + ], + "description": "Gets a restore point.", + "operationId": "RestorePoints_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "restorePointName", + "in": "path", + "description": "The name of the restore point.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully returned the restore point.", + "schema": { + "$ref": "#/definitions/RestorePoint" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BackupNotAllowedOnDeactivatedDatabase - Cannot create restore point on a deactivated database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 RestorePointLimitReached - A restore point cannot be created because database would exceed the allowed quota of restore points.\n\n * 400 RestorePointAttemptToDeleteSystemBackup - Cannot delete system restore point.\n\n * 404 DatabaseRestorePointNotFound - Can not find database restore point.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 408 DatabaseRestorePointTimedOut - Create database restore point failed." + } + }, + "x-ms-examples": { + "Gets a database restore point.": { + "$ref": "./examples/DatabaseRestorePointsGet.json" + }, + "Gets a datawarehouse database restore point.": { + "$ref": "./examples/DataWarehouseRestorePointsGet.json" + } + } + }, + "delete": { + "tags": [ + "RestorePoints" + ], + "description": "Deletes a restore point.", + "operationId": "RestorePoints_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "restorePointName", + "in": "path", + "description": "The name of the restore point.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the restore point." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 BackupNotAllowedOnDeactivatedDatabase - Cannot create restore point on a deactivated database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 RestorePointLimitReached - A restore point cannot be created because database would exceed the allowed quota of restore points.\n\n * 400 RestorePointAttemptToDeleteSystemBackup - Cannot delete system restore point.\n\n * 404 DatabaseRestorePointNotFound - Can not find database restore point.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 408 DatabaseRestorePointTimedOut - Create database restore point failed." + } + }, + "x-ms-examples": { + "Deletes a restore point.": { + "$ref": "./examples/DatabaseRestorePointsDelete.json" + } + } + } + } + }, + "definitions": { + "CreateDatabaseRestorePointDefinition": { + "description": "Contains the information necessary to perform a create database restore point operation.", + "required": [ + "restorePointLabel" + ], + "type": "object", + "properties": { + "restorePointLabel": { + "description": "The restore point label to apply", + "type": "string" + } + } + }, + "RestorePoint": { + "description": "Database restore points.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/RestorePointProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RestorePointListResult": { + "description": "A list of long term retention backups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/RestorePoint" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "RestorePointProperties": { + "description": "Properties of a database restore point", + "type": "object", + "properties": { + "restorePointType": { + "description": "The type of restore point", + "enum": [ + "CONTINUOUS", + "DISCRETE" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RestorePointType", + "modelAsString": false + } + }, + "earliestRestoreDate": { + "format": "date-time", + "description": "The earliest time to which this database can be restored", + "type": "string", + "readOnly": true + }, + "restorePointCreationDate": { + "format": "date-time", + "description": "The time the backup was taken", + "type": "string", + "readOnly": true + }, + "restorePointLabel": { + "description": "The label of restore point for backup request by user", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SensitivityLabels.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SensitivityLabels.json new file mode 100644 index 000000000000..7fa1212601fd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SensitivityLabels.json @@ -0,0 +1,950 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels": { + "get": { + "tags": [ + "SensitivityLabels" + ], + "description": "Gets the sensitivity labels of a given database", + "operationId": "SensitivityLabels_ListCurrentByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$count", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity labels.", + "schema": { + "$ref": "#/definitions/SensitivityLabelListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/SensitivityLabel", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the current sensitivity labels of a given database": { + "$ref": "./examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json" + } + } + }, + "patch": { + "tags": [ + "SensitivityLabels" + ], + "description": "Update sensitivity labels of a given database using an operations batch.", + "operationId": "SensitivityLabels_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SensitivityLabelUpdateList" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated sensitivity labels." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelsBatch - The specified sensitivity labels batch is not valid. Please provide batch operations\n\n * 400 SensitivityLabelsMissingSchema - Operation[{0}]: Missing schema information\n\n * 400 SensitivityLabelsMissingTable - Operation[{0}]: Missing table information\n\n * 400 SensitivityLabelsMissingColumn - Operation[{0}]: Missing column information\n\n * 400 SensitivityLabelsUpdateSameColumnMoreThanOnce - The column {0} can not be updated more than once in a single command\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Update sensitivity labels of a given database using an operations batch.": { + "$ref": "./examples/SensitivityLabelsCurrentUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels": { + "get": { + "tags": [ + "SensitivityLabels" + ], + "description": "Gets the sensitivity labels of a given database", + "operationId": "SensitivityLabels_ListRecommendedByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "includeDisabledRecommendations", + "in": "query", + "description": "Specifies whether to include disabled recommendations or not.", + "required": false, + "type": "boolean" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity labels.", + "schema": { + "$ref": "#/definitions/SensitivityLabelListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/SensitivityLabel", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the recommended sensitivity labels of a given database": { + "$ref": "./examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json" + } + } + }, + "patch": { + "tags": [ + "SensitivityLabels" + ], + "description": "Update recommended sensitivity labels states of a given database using an operations batch.", + "operationId": "RecommendedSensitivityLabels_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdateList" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated recommended sensitivity labels." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidRecommendedSensitivityLabelsBatch - The specified recommended sensitivity labels operations are not valid\n\n * 400 SensitivityLabelsMissingSchema - Operation[{0}]: Missing schema information\n\n * 400 SensitivityLabelsMissingTable - Operation[{0}]: Missing table information\n\n * 400 SensitivityLabelsMissingColumn - Operation[{0}]: Missing column information\n\n * 400 SensitivityLabelsUpdateSameColumnMoreThanOnce - The column {0} can not be updated more than once in a single command\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-examples": { + "Update recommended sensitivity labels of a given database using an operations batch.": { + "$ref": "./examples/SensitivityLabelsRecommendedUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}": { + "get": { + "tags": [ + "SensitivityLabels" + ], + "description": "Gets the sensitivity label of a given column", + "operationId": "SensitivityLabels_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current", + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + } + }, + "x-ms-examples": { + "Gets the sensitivity label of a given column": { + "$ref": "./examples/ColumnSensitivityLabelGet.json" + } + } + }, + "put": { + "tags": [ + "SensitivityLabels" + ], + "description": "Creates or updates the sensitivity label of a given column", + "operationId": "SensitivityLabels_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "CurrentSensitivityLabelSource", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The column sensitivity label resource.", + "required": true, + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - The provided ‘labelId’ is invalid. Value must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - The provided ‘informationTypeId’ is invalid. Value must be a GUID\n\n * 400 LabelMissing - Label is required. At least one of ‘labelName’ or ‘labelId’ must be provided\n\n * 400 InformationTypeMissing - Information type is required. At least one of ‘informationType’ or ‘informationTypeId’ must be provided\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + }, + "201": { + "description": "Successfully created the sensitivity label.", + "schema": { + "$ref": "#/definitions/SensitivityLabel" + } + } + }, + "x-ms-examples": { + "Updates the sensitivity label of a given column with all parameters": { + "$ref": "./examples/ColumnSensitivityLabelCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "SensitivityLabels" + ], + "description": "Deletes the sensitivity label of a given column", + "operationId": "SensitivityLabels_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "description": "The source of the sensitivity label.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "CurrentSensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the sensitivity label." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 404 SensitivityLabelsSchemaNotFound - The schema {0} could not be found\n\n * 404 SensitivityLabelsTableNotFound - The table {0} could not be found in schema {1}\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + } + }, + "x-ms-examples": { + "Deletes the sensitivity label of a given column": { + "$ref": "./examples/ColumnSensitivityLabelDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable": { + "post": { + "tags": [ + "SensitivityLabels" + ], + "description": "Disables sensitivity recommendations on a given column", + "operationId": "SensitivityLabels_DisableRecommendation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "RecommendedSensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled the sensitivity recommendation on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\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-examples": { + "Disables sensitivity recommendations on a given column": { + "$ref": "./examples/RecommendedColumnSensitivityLabelDisable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable": { + "post": { + "tags": [ + "SensitivityLabels" + ], + "description": "Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns)", + "operationId": "SensitivityLabels_EnableRecommendation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "RecommendedSensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully enabled the sensitivity recommendations on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 SensitivityLabelsColumnNotFound - The column {0} could not be found in table {2}.{1}\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\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-examples": { + "Enables sensitivity recommendations on a given column": { + "$ref": "./examples/RecommendedColumnSensitivityLabelEnable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels": { + "get": { + "tags": [ + "SensitivityLabels" + ], + "description": "Gets the sensitivity labels of a given database", + "operationId": "SensitivityLabels_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the sensitivity labels.", + "schema": { + "$ref": "#/definitions/SensitivityLabelListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable." + } + }, + "x-ms-odata": "#/definitions/SensitivityLabel", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the current and recommended sensitivity labels of a given database": { + "$ref": "./examples/SensitivityLabelsListByDatabase.json" + } + } + } + } + }, + "definitions": { + "RecommendedSensitivityLabelUpdate": { + "description": "A recommended sensitivity label update operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RecommendedSensitivityLabelUpdateList": { + "description": "A list of recommended sensitivity label update operations.", + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedSensitivityLabelUpdate" + } + } + } + }, + "RecommendedSensitivityLabelUpdateProperties": { + "description": "Properties of an operation executed on a recommended sensitivity label.", + "required": [ + "op", + "schema", + "table", + "column" + ], + "type": "object", + "properties": { + "op": { + "enum": [ + "enable", + "disable" + ], + "type": "string", + "x-ms-enum": { + "name": "RecommendedSensitivityLabelUpdateKind", + "modelAsString": false + } + }, + "schema": { + "description": "Schema name of the column to update.", + "type": "string" + }, + "table": { + "description": "Table name of the column to update.", + "type": "string" + }, + "column": { + "description": "Column name to update.", + "type": "string" + } + } + }, + "SensitivityLabel": { + "description": "A sensitivity label.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "managedBy": { + "description": "Resource that manages the sensitivity label.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SensitivityLabelProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SensitivityLabelListResult": { + "description": "A list of sensitivity labels.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SensitivityLabel" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SensitivityLabelProperties": { + "description": "Properties of a sensitivity label.", + "type": "object", + "properties": { + "schemaName": { + "description": "The schema name.", + "type": "string", + "readOnly": true + }, + "tableName": { + "description": "The table name.", + "type": "string", + "readOnly": true + }, + "columnName": { + "description": "The column name.", + "type": "string", + "readOnly": true + }, + "labelName": { + "description": "The label name.", + "type": "string" + }, + "labelId": { + "description": "The label ID.", + "type": "string" + }, + "informationType": { + "description": "The information type.", + "type": "string" + }, + "informationTypeId": { + "description": "The information type ID.", + "type": "string" + }, + "isDisabled": { + "description": "Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.", + "type": "boolean", + "readOnly": true + }, + "rank": { + "enum": [ + "None", + "Low", + "Medium", + "High", + "Critical" + ], + "type": "string", + "x-ms-enum": { + "name": "SensitivityLabelRank", + "modelAsString": false + } + }, + "clientClassificationSource": { + "enum": [ + "None", + "Native", + "Recommended", + "MIP" + ], + "type": "string", + "x-ms-enum": { + "name": "ClientClassificationSource", + "modelAsString": true + } + } + } + }, + "SensitivityLabelUpdate": { + "description": "A sensitivity label update operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SensitivityLabelUpdateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SensitivityLabelUpdateList": { + "description": "A list of sensitivity label update operations.", + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/SensitivityLabelUpdate" + } + } + } + }, + "SensitivityLabelUpdateProperties": { + "description": "Properties of an operation executed on a sensitivity label.", + "required": [ + "op", + "schema", + "table", + "column" + ], + "type": "object", + "properties": { + "op": { + "enum": [ + "set", + "remove" + ], + "type": "string", + "x-ms-enum": { + "name": "SensitivityLabelUpdateKind", + "modelAsString": false + } + }, + "schema": { + "description": "Schema name of the column to update.", + "type": "string" + }, + "table": { + "description": "Table name of the column to update.", + "type": "string" + }, + "column": { + "description": "Column name to update.", + "type": "string" + }, + "sensitivityLabel": { + "$ref": "#/definitions/SensitivityLabel", + "description": "The sensitivity label information to apply on a column." + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAdvancedThreatProtectionSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAdvancedThreatProtectionSettings.json new file mode 100644 index 000000000000..c02ed766bd1d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAdvancedThreatProtectionSettings.json @@ -0,0 +1,273 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings": { + "get": { + "tags": [ + "ServerAdvancedThreatProtectionSettings" + ], + "description": "Get a list of the server's Advanced Threat Protection states.", + "operationId": "ServerAdvancedThreatProtectionSettings_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of server's Advanced Threat Protection states.", + "schema": { + "$ref": "#/definitions/LogicalServerAdvancedThreatProtectionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting the server Advanced Threat Protection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidServerAdvancedThreatProtectionCreateRequest - The create server Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 409 ServerAdvancedThreatProtectionInProgress - Setting the server Advanced Threat Protection settings is already in progress\n\n * 409 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 GetServerAdvancedThreatProtectionFailed - Failed to get the Advanced Threat Protection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the server's Advanced Threat Protection settings.": { + "$ref": "./examples/ServerAdvancedThreatProtectionSettingsListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}": { + "get": { + "tags": [ + "ServerAdvancedThreatProtectionSettings" + ], + "description": "Get a server's Advanced Threat Protection state.", + "operationId": "ServerAdvancedThreatProtectionSettings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "advancedThreatProtectionName", + "in": "path", + "description": "The name of the Advanced Threat Protection state.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AdvancedThreatProtectionName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server's Advanced Threat Protection state.", + "schema": { + "$ref": "#/definitions/ServerAdvancedThreatProtection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting the server Advanced Threat Protection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidServerAdvancedThreatProtectionCreateRequest - The create server Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 409 ServerAdvancedThreatProtectionInProgress - Setting the server Advanced Threat Protection settings is already in progress\n\n * 409 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 GetServerAdvancedThreatProtectionFailed - Failed to get the Advanced Threat Protection settings" + } + }, + "x-ms-examples": { + "Get a server's Advanced Threat Protection settings": { + "$ref": "./examples/ServerAdvancedThreatProtectionSettingsGet.json" + } + } + }, + "put": { + "tags": [ + "ServerAdvancedThreatProtectionSettings" + ], + "description": "Creates or updates an Advanced Threat Protection state.", + "operationId": "ServerAdvancedThreatProtectionSettings_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "advancedThreatProtectionName", + "in": "path", + "description": "The name of the Advanced Threat Protection state.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AdvancedThreatProtectionName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The server Advanced Threat Protection state.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAdvancedThreatProtection" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created or updated the Advanced Threat Protection state.", + "schema": { + "$ref": "#/definitions/ServerAdvancedThreatProtection" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting the server Advanced Threat Protection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database\n\n * 400 InvalidServerAdvancedThreatProtectionCreateRequest - The create server Advanced Threat Protection request does not exist or has no properties object\n\n * 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 400 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerAdvancedThreatProtectionInProgress - Setting the server Advanced Threat Protection settings is already in progress\n\n * 409 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\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 * 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 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 UpsertServerAdvancedThreatProtectionFailed - An error has occurred while saving the Advanced Threat Protection settings, please try again later\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Created request to set the Advanced Threat Protection state." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a server's Advanced Threat Protection settings with minimal parameters.": { + "$ref": "./examples/ServerAdvancedThreatProtectionSettingsCreateMin.json" + }, + "Update a server's Advanced Threat Protection settings with all parameters.": { + "$ref": "./examples/ServerAdvancedThreatProtectionSettingsCreateMax.json" + } + } + } + } + }, + "definitions": { + "AdvancedThreatProtectionProperties": { + "description": "Properties of an Advanced Threat Protection state.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.", + "enum": [ + "New", + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "AdvancedThreatProtectionState", + "modelAsString": false + } + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "LogicalServerAdvancedThreatProtectionListResult": { + "description": "A list of the server's Advanced Threat Protection configurations.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerAdvancedThreatProtection" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerAdvancedThreatProtection": { + "description": "A server Advanced Threat Protection.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of AdvancedThreatProtectionResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/AdvancedThreatProtectionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAdvisors.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAdvisors.json new file mode 100644 index 000000000000..4910b1e0e404 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAdvisors.json @@ -0,0 +1,648 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors": { + "get": { + "tags": [ + "ServerAdvisors" + ], + "description": "Gets a list of server advisors.", + "operationId": "ServerAdvisors_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "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 server advisors.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Advisor" + } + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "List of server advisors": { + "$ref": "./examples/ServerAdvisorList.json" + }, + "List of server recommended actions for all advisors": { + "$ref": "./examples/ServerRecommendedActionListExpand.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}": { + "get": { + "tags": [ + "ServerAdvisors" + ], + "description": "Gets a server advisor.", + "operationId": "ServerAdvisors_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Server Advisor.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved details of specified server advisor.", + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Get server advisor": { + "$ref": "./examples/ServerAdvisorGet.json" + } + } + }, + "patch": { + "tags": [ + "ServerAdvisors" + ], + "description": "Updates a server advisor.", + "operationId": "ServerAdvisors_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "advisorName", + "in": "path", + "description": "The name of the Server Advisor.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested advisor resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the specified server advisor.", + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 DataWarehouseNotSupported - Automatic tuning is not supported for SQL Data Warehouse.\n\n * 400 InvalidAdvisorUpsertRequest - The update advisor request body does not exist or has no properties object.\n\n * 400 InvalidAdvisorAutoExecuteStatus - Specified auto-execute status for the advisor is not allowed.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 AdvisorNotFound - The requested advisor was not found.\n\n * 404 AutomaticTuningOptionNotFound - The requested automatic tuning option was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 409 DefaultAdvisorStateNotAllowedInCustomServerMode - DEFAULT advisor state not allowed in CUSTOM mode\n\n * 409 UpdateNotAllowedIfServerAutotuningUpdateOperationInProgress - Automatic tuning settings from previous request have not propagated to all user databases.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." + } + }, + "x-ms-examples": { + "Update server advisor": { + "$ref": "./examples/ServerAdvisorUpdate.json" + } + } + } + } + }, + "definitions": { + "AdvisorProperties": { + "description": "Properties for a Database, Server or Elastic Pool Advisor.", + "required": [ + "autoExecuteStatus" + ], + "type": "object", + "properties": { + "advisorStatus": { + "description": "Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'.", + "enum": [ + "GA", + "PublicPreview", + "LimitedPublicPreview", + "PrivatePreview" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AdvisorStatus", + "modelAsString": false + } + }, + "autoExecuteStatus": { + "description": "Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'", + "enum": [ + "Enabled", + "Disabled", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "AutoExecuteStatus", + "modelAsString": false + } + }, + "autoExecuteStatusInheritedFrom": { + "description": "Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level).", + "enum": [ + "Default", + "Subscription", + "Server", + "ElasticPool", + "Database" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutoExecuteStatusInheritedFrom", + "modelAsString": false + } + }, + "recommendationsStatus": { + "description": "Gets that status of recommendations for this advisor and reason for not having any recommendations. Possible values include, but are not limited to, 'Ok' (Recommendations available),LowActivity (not enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc.", + "type": "string", + "readOnly": true + }, + "lastChecked": { + "format": "date-time", + "description": "Gets the time when the current resource was analyzed for recommendations by this advisor.", + "type": "string", + "readOnly": true + }, + "recommendedActions": { + "description": "Gets the recommended actions for this advisor.", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedAction" + }, + "readOnly": true + } + } + }, + "RecommendedActionProperties": { + "description": "Properties for a Database, Server or Elastic Pool Recommended Action.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "recommendationReason": { + "description": "Gets the reason for recommending this action. e.g., DuplicateIndex", + "type": "string", + "readOnly": true + }, + "validSince": { + "format": "date-time", + "description": "Gets the time since when this recommended action is valid.", + "type": "string", + "readOnly": true + }, + "lastRefresh": { + "format": "date-time", + "description": "Gets time when this recommended action was last refreshed.", + "type": "string", + "readOnly": true + }, + "state": { + "$ref": "#/definitions/RecommendedActionStateInfo", + "description": "Gets the info of the current state the recommended action is in." + }, + "isExecutableAction": { + "description": "Gets if this recommended action is actionable by user", + "type": "boolean", + "readOnly": true + }, + "isRevertableAction": { + "description": "Gets if changes applied by this recommended action can be reverted by user", + "type": "boolean", + "readOnly": true + }, + "isArchivedAction": { + "description": "Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a new recommended action again.", + "type": "boolean", + "readOnly": true + }, + "executeActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started applying this recommended action on the user resource. e.g., index creation start time", + "type": "string", + "readOnly": true + }, + "executeActionDuration": { + "format": "duration", + "description": "Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation", + "type": "string", + "readOnly": true + }, + "revertActionStartTime": { + "format": "date-time", + "description": "Gets the time when system started reverting changes of this recommended action on user resource. e.g., time when index drop is executed.", + "type": "string", + "readOnly": true + }, + "revertActionDuration": { + "format": "duration", + "description": "Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for dropping the created index.", + "type": "string", + "readOnly": true + }, + "executeActionInitiatedBy": { + "description": "Gets if approval for applying this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "executeActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for execution.", + "type": "string", + "readOnly": true + }, + "revertActionInitiatedBy": { + "description": "Gets if approval for reverting this recommended action was given by user/system.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "revertActionInitiatedTime": { + "format": "date-time", + "description": "Gets the time when this recommended action was approved for revert.", + "type": "string", + "readOnly": true + }, + "score": { + "format": "int32", + "description": "Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High Impact", + "type": "integer", + "readOnly": true + }, + "implementationDetails": { + "$ref": "#/definitions/RecommendedActionImplementationInfo", + "description": "Gets the implementation details of this recommended action for user to apply it manually.", + "readOnly": true + }, + "errorDetails": { + "$ref": "#/definitions/RecommendedActionErrorInfo", + "description": "Gets the error details if and why this recommended action is put to error state.", + "readOnly": true + }, + "estimatedImpact": { + "description": "Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "observedImpact": { + "description": "Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionImpactRecord" + }, + "readOnly": true + }, + "timeSeries": { + "description": "Gets the time series info of metrics for this recommended action e.g., CPU consumption time series", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedActionMetricInfo" + }, + "readOnly": true + }, + "linkedObjects": { + "description": "Gets the linked objects, if any.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "details": { + "description": "Gets additional details specific to this recommended action.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true + } + } + }, + "RecommendedActionStateInfo": { + "description": "Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "required": [ + "currentValue" + ], + "type": "object", + "properties": { + "currentValue": { + "description": "Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action. ", + "enum": [ + "Active", + "Pending", + "Executing", + "Verifying", + "PendingRevert", + "RevertCancelled", + "Reverting", + "Reverted", + "Ignored", + "Expired", + "Monitoring", + "Resolved", + "Success", + "Error" + ], + "type": "string", + "x-ms-enum": { + "name": "RecommendedActionCurrentState", + "modelAsString": true + } + }, + "actionInitiatedBy": { + "description": "Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity notified system to apply the recommended action. System -> When auto-execute status of this advisor was set to 'Enabled', in which case the system applied it.", + "enum": [ + "User", + "System" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RecommendedActionInitiatedBy", + "modelAsString": false + } + }, + "lastModified": { + "format": "date-time", + "description": "Gets the time when the state was last modified", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionImplementationInfo": { + "description": "Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "method": { + "description": "Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell.", + "enum": [ + "TSql", + "AzurePowerShell" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ImplementationMethod", + "modelAsString": false + } + }, + "script": { + "description": "Gets the manual implementation script. e.g., T-SQL script that could be executed on the database.", + "type": "string", + "readOnly": true + } + } + }, + "RecommendedActionErrorInfo": { + "description": "Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "errorCode": { + "description": "Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists", + "type": "string", + "readOnly": true + }, + "isRetryable": { + "description": "Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No", + "enum": [ + "Yes", + "No" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "IsRetryable", + "modelAsString": false + } + } + } + }, + "RecommendedActionImpactRecord": { + "description": "Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "dimensionName": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.", + "type": "string", + "readOnly": true + }, + "absoluteValue": { + "format": "double", + "description": "Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected", + "type": "number", + "readOnly": true + }, + "changeValueAbsolute": { + "format": "double", + "description": "Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes", + "type": "number", + "readOnly": true + }, + "changeValueRelative": { + "format": "double", + "description": "Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedActionMetricInfo": { + "description": "Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "properties": { + "metricName": { + "description": "Gets the name of the metric. e.g., CPU, Number of Queries.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Gets the unit in which metric is measured. e.g., DTU, Frequency", + "type": "string", + "readOnly": true + }, + "timeGrain": { + "description": "Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour)", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Gets the start time of time interval given by this MetricInfo.", + "type": "string", + "readOnly": true + }, + "value": { + "format": "double", + "description": "Gets the value of the metric in the time interval given by this MetricInfo.", + "type": "number", + "readOnly": true + } + } + }, + "RecommendedAction": { + "description": "Database, Server or Elastic Pool Recommended Action.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/RecommendedActionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "Advisor": { + "description": "Database, Server or Elastic Pool Advisor.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/AdvisorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAutomaticTuning.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAutomaticTuning.json new file mode 100644 index 000000000000..e8abb0edd7b8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAutomaticTuning.json @@ -0,0 +1,239 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current": { + "get": { + "tags": [ + "ServerAutomaticTuning" + ], + "description": "Retrieves server automatic tuning options.", + "operationId": "ServerAutomaticTuning_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved server automatic tuning properties.", + "schema": { + "$ref": "#/definitions/ServerAutomaticTuning" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\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 * 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 * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Get a server's automatic tuning settings": { + "$ref": "./examples/ServerAutomaticTuningGet.json" + } + } + }, + "patch": { + "tags": [ + "ServerAutomaticTuning" + ], + "description": "Update automatic tuning options on server.", + "operationId": "ServerAutomaticTuning_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested automatic tuning resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAutomaticTuning" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server-level automatic tuning options.", + "schema": { + "$ref": "#/definitions/ServerAutomaticTuning" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidAutomaticTuningUpsertRequest - The update automatic tuning request body does not exist or has no properties object.\n\n * 400 InvalidAdvisorAutoExecuteStatus - Specified auto-execute status for the advisor is not allowed.\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 AutomaticTuningOptionNotFound - The requested automatic tuning option was not found.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\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 DefaultAdvisorStateNotAllowedInCustomServerMode - DEFAULT advisor state not allowed in CUSTOM mode\n\n * 409 UpdateNotAllowedIfServerAutotuningUpdateOperationInProgress - Automatic tuning settings from previous request have not propagated to all user databases.\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 * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Updates server automatic tuning settings with minimal properties": { + "$ref": "./examples/ServerAutomaticTuningUpdateMin.json" + }, + "Updates server automatic tuning settings with all properties": { + "$ref": "./examples/ServerAutomaticTuningUpdateMax.json" + } + } + } + } + }, + "definitions": { + "AutomaticTuningServerOptions": { + "description": "Automatic tuning properties for individual advisors.", + "type": "object", + "properties": { + "desiredState": { + "description": "Automatic tuning option desired state.", + "enum": [ + "Off", + "On", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "AutomaticTuningOptionModeDesired", + "modelAsString": false + } + }, + "actualState": { + "description": "Automatic tuning option actual state.", + "enum": [ + "Off", + "On" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningOptionModeActual", + "modelAsString": false + } + }, + "reasonCode": { + "format": "int32", + "description": "Reason code if desired and actual state are different.", + "type": "integer", + "readOnly": true + }, + "reasonDesc": { + "description": "Reason description if desired and actual state are different.", + "enum": [ + "Default", + "Disabled", + "AutoConfigured" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningServerReason", + "modelAsString": false + } + } + } + }, + "AutomaticTuningServerProperties": { + "description": "Server-level Automatic Tuning properties.", + "type": "object", + "properties": { + "desiredState": { + "description": "Automatic tuning desired state.", + "enum": [ + "Custom", + "Auto", + "Unspecified" + ], + "type": "string", + "x-ms-enum": { + "name": "AutomaticTuningServerMode", + "modelAsString": false + } + }, + "actualState": { + "description": "Automatic tuning actual state.", + "enum": [ + "Custom", + "Auto", + "Unspecified" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "AutomaticTuningServerMode", + "modelAsString": false + } + }, + "options": { + "description": "Automatic tuning options definition.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AutomaticTuningServerOptions" + } + } + } + }, + "ServerAutomaticTuning": { + "description": "Server-level Automatic Tuning.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/AutomaticTuningServerProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAzureADAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAzureADAdministrators.json new file mode 100644 index 000000000000..bf9c284d7238 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAzureADAdministrators.json @@ -0,0 +1,339 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators": { + "get": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Gets a list of Azure Active Directory administrators in a server.", + "operationId": "ServerAzureADAdministrators_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of Azure Active Directory administrators.", + "schema": { + "$ref": "#/definitions/AdministratorListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidServerAdministratorTypePropertyName - Server active directory administrator type should be ActiveDirectory\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}": { + "get": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Gets a Azure Active Directory administrator.", + "operationId": "ServerAzureADAdministrators_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "description": "The name of server active directory administrator.", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified Azure Active Directory administrator.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidServerAdministratorTypePropertyName - Server active directory administrator type should be ActiveDirectory\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorGet.json" + } + } + }, + "put": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Creates or updates an existing Azure Active Directory administrator.", + "operationId": "ServerAzureADAdministrators_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "description": "The name of server active directory administrator.", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested Azure Active Directory administrator Resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated a Azure Active Directory administrator.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidServerAdministratorTypePropertyName - Server active directory administrator type should be ActiveDirectory\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 400 ServerAdministratorNameAlreadyExists - User tried to set the external admin and the principal name already exists in the 'master' database.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created a Azure Active Directory administrator.", + "schema": { + "$ref": "#/definitions/ServerAzureADAdministrator" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates an existing Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ServerAzureADAdministrators" + ], + "description": "Deletes the Azure Active Directory administrator with the given name.", + "operationId": "ServerAzureADAdministrators_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "administratorName", + "in": "path", + "description": "The name of server active directory administrator.", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the Azure Active Directory administrator." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidServerAdministratorTypePropertyName - Server active directory administrator type should be ActiveDirectory\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAzureADAdminDeleteOperation - User tried to delete server Azure Active Azure admin when AzureADOnlyAuthentication is set, please use azureADOnlyAuthentications API first.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified Azure Active Directory administrator does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete Azure Active Directory administrator.": { + "$ref": "./examples/AdministratorDelete.json" + } + } + } + } + }, + "definitions": { + "AdministratorListResult": { + "description": "A list of active directory administrators.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerAzureADAdministrator" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "AdministratorProperties": { + "description": "Properties of a active directory administrator.", + "required": [ + "administratorType", + "login", + "sid" + ], + "type": "object", + "properties": { + "administratorType": { + "description": "Type of the sever administrator.", + "enum": [ + "ActiveDirectory" + ], + "type": "string", + "x-ms-enum": { + "name": "AdministratorType", + "modelAsString": true + } + }, + "login": { + "description": "Login name of the server administrator.", + "type": "string" + }, + "sid": { + "format": "uuid", + "description": "SID (object ID) of the server administrator.", + "type": "string" + }, + "tenantId": { + "format": "uuid", + "description": "Tenant ID of the administrator.", + "type": "string" + }, + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean", + "readOnly": true + } + } + }, + "ServerAzureADAdministrator": { + "description": "Azure Active Directory administrator.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/AdministratorProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAzureADOnlyAuthentications.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAzureADOnlyAuthentications.json new file mode 100644 index 000000000000..1583b0231e10 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerAzureADOnlyAuthentications.json @@ -0,0 +1,311 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications": { + "get": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Gets a list of server Azure Active Directory only authentications.", + "operationId": "ServerAzureADOnlyAuthentications_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of Azure Active Directory only authentication objects.", + "schema": { + "$ref": "#/definitions/AzureADOnlyAuthListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}": { + "get": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Gets a specific Azure Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified Azure Active Directory only authentication properties.", + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAADOnlyAuthTypePropertyName - Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a Azure Active Directory only authentication property.": { + "$ref": "./examples/AzureADOnlyAuthGet.json" + } + } + }, + "put": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Sets Server Active Directory only authentication property or updates an existing server Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for creating or updating an Active Directory only authentication property.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated a Azure Active Directory only authentication property.", + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAADOnlyAuthTypePropertyName - Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully updated Azure Active Directory only authentication property.", + "schema": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ServerAzureADOnlyAuthentications" + ], + "description": "Deletes an existing server Active Directory only authentication property.", + "operationId": "ServerAzureADOnlyAuthentications_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "authenticationName", + "in": "path", + "description": "The name of server azure active directory only authentication.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "AuthenticationName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the Azure Active Directory only property." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerAzureADOnlyAuthenticationParameter - User tried to set AzureADOnlyAuthentication parameter to false which is not allowed, please use azureADOnlyAuthentications API instead.\n\n * 400 InvalidServerAADOnlyAuthTypePropertyName - Server Azure Active Directory only authentication type should be Default\n\n * 400 InvalidServerAADOnlyAuthNoAADAdminPropertyName - AAD Admin is not configured, AAD Admin must be set before enabling/disabling AAD Only Authentication.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified Azure Active Directory only property does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Deletes Azure Active Directory only authentication object.": { + "$ref": "./examples/AzureADOnlyAuthDelete.json" + } + } + } + } + }, + "definitions": { + "AzureADOnlyAuthListResult": { + "description": "A list of active directory only authentications.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerAzureADOnlyAuthentication" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "AzureADOnlyAuthProperties": { + "description": "Properties of a active directory only authentication.", + "required": [ + "azureADOnlyAuthentication" + ], + "type": "object", + "properties": { + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean" + } + } + }, + "ServerAzureADOnlyAuthentication": { + "description": "Azure Active Directory only authentication.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/AzureADOnlyAuthProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerConfigurationOptions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerConfigurationOptions.json new file mode 100644 index 000000000000..1b2a2f76068b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerConfigurationOptions.json @@ -0,0 +1,268 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverConfigurationOptions": { + "get": { + "tags": [ + "ServerConfigurationOptions" + ], + "description": "Gets a list of managed instance server configuration options.", + "operationId": "ServerConfigurationOptions_ListByManagedInstance", + "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 managed instance server configuration options.", + "schema": { + "$ref": "#/definitions/ServerConfigurationOptionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 EmptySubscriptionId - Subscription ID is empty.\n\n * 400 ServerConfigurationOptionFeatureDisabled - User tried to interact with Azure SQL Managed Instance Server Configuration Option but feature is currently not supported.\n\n * 404 SubscriptionDoesNotHaveServer - Specified server does not exist in the specified subscription.\n\n * 404 ResourceNotFound - Resource was not found.\n\n * 404 SubscriptionDoesNotHaveServerInResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of managed instance server configuration options.": { + "$ref": "./examples/ServerConfigurationOptionList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverConfigurationOptions/{serverConfigurationOptionName}": { + "get": { + "tags": [ + "ServerConfigurationOptions" + ], + "description": "Gets managed instance server configuration option.", + "operationId": "ServerConfigurationOptions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "serverConfigurationOptionName", + "in": "path", + "description": "The name of the server configuration option.", + "required": true, + "type": "string", + "enum": [ + "allowPolybaseExport" + ], + "x-ms-enum": { + "name": "ServerConfigurationOptionName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance server configuration option.", + "schema": { + "$ref": "#/definitions/ServerConfigurationOption" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerConfigurationOptionName - User specified server configuration option name that is not supported.\n\n * 400 InvalidServerConfigurationOptionValue - Server configuration option value \"{0}\" is not supported for server configuration option \"{1}\".\n\n * 400 InvalidServerConfigurationOptionProperties - The provided set of parameters in the body of the request is either empty or invalid.\n\n * 400 EmptySubscriptionId - Subscription ID is empty.\n\n * 400 ServerConfigurationOptionFeatureDisabled - User tried to interact with Azure SQL Managed Instance Server Configuration Option but feature is currently not supported.\n\n * 404 SubscriptionDoesNotHaveServer - Specified server does not exist in the specified subscription.\n\n * 404 ResourceNotFound - Resource was not found.\n\n * 404 SubscriptionDoesNotHaveServerInResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets managed instance server configuration option.": { + "$ref": "./examples/ServerConfigurationOptionGet.json" + } + } + }, + "put": { + "tags": [ + "ServerConfigurationOptions" + ], + "description": "Updates managed instance server configuration option.", + "operationId": "ServerConfigurationOptions_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "serverConfigurationOptionName", + "in": "path", + "description": "The name of the server configuration option.", + "required": true, + "type": "string", + "enum": [ + "allowPolybaseExport" + ], + "x-ms-enum": { + "name": "ServerConfigurationOptionName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "Server configuration option parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerConfigurationOption" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Updating managed instance server configuration option is in progress", + "schema": { + "$ref": "#/definitions/ServerConfigurationOption" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerConfigurationOptionName - User specified server configuration option name that is not supported.\n\n * 400 InvalidServerConfigurationOptionValue - Server configuration option value \"{0}\" is not supported for server configuration option \"{1}\".\n\n * 400 InvalidServerConfigurationOptionProperties - The provided set of parameters in the body of the request is either empty or invalid.\n\n * 400 UpdateWithUnsupportedServerConfigurationOptionName - User specified server configuration option name that is not supported.\n\n * 400 UpdateWithUnsupportedServerConfigurationOptionValue - User specified server configuration option value that is not supported.\n\n * 400 EmptySubscriptionId - Subscription ID is empty.\n\n * 400 ServerConfigurationOptionFeatureDisabled - User tried to interact with Azure SQL Managed Instance Server Configuration Option but feature is currently not supported.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state.\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state.\n\n * 404 ResourceNotFound - Resource was not found.\n\n * 404 SubscriptionDoesNotHaveServerInResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - Specified server does not exist in the specified subscription.\n\n * 404 ServerNotFound - The requested server was not found.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerBusy - Operation cannot be executed as server is busy with another operation.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Updates managed instance server configuration option.": { + "$ref": "./examples/ServerConfigurationOptionUpdate.json" + } + } + } + } + }, + "definitions": { + "ServerConfigurationOption": { + "description": "A server configuration option", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerConfigurationOptionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerConfigurationOptionListResult": { + "description": "A list of server configuration options.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerConfigurationOption" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerConfigurationOptionProperties": { + "description": "The properties of server configuration option.", + "required": [ + "serverConfigurationOptionValue" + ], + "type": "object", + "properties": { + "serverConfigurationOptionValue": { + "format": "int32", + "description": "Value of the server configuration option.", + "type": "integer", + "x-ms-mutability": [ + "read", + "update" + ] + }, + "provisioningState": { + "description": "Provisioning state of server configuration option.", + "enum": [ + "Created", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerConnectionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerConnectionPolicies.json new file mode 100644 index 000000000000..a2c1d5e7dfe1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerConnectionPolicies.json @@ -0,0 +1,269 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies": { + "get": { + "tags": [ + "ServerConnectionPolicies" + ], + "description": "Lists connection policy", + "operationId": "ServerConnectionPolicies_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server connection policy list", + "schema": { + "$ref": "#/definitions/ServerConnectionPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidConnectionPolicyName - Invalid connection policy name.\n\n * 400 ConnectionPolicyParamsNull - The request body cannot be null.\n\n * 400 InvalidConnectionPolicyType - Connection type is invalid\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Lists a servers connection policies": { + "$ref": "./examples/ServerConnectionPoliciesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}": { + "get": { + "tags": [ + "ServerConnectionPolicies" + ], + "description": "Gets a server connection policy", + "operationId": "ServerConnectionPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "connectionPolicyName", + "in": "path", + "description": "The name of the connection policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ConnectionPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server connection policy.", + "schema": { + "$ref": "#/definitions/ServerConnectionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidConnectionPolicyName - Invalid connection policy name.\n\n * 400 ConnectionPolicyParamsNull - The request body cannot be null.\n\n * 400 InvalidConnectionPolicyType - Connection type is invalid\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Gets a server connection policy": { + "$ref": "./examples/ServerConnectionPoliciesGet.json" + } + } + }, + "put": { + "tags": [ + "ServerConnectionPolicies" + ], + "description": "Updates a server connection policy", + "operationId": "ServerConnectionPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "connectionPolicyName", + "in": "path", + "description": "The name of the connection policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "ConnectionPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The required parameters for updating a server connection policy.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerConnectionPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the connection policy", + "schema": { + "$ref": "#/definitions/ServerConnectionPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidConnectionPolicyName - Invalid connection policy name.\n\n * 400 ConnectionPolicyParamsNull - The request body cannot be null.\n\n * 400 InvalidConnectionPolicyType - Connection type is invalid\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Updating the server connection policy is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Updates a server connection policy": { + "$ref": "./examples/ServerConnectionPoliciesUpdate.json" + } + } + } + } + }, + "definitions": { + "ServerConnectionPolicy": { + "description": "A server connection policy", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "kind": { + "description": "Metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ServerConnectionPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerConnectionPolicyListResult": { + "description": "A list of server connection policy objects.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerConnectionPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerConnectionPolicyProperties": { + "description": "The properties of a server connection policy.", + "required": [ + "connectionType" + ], + "type": "object", + "properties": { + "connectionType": { + "description": "The server connection type.", + "enum": [ + "Default", + "Redirect", + "Proxy" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerConnectionType", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerDevOpsAudit.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerDevOpsAudit.json new file mode 100644 index 000000000000..faf2901c0834 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerDevOpsAudit.json @@ -0,0 +1,293 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings": { + "get": { + "tags": [ + "ServerDevOpsAudit" + ], + "description": "Lists DevOps audit settings of a server.", + "operationId": "ServerDevOpsAuditSettings_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved server DevOps audit settings.", + "schema": { + "$ref": "#/definitions/ServerDevOpsAuditSettingsListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List DevOps audit settings of a server": { + "$ref": "./examples/ServerDevOpsAuditList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}": { + "get": { + "tags": [ + "ServerDevOpsAudit" + ], + "description": "Gets a server's DevOps audit settings.", + "operationId": "ServerDevOpsAuditSettings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "devOpsAuditingSettingsName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "DevOpsAuditingSettingsName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server DevOps audit settings.", + "schema": { + "$ref": "#/definitions/ServerDevOpsAuditingSettings" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Get a server's DevOps audit settings": { + "$ref": "./examples/ServerDevOpsAuditGet.json" + } + } + }, + "put": { + "tags": [ + "ServerDevOpsAudit" + ], + "description": "Creates or updates a server's DevOps audit settings.", + "operationId": "ServerDevOpsAuditSettings_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "devOpsAuditingSettingsName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "DevOpsAuditingSettingsName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "Properties of DevOps audit settings", + "required": true, + "schema": { + "$ref": "#/definitions/ServerDevOpsAuditingSettings" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the DevOps audit settings.", + "schema": { + "$ref": "#/definitions/ServerDevOpsAuditingSettings" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidServerDevOpsAuditSettingsCreateRequest - The create server DevOps audit policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidServerDevOpsAuditSettingsName - Invalid server DevOps policy name.\n\n * 400 DevOpsAuditInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerDevOpsAuditSettingsInProgress - Set server DevOps audit is already in progress.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Updating the audit DevOps settings is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update a server's DevOps audit settings with minimal input": { + "$ref": "./examples/ServerDevOpsAuditCreateMin.json" + }, + "Update a server's DevOps audit settings with all params": { + "$ref": "./examples/ServerDevOpsAuditCreateMax.json" + } + } + } + } + }, + "definitions": { + "ServerDevOpsAuditingSettings": { + "description": "A server DevOps auditing settings.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of ServerDevOpsAuditSettingsResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ServerDevOpsAuditSettingsProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerDevOpsAuditSettingsListResult": { + "description": "A list of server DevOps audit settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerDevOpsAuditingSettings" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerDevOpsAuditSettingsProperties": { + "description": "Properties of a server DevOps audit settings.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "isAzureMonitorTargetEnabled": { + "description": "Specifies whether DevOps audit events are sent to Azure Monitor. \r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.\r\n\r\nWhen using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should be also created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, + "isManagedIdentityInUse": { + "description": "Specifies whether Managed Identity is used to access blob storage", + "type": "boolean" + }, + "state": { + "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "BlobAuditingPolicyState", + "modelAsString": false + } + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the auditing storage account. \r\nIf state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.\r\nPrerequisites for using managed identity authentication:\r\n1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).\r\n2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.\r\nFor more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountSubscriptionId": { + "format": "uuid", + "description": "Specifies the blob storage subscription Id.", + "type": "string" + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerDnsAliases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerDnsAliases.json new file mode 100644 index 000000000000..6cb228bd9700 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerDnsAliases.json @@ -0,0 +1,361 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases": { + "get": { + "tags": [ + "ServerDnsAliases" + ], + "description": "Gets a list of server DNS aliases for a server.", + "operationId": "ServerDnsAliases_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server that the alias is pointing to.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of server DNS aliases.", + "schema": { + "$ref": "#/definitions/ServerDnsAliasListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\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 server DNS aliases": { + "$ref": "./examples/ServerDnsAliasList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}": { + "get": { + "tags": [ + "ServerDnsAliases" + ], + "description": "Gets a server DNS alias.", + "operationId": "ServerDnsAliases_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server that the alias is pointing to.", + "required": true, + "type": "string" + }, + { + "name": "dnsAliasName", + "in": "path", + "description": "The name of the server dns alias.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified server DNS alias.", + "schema": { + "$ref": "#/definitions/ServerDnsAlias" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\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-examples": { + "Get server DNS alias": { + "$ref": "./examples/ServerDnsAliasGet.json" + } + } + }, + "put": { + "tags": [ + "ServerDnsAliases" + ], + "description": "Creates a server DNS alias.", + "operationId": "ServerDnsAliases_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server that the alias is pointing to.", + "required": true, + "type": "string" + }, + { + "name": "dnsAliasName", + "in": "path", + "description": "The name of the server dns alias.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The server DNS alias already exists.", + "schema": { + "$ref": "#/definitions/ServerDnsAlias" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created a server DNS alias.", + "schema": { + "$ref": "#/definitions/ServerDnsAlias" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create server DNS alias": { + "$ref": "./examples/ServerDnsAliasCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ServerDnsAliases" + ], + "description": "Deletes the server DNS alias with the given name.", + "operationId": "ServerDnsAliases_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server that the alias is pointing to.", + "required": true, + "type": "string" + }, + { + "name": "dnsAliasName", + "in": "path", + "description": "The name of the server dns alias.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the server DNS alias." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\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 * 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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified server DNS alias does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete server DNS alias": { + "$ref": "./examples/ServerDnsAliasDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}/acquire": { + "post": { + "tags": [ + "ServerDnsAliases" + ], + "description": "Acquires server DNS alias from another server.", + "operationId": "ServerDnsAliases_Acquire", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server that the alias is pointing to.", + "required": true, + "type": "string" + }, + { + "name": "dnsAliasName", + "in": "path", + "description": "The name of the server dns alias.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServerDnsAliasAcquisition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully acquired server DNS alias.", + "schema": { + "$ref": "#/definitions/ServerDnsAlias" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.\n\n * 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.\n\n * 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.\n\n * 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.\n\n * 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.\n\n * 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.\n\n * 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.\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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Acquire server DNS alias": { + "$ref": "./examples/ServerDnsAliasAcquire.json" + } + } + } + } + }, + "definitions": { + "ServerDnsAlias": { + "description": "A server DNS alias.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerDnsAliasProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerDnsAliasAcquisition": { + "description": "A server dns alias acquisition request.", + "required": [ + "oldServerDnsAliasId" + ], + "type": "object", + "properties": { + "oldServerDnsAliasId": { + "description": "The id of the server alias that will be acquired to point to this server instead.", + "type": "string" + } + } + }, + "ServerDnsAliasListResult": { + "description": "A list of server DNS aliases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerDnsAlias" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerDnsAliasProperties": { + "description": "Properties of a server DNS alias.", + "type": "object", + "properties": { + "azureDnsRecord": { + "description": "The fully qualified DNS record for alias", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerKeys.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerKeys.json new file mode 100644 index 000000000000..9e04b17ff86a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerKeys.json @@ -0,0 +1,339 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys": { + "get": { + "tags": [ + "ServerKeys" + ], + "description": "Gets a list of server keys.", + "operationId": "ServerKeys_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of server keys.", + "schema": { + "$ref": "#/definitions/ServerKeyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the server keys by server": { + "$ref": "./examples/ServerKeyList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}": { + "get": { + "tags": [ + "ServerKeys" + ], + "description": "Gets a server key.", + "operationId": "ServerKeys_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the server key to be retrieved.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified server key.", + "schema": { + "$ref": "#/definitions/ServerKey" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get the server key": { + "$ref": "./examples/ServerKeyGet.json" + } + } + }, + "put": { + "tags": [ + "ServerKeys" + ], + "description": "Creates or updates a server key.", + "operationId": "ServerKeys_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the server key to be operated on (updated or created). The key name is required to be in the format of 'vault_key_version'. For example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be formatted as: YourVaultName_YourKeyName_YourKeyVersion", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested server key resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerKey" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server key.", + "schema": { + "$ref": "#/definitions/ServerKey" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 * 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the server key.", + "schema": { + "$ref": "#/definitions/ServerKey" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Creates or updates a server key": { + "$ref": "./examples/ServerKeyCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "ServerKeys" + ], + "description": "Deletes the server key with the given name.", + "operationId": "ServerKeys_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "keyName", + "in": "path", + "description": "The name of the server key to be deleted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the server key." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidKeyName - An invalid value was given for the server key name.\n\n * 400 InvalidKeyType - The create server key type is not supported.\n\n * 400 InvalidUpsertKeyType - Service-managed TDE keys are managed by the service. Service-managed TDE keys don't support Create or Update by the user.\n\n * 400 InvalidKeyUpsertRequest - The create server key request does not exist or has no properties object.\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.\n\n * 400 AzureKeyVaultKeyUsedOnGeoPrimary - The operation could not be completed because the Azure Key Vault Key name {0} is currently set as encryption protector on geo-primary.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\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 * 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified server key does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete the server key": { + "$ref": "./examples/ServerKeyDelete.json" + } + } + } + } + }, + "definitions": { + "ServerKey": { + "description": "A server key.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "kind": { + "description": "Kind of encryption protector. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Resource location.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ServerKeyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerKeyListResult": { + "description": "A list of server keys.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerKey" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerKeyProperties": { + "description": "Properties for a server key execution.", + "required": [ + "serverKeyType" + ], + "type": "object", + "properties": { + "subregion": { + "description": "Subregion of the server key.", + "type": "string", + "readOnly": true + }, + "serverKeyType": { + "description": "The server key type like 'ServiceManaged', 'AzureKeyVault'.", + "enum": [ + "ServiceManaged", + "AzureKeyVault" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "uri": { + "description": "The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "thumbprint": { + "description": "Thumbprint of the server key.", + "type": "string", + "readOnly": true + }, + "creationDate": { + "format": "date-time", + "description": "The server key creation date.", + "type": "string", + "readOnly": true + }, + "autoRotationEnabled": { + "description": "Key auto rotation opt-in flag. Either true or false.", + "type": "boolean", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerOperations.json new file mode 100644 index 000000000000..7622fadfd2aa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerOperations.json @@ -0,0 +1,208 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/operations": { + "get": { + "tags": [ + "ServerOperations" + ], + "description": "Gets a list of operations performed on the server.", + "operationId": "ServerOperations_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request for getting server operations has been executed successfully.", + "schema": { + "$ref": "#/definitions/ServerOperationListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 PECsNotExistingToDenyPublicNetworkAccess - Unable to set Deny Public Network Access to Yes since there is no private endpoint enabled to access the server. Please set up private endpoints and retry the operation (https://docs.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database).\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 Ipv6FeatureNotEnabled - User tried to turn on Ipv6 support on the server without enabling feature flag on subscription, or the feature support is currently disabled in the region.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 CannotDropDatabaseAKVError - The database {0} on server {1} cannot be safely dropped because it is encrypted with a customer managed key that is no longer accessible to take the last backup before drop. Please restore Azure Key Vault Access on the server and revalidate the keys to make this database accessible and then proceed with the drop. For details see https://aka.ms/tdecmkrestorability\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 SubscriptionNotFound - The requested subscription 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 UpsertLogicalServerRequestAlreadyInProgress - An ongoing logical server request is already in progress, please try your request again later.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 DropLogicalServerAlreadyInProgress - Server is already being dropped.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 * 503 TooManyRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the server management operations": { + "$ref": "./examples/ListServerOperations.json" + } + } + } + } + }, + "definitions": { + "ServerOperation": { + "description": "A server operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerOperationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerOperationListResult": { + "description": "The response to a list server operations request", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerOperation" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerOperationProperties": { + "description": "The properties of a server operation.", + "type": "object", + "properties": { + "operation": { + "description": "The name of operation.", + "type": "string", + "readOnly": true + }, + "operationFriendlyName": { + "description": "The friendly name of operation.", + "type": "string", + "readOnly": true + }, + "percentComplete": { + "format": "int32", + "description": "The percentage of the operation completed.", + "type": "integer", + "readOnly": true + }, + "serverName": { + "description": "The name of the server.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The operation start time.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "The operation state.", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ManagementOperationState", + "modelAsString": true + } + }, + "errorCode": { + "format": "int32", + "description": "The operation error code.", + "type": "integer", + "readOnly": true + }, + "errorDescription": { + "description": "The operation error description.", + "type": "string", + "readOnly": true + }, + "errorSeverity": { + "format": "int32", + "description": "The operation error severity.", + "type": "integer", + "readOnly": true + }, + "isUserError": { + "description": "Whether or not the error is a user error.", + "type": "boolean", + "readOnly": true + }, + "estimatedCompletionTime": { + "format": "date-time", + "description": "The estimated completion time of the operation.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The operation description.", + "type": "string", + "readOnly": true + }, + "isCancellable": { + "description": "Whether the operation can be cancelled.", + "type": "boolean", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerSecurityAlertPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerSecurityAlertPolicies.json new file mode 100644 index 000000000000..aac044ebf556 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerSecurityAlertPolicies.json @@ -0,0 +1,303 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies": { + "get": { + "tags": [ + "ServerSecurityAlertPolicies" + ], + "description": "Get the server's threat detection policies.", + "operationId": "ServerSecurityAlertPolicies_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server threat detection policies.", + "schema": { + "$ref": "#/definitions/LogicalServerSecurityAlertPolicyListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List the server's threat detection policies": { + "$ref": "./examples/ServerSecurityAlertsListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}": { + "get": { + "tags": [ + "ServerSecurityAlertPolicies" + ], + "description": "Get a server's security alert policy.", + "operationId": "ServerSecurityAlertPolicies_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the security alert policy.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server threat detection policy.", + "schema": { + "$ref": "#/definitions/ServerSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings" + } + }, + "x-ms-examples": { + "Get a server's threat detection policy": { + "$ref": "./examples/ServerSecurityAlertsGet.json" + } + } + }, + "put": { + "tags": [ + "ServerSecurityAlertPolicies" + ], + "description": "Creates or updates a threat detection policy.", + "operationId": "ServerSecurityAlertPolicies_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "securityAlertPolicyName", + "in": "path", + "description": "The name of the threat detection policy.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "SecurityAlertPolicyName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The server security alert policy.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerSecurityAlertPolicy" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the threat detection policy.", + "schema": { + "$ref": "#/definitions/ServerSecurityAlertPolicy" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 UpdateNotAllowedOnServerContainingPausedDWDatabase - Setting server Threat Detection settings is not allowed on a server with a paused Data Warehouse database\n\n * 400 SecurityAlertPoliciesInsufficientDiskSpace - Insufficient disk space to save security alert policy metadata in the database\n\n * 400 SecurityAlertPoliciesInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 SecurityAlertPoliciesStorageAccountIsDisabled - The storage account provided in the threat detection policy is disabled.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\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 * 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 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Created request to set the server threat detection policy." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a server's threat detection policy with minimal parameters": { + "$ref": "./examples/ServerSecurityAlertsCreateMin.json" + }, + "Update a server's threat detection policy with all parameters": { + "$ref": "./examples/ServerSecurityAlertsCreateMax.json" + } + } + } + } + }, + "definitions": { + "LogicalServerSecurityAlertPolicyListResult": { + "description": "A list of the server's security alert policies.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerSecurityAlertPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SecurityAlertsPolicyProperties": { + "description": "Properties of a security alert policy.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SecurityAlertsPolicyState", + "modelAsString": false + } + }, + "disabledAlerts": { + "description": "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAddresses": { + "description": "Specifies an array of e-mail addresses to which the alert is sent.", + "type": "array", + "items": { + "type": "string" + } + }, + "emailAccountAdmins": { + "description": "Specifies that the alert is sent to the account administrators.", + "type": "boolean" + }, + "storageEndpoint": { + "description": "Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.", + "type": "string" + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the Threat Detection audit storage account.", + "type": "string" + }, + "retentionDays": { + "format": "int32", + "description": "Specifies the number of days to keep in the Threat Detection audit logs.", + "type": "integer" + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "ServerSecurityAlertPolicy": { + "description": "A server security alert policy.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SecurityAlertPolicyResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SecurityAlertsPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerTrustCertificates.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerTrustCertificates.json new file mode 100644 index 000000000000..42988b737f0f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerTrustCertificates.json @@ -0,0 +1,297 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates": { + "get": { + "tags": [ + "ServerTrustCertificates" + ], + "description": "Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance.", + "operationId": "ServerTrustCertificates_ListByInstance", + "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 a list of server trust certificates.", + "schema": { + "$ref": "#/definitions/ServerTrustCertificatesListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of server trust certificates on a given server.": { + "$ref": "./examples/ServerTrustCertificatesListByInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}": { + "get": { + "tags": [ + "ServerTrustCertificates" + ], + "description": "Gets a server trust certificate that was uploaded from box to Sql Managed Instance.", + "operationId": "ServerTrustCertificates_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "certificateName", + "in": "path", + "description": "Name of of the certificate to get.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a server trust certificate.", + "schema": { + "$ref": "#/definitions/ServerTrustCertificate" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 GatewayInternalServerError - The server encountered an unexpected exception.\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-examples": { + "Gets server trust certificate.": { + "$ref": "./examples/ServerTrustCertificatesGet.json" + } + } + }, + "put": { + "tags": [ + "ServerTrustCertificates" + ], + "description": "Uploads a server trust certificate from box to Sql Managed Instance.", + "operationId": "ServerTrustCertificates_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "certificateName", + "in": "path", + "description": "Name of of the certificate to upload.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The server trust certificate info.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerTrustCertificate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Certificate already existed.", + "schema": { + "$ref": "#/definitions/ServerTrustCertificate" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 MissingPublicBlob - The public blob is missing.\n\n * 400 InvalidPublicBlob - Invalid public blob specified, reason: '{0}'.\n\n * 400 MissingCertificateName - The certificate name is missing.\n\n * 400 CertificateAlreadyExists - A certificate with a given name already exists or this certificate already has been added to the database.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted request for creating server trust certificate." + }, + "201": { + "description": "Certificate is successfully created.", + "schema": { + "$ref": "#/definitions/ServerTrustCertificate" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create server trust certificate.": { + "$ref": "./examples/ServerTrustCertificatesCreate.json" + } + } + }, + "delete": { + "tags": [ + "ServerTrustCertificates" + ], + "description": "Deletes a server trust certificate that was uploaded from box to Sql Managed Instance.", + "operationId": "ServerTrustCertificates_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "certificateName", + "in": "path", + "description": "Name of of the certificate to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Certificate successfully deleted." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 MissingCertificateName - The certificate name is missing.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 GatewayInternalServerError - The server encountered an unexpected exception.\n\n * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted request for deleting server trust certificate." + }, + "204": { + "description": "Certificate resource not found." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete server trust certificate.": { + "$ref": "./examples/ServerTrustCertificatesDelete.json" + } + } + } + } + }, + "definitions": { + "ServerTrustCertificate": { + "description": "Server trust certificate imported from box to enable connection between box and Sql Managed Instance.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerTrustCertificateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerTrustCertificateProperties": { + "description": "The properties of a server trust certificate.", + "type": "object", + "properties": { + "publicBlob": { + "description": "The certificate public blob", + "type": "string" + }, + "thumbprint": { + "description": "The certificate thumbprint", + "type": "string", + "readOnly": true + }, + "certificateName": { + "description": "The certificate name", + "type": "string", + "readOnly": true + } + } + }, + "ServerTrustCertificatesListResult": { + "description": "A list of server trust certificates in instance.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerTrustCertificate" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerTrustGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerTrustGroups.json new file mode 100644 index 000000000000..de4db3776f1d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerTrustGroups.json @@ -0,0 +1,376 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups": { + "get": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Lists a server trust group.", + "operationId": "ServerTrustGroups_ListByLocation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server trust groups.", + "schema": { + "$ref": "#/definitions/ServerTrustGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerTrustGroupNotFound - Server trust group with specified name does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 406 ServerTrustGroupMemberIsBusy - Group member '{0}' is not in a valid state and cannot perform Server trust group operation.\n\n * 406 ServerTrustGroupInInvalidState - SQL trust group '{0}' is busy and cannot perform requested operation.\n\n * 406 ServerTrustGroupMemberNotFound - Group member '{0}' is not found, therefore we cannot perform Server trust group operation." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List server trust groups": { + "$ref": "./examples/ServerTrustGroupList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}": { + "get": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Gets a server trust group.", + "operationId": "ServerTrustGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "serverTrustGroupName", + "in": "path", + "description": "The name of the server trust group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the the specified server trust group.", + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerTrustGroupNotFound - Server trust group with specified name does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 406 ServerTrustGroupMemberIsBusy - Group member '{0}' is not in a valid state and cannot perform Server trust group operation.\n\n * 406 ServerTrustGroupInInvalidState - SQL trust group '{0}' is busy and cannot perform requested operation.\n\n * 406 ServerTrustGroupMemberNotFound - Group member '{0}' is not found, therefore we cannot perform Server trust group operation." + } + }, + "x-ms-examples": { + "Get server trust group": { + "$ref": "./examples/ServerTrustGroupGet.json" + } + } + }, + "put": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Creates or updates a server trust group.", + "operationId": "ServerTrustGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "serverTrustGroupName", + "in": "path", + "description": "The name of the server trust group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The server trust group parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server trust group.", + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ServerTrustGroupCreateRequestInvalid - The resource or resource properties in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembers - The group members property in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembersCount - The group members property has an invalid number of servers\n\n * 400 ServerTrustGroupCreateRequestInvalidServer - The given serverId field in create server trust group request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestDuplicateServer - One or more of the provided servers are duplicates.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopes - The trust scope property in the request body is empty or invalid.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopesValue - The trust scope property in the request body has an invalid value.\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembersCount2 - The group members property has an invalid number of servers\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerTrustGroupNotFound - Server trust group with specified name does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 406 ServerTrustGroupMemberIsBusy - Group member '{0}' is not in a valid state and cannot perform Server trust group operation.\n\n * 406 ServerTrustGroupInInvalidState - SQL trust group '{0}' is busy and cannot perform requested operation.\n\n * 406 ServerTrustGroupMemberNotFound - Group member '{0}' is not found, therefore we cannot perform Server trust group operation.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the server trust group.", + "schema": { + "$ref": "#/definitions/ServerTrustGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create server trust group": { + "$ref": "./examples/ServerTrustGroupCreate.json" + } + } + }, + "delete": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Deletes a server trust group.", + "operationId": "ServerTrustGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "serverTrustGroupName", + "in": "path", + "description": "The name of the server trust group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the server trust group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ServerTrustGroupCreateRequestInvalid - The resource or resource properties in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembers - The group members property in the request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembersCount - The group members property has an invalid number of servers\n\n * 400 ServerTrustGroupCreateRequestInvalidServer - The given serverId field in create server trust group request body is empty or invalid\n\n * 400 ServerTrustGroupCreateRequestDuplicateServer - One or more of the provided servers are duplicates.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopes - The trust scope property in the request body is empty or invalid.\n\n * 400 ServerTrustGroupCreateRequestInvalidTrustScopesValue - The trust scope property in the request body has an invalid value.\n\n * 400 ServerTrustGroupCreateRequestInvalidGroupMembersCount2 - The group members property has an invalid number of servers\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 ServerTrustGroupNotFound - Server trust group with specified name does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 406 ServerTrustGroupMemberIsBusy - Group member '{0}' is not in a valid state and cannot perform Server trust group operation.\n\n * 406 ServerTrustGroupInInvalidState - SQL trust group '{0}' is busy and cannot perform requested operation.\n\n * 406 ServerTrustGroupMemberNotFound - Group member '{0}' is not found, therefore we cannot perform Server trust group operation.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified server trust group does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Drop server trust group": { + "$ref": "./examples/ServerTrustGroupDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups": { + "get": { + "tags": [ + "ServerTrustGroups" + ], + "description": "Gets a server trust groups by instance name.", + "operationId": "ServerTrustGroups_ListByInstance", + "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 server trust groups.", + "schema": { + "$ref": "#/definitions/ServerTrustGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List server trust groups by managed instance": { + "$ref": "./examples/ServerTrustGroupListByManagedInstance.json" + } + } + } + } + }, + "definitions": { + "ServerInfo": { + "description": "Server info for the server trust group.", + "required": [ + "serverId" + ], + "type": "object", + "properties": { + "serverId": { + "description": "Server Id.", + "type": "string" + } + } + }, + "ServerTrustGroup": { + "description": "A server trust group.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerTrustGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerTrustGroupListResult": { + "description": "A list of server trust groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerTrustGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerTrustGroupProperties": { + "description": "Properties of a server trust group.", + "required": [ + "groupMembers", + "trustScopes" + ], + "type": "object", + "properties": { + "groupMembers": { + "description": "Group members information for the server trust group.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerInfo" + } + }, + "trustScopes": { + "description": "Trust scope of the server trust group.", + "type": "array", + "items": { + "enum": [ + "GlobalTransactions", + "ServiceBroker" + ], + "type": "string" + } + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerUsages.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerUsages.json new file mode 100644 index 000000000000..a04eb5176168 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerUsages.json @@ -0,0 +1,148 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages": { + "get": { + "tags": [ + "ServerUsages" + ], + "description": "Gets server usages.", + "operationId": "ServerUsages_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server usages.", + "schema": { + "$ref": "#/definitions/ServerUsageListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List servers usages.": { + "$ref": "./examples/ServerUsageList.json" + } + } + } + } + }, + "definitions": { + "ServerUsage": { + "description": "Usage metric of a server.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerUsageProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerUsageListResult": { + "description": "A list of server usage metrics.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerUsage" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerUsageProperties": { + "description": "Properties of a server usage.", + "type": "object", + "properties": { + "displayName": { + "description": "User-readable name of the metric.", + "type": "string", + "readOnly": true + }, + "currentValue": { + "format": "double", + "description": "Current value of the metric.", + "type": "number", + "readOnly": true + }, + "limit": { + "format": "double", + "description": "Boundary value of the metric.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit of the metric.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerVulnerabilityAssessments.json new file mode 100644 index 000000000000..7721dbaba40b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/ServerVulnerabilityAssessments.json @@ -0,0 +1,364 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments": { + "get": { + "tags": [ + "ServerVulnerabilityAssessments" + ], + "description": "Lists the vulnerability assessment policies associated with a server.", + "operationId": "ServerVulnerabilityAssessments_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server vulnerability assessment policies.", + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a server's vulnerability assessment policies": { + "$ref": "./examples/ServerVulnerabilityAssessmentListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "ServerVulnerabilityAssessments" + ], + "description": "Gets the server's vulnerability assessment.", + "operationId": "ServerVulnerabilityAssessments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Get a server's vulnerability assessment": { + "$ref": "./examples/ServerVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "ServerVulnerabilityAssessments" + ], + "description": "Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment with managed identity - https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage", + "operationId": "ServerVulnerabilityAssessments_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 409 VulnerabilityAssessmentStoragelessIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation." + }, + "201": { + "description": "Successfully created the vulnerability assessment.", + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a server's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified": { + "$ref": "./examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json" + }, + "Create a server's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified": { + "$ref": "./examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json" + }, + "Create a server's vulnerability assessment with all parameters": { + "$ref": "./examples/ServerVulnerabilityAssessmentCreateMax.json" + } + } + }, + "delete": { + "tags": [ + "ServerVulnerabilityAssessments" + ], + "description": "Removes the server's vulnerability assessment.", + "operationId": "ServerVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the vulnerability assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the server vulnerability assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 VulnerabilityAssessmentUnsupportedStorageAccount - The provided storage account is unsupported.\n\n * 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.\n\n * 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.\n\n * 400 VulnerabilityAssessmentInsufficientStorageAccountPermissions - Insufficient permissions on the provided storage account.\n\n * 400 VulnerabilityAssessmentStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Remove a server's vulnerability assessment": { + "$ref": "./examples/ServerVulnerabilityAssessmentDelete.json" + } + } + } + } + }, + "definitions": { + "ServerVulnerabilityAssessment": { + "description": "A server vulnerability assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerVulnerabilityAssessmentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerVulnerabilityAssessmentListResult": { + "description": "A list of the server's vulnerability assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerVulnerabilityAssessmentProperties": { + "description": "Properties of a server Vulnerability Assessment.", + "required": [ + "storageContainerPath" + ], + "type": "object", + "properties": { + "storageContainerPath": { + "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageContainerSasKey": { + "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageAccountAccessKey": { + "description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "recurringScans": { + "$ref": "#/definitions/VulnerabilityAssessmentRecurringScansProperties", + "description": "The recurring scans settings" + } + } + }, + "VulnerabilityAssessmentRecurringScansProperties": { + "description": "Properties of a Vulnerability Assessment recurring scans.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Recurring scans state.", + "type": "boolean" + }, + "emailSubscriptionAdmins": { + "description": "Specifies that the schedule scan notification will be is sent to the subscription administrators.", + "default": true, + "type": "boolean" + }, + "emails": { + "description": "Specifies an array of e-mail addresses to which the scan notification is sent.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Servers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Servers.json new file mode 100644 index 000000000000..db62fa1e3ecc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Servers.json @@ -0,0 +1,1200 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability": { + "post": { + "tags": [ + "Servers" + ], + "description": "Determines whether a resource can be created with the specified name.", + "operationId": "Servers_CheckNameAvailability", + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "The name availability request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityRequest" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully completed the availability check.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidNameAvailabilityRequest - The check name availability request is invalid.\n\n * 400 UnknownNameType - Unknown resource type specified for a subscription level name availability check." + } + }, + "x-ms-examples": { + "Check for a server name that already exists": { + "$ref": "./examples/CheckNameAvailabilityServerAlreadyExists.json" + }, + "Check for a server name that is available": { + "$ref": "./examples/CheckNameAvailabilityServerAvailable.json" + }, + "Check for a server name that is invalid": { + "$ref": "./examples/CheckNameAvailabilityServerInvalid.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers": { + "get": { + "tags": [ + "Servers" + ], + "description": "Gets a list of all servers in the subscription.", + "operationId": "Servers_List", + "parameters": [ + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "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 servers.", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionNotFound - The requested subscription was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List servers": { + "$ref": "./examples/ServerList.json" + }, + "List servers with $expand=administrators/activedirectory": { + "$ref": "./examples/ServerListWithExpandEqualsAdministrators.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers": { + "get": { + "tags": [ + "Servers" + ], + "description": "Gets a list of servers in a resource groups.", + "operationId": "Servers_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "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 servers.", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionNotFound - The requested subscription was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List servers by resource group": { + "$ref": "./examples/ServerListByResourceGroup.json" + }, + "List servers by resource group with $expand=administrators/activedirectory": { + "$ref": "./examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}": { + "get": { + "tags": [ + "Servers" + ], + "description": "Gets a server.", + "operationId": "Servers_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified server.", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get server": { + "$ref": "./examples/ServerGet.json" + }, + "Get server with $expand=administrators/activedirectory": { + "$ref": "./examples/ServerGetWithExpandEqualsAdministrators.json" + } + } + }, + "put": { + "tags": [ + "Servers" + ], + "description": "Creates or updates a server.", + "operationId": "Servers_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested server resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/Server" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server.", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 PECsNotExistingToDenyPublicNetworkAccess - Unable to set Deny Public Network Access to Yes since there is no private endpoint enabled to access the server. Please set up private endpoints and retry the operation (https://docs.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database).\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 Ipv6FeatureNotEnabled - User tried to turn on Ipv6 support on the server without enabling feature flag on subscription, or the feature support is currently disabled in the region.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidExternalAdministratorLogin - Invalid or missing external administrator login name.\n\n * 400 InvalidExternalAdministratorSid - Invalid or missing external administrator object id.\n\n * 400 InvalidExternalAdministratorTenantId - Invalid or missing external administrator tenant id.\n\n * 400 ExternalAdministratorPrincipalType - Invalid or missing external administrator principal type. Please select from User, Application or Group.\n\n * 400 MissingExternalAdministratorWithAadOnlyAuth - In order to use Azure AD Only Authentication, please provide details of an external administrator.\n\n * 400 ExternalAdministratorLoginSameAsSqlAdmin - The names of the Azure Active Directory administrator and of the server admin account must be different. Please provide different values.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionNotFound - The requested subscription 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 UpsertLogicalServerRequestAlreadyInProgress - An ongoing logical server request is already in progress, please try your request again later.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 ServerAlreadyExists - Duplicate server name.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the server.", + "schema": { + "$ref": "#/definitions/Server" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create server": { + "$ref": "./examples/ServerCreate.json" + } + } + }, + "delete": { + "tags": [ + "Servers" + ], + "description": "Deletes a server.", + "operationId": "Servers_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the server." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 CannotDropDatabaseAKVError - The database {0} on server {1} cannot be safely dropped because it is encrypted with a customer managed key that is no longer accessible to take the last backup before drop. Please restore Azure Key Vault Access on the server and revalidate the keys to make this database accessible and then proceed with the drop. For details see https://aka.ms/tdecmkrestorability\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionNotFound - The requested subscription 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 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 DropLogicalServerAlreadyInProgress - Server is already being dropped.\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 * 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified server does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete server": { + "$ref": "./examples/ServerDelete.json" + } + } + }, + "patch": { + "tags": [ + "Servers" + ], + "description": "Updates a server.", + "operationId": "Servers_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested server resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the server.", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 PECsNotExistingToDenyPublicNetworkAccess - Unable to set Deny Public Network Access to Yes since there is no private endpoint enabled to access the server. Please set up private endpoints and retry the operation (https://docs.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database).\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 Ipv6FeatureNotEnabled - User tried to turn on Ipv6 support on the server without enabling feature flag on subscription, or the feature support is currently disabled in the region.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.\n\n * 400 InvalidExternalAdministratorLogin - Invalid or missing external administrator login name.\n\n * 400 InvalidExternalAdministratorSid - Invalid or missing external administrator object id.\n\n * 400 InvalidExternalAdministratorTenantId - Invalid or missing external administrator tenant id.\n\n * 400 ExternalAdministratorPrincipalType - Invalid or missing external administrator principal type. Please select from User, Application or Group.\n\n * 400 MissingExternalAdministratorWithAadOnlyAuth - In order to use Azure AD Only Authentication, please provide details of an external administrator.\n\n * 400 ExternalAdministratorLoginSameAsSqlAdmin - The names of the Azure Active Directory administrator and of the server admin account must be different. Please provide different values.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionNotFound - The requested subscription 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 UpsertLogicalServerRequestAlreadyInProgress - An ongoing logical server request is already in progress, please try your request again later.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 409 ServerAlreadyExists - Duplicate server name.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - 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." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a server": { + "$ref": "./examples/ServerUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import": { + "post": { + "tags": [ + "Servers" + ], + "description": "Imports a bacpac into a new database.", + "operationId": "Servers_ImportDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The database import request parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/ImportNewDatabaseDefinition" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully imported the database.", + "schema": { + "$ref": "#/definitions/ImportExportOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 InvalidImportExportInputParameter - The import/export request failed due to an invalid input parameter.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 InvalidSqlAuthType - ImportExport operation failed because the sql authentication type is invalid\n\n * 400 BlobAlreadyExist - ImportExport operation failed because the storage blob is already exists\n\n * 400 InvalidImportExportOperationResourceLocks - The Import/Export request is invalid due to locks on the Private Link resources.\n\n * 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.\n\n * 400 InvalidTier - The user specified an invalid tier.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidImportExportParameter - The Import/Export request failed due to an invalid input parameter.\n\n * 400 InvalidSku - The user specified an invalid sku.\n\n * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.\n\n * 400 InvalidImportExportStorageCredentials - Import/Export operation failed due to invalid storage credentials\n\n * 400 InvalidImportExportStorageAuthType - Import/Export operation failed due to invalid storage auth type\n\n * 400 InvalidImportExportStorageKeyFormat - Import/Export operation failed due to invalid storage key format\n\n * 400 LongImportExportStorageUri - Import/Export operation failed due to long storage URI\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 LargeExportDatabaseSize - Export operation failed because database is larger than max supported size\n\n * 400 UnSupportedImportExportEdition - ImportExport operation failed because it is targeting a invalid edition\n\n * 400 InvalidImportExportStorageURI - ImportExport operation failed because storage URI is invalid\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Importing the database is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Imports to a new database.": { + "$ref": "./examples/ImportNewDatabase.json" + }, + "Imports to a new database, using private link for the SQL server and storage account.": { + "$ref": "./examples/ImportNewDatabaseWithNetworkIsolation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/refreshExternalGovernanceStatus": { + "post": { + "tags": [ + "Servers" + ], + "description": "Refresh external governance enablement status.", + "operationId": "Servers_RefreshStatus", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully refreshed external governance enablement status.", + "schema": { + "$ref": "#/definitions/RefreshExternalGovernanceStatusOperationResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Refreshing external governance enablement status." + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Refresh external governance enablement status.": { + "$ref": "./examples/RefreshExternalGovernanceStatus.json" + } + } + } + } + }, + "definitions": { + "CheckNameAvailabilityRequest": { + "description": "A request to check whether the specified name for a resource is available.", + "required": [ + "name", + "type" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "enum": [ + "Microsoft.Sql/servers" + ], + "type": "string", + "x-ms-enum": { + "name": "CheckNameAvailabilityResourceType", + "modelAsString": false + } + } + } + }, + "CheckNameAvailabilityResponse": { + "description": "The result of a name availability check.", + "type": "object", + "properties": { + "name": { + "description": "The name whose availability was checked.", + "type": "string", + "readOnly": true + }, + "available": { + "description": "True if the name is available, otherwise false.", + "type": "boolean", + "readOnly": true + }, + "reason": { + "description": "The reason code explaining why the name is unavailable. Will be undefined if the name is available.", + "enum": [ + "Invalid", + "AlreadyExists" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "CheckNameAvailabilityReason", + "modelAsString": false + } + }, + "message": { + "description": "A message explaining why the name is unavailable. Will be undefined if the name is available.", + "type": "string", + "readOnly": true + } + } + }, + "ImportExportOperationResult": { + "description": "An ImportExport operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ImportExportOperationResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ImportExportOperationResultProperties": { + "description": "Contains the operation result properties for import/export operation.", + "type": "object", + "properties": { + "requestId": { + "format": "uuid", + "description": "Request Id.", + "type": "string", + "readOnly": true + }, + "requestType": { + "description": "Request type.", + "type": "string", + "readOnly": true + }, + "queuedTime": { + "description": "Queued time.", + "type": "string", + "readOnly": true + }, + "lastModifiedTime": { + "description": "Last modified time.", + "type": "string", + "readOnly": true + }, + "blobUri": { + "description": "Blob Uri.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "Database name.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Operation status.", + "type": "string", + "readOnly": true + }, + "errorMessage": { + "description": "Error message.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnections": { + "description": "Gets the status of private endpoints associated with this request.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnectionRequestStatus" + }, + "readOnly": true + } + } + }, + "ImportNewDatabaseDefinition": { + "description": "Contains the information necessary to perform import operation for new database.", + "required": [ + "storageKeyType", + "storageKey", + "storageUri", + "administratorLogin", + "administratorLoginPassword" + ], + "type": "object", + "properties": { + "databaseName": { + "description": "Name of the import database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "edition": { + "description": "Edition of the import database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "serviceObjectiveName": { + "description": "Service level objective name of the import database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "maxSizeBytes": { + "description": "Max size in bytes for the import database.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageKeyType": { + "description": "Storage key type.", + "enum": [ + "SharedAccessKey", + "StorageAccessKey" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageKeyType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "storageKey": { + "description": "Storage key.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "storageUri": { + "description": "Storage Uri.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLogin": { + "description": "Administrator login name.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "administratorLoginPassword": { + "description": "Administrator login password.", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create" + ] + }, + "authenticationType": { + "description": "Authentication type.", + "type": "string", + "x-ms-mutability": [ + "create" + ] + }, + "networkIsolation": { + "$ref": "#/definitions/NetworkIsolationSettings", + "description": "Optional resource information to enable network isolation for request.", + "x-ms-mutability": [ + "create" + ] + } + } + }, + "NetworkIsolationSettings": { + "description": "Contains the ARM resources for which to create private endpoint connection.", + "type": "object", + "properties": { + "storageAccountResourceId": { + "description": "The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + }, + "sqlServerResourceId": { + "description": "The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + {} + ] + }, + "x-ms-mutability": [ + "create" + ] + } + } + }, + "PrivateEndpointConnectionProperties": { + "description": "Properties of a private endpoint connection.", + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpointProperty", + "description": "Private endpoint which the connection belongs to." + }, + "groupIds": { + "description": "Group IDs.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionStateProperty", + "description": "Connection state of the private endpoint connection." + }, + "provisioningState": { + "description": "State of the private endpoint connection.", + "enum": [ + "Approving", + "Ready", + "Dropping", + "Failed", + "Rejecting" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PrivateEndpointProvisioningState", + "modelAsString": true + } + } + } + }, + "PrivateEndpointConnectionRequestStatus": { + "description": "Contains the private endpoint connection requests status.", + "type": "object", + "properties": { + "privateLinkServiceId": { + "description": "Resource id for which the private endpoint is created.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnectionName": { + "description": "The connection name for the private endpoint.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Status of this private endpoint connection.", + "type": "string", + "readOnly": true + } + } + }, + "PrivateEndpointProperty": { + "type": "object", + "properties": { + "id": { + "description": "Resource id of the private endpoint.", + "type": "string" + } + }, + "x-ms-azure-resource": true + }, + "PrivateLinkServiceConnectionStateProperty": { + "required": [ + "status", + "description" + ], + "type": "object", + "properties": { + "status": { + "description": "The private link service connection status.", + "enum": [ + "Approved", + "Pending", + "Rejected", + "Disconnected" + ], + "type": "string", + "x-ms-enum": { + "name": "PrivateLinkServiceConnectionStateStatus", + "modelAsString": true + } + }, + "description": { + "description": "The private link service connection description.", + "type": "string" + }, + "actionsRequired": { + "description": "The actions required for private link service connection.", + "enum": [ + "None" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "PrivateLinkServiceConnectionStateActionsRequire", + "modelAsString": true + } + } + } + }, + "RefreshExternalGovernanceStatusOperationResult": { + "description": "An RefreshExternalGovernanceStatus operation result resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RefreshExternalGovernanceStatusOperationResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "RefreshExternalGovernanceStatusOperationResultProperties": { + "description": "Contains the operation result properties for refresh external governance status operation.", + "type": "object", + "properties": { + "requestId": { + "format": "uuid", + "description": "Request Id.", + "type": "string", + "readOnly": true + }, + "requestType": { + "description": "Request type.", + "type": "string", + "readOnly": true + }, + "queuedTime": { + "description": "Queued time.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Operation status.", + "type": "string", + "readOnly": true + }, + "errorMessage": { + "description": "Error message.", + "type": "string", + "readOnly": true + } + } + }, + "Server": { + "description": "An Azure SQL Database server.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "identity": { + "$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity", + "description": "The Azure Active Directory identity of the server." + }, + "kind": { + "description": "Kind of sql server. This is metadata used for the Azure portal experience.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ServerProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerExternalAdministrator": { + "description": "Properties of a active directory administrator.", + "type": "object", + "properties": { + "administratorType": { + "description": "Type of the sever administrator.", + "enum": [ + "ActiveDirectory" + ], + "type": "string", + "x-ms-enum": { + "name": "AdministratorType", + "modelAsString": true + } + }, + "principalType": { + "description": "Principal Type of the sever administrator.", + "enum": [ + "User", + "Group", + "Application" + ], + "type": "string", + "x-ms-enum": { + "name": "PrincipalType", + "modelAsString": true + } + }, + "login": { + "description": "Login name of the server administrator.", + "type": "string" + }, + "sid": { + "format": "uuid", + "description": "SID (object ID) of the server administrator.", + "type": "string" + }, + "tenantId": { + "format": "uuid", + "description": "Tenant ID of the administrator.", + "type": "string" + }, + "azureADOnlyAuthentication": { + "description": "Azure Active Directory only Authentication enabled.", + "type": "boolean" + } + } + }, + "ServerListResult": { + "description": "A list of servers.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Server" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ServerPrivateEndpointConnection": { + "description": "A private endpoint connection under a server", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "description": "Private endpoint connection properties", + "readOnly": true + } + } + }, + "ServerProperties": { + "description": "The properties of a server.", + "type": "object", + "properties": { + "administratorLogin": { + "description": "Administrator username for the server. Once created it cannot be changed.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "administratorLoginPassword": { + "description": "The administrator login password (required for server creation).", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "version": { + "description": "The version of the server.", + "type": "string" + }, + "state": { + "description": "The state of the server.", + "type": "string", + "readOnly": true + }, + "fullyQualifiedDomainName": { + "description": "The fully qualified domain name of the server.", + "type": "string", + "readOnly": true + }, + "privateEndpointConnections": { + "description": "List of private endpoint connections on a server", + "type": "array", + "items": { + "$ref": "#/definitions/ServerPrivateEndpointConnection" + }, + "readOnly": true + }, + "minimalTlsVersion": { + "description": "Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'", + "type": "string" + }, + "publicNetworkAccess": { + "description": "Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'", + "enum": [ + "Enabled", + "Disabled", + "SecuredByPerimeter" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerPublicNetworkAccessFlag", + "modelAsString": true + } + }, + "workspaceFeature": { + "description": "Whether or not existing server has a workspace created and if it allows connection from workspace", + "enum": [ + "Connected", + "Disconnected" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ServerWorkspaceFeature", + "modelAsString": true + } + }, + "primaryUserAssignedIdentityId": { + "description": "The resource id of a user assigned identity to be used by default.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.ManagedIdentity/userAssignedIdentities" + } + ] + } + }, + "federatedClientId": { + "format": "uuid", + "description": "The Client id used for cross tenant CMK scenario", + "type": "string" + }, + "keyId": { + "description": "A CMK URI of the key to use for encryption.", + "type": "string" + }, + "administrators": { + "$ref": "#/definitions/ServerExternalAdministrator", + "description": "The Azure Active Directory administrator of the server. This can only be used at server create time. If used for server update, it will be ignored or it will result in an error. For updates individual APIs will need to be used.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "restrictOutboundNetworkAccess": { + "description": "Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerNetworkAccessFlag", + "modelAsString": true + } + }, + "isIPv6Enabled": { + "description": "Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ServerNetworkAccessFlag", + "modelAsString": true + } + }, + "externalGovernanceStatus": { + "description": "Status of external governance.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ExternalGovernanceStatus", + "modelAsString": true + } + } + } + }, + "ServerUpdate": { + "description": "An update request for an Azure SQL Database server.", + "type": "object", + "properties": { + "identity": { + "$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity", + "description": "Server identity" + }, + "properties": { + "$ref": "#/definitions/ServerProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "UserIdentity": { + "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 + }, + "clientId": { + "format": "uuid", + "description": "The Azure Active Directory client id.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlAgent.json new file mode 100644 index 000000000000..2952dbfd6120 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlAgent.json @@ -0,0 +1,157 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/sqlAgent/current": { + "get": { + "tags": [ + "SqlAgent" + ], + "description": "Gets current instance sql agent configuration.", + "operationId": "SqlAgent_Get", + "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 current sql agent configuration.", + "schema": { + "$ref": "#/definitions/SqlAgentConfiguration" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlAgentManagedServerNotFound - User tried to configure sql agent of unknown managed instance." + } + }, + "x-ms-examples": { + "Gets current instance sql agent configuration.": { + "$ref": "./examples/SqlAgentConfigurationGet.json" + } + } + }, + "put": { + "tags": [ + "SqlAgent" + ], + "description": "Puts new sql agent configuration to instance.", + "operationId": "SqlAgent_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SqlAgentConfiguration" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully put sql agent configuration", + "schema": { + "$ref": "#/definitions/SqlAgentConfiguration" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlAgentManagedServerNotFound - User tried to configure sql agent of unknown managed instance." + } + }, + "x-ms-examples": { + "Puts new sql agent configuration to instance.": { + "$ref": "./examples/SqlAgentConfigurationPut.json" + } + } + } + } + }, + "definitions": { + "SqlAgentConfiguration": { + "description": "A recoverable managed database resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlAgentConfigurationProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlAgentConfigurationProperties": { + "description": "Sql agent configuration properties.", + "type": "object", + "properties": { + "state": { + "description": "The state of Sql Agent.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string" + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentBaseline.json new file mode 100644 index 000000000000..340350600a17 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentBaseline.json @@ -0,0 +1,393 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentBaseline" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "SqlVulnerabilityAssessmentBaseline_ListBySqlVulnerabilityAssessment", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSetListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentBaseline" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "SqlVulnerabilityAssessmentBaseline_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/SqlVulnerabilityAssessmentBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "SqlVulnerabilityAssessmentBaseline" + ], + "description": "Add a database's vulnerability assessment rule baseline list.", + "operationId": "SqlVulnerabilityAssessmentBaselines_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully add the vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Add a database's vulnerability assessment rule baseline list.": { + "$ref": "./examples/SqlVulnerabilityAssessmentBaselineAdd.json" + }, + "Add a database's vulnerability assessment rule baseline from the latest scan result.": { + "$ref": "./examples/SqlVulnerabilityAssessmentBaselineAddLatest.json" + } + } + } + } + }, + "definitions": { + "DatabaseSqlVulnerabilityAssessmentBaselineSet": { + "description": "A database sql vulnerability assessment baseline set.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentBaselineSetResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSetProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentBaselineSetListResult": { + "description": "A list of SQL Vulnerability Assessments baseline set.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentBaselineSetProperties": { + "description": "Properties of a database Sql Vulnerability Assessment baseline set.", + "required": [ + "results" + ], + "type": "object", + "properties": { + "results": { + "description": "The baseline set result", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput": { + "description": "A database sql vulnerability assessment rule baseline list input.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "latestScan", + "results" + ], + "type": "object", + "properties": { + "latestScan": { + "description": "The latest scan flag", + "type": "boolean" + }, + "results": { + "description": "The rule baseline result list", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentExecuteScan.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentExecuteScan.json new file mode 100644 index 000000000000..4042730fe303 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentExecuteScan.json @@ -0,0 +1,110 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan": { + "post": { + "tags": [ + "SqlVulnerabilityAssessmentExecuteScan" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "SqlVulnerabilityAssessmentExecuteScan_Execute", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 VulnerabilityAssessmentStoragelessIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\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 * 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 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/SqlVulnerabilityAssessmentScansExecute.json" + } + } + } + } + }, + "definitions": {}, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json new file mode 100644 index 000000000000..29d7247b0ce1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -0,0 +1,496 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentRuleBaseline" + ], + "description": "Gets a system database's sql vulnerability assessment rule baseline.", + "operationId": "SqlVulnerabilityAssessmentRuleBaseline_ListByBaseline", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a system database's sql vulnerability assessment rule baseline.": { + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentRuleBaseline" + ], + "description": "Gets a system database's sql vulnerability assessment rule baseline.", + "operationId": "SqlVulnerabilityAssessmentRuleBaseline_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a system database's sql vulnerability assessment rule baseline.": { + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "SqlVulnerabilityAssessmentRuleBaseline" + ], + "description": "Creates or updates a database's vulnerability assessment rule baseline.", + "operationId": "SqlVulnerabilityAssessmentRuleBaseline_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineInput" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Creates or updates a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json" + } + } + }, + "delete": { + "tags": [ + "SqlVulnerabilityAssessmentRuleBaseline" + ], + "description": "Removes the database's vulnerability assessment rule baseline.", + "operationId": "SqlVulnerabilityAssessmentRuleBaselines_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment rule baseline." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "204": { + "description": "The specified rule baseline does not exist." + } + }, + "x-ms-examples": { + "Removes a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseSqlVulnerabilityAssessmentRuleBaseline": { + "description": "A database sql vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineInput": { + "description": "A database sql vulnerability assessment rule baseline input.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineInputResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "latestScan", + "results" + ], + "type": "object", + "properties": { + "latestScan": { + "description": "The latest scan flag", + "type": "boolean" + }, + "results": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": { + "description": "A list of SQL Vulnerability Assessments rule baseline.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "results" + ], + "type": "object", + "properties": { + "results": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentScanResult.json new file mode 100644 index 000000000000..e79a8eea4d5b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentScanResult.json @@ -0,0 +1,521 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentScanResult" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "SqlVulnerabilityAssessmentScanResult_ListByScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The scan id of the SQL Vulnerability Assessment scan to retrieve result from.", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The SQL vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment scan results.", + "schema": { + "$ref": "#/definitions/SQLVulnerabilityAssessmentScanListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List system database SQL Vulnerability Assessment scan results for scan id": { + "$ref": "./examples/SqlVulnerabilityAssessmentListScansResults.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults/{scanResultId}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentScanResult" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "SqlVulnerabilityAssessmentScanResult_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The scan id of the SQL Vulnerability Assessment scan to retrieve result from.", + "required": true, + "type": "string" + }, + { + "name": "scanResultId", + "in": "path", + "description": "The scan result id of the specific result to retrieve.", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The SQL vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment scan results for id.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResults" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a system database SQL Vulnerability Assessment scan result for scan id and scan result id": { + "$ref": "./examples/SqlVulnerabilityAssessmentScansResults.json" + } + } + } + } + }, + "definitions": { + "Baseline": { + "description": "SQL Vulnerability Assessment baseline Details", + "type": "object", + "properties": { + "expectedResults": { + "description": "SQL Vulnerability Assessment baseline expected results", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "updatedTime": { + "format": "date-time", + "description": "SQL Vulnerability Assessment baseline update time (UTC)", + "type": "string", + "readOnly": true + } + } + }, + "BaselineAdjustedResult": { + "description": "SQL Vulnerability Assessment baseline adjusted results", + "type": "object", + "properties": { + "baseline": { + "$ref": "#/definitions/Baseline", + "description": "SQL Vulnerability Assessment baseline details", + "readOnly": true + }, + "status": { + "description": "SQL Vulnerability Assessment baseline status", + "enum": [ + "NonFinding", + "Finding", + "InternalError" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": true + } + }, + "resultsNotInBaseline": { + "description": "SQL Vulnerability Assessment results that are not in baseline", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "resultsOnlyInBaseline": { + "description": "SQL Vulnerability Assessment results that are in baseline.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + } + } + }, + "BenchmarkReference": { + "description": "SQL Vulnerability Assessment benchmark reference", + "type": "object", + "properties": { + "benchmark": { + "description": "SQL Vulnerability Assessment benchmark name", + "type": "string", + "readOnly": true + }, + "reference": { + "description": "SQL Vulnerability Assessment benchmark reference.", + "type": "string", + "readOnly": true + } + } + }, + "QueryCheck": { + "description": "SQL Vulnerability Assessment query check object.", + "type": "object", + "properties": { + "query": { + "description": "SQL Vulnerability Assessment rule query.", + "type": "string", + "readOnly": true + }, + "expectedResult": { + "description": "SQL Vulnerability Assessment query expected result.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "columnNames": { + "description": "SQL Vulnerability Assessment column names of query expected result.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + }, + "Remediation": { + "description": "SQL Vulnerability Assessment remediation Details.", + "type": "object", + "properties": { + "description": { + "description": "SQL Vulnerability Assessment remediation description.", + "type": "string", + "readOnly": true + }, + "scripts": { + "description": "SQL Vulnerability Assessment remediation script.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "automated": { + "description": "SQL Vulnerability Assessment is remediation automated.", + "type": "boolean", + "readOnly": true + }, + "portalLink": { + "description": "SQL Vulnerability Assessment optional link to remediate in Azure Portal.", + "type": "string", + "readOnly": true + } + } + }, + "SQLVulnerabilityAssessmentScanListResult": { + "description": "A list of vulnerability assessment scan results.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResults" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanResultProperties": { + "description": "SQL Vulnerability Assessment scan result properties for a single rule.", + "type": "object", + "properties": { + "ruleId": { + "description": "SQL Vulnerability Assessment rule Id.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "SQL Vulnerability Assessment rule result status.", + "enum": [ + "NonFinding", + "Finding", + "InternalError" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": true + } + }, + "errorMessage": { + "description": "SQL Vulnerability Assessment error message.", + "type": "string", + "readOnly": true + }, + "isTrimmed": { + "description": "SQL Vulnerability Assessment is the query results trimmed.", + "type": "boolean", + "readOnly": true + }, + "queryResults": { + "description": "SQL Vulnerability Assessment query results that was run.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "remediation": { + "$ref": "#/definitions/Remediation", + "description": "SQL Vulnerability Assessment the remediation details.", + "readOnly": true + }, + "baselineAdjustedResult": { + "$ref": "#/definitions/BaselineAdjustedResult", + "description": "SQL Vulnerability Assessment rule result adjusted with baseline.", + "readOnly": true + }, + "ruleMetadata": { + "$ref": "#/definitions/VaRule", + "description": "SQL Vulnerability Assessment rule metadata.", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanResults": { + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of AdvancedThreatProtectionResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VaRule": { + "description": "SQL Vulnerability Assessment rule metadata details.", + "type": "object", + "properties": { + "ruleId": { + "description": "SQL Vulnerability Assessment rule Id.", + "type": "string", + "readOnly": true + }, + "severity": { + "description": "SQL Vulnerability Assessment rule severity.", + "enum": [ + "High", + "Medium", + "Low", + "Informational", + "Obsolete" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RuleSeverity", + "modelAsString": true + } + }, + "category": { + "description": "SQL Vulnerability Assessment rule category.", + "type": "string", + "readOnly": true + }, + "ruleType": { + "description": "SQL Vulnerability Assessment rule type.", + "enum": [ + "Binary", + "BaselineExpected", + "PositiveList", + "NegativeList" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "RuleType", + "modelAsString": true + } + }, + "title": { + "description": "SQL Vulnerability Assessment rule title.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "SQL Vulnerability Assessment rule description.", + "type": "string", + "readOnly": true + }, + "rationale": { + "description": "SQL Vulnerability Assessment rule rationale.", + "type": "string", + "readOnly": true + }, + "queryCheck": { + "$ref": "#/definitions/QueryCheck", + "description": "SQL Vulnerability Assessment rule query details.", + "readOnly": true + }, + "benchmarkReferences": { + "description": "SQL Vulnerability Assessment benchmark references.", + "type": "array", + "items": { + "$ref": "#/definitions/BenchmarkReference" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentScans.json new file mode 100644 index 000000000000..a28750c64ed1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentScans.json @@ -0,0 +1,363 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentScans" + ], + "description": "Lists the vulnerability assessment scans of a database.", + "operationId": "SqlVulnerabilityAssessmentScans_ListBySqlVulnerabilityAssessments", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan records.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecordListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the list of a database vulnerability assessment scan records": { + "$ref": "./examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentScans" + ], + "description": "Get a system database vulnerability assessment scan record.", + "operationId": "SqlVulnerabilityAssessmentScans_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan record.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecord" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets the a database vulnerability assessment scan records": { + "$ref": "./examples/SqlVulnerabilityAssessmentScan.json" + } + } + } + } + }, + "definitions": { + "SqlVulnerabilityAssessmentScanError": { + "description": "Properties of a vulnerability assessment scan error.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecord": { + "description": "A vulnerability assessment scan record.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SqlVulnerabilityAssessmentScanRecordResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecordProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecordListResult": { + "description": "A list of vulnerability assessment scan records.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecord" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecordProperties": { + "description": "Properties of a vulnerability assessment scan record.", + "type": "object", + "properties": { + "scanId": { + "description": "The scan ID.", + "type": "string", + "readOnly": true + }, + "triggerType": { + "description": "The scan trigger type.", + "enum": [ + "OnDemand", + "Recurring" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanTriggerType", + "modelAsString": true + } + }, + "state": { + "description": "The scan status.", + "enum": [ + "Passed", + "Failed", + "FailedToRun", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanState", + "modelAsString": true + } + }, + "startTime": { + "format": "date-time", + "description": "The scan start time (UTC).", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The scan end time (UTC).", + "type": "string", + "readOnly": true + }, + "errors": { + "description": "The scan errors.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanError" + }, + "readOnly": true + }, + "server": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "database": { + "description": "The database name.", + "type": "string", + "readOnly": true + }, + "sqlVersion": { + "description": "The SQL version.", + "type": "string", + "readOnly": true + }, + "highSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with high severity.", + "type": "integer", + "readOnly": true + }, + "mediumSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with medium severity.", + "type": "integer", + "readOnly": true + }, + "lowSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with low severity.", + "type": "integer", + "readOnly": true + }, + "totalPassedRulesCount": { + "format": "int32", + "description": "The number of total passed rules.", + "type": "integer", + "readOnly": true + }, + "totalFailedRulesCount": { + "format": "int32", + "description": "The number of total failed rules.", + "type": "integer", + "readOnly": true + }, + "totalRulesCount": { + "format": "int32", + "description": "The number of total rules assessed.", + "type": "integer", + "readOnly": true + }, + "isBaselineApplied": { + "description": "Baseline created for this database, and has one or more rules.", + "type": "boolean", + "readOnly": true + }, + "lastScanTime": { + "format": "date-time", + "description": "The last scan time.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentsSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentsSettings.json new file mode 100644 index 000000000000..db7786d0ca10 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentsSettings.json @@ -0,0 +1,312 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentsSettings" + ], + "description": "Lists SQL Vulnerability Assessment policies associated with a server.", + "operationId": "SqlVulnerabilityAssessmentsSettings_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment policies.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get SQL Vulnerability Assessment policies": { + "$ref": "./examples/SqlVulnerabilityAssessmentListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentsSettings" + ], + "description": "Gets SQL Vulnerability Assessment policy.", + "operationId": "SqlVulnerabilityAssessmentsSettings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get SQL Vulnerability Assessment policy": { + "$ref": "./examples/SqlVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "SqlVulnerabilityAssessmentsSettings" + ], + "description": "Creates or updates SQL Vulnerability Assessment policy.", + "operationId": "SqlVulnerabilityAssessmentsSettings_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set SQL Vulnerability Assessment.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created SQL Vulnerability Assessment.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a SQL Vulnerability Assessment policy": { + "$ref": "./examples/SqlVulnerabilityAssessmentCreate.json" + } + } + }, + "delete": { + "tags": [ + "SqlVulnerabilityAssessmentsSettings" + ], + "description": "Removes SQL Vulnerability Assessment.", + "operationId": "SqlVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed SQL Vulnerability Assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidSqlVulnerabilityAssessmentBaselineInput - The SQL vulnerability assessment baseline input is null or empty.\n\n * 400 InvalidSqlVulnerabilityAssessmentSettingsInput - The SQL vulnerability assessment setting input is null or empty\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentEmptyBaseline - Baseline not set because the results are null or empty\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SqlVulnerabilityAssessmentStoragefullApiIsEnabled - Vulnerability Assessment is enabled on this server or one of its underlying databases with an incompatible version. Additional troubleshooting information can be found https://aka.ms/SQLVAStoragelessDocumentation.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "204": { + "description": "The SQL Vulnerability Assessment settings does not exist." + } + }, + "x-ms-examples": { + "Remove SQL Vulnerability Assessment": { + "$ref": "./examples/SqlVulnerabilityAssessmentDelete.json" + } + } + } + } + }, + "definitions": { + "SqlVulnerabilityAssessment": { + "description": "A SQL Vulnerability Assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SqlVulnerabilityAssessmentResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlVulnerabilityAssessmentListResult": { + "description": "A list of SQL Vulnerability Assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentPolicyProperties": { + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentState", + "modelAsString": false + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/StartStopManagedInstanceSchedules.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/StartStopManagedInstanceSchedules.json new file mode 100644 index 000000000000..67fd7e8691d5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/StartStopManagedInstanceSchedules.json @@ -0,0 +1,389 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules": { + "get": { + "tags": [ + "StartStopManagedInstanceSchedules" + ], + "description": "Lists the managed instance's Start/Stop schedules.", + "operationId": "StartStopManagedInstanceSchedules_ListByInstance", + "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 Start/Stop schedules.", + "schema": { + "$ref": "#/definitions/StartStopManagedInstanceScheduleListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleOverlap - Overlap in schedule pairs.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleSmallTimespan - Time between two successive actions is less than 1 hour.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleSubscriptionNotEnabledForFeature - User attempted to use Start/Stop feature without having the subscription allowlisted for the appropriate subscription feature.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleNotSupportedOnSKU - Scheduled Start/Stop operation is not supported on the given SKU.\n\n * 400 StartStopOfManagedInstanceIsDisabled - Start and stop operation on managed instance is not enabled.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleFeatureDisabled - User attempted to use the scheduled Start/Stop Azure SQL Managed Instance feature, which is disabled.\n\n * 400 ManagementServiceStopManagedInstanceHostedOnRdfePlatform - Stop executed on the instance that is not running with Feature Wave November 2022\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ManagementServiceStartStopManagedInstanceScheduleNotFound - Schedule does not exist for a given managed instance.\n\n * 409 ManagementServiceStartStopManagedInstanceScheduleConflictingOperation - The attempted create/update/delete operation of Start/Stop schedule on the Azure SQL Managed Instance failed. The schedule was either not created or couldn't be updated/deleted as it was busy with an ongoing scheduled operation. Please retry your request later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Lists the managed instance's Start/Stop schedules.": { + "$ref": "./examples/StartStopManagedInstanceScheduleList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/{startStopScheduleName}": { + "get": { + "tags": [ + "StartStopManagedInstanceSchedules" + ], + "description": "Gets the managed instance's Start/Stop schedule.", + "operationId": "StartStopManagedInstanceSchedules_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "startStopScheduleName", + "in": "path", + "description": "Name of the managed instance Start/Stop schedule.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "StartStopScheduleName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the Start/Stop schedule.", + "schema": { + "$ref": "#/definitions/StartStopManagedInstanceSchedule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 204 ManagementServiceStartStopManagedInstanceScheduleNameInvalid - User attempted to perform CRUD operation of Start/Stop schedule with a schedule name different from 'default'\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleOverlap - Overlap in schedule pairs.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleSmallTimespan - Time between two successive actions is less than 1 hour.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleSubscriptionNotEnabledForFeature - User attempted to use Start/Stop feature without having the subscription allowlisted for the appropriate subscription feature.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleNotSupportedOnSKU - Scheduled Start/Stop operation is not supported on the given SKU.\n\n * 400 StartStopOfManagedInstanceIsDisabled - Start and stop operation on managed instance is not enabled.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleFeatureDisabled - User attempted to use the scheduled Start/Stop Azure SQL Managed Instance feature, which is disabled.\n\n * 400 ManagementServiceStopManagedInstanceHostedOnRdfePlatform - Stop executed on the instance that is not running with Feature Wave November 2022\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestParametersInvalid - The provided set of parameters in the body of the request is either empty or invalid.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestTimeZoneInvalid - The provided time zone parameter is invalid.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestScheduleInvalid - The provided Start/Stop schedule is invalid. The schedule either contains no items in the schedule list or some of the items in the list have invalid values. \n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ManagementServiceStartStopManagedInstanceScheduleNotFound - Schedule does not exist for a given managed instance.\n\n * 404 ManagementServiceStartStopManagedInstanceScheduleNameInvalid - User attempted to perform CRUD operation of Start/Stop schedule with a schedule name different from 'default'\n\n * 409 ManagementServiceStartStopManagedInstanceScheduleConflictingOperation - The attempted create/update/delete operation of Start/Stop schedule on the Azure SQL Managed Instance failed. The schedule was either not created or couldn't be updated/deleted as it was busy with an ongoing scheduled operation. Please retry your request later." + } + }, + "x-ms-examples": { + "Gets the managed instance's Start/Stop schedule.": { + "$ref": "./examples/StartStopManagedInstanceScheduleGet.json" + } + } + }, + "put": { + "tags": [ + "StartStopManagedInstanceSchedules" + ], + "description": "Creates or updates the managed instance's Start/Stop schedule.", + "operationId": "StartStopManagedInstanceSchedules_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "startStopScheduleName", + "in": "path", + "description": "Name of the managed instance Start/Stop schedule.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "StartStopScheduleName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested managed instance Start/Stop schedule.", + "required": true, + "schema": { + "$ref": "#/definitions/StartStopManagedInstanceSchedule" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the Start/Stop schedule.", + "schema": { + "$ref": "#/definitions/StartStopManagedInstanceSchedule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 204 ManagementServiceStartStopManagedInstanceScheduleNameInvalid - User attempted to perform CRUD operation of Start/Stop schedule with a schedule name different from 'default'\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestParametersInvalid - The provided set of parameters in the body of the request is either empty or invalid.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestTimeZoneInvalid - The provided time zone parameter is invalid.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestScheduleInvalid - The provided Start/Stop schedule is invalid. The schedule either contains no items in the schedule list or some of the items in the list have invalid values. \n\n * 400 ManagementServiceStartStopManagedInstanceScheduleOverlap - Overlap in schedule pairs.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleSmallTimespan - Time between two successive actions is less than 1 hour.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleSubscriptionNotEnabledForFeature - User attempted to use Start/Stop feature without having the subscription allowlisted for the appropriate subscription feature.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleNotSupportedOnSKU - Scheduled Start/Stop operation is not supported on the given SKU.\n\n * 400 StartStopOfManagedInstanceIsDisabled - Start and stop operation on managed instance is not enabled.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleFeatureDisabled - User attempted to use the scheduled Start/Stop Azure SQL Managed Instance feature, which is disabled.\n\n * 400 ManagementServiceStopManagedInstanceHostedOnRdfePlatform - Stop executed on the instance that is not running with Feature Wave November 2022\n\n * 404 ManagementServiceStartStopManagedInstanceScheduleNameInvalid - User attempted to perform CRUD operation of Start/Stop schedule with a schedule name different from 'default'\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ManagementServiceStartStopManagedInstanceScheduleNotFound - Schedule does not exist for a given managed instance.\n\n * 409 ManagementServiceStartStopManagedInstanceScheduleConflictingOperation - The attempted create/update/delete operation of Start/Stop schedule on the Azure SQL Managed Instance failed. The schedule was either not created or couldn't be updated/deleted as it was busy with an ongoing scheduled operation. Please retry your request later." + }, + "201": { + "description": "Successfully created the Start/Stop schedule.", + "schema": { + "$ref": "#/definitions/StartStopManagedInstanceSchedule" + } + } + }, + "x-ms-examples": { + "Creates or updates the managed instance's Start/Stop schedule with all optional parameters specified.": { + "$ref": "./examples/StartStopManagedInstanceScheduleCreateOrUpdateMax.json" + }, + "Creates or updates the managed instance's Start/Stop schedule with no optional parameters specified.": { + "$ref": "./examples/StartStopManagedInstanceScheduleCreateOrUpdateMin.json" + } + } + }, + "delete": { + "tags": [ + "StartStopManagedInstanceSchedules" + ], + "description": "Deletes the managed instance's Start/Stop schedule.", + "operationId": "StartStopManagedInstanceSchedules_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "startStopScheduleName", + "in": "path", + "description": "Name of the managed instance Start/Stop schedule.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "StartStopScheduleName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the Start/Stop schedule." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 204 ManagementServiceStartStopManagedInstanceScheduleNotFound - Schedule does not exist for a given managed instance.\n\n * 204 ManagementServiceStartStopManagedInstanceScheduleNameInvalid - User attempted to perform CRUD operation of Start/Stop schedule with a schedule name different from 'default'\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleOverlap - Overlap in schedule pairs.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleSmallTimespan - Time between two successive actions is less than 1 hour.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleSubscriptionNotEnabledForFeature - User attempted to use Start/Stop feature without having the subscription allowlisted for the appropriate subscription feature.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleNotSupportedOnSKU - Scheduled Start/Stop operation is not supported on the given SKU.\n\n * 400 StartStopOfManagedInstanceIsDisabled - Start and stop operation on managed instance is not enabled.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleFeatureDisabled - User attempted to use the scheduled Start/Stop Azure SQL Managed Instance feature, which is disabled.\n\n * 400 ManagementServiceStopManagedInstanceHostedOnRdfePlatform - Stop executed on the instance that is not running with Feature Wave November 2022\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestParametersInvalid - The provided set of parameters in the body of the request is either empty or invalid.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestTimeZoneInvalid - The provided time zone parameter is invalid.\n\n * 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestScheduleInvalid - The provided Start/Stop schedule is invalid. The schedule either contains no items in the schedule list or some of the items in the list have invalid values. \n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ManagementServiceStartStopManagedInstanceScheduleNameInvalid - User attempted to perform CRUD operation of Start/Stop schedule with a schedule name different from 'default'\n\n * 409 ManagementServiceStartStopManagedInstanceScheduleConflictingOperation - The attempted create/update/delete operation of Start/Stop schedule on the Azure SQL Managed Instance failed. The schedule was either not created or couldn't be updated/deleted as it was busy with an ongoing scheduled operation. Please retry your request later." + }, + "204": { + "description": "The specified Start/Stop schedule does not exist." + } + }, + "x-ms-examples": { + "Deletes the managed instance's Start/Stop schedule.": { + "$ref": "./examples/StartStopManagedInstanceScheduleDelete.json" + } + } + } + } + }, + "definitions": { + "ScheduleItem": { + "description": "Schedule info describing when the server should be started or stopped.", + "required": [ + "startDay", + "startTime", + "stopDay", + "stopTime" + ], + "type": "object", + "properties": { + "startDay": { + "description": "Start day.", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": true + } + }, + "startTime": { + "description": "Start time.", + "type": "string" + }, + "stopDay": { + "description": "Stop day.", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "x-ms-enum": { + "name": "DayOfWeek", + "modelAsString": true + } + }, + "stopTime": { + "description": "Stop time.", + "type": "string" + } + } + }, + "StartStopManagedInstanceSchedule": { + "description": "Managed instance's Start/Stop schedule.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "System data of the scheduled resource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/StartStopManagedInstanceScheduleProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "StartStopManagedInstanceScheduleListResult": { + "description": "Managed instance's Start/Stop schedule list result.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/StartStopManagedInstanceSchedule" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "StartStopManagedInstanceScheduleProperties": { + "description": "Properties of managed instance's Start/Stop schedule.", + "required": [ + "scheduleList" + ], + "type": "object", + "properties": { + "description": { + "description": "The description of the schedule.", + "default": "", + "type": "string" + }, + "timeZoneId": { + "description": "The time zone of the schedule.", + "default": "UTC", + "type": "string" + }, + "scheduleList": { + "description": "Schedule list.", + "type": "array", + "items": { + "$ref": "#/definitions/ScheduleItem" + }, + "x-ms-identifiers": [] + }, + "nextRunAction": { + "description": "Next action to be executed (Start or Stop)", + "type": "string", + "readOnly": true + }, + "nextExecutionTime": { + "description": "Timestamp when the next action will be executed in the corresponding schedule time zone.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SubscriptionUsages.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SubscriptionUsages.json new file mode 100644 index 000000000000..18db4780439f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SubscriptionUsages.json @@ -0,0 +1,187 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages": { + "get": { + "tags": [ + "SubscriptionUsages" + ], + "description": "Gets all subscription usage metrics in a given location.", + "operationId": "SubscriptionUsages_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the subscription location usages.", + "schema": { + "$ref": "#/definitions/SubscriptionUsageListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 404 SubscriptionNotFound - The requested subscription was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List subscription usages in the given location.": { + "$ref": "./examples/SubscriptionUsageListByLocation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}": { + "get": { + "tags": [ + "SubscriptionUsages" + ], + "description": "Gets a subscription usage metric.", + "operationId": "SubscriptionUsages_Get", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "name": "usageName", + "in": "path", + "description": "Name of usage metric to return.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved particular subscription location usage.", + "schema": { + "$ref": "#/definitions/SubscriptionUsage" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get specific subscription usage in the given location.": { + "$ref": "./examples/SubscriptionUsageGet.json" + } + } + } + } + }, + "definitions": { + "SubscriptionUsage": { + "description": "Usage Metric of a Subscription in a Location.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SubscriptionUsageProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SubscriptionUsageListResult": { + "description": "A list of subscription usage metrics in a location.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SubscriptionUsage" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SubscriptionUsageProperties": { + "description": "Properties of a subscription usage.", + "type": "object", + "properties": { + "displayName": { + "description": "User-readable name of the metric.", + "type": "string", + "readOnly": true + }, + "currentValue": { + "format": "double", + "description": "Current value of the metric.", + "type": "number", + "readOnly": true + }, + "limit": { + "format": "double", + "description": "Boundary value of the metric.", + "type": "number", + "readOnly": true + }, + "unit": { + "description": "Unit of the metric.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SynapseLinkWorkspaces.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SynapseLinkWorkspaces.json new file mode 100644 index 000000000000..72007e55b2dc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SynapseLinkWorkspaces.json @@ -0,0 +1,159 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/linkWorkspaces": { + "get": { + "tags": [ + "SynapseLinkWorkspaces" + ], + "description": "Gets all synapselink workspaces for a database.", + "operationId": "SynapseLinkWorkspaces_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved synapselink workspaces.", + "schema": { + "$ref": "#/definitions/SynapseLinkWorkspaceListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List all synapselink workspaces for the given database.": { + "$ref": "./examples/SynapseLinkWorkspaceListByDatabase.json" + } + } + } + } + }, + "definitions": { + "SynapseLinkWorkspace": { + "description": "Synapse link workspace resource", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SynapseLinkWorkspaceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SynapseLinkWorkspaceInfoProperties": { + "description": "Properties of a Synapse link workspaces", + "type": "object", + "properties": { + "workspaceId": { + "description": "Synapse link workspace id.", + "type": "string" + }, + "linkConnectionName": { + "description": "Link connection name.", + "type": "string" + } + } + }, + "SynapseLinkWorkspaceListResult": { + "description": "A list of synapselink workspaces", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SynapseLinkWorkspace" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SynapseLinkWorkspaceProperties": { + "description": "Properties of a Synapse link workspaces", + "type": "object", + "properties": { + "workspaces": { + "description": "List of all synapselink workspaces", + "type": "array", + "items": { + "$ref": "#/definitions/SynapseLinkWorkspaceInfoProperties" + }, + "x-ms-identifiers": [] + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SyncAgents.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SyncAgents.json new file mode 100644 index 000000000000..ee3585a06d44 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SyncAgents.json @@ -0,0 +1,532 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents": { + "get": { + "tags": [ + "SyncAgents" + ], + "description": "Lists sync agents in a server.", + "operationId": "SyncAgents_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of sync agents.", + "schema": { + "$ref": "#/definitions/SyncAgentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get sync agents under a server": { + "$ref": "./examples/SyncAgentListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}": { + "get": { + "tags": [ + "SyncAgents" + ], + "description": "Gets a sync agent.", + "operationId": "SyncAgents_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncAgentName", + "in": "path", + "description": "The name of the sync agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified sync agent.", + "schema": { + "$ref": "#/definitions/SyncAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists." + } + }, + "x-ms-examples": { + "Get a sync agent": { + "$ref": "./examples/SyncAgentGet.json" + } + } + }, + "put": { + "tags": [ + "SyncAgents" + ], + "description": "Creates or updates a sync agent.", + "operationId": "SyncAgents_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncAgentName", + "in": "path", + "description": "The name of the sync agent.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested sync agent resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/SyncAgent" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sync agent.", + "schema": { + "$ref": "#/definitions/SyncAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Creating or updating the sync agent is in progress." + }, + "201": { + "description": "Successfully created the sync agent.", + "schema": { + "$ref": "#/definitions/SyncAgent" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a new sync agent": { + "$ref": "./examples/SyncAgentCreate.json" + }, + "Update a sync agent": { + "$ref": "./examples/SyncAgentUpdate.json" + } + } + }, + "delete": { + "tags": [ + "SyncAgents" + ], + "description": "Deletes a sync agent.", + "operationId": "SyncAgents_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncAgentName", + "in": "path", + "description": "The name of the sync agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the sync agent." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Deleting the sync agent is in progress." + }, + "204": { + "description": "The specified sync agent does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a sync agent": { + "$ref": "./examples/SyncAgentDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/generateKey": { + "post": { + "tags": [ + "SyncAgents" + ], + "description": "Generates a sync agent key.", + "operationId": "SyncAgents_GenerateKey", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncAgentName", + "in": "path", + "description": "The name of the sync agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully generate a sync agent key.", + "schema": { + "$ref": "#/definitions/SyncAgentKeyProperties" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists." + } + }, + "x-ms-examples": { + "Generate a sync agent key": { + "$ref": "./examples/SyncAgentGenerateKey.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases": { + "get": { + "tags": [ + "SyncAgents" + ], + "description": "Lists databases linked to a sync agent.", + "operationId": "SyncAgents_ListLinkedDatabases", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server on which the sync agent is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncAgentName", + "in": "path", + "description": "The name of the sync agent.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved sync agent linked SQL server databases.", + "schema": { + "$ref": "#/definitions/SyncAgentLinkedDatabaseListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.\n\n * 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get sync agent linked databases": { + "$ref": "./examples/SyncAgentGetLinkedDatabases.json" + } + } + } + } + }, + "definitions": { + "SyncAgent": { + "description": "An Azure SQL Database sync agent.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SyncAgentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SyncAgentKeyProperties": { + "description": "Properties of an Azure SQL Database sync agent key.", + "type": "object", + "properties": { + "syncAgentKey": { + "description": "Key of sync agent.", + "type": "string", + "readOnly": true + } + } + }, + "SyncAgentLinkedDatabase": { + "description": "An Azure SQL Database sync agent linked database.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SyncAgentLinkedDatabaseProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SyncAgentLinkedDatabaseListResult": { + "description": "A list of sync agent linked databases.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncAgentLinkedDatabase" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncAgentLinkedDatabaseProperties": { + "description": "Properties of an Azure SQL Database sync agent linked database.", + "type": "object", + "properties": { + "databaseType": { + "description": "Type of the sync agent linked database.", + "enum": [ + "AzureSqlDatabase", + "SqlServerDatabase" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SyncMemberDbType", + "modelAsString": true + } + }, + "databaseId": { + "description": "Id of the sync agent linked database.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Description of the sync agent linked database.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name of the sync agent linked database.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "Database name of the sync agent linked database.", + "type": "string", + "readOnly": true + }, + "userName": { + "description": "User name of the sync agent linked database.", + "type": "string", + "readOnly": true + } + } + }, + "SyncAgentListResult": { + "description": "A list of sync agents.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncAgent" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncAgentProperties": { + "description": "Properties of an Azure SQL Database sync agent.", + "type": "object", + "properties": { + "name": { + "description": "Name of the sync agent.", + "type": "string", + "readOnly": true + }, + "syncDatabaseId": { + "description": "ARM resource id of the sync database in the sync agent.", + "type": "string", + "format": "arm-id" + }, + "lastAliveTime": { + "format": "date-time", + "description": "Last alive time of the sync agent.", + "type": "string", + "readOnly": true + }, + "state": { + "description": "State of the sync agent.", + "enum": [ + "Online", + "Offline", + "NeverConnected" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SyncAgentState", + "modelAsString": true + } + }, + "isUpToDate": { + "description": "If the sync agent version is up to date.", + "type": "boolean", + "readOnly": true + }, + "expiryTime": { + "format": "date-time", + "description": "Expiration time of the sync agent version.", + "type": "string", + "readOnly": true + }, + "version": { + "description": "Version of the sync agent.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SyncGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SyncGroups.json new file mode 100644 index 000000000000..c0f7f4292d5d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SyncGroups.json @@ -0,0 +1,1071 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds": { + "get": { + "tags": [ + "SyncGroups" + ], + "description": "Gets a collection of sync database ids.", + "operationId": "SyncGroups_ListSyncDatabaseIds", + "parameters": [ + { + "name": "locationName", + "in": "path", + "description": "The name of the region where the resource is located.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved collection of sync database ids.", + "schema": { + "$ref": "#/definitions/SyncDatabaseIdListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a sync database ID": { + "$ref": "./examples/SyncGroupGetSyncDatabaseId.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups": { + "get": { + "tags": [ + "SyncGroups" + ], + "description": "Lists sync groups under a hub database.", + "operationId": "SyncGroups_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of sync groups.", + "schema": { + "$ref": "#/definitions/SyncGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List sync groups under a given database": { + "$ref": "./examples/SyncGroupListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}": { + "get": { + "tags": [ + "SyncGroups" + ], + "description": "Gets a sync group.", + "operationId": "SyncGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified sync group.", + "schema": { + "$ref": "#/definitions/SyncGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + } + }, + "x-ms-examples": { + "Get a sync group": { + "$ref": "./examples/SyncGroupGet.json" + } + } + }, + "put": { + "tags": [ + "SyncGroups" + ], + "description": "Creates or updates a sync group.", + "operationId": "SyncGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested sync group resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/SyncGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sync group.", + "schema": { + "$ref": "#/definitions/SyncGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Creating or updating the sync group is in progress." + }, + "201": { + "description": "Successfully created the sync group.", + "schema": { + "$ref": "#/definitions/SyncGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a sync group": { + "$ref": "./examples/SyncGroupCreate.json" + }, + "Update a sync group": { + "$ref": "./examples/SyncGroupUpdate.json" + } + } + }, + "delete": { + "tags": [ + "SyncGroups" + ], + "description": "Deletes a sync group.", + "operationId": "SyncGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the sync group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Deleting the sync group is in progress." + }, + "204": { + "description": "The specified sync group does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a sync group": { + "$ref": "./examples/SyncGroupDelete.json" + } + } + }, + "patch": { + "tags": [ + "SyncGroups" + ], + "description": "Updates a sync group.", + "operationId": "SyncGroups_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested sync group resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/SyncGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sync group.", + "schema": { + "$ref": "#/definitions/SyncGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Updating the sync group is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a sync group": { + "$ref": "./examples/SyncGroupPatch.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync": { + "post": { + "tags": [ + "SyncGroups" + ], + "description": "Cancels a sync group synchronization.", + "operationId": "SyncGroups_CancelSync", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully cancel a sync group synchronization." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + } + }, + "x-ms-examples": { + "Cancel a sync group synchronization": { + "$ref": "./examples/SyncGroupCancelSync.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas": { + "get": { + "tags": [ + "SyncGroups" + ], + "description": "Gets a collection of hub database schemas.", + "operationId": "SyncGroups_ListHubSchemas", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get a sync group hub database schema.", + "schema": { + "$ref": "#/definitions/SyncFullSchemaPropertiesListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a hub database schema.": { + "$ref": "./examples/SyncGroupGetHubSchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs": { + "get": { + "tags": [ + "SyncGroups" + ], + "description": "Gets a collection of sync group logs.", + "operationId": "SyncGroups_ListLogs", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "name": "startTime", + "in": "query", + "description": "Get logs generated after this time.", + "required": true, + "type": "string" + }, + { + "name": "endTime", + "in": "query", + "description": "Get logs generated before this time.", + "required": true, + "type": "string" + }, + { + "name": "type", + "in": "query", + "description": "The types of logs to retrieve.", + "required": true, + "type": "string", + "enum": [ + "All", + "Error", + "Warning", + "Success" + ], + "x-ms-enum": { + "name": "SyncGroupsType", + "modelAsString": true + } + }, + { + "name": "continuationToken", + "in": "query", + "description": "The continuation token for this operation.", + "required": false, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved sync group logs.", + "schema": { + "$ref": "#/definitions/SyncGroupLogListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get sync group logs": { + "$ref": "./examples/SyncGroupGetLog.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema": { + "post": { + "tags": [ + "SyncGroups" + ], + "description": "Refreshes a hub database schema.", + "operationId": "SyncGroups_RefreshHubSchema", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully refreshed a sync hub schema." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\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 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists.\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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "The sync hub schema refresh operation is on going." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Refresh a hub database schema.": { + "$ref": "./examples/SyncGroupRefreshHubSchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync": { + "post": { + "tags": [ + "SyncGroups" + ], + "description": "Triggers a sync group synchronization.", + "operationId": "SyncGroups_TriggerSync", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully triggered a sync group synchronization." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Trigger a sync group synchronization.": { + "$ref": "./examples/SyncGroupTriggerSync.json" + } + } + } + } + }, + "definitions": { + "SyncDatabaseIdListResult": { + "description": "A list of sync database ID properties.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncDatabaseIdProperties" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncDatabaseIdProperties": { + "description": "Properties of the sync database id.", + "type": "object", + "properties": { + "id": { + "description": "ARM resource id of sync database.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaProperties": { + "description": "Properties of the database full schema.", + "type": "object", + "properties": { + "tables": { + "description": "List of tables in the database full schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaTable" + }, + "readOnly": true + }, + "lastUpdateTime": { + "format": "date-time", + "description": "Last update time of the database schema.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaPropertiesListResult": { + "description": "A list of sync schema properties.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaProperties" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaTable": { + "description": "Properties of the table in the database full schema.", + "type": "object", + "properties": { + "columns": { + "description": "List of columns in the table of database full schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaTableColumn" + }, + "readOnly": true + }, + "errorId": { + "description": "Error id of the table.", + "type": "string", + "readOnly": true + }, + "hasError": { + "description": "If there is error in the table.", + "type": "boolean", + "readOnly": true + }, + "name": { + "description": "Name of the table.", + "type": "string", + "readOnly": true + }, + "quotedName": { + "description": "Quoted name of the table.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaTableColumn": { + "description": "Properties of the column in the table of database full schema.", + "type": "object", + "properties": { + "dataSize": { + "description": "Data size of the column.", + "type": "string", + "readOnly": true + }, + "dataType": { + "description": "Data type of the column.", + "type": "string", + "readOnly": true + }, + "errorId": { + "description": "Error id of the column.", + "type": "string", + "readOnly": true + }, + "hasError": { + "description": "If there is error in the table.", + "type": "boolean", + "readOnly": true + }, + "isPrimaryKey": { + "description": "If it is the primary key of the table.", + "type": "boolean", + "readOnly": true + }, + "name": { + "description": "Name of the column.", + "type": "string", + "readOnly": true + }, + "quotedName": { + "description": "Quoted name of the column.", + "type": "string", + "readOnly": true + } + } + }, + "SyncGroup": { + "description": "An Azure SQL Database sync group.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "sku": { + "$ref": "../../../common/v1/types.json#/definitions/Sku", + "description": "The name and capacity of the SKU." + }, + "properties": { + "$ref": "#/definitions/SyncGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SyncGroupListResult": { + "description": "A list of sync groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncGroupLogListResult": { + "description": "A list of sync group log properties.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncGroupLogProperties" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncGroupLogProperties": { + "description": "Properties of an Azure SQL Database sync group log.", + "type": "object", + "properties": { + "timestamp": { + "format": "date-time", + "description": "Timestamp of the sync group log.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Type of the sync group log.", + "enum": [ + "All", + "Error", + "Warning", + "Success" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SyncGroupLogType", + "modelAsString": true + } + }, + "source": { + "description": "Source of the sync group log.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Details of the sync group log.", + "type": "string", + "readOnly": true + }, + "tracingId": { + "format": "uuid", + "description": "TracingId of the sync group log.", + "type": "string", + "readOnly": true + }, + "operationStatus": { + "description": "OperationStatus of the sync group log.", + "type": "string", + "readOnly": true + } + } + }, + "SyncGroupProperties": { + "description": "Properties of a sync group.", + "type": "object", + "properties": { + "interval": { + "format": "int32", + "description": "Sync interval of the sync group.", + "type": "integer" + }, + "lastSyncTime": { + "format": "date-time", + "description": "Last sync time of the sync group.", + "type": "string", + "readOnly": true + }, + "conflictResolutionPolicy": { + "description": "Conflict resolution policy of the sync group.", + "enum": [ + "HubWin", + "MemberWin" + ], + "type": "string", + "x-ms-enum": { + "name": "SyncConflictResolutionPolicy", + "modelAsString": true + } + }, + "syncDatabaseId": { + "description": "ARM resource id of the sync database in the sync group.", + "type": "string", + "format": "arm-id" + }, + "hubDatabaseUserName": { + "description": "User name for the sync group hub database credential.", + "type": "string" + }, + "hubDatabasePassword": { + "description": "Password for the sync group hub database credential.", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "syncState": { + "description": "Sync state of the sync group.", + "enum": [ + "NotReady", + "Error", + "Warning", + "Progressing", + "Good" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SyncGroupState", + "modelAsString": true + } + }, + "schema": { + "$ref": "#/definitions/SyncGroupSchema", + "description": "Sync schema of the sync group." + }, + "enableConflictLogging": { + "description": "If conflict logging is enabled.", + "type": "boolean" + }, + "conflictLoggingRetentionInDays": { + "format": "int32", + "description": "Conflict logging retention period.", + "type": "integer" + }, + "usePrivateLinkConnection": { + "description": "If use private link connection is enabled.", + "type": "boolean" + }, + "privateEndpointName": { + "description": "Private endpoint name of the sync group if use private link connection is enabled.", + "type": "string", + "readOnly": true + } + } + }, + "SyncGroupSchema": { + "description": "Properties of sync group schema.", + "type": "object", + "properties": { + "tables": { + "description": "List of tables in sync group schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncGroupSchemaTable" + } + }, + "masterSyncMemberName": { + "description": "Name of master sync member where the schema is from.", + "type": "string" + } + } + }, + "SyncGroupSchemaTable": { + "description": "Properties of table in sync group schema.", + "type": "object", + "properties": { + "columns": { + "description": "List of columns in sync group schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncGroupSchemaTableColumn" + } + }, + "quotedName": { + "description": "Quoted name of sync group schema table.", + "type": "string" + } + } + }, + "SyncGroupSchemaTableColumn": { + "description": "Properties of column in sync group table.", + "type": "object", + "properties": { + "quotedName": { + "description": "Quoted name of sync group table column.", + "type": "string" + }, + "dataSize": { + "description": "Data size of the column.", + "type": "string" + }, + "dataType": { + "description": "Data type of the column.", + "type": "string" + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SyncMembers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SyncMembers.json new file mode 100644 index 000000000000..88a420046cb2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/SyncMembers.json @@ -0,0 +1,756 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers": { + "get": { + "tags": [ + "SyncMembers" + ], + "description": "Lists sync members in the given sync group.", + "operationId": "SyncMembers_ListBySyncGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of sync members.", + "schema": { + "$ref": "#/definitions/SyncMemberListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List sync members under a sync group": { + "$ref": "./examples/SyncMemberListBySyncGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}": { + "get": { + "tags": [ + "SyncMembers" + ], + "description": "Gets a sync member.", + "operationId": "SyncMembers_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified sync member.", + "schema": { + "$ref": "#/definitions/SyncMember" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists." + } + }, + "x-ms-examples": { + "Get a sync member": { + "$ref": "./examples/SyncMemberGet.json" + } + } + }, + "put": { + "tags": [ + "SyncMembers" + ], + "description": "Creates or updates a sync member.", + "operationId": "SyncMembers_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested sync member resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/SyncMember" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sync member.", + "schema": { + "$ref": "#/definitions/SyncMember" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Creating or updating the sync member is in progress." + }, + "201": { + "description": "Successfully created the sync member.", + "schema": { + "$ref": "#/definitions/SyncMember" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a new sync member": { + "$ref": "./examples/SyncMemberCreate.json" + }, + "Update a sync member": { + "$ref": "./examples/SyncMemberUpdate.json" + } + } + }, + "delete": { + "tags": [ + "SyncMembers" + ], + "description": "Deletes a sync member.", + "operationId": "SyncMembers_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the sync member." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Deleting the sync member is in progress." + }, + "204": { + "description": "The specified sync member does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a sync member": { + "$ref": "./examples/SyncMemberDelete.json" + } + } + }, + "patch": { + "tags": [ + "SyncMembers" + ], + "description": "Updates an existing sync member.", + "operationId": "SyncMembers_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested sync member resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/SyncMember" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the sync member.", + "schema": { + "$ref": "#/definitions/SyncMember" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Updating the sync member is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update an existing sync member": { + "$ref": "./examples/SyncMemberPatch.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema": { + "post": { + "tags": [ + "SyncMembers" + ], + "description": "Refreshes a sync member database schema.", + "operationId": "SyncMembers_RefreshMemberSchema", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully refreshed a sync member schema." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\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 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "The sync member schema refresh operation is on going." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Refresh a sync member database schema": { + "$ref": "./examples/SyncMemberRefreshSchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas": { + "get": { + "tags": [ + "SyncMembers" + ], + "description": "Gets a sync member database schema.", + "operationId": "SyncMembers_ListMemberSchemas", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database on which the sync group is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncGroupName", + "in": "path", + "description": "The name of the sync group on which the sync member is hosted.", + "required": true, + "type": "string" + }, + { + "name": "syncMemberName", + "in": "path", + "description": "The name of the sync member.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get a sync member schema.", + "schema": { + "$ref": "#/definitions/SyncFullSchemaPropertiesListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.\n\n * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.\n\n * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 MissingServerName - The Server name is missing\n\n * 400 MissingDatabaseName - The Database name is missing\n\n * 400 MissingSyncGroupName - The Sync Group name is missing\n\n * 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing\n\n * 400 MissingSyncAgentName - The Sync Agent name is missing\n\n * 400 SyncOperation_GenericFailure - Failed to perform data sync operation.\n\n * 400 InvalidSyncGroup - Sync group is invalid.\n\n * 400 InvalidSyncMember - Sync member is invalid.\n\n * 400 InvalidSyncAgent - Sync agent is invalid.\n\n * 400 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.\n\n * 400 SyncOperation_DuplicateSyncMemberDrop - The sync member is already being dropped.\n\n * 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.\n\n * 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.\n\n * 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.\n\n * 400 SyncOperation_InvalidCredential - Credential of database is invalid.\n\n * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.\n\n * 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.\n\n * 409 SyncOperation_DuplicateSyncMemberName - Cannot create sync member because the sync member with the same name already exists." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a sync member schema": { + "$ref": "./examples/SyncMemberGetSchema.json" + } + } + } + } + }, + "definitions": { + "SyncFullSchemaProperties": { + "description": "Properties of the database full schema.", + "type": "object", + "properties": { + "tables": { + "description": "List of tables in the database full schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaTable" + }, + "readOnly": true + }, + "lastUpdateTime": { + "format": "date-time", + "description": "Last update time of the database schema.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaPropertiesListResult": { + "description": "A list of sync schema properties.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaProperties" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaTable": { + "description": "Properties of the table in the database full schema.", + "type": "object", + "properties": { + "columns": { + "description": "List of columns in the table of database full schema.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncFullSchemaTableColumn" + }, + "readOnly": true + }, + "errorId": { + "description": "Error id of the table.", + "type": "string", + "readOnly": true + }, + "hasError": { + "description": "If there is error in the table.", + "type": "boolean", + "readOnly": true + }, + "name": { + "description": "Name of the table.", + "type": "string", + "readOnly": true + }, + "quotedName": { + "description": "Quoted name of the table.", + "type": "string", + "readOnly": true + } + } + }, + "SyncFullSchemaTableColumn": { + "description": "Properties of the column in the table of database full schema.", + "type": "object", + "properties": { + "dataSize": { + "description": "Data size of the column.", + "type": "string", + "readOnly": true + }, + "dataType": { + "description": "Data type of the column.", + "type": "string", + "readOnly": true + }, + "errorId": { + "description": "Error id of the column.", + "type": "string", + "readOnly": true + }, + "hasError": { + "description": "If there is error in the table.", + "type": "boolean", + "readOnly": true + }, + "isPrimaryKey": { + "description": "If it is the primary key of the table.", + "type": "boolean", + "readOnly": true + }, + "name": { + "description": "Name of the column.", + "type": "string", + "readOnly": true + }, + "quotedName": { + "description": "Quoted name of the column.", + "type": "string", + "readOnly": true + } + } + }, + "SyncMember": { + "description": "An Azure SQL Database sync member.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SyncMemberProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SyncMemberListResult": { + "description": "A list of Azure SQL Database sync members.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SyncMember" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SyncMemberProperties": { + "description": "Properties of a sync member.", + "type": "object", + "properties": { + "databaseType": { + "description": "Database type of the sync member.", + "enum": [ + "AzureSqlDatabase", + "SqlServerDatabase" + ], + "type": "string", + "x-ms-enum": { + "name": "SyncMemberDbType", + "modelAsString": true + } + }, + "syncAgentId": { + "description": "ARM resource id of the sync agent in the sync member.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Sql/servers/syncAgents" + } + ] + } + }, + "sqlServerDatabaseId": { + "format": "uuid", + "description": "SQL Server database id of the sync member.", + "type": "string" + }, + "syncMemberAzureDatabaseResourceId": { + "description": "ARM resource id of the sync member logical database, for sync members in Azure.", + "type": "string", + "format": "arm-id" + }, + "usePrivateLinkConnection": { + "description": "Whether to use private link connection.", + "type": "boolean" + }, + "privateEndpointName": { + "description": "Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure.", + "type": "string", + "readOnly": true + }, + "serverName": { + "description": "Server name of the member database in the sync member", + "type": "string" + }, + "databaseName": { + "description": "Database name of the member database in the sync member.", + "type": "string" + }, + "userName": { + "description": "User name of the member database in the sync member.", + "type": "string" + }, + "password": { + "description": "Password of the member database in the sync member.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "syncDirection": { + "description": "Sync direction of the sync member.", + "enum": [ + "Bidirectional", + "OneWayMemberToHub", + "OneWayHubToMember" + ], + "type": "string", + "x-ms-enum": { + "name": "SyncDirection", + "modelAsString": true + } + }, + "syncState": { + "description": "Sync state of the sync member.", + "enum": [ + "SyncInProgress", + "SyncSucceeded", + "SyncFailed", + "DisabledTombstoneCleanup", + "DisabledBackupRestore", + "SyncSucceededWithWarnings", + "SyncCancelling", + "SyncCancelled", + "UnProvisioned", + "Provisioning", + "Provisioned", + "ProvisionFailed", + "DeProvisioning", + "DeProvisioned", + "DeProvisionFailed", + "Reprovisioning", + "ReprovisionFailed", + "UnReprovisioned" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "SyncMemberState", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/TdeCertificates.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/TdeCertificates.json new file mode 100644 index 000000000000..c17f7d530040 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/TdeCertificates.json @@ -0,0 +1,133 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/tdeCertificates": { + "post": { + "tags": [ + "TdeCertificates" + ], + "description": "Creates a TDE certificate for a given server.", + "operationId": "TdeCertificates_Create", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested TDE certificate to be created or updated.", + "required": true, + "schema": { + "$ref": "#/definitions/TdeCertificate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully created the TDE certificate." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 MissingPrivateBlob - The private blob is missing.\n\n * 400 InvalidPrivateBlobOrPassword - Invalid private blob or password specified.\n\n * 400 PrivateBlobWithoutPrivateKey - The provided blob does not contain private key.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Upload a TDE certificate": { + "$ref": "./examples/SqlTdeCertificateCreate.json" + } + } + } + } + }, + "definitions": { + "TdeCertificate": { + "description": "A TDE certificate that can be uploaded into a server.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/TdeCertificateProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "TdeCertificateProperties": { + "description": "Properties of a TDE certificate.", + "required": [ + "privateBlob" + ], + "type": "object", + "properties": { + "privateBlob": { + "description": "The base64 encoded certificate private blob.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "certPassword": { + "description": "The certificate password.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/TimeZones.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/TimeZones.json new file mode 100644 index 000000000000..101d3d9ff2cc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/TimeZones.json @@ -0,0 +1,172 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones": { + "get": { + "tags": [ + "TimeZones" + ], + "description": "Gets a list of managed instance time zones by location.", + "operationId": "TimeZones_ListByLocation", + "parameters": [ + { + "name": "locationName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of time zones.", + "schema": { + "$ref": "#/definitions/TimeZoneListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 GatewayInternalServerError - The server encountered an unexpected exception.\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 managed instance time zones by location": { + "$ref": "./examples/ManagedInstanceTimeZoneListByLocation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones/{timeZoneId}": { + "get": { + "tags": [ + "TimeZones" + ], + "description": "Gets a managed instance time zone.", + "operationId": "TimeZones_Get", + "parameters": [ + { + "name": "locationName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "timeZoneId", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified time zone.", + "schema": { + "$ref": "#/definitions/TimeZone" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 NameAlreadyExists - The provided name already exists.\n\n * 400 InvalidCollation - Invalid collation.\n\n * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes\n\n * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.\n\n * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.\n\n * 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.\n\n * 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.\n\n * 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.\n\n * 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.\n\n * 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.\n\n * 400 VnetInWrongRegion - Virtual network is in wrong region.\n\n * 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.\n\n * 400 VnetAddressRangeError - Virtual network address range is invalid.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.\n\n * 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.\n\n * 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.\n\n * 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.\n\n * 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.\n\n * 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.\n\n * 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.\n\n * 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.\n\n * 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.\n\n * 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.\n\n * 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.\n\n * 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.\n\n * 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 VnetResourceNotFound - Resource not found: '{0}'.\n\n * 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.\n\n * 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.\n\n * 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.\n\n * 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.\n\n * 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.\n\n * 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.\n\n * 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.\n\n * 400 InvalidTimezone - Invalid timezone.\n\n * 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.\n\n * 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.\n\n * 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.\n\n * 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.\n\n * 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.\n\n * 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.\n\n * 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.\n\n * 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.\n\n * 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.\n\n * 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.\n\n * 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned\n\n * 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter\n\n * 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.\n\n * 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.\n\n * 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.\n\n * 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.\n\n * 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call\n\n * 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity\n\n * 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks. \n\n * 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.\n\n * 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.\n\n * 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance. \n\n * 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance. \n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidLoginName - The provided login name is invalid.\n\n * 400 InvalidUsername - Supplied user name contains invalid characters.\n\n * 400 PasswordTooShort - The provided password is too short\n\n * 400 PasswordTooLong - The provided password is too long.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.\n\n * 400 StorageIOpsNotSupported - Storage IOps parameter is not allowed in the instance create/update operation.\n\n * 400 StorageThroughputMBpsNotSupported - Storage throughput MBps parameter is not allowed in the instance create/update operation.\n\n * 400 StorageIOpsNotSupportedForSpecifiedEdition - Storage IOps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 StorageThroughputMBpsNotSupportedForSpecifiedEdition - Storage throughput MBps parameter is not allowed in the instance create/update operation for the specified edition.\n\n * 400 InvalidLocation - An invalid location was specified.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 InstancePoolNotFound - An instance pool cannot be found\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.\n\n * 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.\n\n * 405 InvalidStorageSizeValue - \"Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.\n\n * 405 InvalidStorageIOpsLimitValue - Invalid storage IOps limit: {0} IOps. Storage IOps limit must be specified between {1} IOps and {2} IOps, in increments of {3} IOps.\n\n * 405 InvalidStorageThroughputMBpsLimitValue - Invalid storage throughput limit: {0} MBps. Storage throughput limit must be specified between {1} MBps and {2} MBps, in increments of {3} MBps.\n\n * 409 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.\n\n * 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.\n\n * 409 ServerAlreadyExists - Duplicate server name.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.\n\n * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\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 GatewayInternalServerError - The server encountered an unexpected exception.\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-examples": { + "Get managed instance time zone": { + "$ref": "./examples/ManagedInstanceTimeZoneGet.json" + } + } + } + } + }, + "definitions": { + "TimeZone": { + "description": "Time Zone property.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/TimeZoneProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "TimeZoneListResult": { + "description": "A list of time zones.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/TimeZone" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "TimeZoneProperties": { + "description": "The properties of a time zone.", + "type": "object", + "properties": { + "timeZoneId": { + "description": "The time zone id", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "The time zone display name", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/TransparentDataEncryptions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/TransparentDataEncryptions.json new file mode 100644 index 000000000000..7a4267e2ba12 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/TransparentDataEncryptions.json @@ -0,0 +1,291 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption": { + "get": { + "tags": [ + "TransparentDataEncryptions" + ], + "description": "Gets a list of the logical database's transparent data encryption.", + "operationId": "TransparentDataEncryptions_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the logical database for which the transparent data encryption is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of Logical database transparent data encryption.", + "schema": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryptionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 AttemptedEncryptionOnSystemDatabase - Cannot encrypt a system database. Database encryption operations cannot be performed for 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 401 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a list of the database's transparent data encryption": { + "$ref": "./examples/TransparentDataEncryptionList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}": { + "get": { + "tags": [ + "TransparentDataEncryptions" + ], + "description": "Gets a logical database's transparent data encryption.", + "operationId": "TransparentDataEncryptions_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the logical database for which the transparent data encryption is defined.", + "required": true, + "type": "string" + }, + { + "name": "tdeName", + "in": "path", + "description": "The name of the transparent data encryption configuration.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "TransparentDataEncryptionName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the Logical database transparent data encryption.", + "schema": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryption" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 AttemptedEncryptionOnSystemDatabase - Cannot encrypt a system database. Database encryption operations cannot be performed for 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 401 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\n\n * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later." + } + }, + "x-ms-examples": { + "Get a database's transparent data encryption": { + "$ref": "./examples/TransparentDataEncryptionGet.json" + } + } + }, + "put": { + "tags": [ + "TransparentDataEncryptions" + ], + "description": "Updates a logical database's transparent data encryption configuration.", + "operationId": "TransparentDataEncryptions_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the logical database for which the security alert policy is defined.", + "required": true, + "type": "string" + }, + { + "name": "tdeName", + "in": "path", + "description": "The name of the transparent data encryption configuration.", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "TransparentDataEncryptionName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The database transparent data encryption.", + "required": true, + "schema": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryption" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database Transparent Data Encryption state.", + "schema": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryption" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.\n\n * 400 AkvHostNotResolvingFromNode - AKV host '{0}' is not resolvable from SQL, on server '{1}'.\n\n * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.\n\n * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 or 3072 and Key Type is RSA or RSA-HSM.\n\n * 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided\n\n * 400 SameKeyUriNotFoundOnRemoteServer - Secondary server does not have the key material from the same key vault as the primary server's encryption protector with key auto-rotation enabled.\n\n * 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.\n\n * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).\n\n * 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.\n\n * 400 BlockSystemAssignedIdentityForCrossTenantCMK - Cross tenant CMK can only be configured when the server is configured with a User Assigned Managed Identity. Refer to https://aka.ms/sqltdebyokumi to configure User Assigned Managed Identity.\n\n * 400 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.\n\n * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.\n\n * 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.\n\n * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.\n\n * 400 CMKOperationNotAllowed - User tried to perform an operation on the server when the server did not have Azure Key Vault Access.\n\n * 400 AkvEndpointNotReachableFromNode - AKV endpoint '{0}' is not reachable from SQL, on server '{1}'.\n\n * 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. \n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\n\n * 400 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 400 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.\n\n * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.\n\n * 400 AttemptedEncryptionOnSystemDatabase - Cannot encrypt a system database. Database encryption operations cannot be performed for 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.\n\n * 400 ReadOnly - Cannot enable or modify database encryption on a database that is read-only, has read-only files or is not recovered.\n\n * 400 CanNotDropAlterOnMirror - Please modify Transparent Data Encryption on the primary databases.\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidTransparentDataEncryptionUpdateRequest - Please enter a valid state. Please use \"Enabled\" or \"Disabled\".\n\n * 400 InvalidTransparentDataEncryptionName - The transparent data encryption key name is not supported.\n\n * 401 CanNotChangeReadOnlyDuringTdeScan - Cannot modify filegroup read-only/read-write state while an encryption transition is in progress.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.\n\n * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.\n\n * 409 ServerKeyDoesNotExists - The server key does not exist.\n\n * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.\n\n * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.\n\n * 409 EncryptionInProgress - Cannot modify encryption while an encryption scan in progress.\n\n * 409 KeyChangeInProgress - Cannot change database encryption key while an encryption, decryption, or key change scan is in progress.\n\n * 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on database. Try again later.\n\n * 409 NeedsLogBackup - Please wait several minutes for a log backup to occur. \n\n * 409 AltStateConflict - The operation cannot be performed on database because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed\n\n * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .\n\n * 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY failed because a lock could not be placed on the database. Try again later.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Creating or updating the database transparent data encryption configuration is in progress." + }, + "201": { + "description": "Successfully created the database transparent data encryption state.", + "schema": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryption" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update a database's Transparent Data Encryption state with minimal parameters": { + "$ref": "./examples/TransparentDataEncryptionUpdate.json" + } + } + } + } + }, + "definitions": { + "LogicalDatabaseTransparentDataEncryption": { + "description": "A logical database transparent data encryption state.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/TransparentDataEncryptionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "LogicalDatabaseTransparentDataEncryptionListResult": { + "description": "A list of transparent data encryptions", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/LogicalDatabaseTransparentDataEncryption" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "TransparentDataEncryptionProperties": { + "description": "Properties of a transparent data encryption.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the transparent data encryption.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "TransparentDataEncryptionState", + "modelAsString": false + } + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Usages.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Usages.json new file mode 100644 index 000000000000..0f1f7acde52e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/Usages.json @@ -0,0 +1,167 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages": { + "get": { + "tags": [ + "Usages" + ], + "description": "Gets all instance pool usage metrics", + "operationId": "Usages_ListByInstancePool", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "instancePoolName", + "in": "path", + "description": "The name of the instance pool to be retrieved.", + "required": true, + "type": "string" + }, + { + "name": "expandChildren", + "in": "query", + "description": "Optional request parameter to include managed instance usages within the instance pool.", + "required": false, + "type": "boolean" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the instance pool usages.", + "schema": { + "$ref": "#/definitions/UsageListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InstancePoolWrongUsageName - Request for an instance pool's usage has an unsupported usage name\n\n * 400 InstancePoolManagedInstanceInfoUnavailable - Information for managed instances inside this instance pool is not available\n\n * 404 InstancePoolNotFound - An instance pool cannot be found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List instance pool usages.": { + "$ref": "./examples/ListInstancePoolUsage.json" + }, + "List instance pool usages expanded with children.": { + "$ref": "./examples/ListInstancePoolUsageExpanded.json" + } + } + } + } + }, + "definitions": { + "Name": { + "description": "ARM Usage Name", + "type": "object", + "properties": { + "value": { + "description": "Usage name value", + "type": "string" + }, + "localizedValue": { + "description": "Usage name localized value.", + "type": "string" + } + } + }, + "Usage": { + "description": "ARM usage.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "$ref": "#/definitions/Name", + "description": "Resource name.", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + }, + "unit": { + "description": "Usage unit.", + "type": "string", + "readOnly": true + }, + "currentValue": { + "format": "int32", + "description": "Usage current value.", + "type": "integer", + "readOnly": true + }, + "limit": { + "format": "int32", + "description": "Usage limit.", + "type": "integer", + "readOnly": true + }, + "requestedLimit": { + "format": "int32", + "description": "Usage requested limit.", + "type": "integer", + "readOnly": true + } + } + }, + "UsageListResult": { + "description": "A list of usages.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Usage" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {}, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/VirtualClusters.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/VirtualClusters.json new file mode 100644 index 000000000000..5dd9f539a198 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/VirtualClusters.json @@ -0,0 +1,406 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters": { + "get": { + "tags": [ + "VirtualClusters" + ], + "description": "Gets a list of all virtualClusters in the subscription.", + "operationId": "VirtualClusters_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of virtual clusters.", + "schema": { + "$ref": "#/definitions/VirtualClusterListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionNotFound - The requested subscription was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List virtualClusters": { + "$ref": "./examples/VirtualClusterList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters": { + "get": { + "tags": [ + "VirtualClusters" + ], + "description": "Gets a list of virtual clusters in a resource group.", + "operationId": "VirtualClusters_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of virtual clusters.", + "schema": { + "$ref": "#/definitions/VirtualClusterListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotEnabledForFeature - User subscription not enabled for feature user attempted to use.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 VirtualClusterDoesNotExist - The virtual cluster does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - Specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 VirtualClusterRemovalAlreadyInProgress - Removal of virtual cluster is already in progress. Virtual cluster is automatically created with first instance creation, and automatically removed with last instance deletion. Learn more here: https://aka.ms/sqlmi-virtual-cluster-removal.\n\n * 409 VirtualClusterIsNotEmpty - Virtual cluster is not empty and cannot be deleted.\n\n * 409 VirtualClusterIsBusy - Virtual cluster is currently busy. Please retry operation later.\n\n * 409 VirtualClusterRemovalFailed - Request to drop virtual cluster failed. Check if there are active dependent resources.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List virtual clusters by resource group": { + "$ref": "./examples/VirtualClusterListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}": { + "get": { + "tags": [ + "VirtualClusters" + ], + "description": "Gets a virtual cluster.", + "operationId": "VirtualClusters_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/VirtualClusterNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified virtual cluster.", + "schema": { + "$ref": "#/definitions/VirtualCluster" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotEnabledForFeature - User subscription not enabled for feature user attempted to use.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 VirtualClusterDoesNotExist - The virtual cluster does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - Specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 VirtualClusterRemovalAlreadyInProgress - Removal of virtual cluster is already in progress. Virtual cluster is automatically created with first instance creation, and automatically removed with last instance deletion. Learn more here: https://aka.ms/sqlmi-virtual-cluster-removal.\n\n * 409 VirtualClusterIsNotEmpty - Virtual cluster is not empty and cannot be deleted.\n\n * 409 VirtualClusterIsBusy - Virtual cluster is currently busy. Please retry operation later.\n\n * 409 VirtualClusterRemovalFailed - Request to drop virtual cluster failed. Check if there are active dependent resources.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + } + }, + "x-ms-examples": { + "Gets a virtual cluster": { + "$ref": "./examples/VirtualClusterGet.json" + } + } + }, + "delete": { + "tags": [ + "VirtualClusters" + ], + "description": "Deletes a virtual cluster.", + "operationId": "VirtualClusters_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/VirtualClusterNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the virtual cluster." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotEnabledForFeature - User subscription not enabled for feature user attempted to use.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 VirtualClusterDoesNotExist - The virtual cluster does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - Specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 VirtualClusterRemovalAlreadyInProgress - Removal of virtual cluster is already in progress. Virtual cluster is automatically created with first instance creation, and automatically removed with last instance deletion. Learn more here: https://aka.ms/sqlmi-virtual-cluster-removal.\n\n * 409 VirtualClusterIsNotEmpty - Virtual cluster is not empty and cannot be deleted.\n\n * 409 VirtualClusterIsBusy - Virtual cluster is currently busy. Please retry operation later.\n\n * 409 VirtualClusterRemovalFailed - Request to drop virtual cluster failed. Check if there are active dependent resources.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Deleting the virtual cluster is in progress." + }, + "204": { + "description": "The specified virtual cluster does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete virtual cluster": { + "$ref": "./examples/VirtualClusterDelete.json" + } + } + }, + "patch": { + "tags": [ + "VirtualClusters" + ], + "description": "Updates an existing virtual cluster.", + "operationId": "VirtualClusters_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/VirtualClusterNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested virtual cluster resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualClusterUpdate" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated virtual cluster.", + "schema": { + "$ref": "#/definitions/VirtualCluster" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SubscriptionNotEnabledForFeature - User subscription not enabled for feature user attempted to use.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 VirtualClusterDoesNotExist - The virtual cluster does not exist.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 VirtualClusterNotInSubscriptionResourceGroup - Specified virtual cluster does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 SubscriptionDoesNotHaveVirtualCluster - The requested virtual cluster was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 VirtualClusterRemovalAlreadyInProgress - Removal of virtual cluster is already in progress. Virtual cluster is automatically created with first instance creation, and automatically removed with last instance deletion. Learn more here: https://aka.ms/sqlmi-virtual-cluster-removal.\n\n * 409 VirtualClusterIsNotEmpty - Virtual cluster is not empty and cannot be deleted.\n\n * 409 VirtualClusterIsBusy - Virtual cluster is currently busy. Please retry operation later.\n\n * 409 VirtualClusterRemovalFailed - Request to drop virtual cluster failed. Check if there are active dependent resources.\n\n * 409 ConflictingVirtualClusterOperation - An operation is currently in progress for the virtual cluster.\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 * 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 * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 TooManyRequests - 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." + }, + "202": { + "description": "Updating the virtual cluster is in progress." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update virtual cluster with tags": { + "$ref": "./examples/VirtualClusterUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}/updateManagedInstanceDnsServers": { + "post": { + "tags": [ + "VirtualClusters" + ], + "description": "Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster.", + "operationId": "VirtualClusters_UpdateDnsServers", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/VirtualClusterNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully performed synchronize of DNS servers inside virtual cluster.", + "schema": { + "$ref": "#/definitions/UpdateVirtualClusterDnsServersOperation" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.\n\n * 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.\n\n * 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Successfully started synchronize of DNS servers inside virtual cluster." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Performs update of dns servers on managed instance.": { + "$ref": "./examples/UpdateVirtualClusterDnsServers.json" + } + } + } + } + }, + "definitions": { + "UpdateVirtualClusterDnsServersOperation": { + "description": "A refresh DNS servers operation.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/VirtualClusterDnsServersProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VirtualCluster": { + "description": "An Azure SQL virtual cluster.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/VirtualClusterProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VirtualClusterDnsServersProperties": { + "description": "The properties of dns servers on virtual cluster.", + "type": "object", + "properties": { + "status": { + "description": "The status of the DNS refresh operation.", + "enum": [ + "Succeeded", + "Failed", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "DNSRefreshOperationStatus", + "modelAsString": true + } + } + } + }, + "VirtualClusterListResult": { + "description": "A list of virtual clusters.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/VirtualCluster" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "VirtualClusterProperties": { + "description": "The properties of a virtual cluster.", + "type": "object", + "properties": { + "subnetId": { + "description": "Subnet resource ID for the virtual cluster.", + "type": "string", + "readOnly": true + }, + "version": { + "description": "Virtual cluster version.", + "type": "string" + }, + "childResources": { + "description": "List of resources in this virtual cluster.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + }, + "VirtualClusterUpdate": { + "description": "An update request for virtual cluster.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/VirtualClusterProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "parameters": { + "VirtualClusterNameParameter": { + "name": "virtualClusterName", + "in": "path", + "description": "The name of the virtual cluster.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/VirtualNetworkRules.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/VirtualNetworkRules.json new file mode 100644 index 000000000000..a0a924d6367d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/VirtualNetworkRules.json @@ -0,0 +1,319 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules": { + "get": { + "tags": [ + "VirtualNetworkRules" + ], + "description": "Gets a list of virtual network rules in a server.", + "operationId": "VirtualNetworkRules_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of virtual network rules.", + "schema": { + "$ref": "#/definitions/VirtualNetworkRuleListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List virtual network rules": { + "$ref": "./examples/VirtualNetworkRulesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}": { + "get": { + "tags": [ + "VirtualNetworkRules" + ], + "description": "Gets a virtual network rule.", + "operationId": "VirtualNetworkRules_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "virtualNetworkRuleName", + "in": "path", + "description": "The name of the virtual network rule.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified virtual network rule.", + "schema": { + "$ref": "#/definitions/VirtualNetworkRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Gets a virtual network rule": { + "$ref": "./examples/VirtualNetworkRulesGet.json" + } + } + }, + "put": { + "tags": [ + "VirtualNetworkRules" + ], + "description": "Creates or updates an existing virtual network rule.", + "operationId": "VirtualNetworkRules_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "virtualNetworkRuleName", + "in": "path", + "description": "The name of the virtual network rule.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested virtual Network Rule Resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualNetworkRule" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated a virtual network rule.", + "schema": { + "$ref": "#/definitions/VirtualNetworkRule" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 NullVirtualNetworkRequest - Virtual Network Request is Null\n\n * 400 NullVirtualNetworkRequestParameters - Virtual Network Request Parameters are Null\n\n * 400 FirewallChangesDeniedBecausePublicEndpointDisabled - Unable to create or modify firewall rules when public network access for the server is disabled. (https://docs.microsoft.com/en-us/azure/azure-sql/database/connectivity-settings#deny-public-network-access)\n\n * 400 VirtualNetworkRuleBadRequest - Azure SQL Server Virtual Network Rule encountered an user error\n\n * 400 VirtualNetworkRuleWithFailoverGroupsNotSupported - Virtual network firewall rules are not currently supported on servers with failover groups configured with automatic failover policy. Please configure the failover groups on the server with manual failover policy.\n\n * 400 NullVirtualNetworkSubnetId - The Virtual Network Subnet Id is null\n\n * 403 VirtualNetworkRuleAccessDenied - Azure SQL Server Virtual Network Rule encountered permissions error\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 VirtualNetworkRuleNotEnabled - Azure SQL Server Virtual Network Rule feature is not enabled\n\n * 404 VirtualNetworkRuleResourceNotFound - Azure SQL Server Virtual Network Rule encountered a resource not found error\n\n * 404 VirtualNetworkRuleSubscriptionNotFound - Azure SQL Server Virtual Network Subscription id not found or is in disabled state \n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 VirtualNetworkRuleTimedOut - Azure SQL Server Virtual Network Rule encountered a timeout" + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created a virtual network rule.", + "schema": { + "$ref": "#/definitions/VirtualNetworkRule" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or update a virtual network rule": { + "$ref": "./examples/VirtualNetworkRulesCreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "VirtualNetworkRules" + ], + "description": "Deletes the virtual network rule with the given name.", + "operationId": "VirtualNetworkRules_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "virtualNetworkRuleName", + "in": "path", + "description": "The name of the virtual network rule.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the virtual network rule." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 NullVirtualNetworkRequest - Virtual Network Request is Null\n\n * 400 NullVirtualNetworkRequestParameters - Virtual Network Request Parameters are Null\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified virtual network rule does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a virtual network rule": { + "$ref": "./examples/VirtualNetworkRulesDelete.json" + } + } + } + } + }, + "definitions": { + "VirtualNetworkRule": { + "description": "A virtual network rule.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/VirtualNetworkRuleProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VirtualNetworkRuleListResult": { + "description": "A list of virtual network rules.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/VirtualNetworkRule" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "VirtualNetworkRuleProperties": { + "description": "Properties of a virtual network rule.", + "required": [ + "virtualNetworkSubnetId" + ], + "type": "object", + "properties": { + "virtualNetworkSubnetId": { + "description": "The ARM resource id of the virtual network subnet.", + "type": "string", + "format": "arm-id", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ] + } + }, + "ignoreMissingVnetServiceEndpoint": { + "description": "Create firewall rule before the virtual network has vnet service endpoint enabled.", + "type": "boolean" + }, + "state": { + "description": "Virtual Network Rule State", + "enum": [ + "Initializing", + "InProgress", + "Ready", + "Failed", + "Deleting", + "Unknown" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VirtualNetworkRuleState", + "modelAsString": true + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/WorkloadClassifiers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/WorkloadClassifiers.json new file mode 100644 index 000000000000..ea6322debf0a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/WorkloadClassifiers.json @@ -0,0 +1,361 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers": { + "get": { + "tags": [ + "WorkloadClassifiers" + ], + "description": "Gets the list of workload classifiers for a workload group", + "operationId": "WorkloadClassifiers_ListByWorkloadGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group from which to receive the classifiers from.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of workload groups.", + "schema": { + "$ref": "#/definitions/WorkloadClassifierListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the list of workload classifiers for a workload group": { + "$ref": "./examples/GetWorkloadClassifierList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}": { + "get": { + "tags": [ + "WorkloadClassifiers" + ], + "description": "Gets a workload classifier", + "operationId": "WorkloadClassifiers_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group from which to receive the classifier from.", + "required": true, + "type": "string" + }, + { + "name": "workloadClassifierName", + "in": "path", + "description": "The name of the workload classifier.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specifies workload classifier.", + "schema": { + "$ref": "#/definitions/WorkloadClassifier" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Gets a workload classifier for a data warehouse": { + "$ref": "./examples/GetWorkloadClassifier.json" + } + } + }, + "put": { + "tags": [ + "WorkloadClassifiers" + ], + "description": "Creates or updates a workload classifier.", + "operationId": "WorkloadClassifiers_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group from which to receive the classifier from.", + "required": true, + "type": "string" + }, + { + "name": "workloadClassifierName", + "in": "path", + "description": "The name of the workload classifier to create/update.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The properties of the workload classifier.", + "required": true, + "schema": { + "$ref": "#/definitions/WorkloadClassifier" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the workload classifier.", + "schema": { + "$ref": "#/definitions/WorkloadClassifier" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidMemberNameParameter - Invalid member name parameter for this workload classifier.\n\n * 400 InvalidStartTimeAndEndTimeParameters - Invalid start time and end time parameters for the workload classifier.\n\n * 400 InvalidImportanceParameter - Importance must be one of the following strings: Low, Below_Normal, Normal, Above_Normal, High.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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": "Create or update for the workload classifier is in progress." + }, + "201": { + "description": "Successfully created the workload classifier.", + "schema": { + "$ref": "#/definitions/WorkloadClassifier" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a workload group with the required properties specified.": { + "$ref": "./examples/CreateOrUpdateWorkloadClassifierMin.json" + }, + "Create a workload group with all properties specified.": { + "$ref": "./examples/CreateOrUpdateWorkloadClassifierMax.json" + } + } + }, + "delete": { + "tags": [ + "WorkloadClassifiers" + ], + "description": "Deletes a workload classifier.", + "operationId": "WorkloadClassifiers_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group from which to receive the classifier from.", + "required": true, + "type": "string" + }, + { + "name": "workloadClassifierName", + "in": "path", + "description": "The name of the workload classifier to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the workload classifier." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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": "Deleting the workload classifier is in progress." + }, + "204": { + "description": "The specified workload classifier does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a workload classifier": { + "$ref": "./examples/DeleteWorkloadClassifier.json" + } + } + } + } + }, + "definitions": { + "WorkloadClassifier": { + "description": "Workload classifier operations for a data warehouse", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/WorkloadClassifierProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "WorkloadClassifierListResult": { + "description": "A list of workload classifiers for a workload group.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/WorkloadClassifier" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "WorkloadClassifierProperties": { + "description": "Workload classifier definition. For more information look at sys.workload_management_workload_classifiers (DMV).", + "required": [ + "memberName" + ], + "type": "object", + "properties": { + "memberName": { + "description": "The workload classifier member name.", + "type": "string" + }, + "label": { + "description": "The workload classifier label.", + "type": "string" + }, + "context": { + "description": "The workload classifier context.", + "type": "string" + }, + "startTime": { + "description": "The workload classifier start time for classification.", + "type": "string" + }, + "endTime": { + "description": "The workload classifier end time for classification.", + "type": "string" + }, + "importance": { + "description": "The workload classifier importance.", + "type": "string" + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/WorkloadGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/WorkloadGroups.json new file mode 100644 index 000000000000..224f9c511fdf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/WorkloadGroups.json @@ -0,0 +1,340 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-05-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups": { + "get": { + "tags": [ + "WorkloadGroups" + ], + "description": "Gets the list of workload groups", + "operationId": "WorkloadGroups_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of workload groups.", + "schema": { + "$ref": "#/definitions/WorkloadGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the list of workload groups for a data warehouse": { + "$ref": "./examples/GetWorkloadGroupList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}": { + "get": { + "tags": [ + "WorkloadGroups" + ], + "description": "Gets a workload group", + "operationId": "WorkloadGroups_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specifies workload group.", + "schema": { + "$ref": "#/definitions/WorkloadGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." + } + }, + "x-ms-examples": { + "Gets a workload group for a data warehouse": { + "$ref": "./examples/GetWorkloadGroup.json" + } + } + }, + "put": { + "tags": [ + "WorkloadGroups" + ], + "description": "Creates or updates a workload group.", + "operationId": "WorkloadGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested workload group state.", + "required": true, + "schema": { + "$ref": "#/definitions/WorkloadGroup" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the workload group.", + "schema": { + "$ref": "#/definitions/WorkloadGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidWorkloadGroupNameParameter - Invalid workload group name\n\n * 400 InvalidMinResourcePercentParameter - Invalid min resource percent for this workload group.\n\n * 400 InvalidMinResourcePercentPerRequestParameter - Invalid min resource percent per query for this workload group.\n\n * 400 InvalidMaxResourcePercentParameter - Invalid max resource percent to allocate for this workload group.\n\n * 400 InvalidMaxResourcePercentPerRequestParameter - Invalid max resource percent per query for this workload group.\n\n * 400 InvalidImportanceParameter - Importance must be one of the following strings: Low, Below_Normal, Normal, Above_Normal, High.\n\n * 400 InvalidQueryExecutionTimeoutParameter - Invalid query execution timeout value for this workload group.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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": "Create or update for the workload group accepted." + }, + "201": { + "description": "Successfully created the workload group.", + "schema": { + "$ref": "#/definitions/WorkloadGroup" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create a workload group with the required properties specified.": { + "$ref": "./examples/CreateOrUpdateWorkloadGroupMin.json" + }, + "Create a workload group with all properties specified.": { + "$ref": "./examples/CreateOrUpdateWorkloadGroupMax.json" + } + } + }, + "delete": { + "tags": [ + "WorkloadGroups" + ], + "description": "Deletes a workload group.", + "operationId": "WorkloadGroups_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "workloadGroupName", + "in": "path", + "description": "The name of the workload group to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the workload group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\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 * 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 * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\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": "Deleting the workload group is in progress." + }, + "204": { + "description": "The specified workload group does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a workload group": { + "$ref": "./examples/DeleteWorkloadGroup.json" + } + } + } + } + }, + "definitions": { + "WorkloadGroup": { + "description": "Workload group operations for a data warehouse", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/WorkloadGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "WorkloadGroupListResult": { + "description": "A list of workload groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/WorkloadGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "WorkloadGroupProperties": { + "description": "Workload group definition. For more information look at sys.workload_management_workload_groups (DMV).", + "required": [ + "minResourcePercent", + "maxResourcePercent", + "minResourcePercentPerRequest" + ], + "type": "object", + "properties": { + "minResourcePercent": { + "format": "int32", + "description": "The workload group minimum percentage resource.", + "type": "integer" + }, + "maxResourcePercent": { + "format": "int32", + "description": "The workload group cap percentage resource.", + "type": "integer" + }, + "minResourcePercentPerRequest": { + "format": "double", + "description": "The workload group request minimum grant percentage.", + "type": "number" + }, + "maxResourcePercentPerRequest": { + "format": "double", + "description": "The workload group request maximum grant percentage.", + "type": "number" + }, + "importance": { + "description": "The workload group importance level.", + "type": "string" + }, + "queryExecutionTimeout": { + "format": "int32", + "description": "The workload group query execution timeout.", + "type": "integer" + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorCreateOrUpdate.json new file mode 100644 index 000000000000..8e5638e0c9b0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorCreateOrUpdate.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2023-05-01-preview", + "name": "ActiveDirectory", + "parameters": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "activeDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorDelete.json new file mode 100644 index 000000000000..6668be0d430b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/serverAdministratorOperationResults/00000000-1111-2222-3333-444444444444?api-version=2019-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorGet.json new file mode 100644 index 000000000000..7cf84359c6e7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorList.json new file mode 100644 index 000000000000..faf17ff9f1ff --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AdministratorList.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "administratorName": "ActiveDirectory", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.Sql/servers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "azureADOnlyAuthentication": true + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json new file mode 100644 index 000000000000..6a193fce0dc2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2023-05-01-preview", + "name": "Default", + "parameters": { + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthDelete.json new file mode 100644 index 000000000000..dcfe7fff70d6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/serverAdministratorOperationResults/00000000-1111-2222-3333-444444444444?api-version=2020-02-02-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthGet.json new file mode 100644 index 000000000000..ab1fb8823e75 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": true + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthList.json new file mode 100644 index 000000000000..d622f39487a8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/AzureADOnlyAuthList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "authenticationName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/servers/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": true + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelDatabaseOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelDatabaseOperation.json new file mode 100644 index 000000000000..2a85bb47c68c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelDatabaseOperation.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-6661", + "databaseName": "testdb", + "operationId": "f779414b-e748-4925-8cfe-c8598f7660ae", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelElasticPoolOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelElasticPoolOperation.json new file mode 100644 index 000000000000..f5af487cd513 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelElasticPoolOperation.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-6661", + "elasticPoolName": "testpool", + "operationId": "f779414b-e748-4925-8cfe-c8598f7660ae", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelJobExecution.json new file mode 100644 index 000000000000..d6c232489bcd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelJobExecution.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelManagedInstanceOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelManagedInstanceOperation.json new file mode 100644 index 000000000000..9219c9325780 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CancelManagedInstanceOperation.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "operationId": "11111111-1111-1111-1111-111111111111", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ChangeLongTermRetentionBackupAccessTier.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ChangeLongTermRetentionBackupAccessTier.json new file mode 100644 index 000000000000..19d7f617fb85 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ChangeLongTermRetentionBackupAccessTier.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "serverName", + "longTermRetentionDatabaseName": "databaseName", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "api-version": "2023-05-01-preview", + "parameters": { + "backupStorageAccessTier": "Hot", + "operationMode": "Copy" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/serverName/longTermRetentionDatabases/databaseName/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "serverName", + "serverCreateTime": "2017-09-06T08:00:00Z", + "databaseName": "databaseName", + "databaseDeletionTime": "2022-10-06T08:00:00Z", + "backupTime": "2022-09-06T08:00:00Z", + "backupExpirationTime": null, + "backupStorageRedundancy": "Geo" + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/serverName/longTermRetentionDatabases/databaseName/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive/operations/55555555-6666-7777-8888-999999999999?api-version=2023-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json new file mode 100644 index 000000000000..983b51a29ea7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2023-05-01-preview", + "parameters": { + "name": "server1", + "type": "Microsoft.Sql/servers" + } + }, + "responses": { + "200": { + "body": { + "name": "server1", + "available": false, + "reason": "AlreadyExists", + "message": "Specified server name is already used" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerAvailable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerAvailable.json new file mode 100644 index 000000000000..2e3742cbf80e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerAvailable.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2023-05-01-preview", + "parameters": { + "name": "server1", + "type": "Microsoft.Sql/servers" + } + }, + "responses": { + "200": { + "body": { + "name": "server1", + "available": true + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerInvalid.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerInvalid.json new file mode 100644 index 000000000000..5fb0a5d042db --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerInvalid.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2023-05-01-preview", + "parameters": { + "name": "SERVER1", + "type": "Microsoft.Sql/servers" + } + }, + "responses": { + "200": { + "body": { + "name": "SERVER1", + "available": false, + "reason": "Invalid", + "message": "Specified server name contains unsupported characters or is too long. Server name must be no longer than 63 characters long, contain only lower-case characters or digits, cannot contain '.' or '_' characters and can't start or end with '-' character." + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnSensitivityLabelCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnSensitivityLabelCreateMax.json new file mode 100644 index 000000000000..077e68511a8d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnSensitivityLabelCreateMax.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "Low", + "clientClassificationSource": "Native" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "Medium" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnSensitivityLabelDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnSensitivityLabelDelete.json new file mode 100644 index 000000000000..5713d50181d3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnSensitivityLabelDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnSensitivityLabelGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnSensitivityLabelGet.json new file mode 100644 index 000000000000..b3f860b790ef --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnSensitivityLabelGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnsListByDatabaseMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnsListByDatabaseMax.json new file mode 100644 index 000000000000..b7c78eaeb6a3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnsListByDatabaseMax.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview", + "schema": [ + "dbo" + ], + "table": [ + "customer", + "address" + ], + "column": [ + "username" + ], + "orderBy": [ + "schema asc", + "table", + "column desc" + ], + "$skip": "5", + "$top": "50" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "columnType": "nvarchar", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/customer/columns/username", + "name": "username", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnsListByDatabaseMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnsListByDatabaseMin.json new file mode 100644 index 000000000000..9215b2f9a194 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ColumnsListByDatabaseMin.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "columnType": "int", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1", + "name": "col1", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns" + }, + { + "properties": { + "columnType": "bit", + "temporalType": "SystemVersionedTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2", + "name": "col2", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json new file mode 100644 index 000000000000..2a74f2771476 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "requestedBackupStorageRedundancy": "Zone" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Zone", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Zone", + "requestedServiceObjectiveName": "S0", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Zone", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Zone", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "isLedgerOn": false, + "isInfraEncryptionEnabled": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseCopyMode.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseCopyMode.json new file mode 100644 index 000000000000..38e9fe0eef17 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseCopyMode.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "dbcopy", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "S0", + "tier": "Standard" + }, + "properties": { + "createMode": "Copy", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy", + "name": "dbcopy", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy", + "name": "dbcopy", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseDefaultEnclave.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseDefaultEnclave.json new file mode 100644 index 000000000000..a3821680c030 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseDefaultEnclave.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "preferredEnclaveType": "Default" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S0", + "currentBackupStorageRedundancy": "Geo", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "preferredEnclaveType": "Default" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Zone", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Zone", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "preferredEnclaveType": "Default" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseDefaultMode.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseDefaultMode.json new file mode 100644 index 000000000000..973b144da3db --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseDefaultMode.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "S0", + "tier": "Standard" + }, + "properties": { + "createMode": "Default", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824 + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseDefaultModeWithKeysAndEncryptionProtector.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseDefaultModeWithKeysAndEncryptionProtector.json new file mode 100644 index 000000000000..ff2c59e373ba --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseDefaultModeWithKeysAndEncryptionProtector.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "identity": { + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi": {} + }, + "type": "UserAssigned" + }, + "location": "southeastasia", + "sku": { + "name": "S0", + "tier": "Standard" + }, + "properties": { + "createMode": "Default", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "keys": { + "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": {}, + "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version": {} + }, + "encryptionProtector": "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseLedger.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseLedger.json new file mode 100644 index 000000000000..0b67f3fde1eb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseLedger.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "isLedgerOn": true + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S0", + "currentBackupStorageRedundancy": "Geo", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "isLedgerOn": true + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Zone", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Zone", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json new file mode 100644 index 000000000000..2498da0eb79c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "S2", + "tier": "Standard" + }, + "properties": { + "createMode": "Default", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "S2", + "tier": "Standard" + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "earliestRestoreDate": "2020-08-29T06:41:18.283Z", + "readScale": "Disabled", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 50 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "S2", + "tier": "Standard" + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "earliestRestoreDate": "2020-08-29T06:41:18.283Z", + "readScale": "Disabled", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 50 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseMin.json new file mode 100644 index 000000000000..39e879482f54 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseMin.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S0", + "currentBackupStorageRedundancy": "Geo", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseNamedReplica.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseNamedReplica.json new file mode 100644 index 000000000000..34ca4e396532 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseNamedReplica.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "capacity": 2 + }, + "properties": { + "createMode": "Secondary", + "secondaryType": "Named", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/primarydb" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user,vcore,hyperscale", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": -1, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 2 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "HS_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "HS_Gen4_2", + "highAvailabilityReplicaCount": 0, + "licenseType": "LicenseIncluded", + "secondaryType": "Named", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user,vcore,hyperscale", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": -1, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 2 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "HS_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "HS_Gen4_2", + "highAvailabilityReplicaCount": 0, + "licenseType": "LicenseIncluded", + "secondaryType": "Named", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabasePITRMode.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabasePITRMode.json new file mode 100644 index 000000000000..4c952917a0bd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabasePITRMode.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "dbpitr", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "createMode": "PointInTimeRestore", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "restorePointInTime": "2020-10-22T05:35:31.503Z" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "2463ef48-53e2-4c26-9781-2d7138080bfd", + "creationDate": "2020-10-23T20:31:35.807Z", + "currentServiceObjectiveName": "S0", + "requestedServiceObjectiveName": "S0", + "defaultSecondaryLocation": "SoutheastAsia", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "earliestRestoreDate": "2020-10-23T20:47:37Z", + "readScale": "Disabled", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false + }, + "location": "SoutheastAsia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr", + "name": "dbpitr", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "2463ef48-53e2-4c26-9781-2d7138080bfd", + "creationDate": "2020-10-23T20:31:35.807Z", + "currentServiceObjectiveName": "S0", + "requestedServiceObjectiveName": "S0", + "defaultSecondaryLocation": "SoutheastAsia", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "earliestRestoreDate": "2020-10-23T20:47:37Z", + "readScale": "Disabled", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false + }, + "location": "SoutheastAsia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr", + "name": "dbpitr", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseSecondaryMode.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseSecondaryMode.json new file mode 100644 index 000000000000..d4cb1758504f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseSecondaryMode.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "S0", + "tier": "Standard" + }, + "properties": { + "createMode": "Secondary", + "secondaryType": "Geo", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "secondaryType": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "secondaryType": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseStandbyMode.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseStandbyMode.json new file mode 100644 index 000000000000..179d5086fad9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseStandbyMode.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "S0", + "tier": "Standard" + }, + "properties": { + "createMode": "Secondary", + "secondaryType": "Standby", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "secondaryType": "Standby", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "secondaryType": "Standby", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseVBSEnclave.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseVBSEnclave.json new file mode 100644 index 000000000000..792dbe9ead4e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseVBSEnclave.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "preferredEnclaveType": "VBS" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S0", + "currentBackupStorageRedundancy": "Geo", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "preferredEnclaveType": "VBS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Zone", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Zone", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "preferredEnclaveType": "VBS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseWithAvailabilityZone.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseWithAvailabilityZone.json new file mode 100644 index 000000000000..9e79636e4610 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDatabaseWithAvailabilityZone.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "S0", + "tier": "Standard" + }, + "properties": { + "createMode": "Default", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "availabilityZone": "1" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isLedgerOn": false, + "availabilityZone": "1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isLedgerOn": false, + "availabilityZone": "1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionPITR.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionPITR.json new file mode 100644 index 000000000000..3d7c62fbf533 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionPITR.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdw", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "createMode": "PointInTimeRestore", + "sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/databases/srcdw", + "restorePointInTime": "2022-01-22T05:35:31.503Z" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "kind": "v12.0,user,datawarehouse,gen2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 263882790666240, + "status": "Online", + "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a", + "creationDate": "2022-01-24T06:46:14.99Z", + "currentServiceObjectiveName": "DW1000c", + "requestedServiceObjectiveName": "DW1000c", + "defaultSecondaryLocation": "eastus", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "currentSku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "currentBackupStorageRedundancy": "Geo" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw", + "name": "testdw", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "kind": "v12.0,user,datawarehouse,gen2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 263882790666240, + "status": "Online", + "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a", + "creationDate": "2022-01-24T06:46:14.99Z", + "currentServiceObjectiveName": "DW1000c", + "requestedServiceObjectiveName": "DW1000c", + "defaultSecondaryLocation": "eastus", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "currentSku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "currentBackupStorageRedundancy": "Geo" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw", + "name": "testdw", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionRecovery.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionRecovery.json new file mode 100644 index 000000000000..80816f517737 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionRecovery.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-WestUS", + "serverName": "testsvr", + "databaseName": "testdw", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "westus", + "properties": { + "createMode": "Recovery", + "sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-EastUS/providers/Microsoft.Sql/servers/srcsvr/recoverabledatabases/srcdw" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "kind": "v12.0,user,datawarehouse,gen2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 263882790666240, + "status": "Online", + "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a", + "creationDate": "2022-01-24T06:46:14.99Z", + "currentServiceObjectiveName": "DW1000c", + "requestedServiceObjectiveName": "DW1000c", + "defaultSecondaryLocation": "eastus", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "currentSku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "currentBackupStorageRedundancy": "Geo" + }, + "location": "westus", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw", + "name": "testdw", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "kind": "v12.0,user,datawarehouse,gen2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 263882790666240, + "status": "Online", + "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a", + "creationDate": "2022-01-24T06:46:14.99Z", + "currentServiceObjectiveName": "DW1000c", + "requestedServiceObjectiveName": "DW1000c", + "defaultSecondaryLocation": "eastus", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "currentSku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "currentBackupStorageRedundancy": "Geo" + }, + "location": "westus", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw", + "name": "testdw", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionRestore.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionRestore.json new file mode 100644 index 000000000000..4292a65e4639 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionRestore.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdw", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "createMode": "Restore", + "sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/restorableDroppedDatabases/srcdw,131403269876900000" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "kind": "v12.0,user,datawarehouse,gen2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 263882790666240, + "status": "Online", + "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a", + "creationDate": "2022-01-24T06:46:14.99Z", + "currentServiceObjectiveName": "DW1000c", + "requestedServiceObjectiveName": "DW1000c", + "defaultSecondaryLocation": "eastus", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "currentSku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "currentBackupStorageRedundancy": "Geo" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw", + "name": "testdw", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "kind": "v12.0,user,datawarehouse,gen2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 263882790666240, + "status": "Online", + "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a", + "creationDate": "2022-01-24T06:46:14.99Z", + "currentServiceObjectiveName": "DW1000c", + "requestedServiceObjectiveName": "DW1000c", + "defaultSecondaryLocation": "eastus", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "currentSku": { + "name": "DataWarehouse", + "tier": "DataWarehouse", + "capacity": 9000 + }, + "currentBackupStorageRedundancy": "Geo" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw", + "name": "testdw", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateElasticPoolWithAvailabilityZone.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateElasticPoolWithAvailabilityZone.json new file mode 100644 index 000000000000..8d734f1b5fca --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateElasticPoolWithAvailabilityZone.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "Japan East", + "sku": { + "name": "HS_Gen5_4" + }, + "properties": { + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 2 + }, + "zoneRedundant": true, + "availabilityZone": "1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "StandardPool", + "tier": "Standard", + "capacity": 100 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 2 + }, + "zoneRedundant": true, + "availabilityZone": "1" + } + } + }, + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + }, + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "StandardPool", + "tier": "Standard", + "capacity": 100 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 2 + }, + "availabilityZone": "1" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateJobExecution.json new file mode 100644 index 000000000000..83384b51f734 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateJobExecution.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2016-09-23T01:00:00Z", + "currentAttempts": 0, + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/locations/westus/jobAgentOperationResults/5555-6666-7777-8888-999999999999?api-version=2017-03-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateManagedDatabaseLedger.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateManagedDatabaseLedger.json new file mode 100644 index 000000000000..ca748e2d8d51 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateManagedDatabaseLedger.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "isLedgerOn": true + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": true + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": true + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateDatabaseExtensions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateDatabaseExtensions.json new file mode 100644 index 000000000000..eb6cf036f2c0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateDatabaseExtensions.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "a1c0814d-3c18-4e1e-a247-c128c12b1677", + "resourceGroupName": "rg_20cbe0f0-c2d9-4522-9177-5469aad53029", + "serverName": "srv_1ffd1cf8-9951-47fb-807d-a9c384763849", + "databaseName": "878e303f-1ea0-4f17-aa3d-a22ac5e9da08", + "extensionName": "polybaseimport", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "operationMode": "PolybaseImport", + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "storageUri": "https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml" + } + } + }, + "responses": { + "202": {}, + "200": { + "body": { + "properties": { + "requestId": "10000000-0000-0000-0000-000000000002", + "requestType": "PolybaseImport", + "lastModifiedTime": "lastModifiedTime", + "serverName": "srv_1ffd1cf8-9951-47fb-807d-a9c384763849", + "databaseName": "878e303f-1ea0-4f17-aa3d-a22ac5e9da08", + "status": "succeeded" + }, + "id": "10000000-0000-0000-0000-000000000002", + "name": "10000000-0000-0000-0000-000000000002", + "type": "Microsoft.Sql/servers/databases/extensions" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateInstancePoolMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateInstancePoolMax.json new file mode 100644 index 000000000000..922f65e27a37 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateInstancePoolMax.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded", + "dnsZone": "1234567890", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + }, + "201": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded", + "dnsZone": "1234567890", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateInstancePoolMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateInstancePoolMin.json new file mode 100644 index 000000000000..dcceb8ce066c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateInstancePoolMin.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "location": "japaneast", + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": {}, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + }, + "201": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded" + }, + "location": "japaneast", + "tags": {}, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobAgent.json new file mode 100644 index 000000000000..e69434d87c6b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobAgent.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "JA100", + "capacity": 100 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "JA100", + "capacity": 100 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobAgentWithIdentity.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobAgentWithIdentity.json new file mode 100644 index 000000000000..d23a01f89782 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobAgentWithIdentity.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi": {} + } + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi": { + "clientId": "0c29d9b7-0ae2-4014-96ea-faf8e0cf2bc7", + "principalId": "0c29d9b7-0ae2-4014-96ea-faf8e0cf2bc7" + } + } + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi": { + "clientId": "0c29d9b7-0ae2-4014-96ea-faf8e0cf2bc7", + "principalId": "0c29d9b7-0ae2-4014-96ea-faf8e0cf2bc7" + } + } + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobAgentWithSku.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobAgentWithSku.json new file mode 100644 index 000000000000..c5208200fba3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobAgentWithSku.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "JA400" + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "JA400", + "capacity": 400 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "JA400", + "capacity": 400 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobCredential.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobCredential.json new file mode 100644 index 000000000000..4c8a2e2446d3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobCredential.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "credentialName": "cred1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "username": "myuser", + "password": "" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name": "cred1", + "type": "Microsoft.Sql/servers/jobAccounts/credentials", + "properties": { + "username": "myuser" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name": "cred1", + "type": "Microsoft.Sql/servers/jobAccounts/credentials", + "properties": { + "username": "myuser" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobExecution.json new file mode 100644 index 000000000000..79a65e7938c4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobExecution.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-12-18T19:02:00.8707045Z", + "currentAttempts": 0, + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + }, + "201": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-05-04T19:02:00.8707045Z", + "currentAttempts": 0, + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobMax.json new file mode 100644 index 000000000000..1eb0e2502054 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobMax.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "description": "my favourite job", + "schedule": { + "startTime": "2015-09-24T18:30:01Z", + "endTime": "2015-09-24T23:59:59Z", + "type": "Recurring", + "interval": "PT5M", + "enabled": true + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "my favourite job", + "version": 0, + "schedule": { + "startTime": "2015-09-24T18:30:01Z", + "endTime": "2015-09-24T23:59:59Z", + "type": "Recurring", + "interval": "PT5M", + "enabled": true + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "my favourite job", + "version": 0, + "schedule": { + "startTime": "2015-09-24T18:30:01Z", + "endTime": "2015-09-24T23:59:59Z", + "type": "Recurring", + "interval": "PT5M", + "enabled": true + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobMin.json new file mode 100644 index 000000000000..2bf4ae211a5e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobMin.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "", + "version": 0, + "schedule": { + "startTime": "0001-01-01T00:00:00Z", + "endTime": "9999-12-31T11:59:59Z", + "type": "Once", + "enabled": false + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "", + "version": 0, + "schedule": { + "startTime": "0001-01-01T00:00:00Z", + "endTime": "9999-12-31T11:59:59Z", + "type": "Once", + "enabled": false + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobPrivateEndpoint.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobPrivateEndpoint.json new file mode 100644 index 000000000000..a01d8159dfc5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobPrivateEndpoint.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "privateEndpointName": "endpoint1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "targetServerAzureResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint1", + "name": "endpoint1", + "type": "Microsoft.Sql/servers/jobAgents/privateEndpoints", + "properties": { + "targetServerAzureResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1", + "privateEndpointId": "EJ_47e33188-85ff-4705-8d78-444444444444_endpoint1" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint1", + "name": "endpoint1", + "type": "Microsoft.Sql/servers/jobAgents/privateEndpoints", + "properties": { + "targetServerAzureResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1", + "privateEndpointId": "EJ_47e33188-85ff-4705-8d78-444444444444_endpoint1" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/jobAgentPrivateEndpointOperationResults/00000000-1111-2222-3333-444444444444?api-version=2023-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobStepMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobStepMax.json new file mode 100644 index 000000000000..53862d933c9b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobStepMax.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "stepName": "step1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + }, + "201": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobStepMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobStepMin.json new file mode 100644 index 000000000000..760fc5a8fe35 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobStepMin.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "stepName": "step1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0", + "action": { + "value": "select 1" + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 1" + }, + "executionOptions": { + "timeoutSeconds": 43200, + "retryAttempts": 10, + "initialRetryIntervalSeconds": 1, + "maximumRetryIntervalSeconds": 120, + "retryIntervalBackoffMultiplier": 2.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + }, + "201": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 1" + }, + "executionOptions": { + "timeoutSeconds": 43200, + "retryAttempts": 10, + "initialRetryIntervalSeconds": 1, + "maximumRetryIntervalSeconds": 120, + "retryIntervalBackoffMultiplier": 2.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json new file mode 100644 index 000000000000..4f1b7bd46004 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "targetGroupName": "targetGroup1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "members": [ + { + "membershipType": "Exclude", + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + }, + { + "membershipType": "Include", + "type": "SqlServer", + "serverName": "server1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlElasticPool", + "serverName": "server2", + "elasticPoolName": "pool1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlShardMap", + "serverName": "server3", + "shardMapName": "shardMap1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "members": [ + { + "membershipType": "Exclude", + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + }, + { + "membershipType": "Include", + "type": "SqlServer", + "serverName": "server1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlElasticPool", + "serverName": "server2", + "elasticPoolName": "pool1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlShardMap", + "serverName": "server3", + "shardMapName": "shardMap1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + }, + "201": { + "body": { + "properties": { + "members": [ + { + "membershipType": "Exclude", + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + }, + { + "membershipType": "Include", + "type": "SqlServer", + "serverName": "server1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlElasticPool", + "serverName": "server2", + "elasticPoolName": "pool1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlShardMap", + "serverName": "server3", + "shardMapName": "shardMap1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json new file mode 100644 index 000000000000..b41953efe9b7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "targetGroupName": "targetGroup1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "members": [] + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "members": [] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + }, + "201": { + "body": { + "properties": { + "members": [] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateMaintenanceWindows.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateMaintenanceWindows.json new file mode 100644 index 000000000000..10da4c9b86a6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateMaintenanceWindows.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdwdb", + "maintenanceWindowName": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "timeRanges": [ + { + "dayOfWeek": "Saturday", + "startTime": "00:00:00", + "duration": "PT60M" + } + ] + } + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json new file mode 100644 index 000000000000..77f8653e7178 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "workloadClassifierName": "wlm_workloadclassifier", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "memberName": "dbo", + "label": "test_label", + "context": "test_context", + "startTime": "12:00", + "endTime": "14:00", + "importance": "high" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "memberName": "dbo", + "label": "test_label", + "context": "test_context", + "startTime": "12:00", + "endTime": "14:00", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier", + "name": "wlm_workloadclassifier", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + }, + "201": { + "body": { + "properties": { + "memberName": "dbo", + "label": "test_label", + "context": "test_context", + "startTime": "12:00", + "endTime": "14:00", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier", + "name": "wlm_workloadclassifier", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json new file mode 100644 index 000000000000..2a088590ad27 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "workloadClassifierName": "wlm_workloadclassifier", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "memberName": "dbo" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "memberName": "dbo", + "label": "", + "context": "", + "startTime": "", + "endTime": "", + "importance": "" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier", + "name": "wlm_workloadclassifier", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + }, + "201": { + "body": { + "properties": { + "memberName": "dbo", + "label": "", + "context": "", + "startTime": "", + "endTime": "", + "importance": "" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier", + "name": "wlm_workloadclassifier", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json new file mode 100644 index 000000000000..138a65e9911d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "smallrc", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + }, + "201": { + "body": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json new file mode 100644 index 000000000000..00bc900743a6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "smallrc", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0 + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + }, + "201": { + "body": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json new file mode 100644 index 000000000000..cfc77f115450 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "BC", + "family": "Gen4", + "capacity": 2 + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "readScale": "Enabled", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "readScale": "Enabled", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "isLedgerOn": false, + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json new file mode 100644 index 000000000000..2bd9505b2280 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "sku": { + "name": "BC_Gen4", + "capacity": 2 + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "readScale": "Enabled", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "family": "Gen4", + "capacity": 2 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "readScale": "Enabled", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingPolicyCreateOrUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingPolicyCreateOrUpdateMax.json new file mode 100644 index 000000000000..0ff5a310f9ff --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingPolicyCreateOrUpdateMax.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6852", + "serverName": "sqlcrudtest-2080", + "databaseName": "sqlcrudtest-331", + "dataMaskingPolicyName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "dataMaskingState": "Enabled", + "exemptPrincipals": "testuser;" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies", + "location": "Central US", + "kind": null, + "properties": { + "dataMaskingState": "Enabled", + "applicationPrincipals": "", + "exemptPrincipals": "testuser;", + "maskingLevel": "" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies", + "location": "Central US", + "kind": null, + "properties": { + "dataMaskingState": "Enabled", + "applicationPrincipals": "", + "exemptPrincipals": "testuser;", + "maskingLevel": "" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingPolicyCreateOrUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingPolicyCreateOrUpdateMin.json new file mode 100644 index 000000000000..d95fa592c689 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingPolicyCreateOrUpdateMin.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6852", + "serverName": "sqlcrudtest-2080", + "databaseName": "sqlcrudtest-331", + "dataMaskingPolicyName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "dataMaskingState": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies", + "location": "Central US", + "kind": null, + "properties": { + "dataMaskingState": "Enabled", + "applicationPrincipals": "", + "exemptPrincipals": "", + "maskingLevel": "" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies", + "location": "Central US", + "kind": null, + "properties": { + "dataMaskingState": "Enabled", + "applicationPrincipals": "", + "exemptPrincipals": "", + "maskingLevel": "" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingPolicyGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingPolicyGet.json new file mode 100644 index 000000000000..704725070163 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingPolicyGet.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6852", + "serverName": "sqlcrudtest-2080", + "databaseName": "sqlcrudtest-331", + "dataMaskingPolicyName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies", + "location": "Central US", + "kind": null, + "properties": { + "dataMaskingState": "Enabled", + "applicationPrincipals": "", + "exemptPrincipals": "", + "maskingLevel": "" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json new file mode 100644 index 000000000000..38a8820667fe --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6852", + "serverName": "sqlcrudtest-2080", + "databaseName": "sqlcrudtest-331", + "dataMaskingPolicyName": "Default", + "api-version": "2023-05-01-preview", + "dataMaskingRuleName": "rule1", + "parameters": { + "properties": { + "aliasName": "nickname", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "maskingFunction": "Default", + "ruleState": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/", + "name": null, + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules", + "location": "Central US", + "kind": null, + "properties": { + "id": "dbo_Table_1_test1", + "ruleState": "Enabled", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "aliasName": "nickname", + "maskingFunction": "Default", + "numberFrom": null, + "numberTo": null, + "prefixSize": null, + "suffixSize": null, + "replacementString": null + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/", + "name": null, + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules", + "location": "Central US", + "kind": null, + "properties": { + "id": "dbo_Table_1_test1", + "ruleState": "Enabled", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "aliasName": "nickname", + "maskingFunction": "Default", + "numberFrom": null, + "numberTo": null, + "prefixSize": null, + "suffixSize": null, + "replacementString": null + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json new file mode 100644 index 000000000000..a3b74441325a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6852", + "serverName": "sqlcrudtest-2080", + "databaseName": "sqlcrudtest-331", + "dataMaskingPolicyName": "Default", + "api-version": "2023-05-01-preview", + "dataMaskingRuleName": "rule1", + "parameters": { + "properties": { + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "maskingFunction": "Default" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/", + "name": null, + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules", + "location": "Central US", + "kind": null, + "properties": { + "id": "dbo_Table_1_test1", + "ruleState": "Enabled", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "aliasName": null, + "maskingFunction": "Default", + "numberFrom": null, + "numberTo": null, + "prefixSize": null, + "suffixSize": null, + "replacementString": null + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/", + "name": null, + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules", + "location": "Central US", + "kind": null, + "properties": { + "id": "dbo_Table_1_test1", + "ruleState": "Enabled", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "aliasName": null, + "maskingFunction": "Default", + "numberFrom": null, + "numberTo": null, + "prefixSize": null, + "suffixSize": null, + "replacementString": null + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateNumber.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateNumber.json new file mode 100644 index 000000000000..652a239fd6e9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateNumber.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6852", + "serverName": "sqlcrudtest-2080", + "databaseName": "sqlcrudtest-331", + "dataMaskingPolicyName": "Default", + "api-version": "2023-05-01-preview", + "dataMaskingRuleName": "rule1", + "parameters": { + "properties": { + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "maskingFunction": "Number", + "numberFrom": "0", + "numberTo": "2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/", + "name": null, + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules", + "location": "Central US", + "kind": null, + "properties": { + "id": "dbo_Table_1_test1", + "ruleState": "Enabled", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "aliasName": null, + "maskingFunction": "Number", + "numberFrom": "0", + "numberTo": "2", + "prefixSize": null, + "suffixSize": null, + "replacementString": null + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/", + "name": null, + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules", + "location": "Central US", + "kind": null, + "properties": { + "id": "dbo_Table_1_test1", + "ruleState": "Enabled", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "aliasName": null, + "maskingFunction": "Number", + "numberFrom": "0", + "numberTo": "2", + "prefixSize": null, + "suffixSize": null, + "replacementString": null + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateText.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateText.json new file mode 100644 index 000000000000..df8700ba9a91 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleCreateOrUpdateText.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6852", + "serverName": "sqlcrudtest-2080", + "databaseName": "sqlcrudtest-331", + "dataMaskingPolicyName": "Default", + "api-version": "2023-05-01-preview", + "dataMaskingRuleName": "rule1", + "parameters": { + "properties": { + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "maskingFunction": "Text", + "prefixSize": "1", + "suffixSize": "0", + "replacementString": "asdf" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/", + "name": null, + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules", + "location": "Central US", + "kind": null, + "properties": { + "id": "dbo_Table_1_test1", + "ruleState": "Enabled", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "aliasName": null, + "maskingFunction": "Text", + "numberFrom": null, + "numberTo": null, + "prefixSize": "1", + "suffixSize": "0", + "replacementString": "asdf" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/", + "name": null, + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules", + "location": "Central US", + "kind": null, + "properties": { + "id": "dbo_Table_1_test1", + "ruleState": "Enabled", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "aliasName": null, + "maskingFunction": "Text", + "numberFrom": null, + "numberTo": null, + "prefixSize": "1", + "suffixSize": "0", + "replacementString": "asdf" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleListByDatabase.json new file mode 100644 index 000000000000..c918cbcda05b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataMaskingRuleListByDatabase.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6852", + "serverName": "sqlcrudtest-2080", + "databaseName": "sqlcrudtest-331", + "dataMaskingPolicyName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/", + "name": null, + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules", + "location": "Central US", + "kind": null, + "properties": { + "id": "dbo_Table_1_test1", + "ruleState": "Enabled", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "aliasName": null, + "maskingFunction": "Text", + "numberFrom": null, + "numberTo": null, + "prefixSize": "1", + "suffixSize": "0", + "replacementString": "asdf" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/", + "name": null, + "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules", + "location": "Central US", + "kind": null, + "properties": { + "id": "dbo_Table_1_test1", + "ruleState": "Enabled", + "schemaName": "dbo", + "tableName": "Table_1", + "columnName": "test1", + "aliasName": null, + "maskingFunction": "Number", + "numberFrom": "0", + "numberTo": "2", + "prefixSize": null, + "suffixSize": null, + "replacementString": null + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataWarehouseRestorePointsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataWarehouseRestorePointsGet.json new file mode 100644 index 000000000000..c14119e4ebc8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataWarehouseRestorePointsGet.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "restorePointName": "131546477590000000", + "location": "japaneast", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000", + "name": "131546477590000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-03-10T08:00:00Z", + "restorePointLabel": "mylabel" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json new file mode 100644 index 000000000000..3f70df9f9e4f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "location": "japaneast", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000", + "name": "131546477590000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-03-10T08:00:00Z", + "restorePointLabel": "mylabel1" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131553636140000000", + "name": "131553636140000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-11-17T03:40:14Z", + "restorePointLabel": "mylabel2" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131553619750000000", + "name": "131553619750000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-11-17T03:12:55Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json new file mode 100644 index 000000000000..936735c6af5f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "serverName": "threatprotection-6440", + "databaseName": "testdb", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json new file mode 100644 index 000000000000..b0f301d328d7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "serverName": "threatprotection-6440", + "databaseName": "testdb", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Disabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsGet.json new file mode 100644 index 000000000000..9fccbefdc398 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsGet.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-6852", + "serverName": "threatprotection-2080", + "databaseName": "testdb", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsListByDatabase.json new file mode 100644 index 000000000000..54c981c29eea --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsListByDatabase.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-6852", + "serverName": "threatprotection-2080", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-6852/providers/Microsoft.Sql/servers/threatprotection-2080/databases/testdb/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvisorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvisorGet.json new file mode 100644 index 000000000000..9fcd13fc2d4b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvisorGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "recommendationsStatus": "Ok", + "lastChecked": "2017-06-20T00:24:39Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvisorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvisorList.json new file mode 100644 index 000000000000..6ca504564f93 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvisorList.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "Ok", + "lastChecked": "2017-06-20T00:24:39Z" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex", + "name": "DropIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "DbSeemsTuned", + "lastChecked": "2017-06-19T20:42:43Z" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization", + "name": "DbParameterization", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Enabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "DbParameterizationIssue", + "lastChecked": "2017-06-19T19:13:03Z" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue", + "name": "SchemaIssue", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PublicPreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendationsStatus": "SchemaIsNotConsistent", + "lastChecked": "2017-06-20T14:00:32Z" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/ForceLastGoodPlan", + "name": "ForceLastGoodPlan", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PrivatePreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + } + ] + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvisorUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvisorUpdate.json new file mode 100644 index 000000000000..0a0e917adde7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAdvisorUpdate.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "autoExecuteStatus": "Disabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "recommendationsStatus": "Ok", + "lastChecked": "2017-06-20T00:24:39Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAuditingSettingsList.json new file mode 100644 index 000000000000..e43f6e024bb1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAuditingSettingsList.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-6852", + "serverName": "blobauditingtest-2080", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAutomaticTuningGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAutomaticTuningGet.json new file mode 100644 index 000000000000..3b842ba0b68f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAutomaticTuningGet.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "databaseName": "db1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "createIndex": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "dropIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json new file mode 100644 index 000000000000..8526b4dc02a9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "databaseName": "db1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "desiredState": "Auto", + "options": { + "createIndex": { + "desiredState": "Off" + }, + "dropIndex": { + "desiredState": "On" + }, + "forceLastGoodPlan": { + "desiredState": "Default" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "createIndex": { + "desiredState": "Off", + "actualState": "Off" + }, + "dropIndex": { + "desiredState": "On", + "actualState": "On" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json new file mode 100644 index 000000000000..1158b88ea357 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "databaseName": "db1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "desiredState": "Auto" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "createIndex": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "dropIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json new file mode 100644 index 000000000000..3d22cd8460ff --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true, + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true, + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseBlobAuditingCreateMax.json new file mode 100644 index 000000000000..bdbb5b794bac --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseBlobAuditingCreateMax.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "isAzureMonitorTargetEnabled": true + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "isAzureMonitorTargetEnabled": true + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseBlobAuditingCreateMin.json new file mode 100644 index 000000000000..162c93dde2a4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseBlobAuditingCreateMin.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseBlobAuditingGet.json new file mode 100644 index 000000000000..3ddf3b552be0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseBlobAuditingGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-6852", + "serverName": "blobauditingtest-2080", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseColumnGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseColumnGet.json new file mode 100644 index 000000000000..041d85f58640 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseColumnGet.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "columnName": "column1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/column1", + "name": "column1", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns", + "properties": { + "columnType": "bit", + "temporalType": "SystemVersionedTemporalTable", + "memoryOptimized": false, + "isComputed": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseColumnListByTable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseColumnListByTable.json new file mode 100644 index 000000000000..f28e77d3d6d0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseColumnListByTable.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1", + "name": "col1", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns", + "properties": { + "columnType": "nvarchar", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2", + "name": "col2", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns", + "properties": { + "columnType": "bit", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseEncryptionProtectorRevalidate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseEncryptionProtectorRevalidate.json new file mode 100644 index 000000000000..16f30ca5d761 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseEncryptionProtectorRevalidate.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "databaseName": "sqlcrudtestdb-2342", + "encryptionProtectorName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/locations/eastus/databaseEncryptionProtectorRevalidateOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseEncryptionProtectorRevert.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseEncryptionProtectorRevert.json new file mode 100644 index 000000000000..6f6552fec201 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseEncryptionProtectorRevert.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "databaseName": "sqlcrudtestdb-2342", + "encryptionProtectorName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/locations/eastus/databaseEncryptionProtectorRevertOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseExtendedAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseExtendedAuditingSettingsList.json new file mode 100644 index 000000000000..e642a057008e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseExtendedAuditingSettingsList.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-6852", + "serverName": "blobauditingtest-2080", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionGet.json new file mode 100644 index 000000000000..fcfe73532457 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionGet.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "recommendedActionName": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:04Z", + "lastRefresh": "2017-03-01T14:38:04Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 1440.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 209.3125 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money],[Power]", + "includedColumns": "[Hour], [System], [LastChanged]" + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionList.json new file mode 100644 index 000000000000..73d5754851f3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionList.json @@ -0,0 +1,197 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:04Z", + "lastRefresh": "2017-03-01T14:38:04Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 1440.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 209.3125 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money],[Power]", + "includedColumns": "[Hour], [System], [LastChanged]" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "name": "IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "User", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC] ON [dbo].[DataPoints]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 5040.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 120.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.9 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.3175 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 12.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 1.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 130.742187 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money]", + "includedColumns": "[Power],[Pineapple]", + "indexActionStartTime": "2017-03-01T14:38:05.337", + "indexActionDuration": "00:01:00" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "name": "IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE] ON [dbo].[Employees] ([City], [State]) INCLUDE ([Postal]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 17.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 128.0 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[Employees]", + "indexColumns": "[City], [State]", + "includedColumns": "[Postal]" + } + } + } + ] + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionListExpand.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionListExpand.json new file mode 100644 index 000000000000..19c68150d9aa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionListExpand.json @@ -0,0 +1,625 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "api-version": "2023-05-01-preview", + "$expand": "recommendedActions" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "Ok", + "lastChecked": "2017-06-20T16:39:16Z", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:04Z", + "lastRefresh": "2017-03-01T14:38:04Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-06-20T15:15:40Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 1440.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 209.3125 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money],[Power]", + "includedColumns": "[Hour], [System], [LastChanged]" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "name": "IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "User", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC] ON [dbo].[DataPoints]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 5040.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 120.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.9 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.3175 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 12.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 1.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 130.742187 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money]", + "includedColumns": "[Power],[Pineapple]", + "indexActionStartTime": "2017-03-01T14:38:05.337", + "indexActionDuration": "00:01:00" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "name": "IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE] ON [dbo].[Employees] ([City], [State]) INCLUDE ([Postal]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 17.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 128.0 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[Employees]", + "indexColumns": "[City], [State]", + "includedColumns": "[Postal]" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex", + "name": "DropIndex", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "DbSeemsTuned", + "lastChecked": "2017-06-19T20:42:43Z", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B", + "name": "IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Unused", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-03-23T14:14:35Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-23T14:14:35Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [IX_FF] ON [CRM].[DataPoints1]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 645.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "IX_FF", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints1]", + "indexColumns": "[Protocol],[SessionId]", + "includedColumns": "[Apple]" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A", + "name": "IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [MyIndex123] ON [CRM].[DataPoints1]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 803.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 144.6875 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "MyIndex123", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints1]", + "indexColumns": "[Cookies],[SessionId]", + "includedColumns": "[Apple]" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints2]_E4B21F229379807E531A", + "name": "IR_[CRM]_[DataPoints2]_E4B21F229379807E531A", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "User", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [MyIndex321] ON [CRM].[DataPoints2] ([Cookies],[SessionId],[Protocol]) INCLUDE ([Apple]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 705.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": -342.0 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "MyIndex321", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints2]", + "indexColumns": "[Cookies],[SessionId],[Protocol]", + "includedColumns": "[Apple]", + "indexActionStartTime": "2017-03-01T14:38:05.697", + "indexActionDuration": "00:01:00" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B", + "name": "IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "System", + "lastModified": "2017-02-28T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [IX_FF] ON [dbo].[FactFinance] ([FinanceKey],[DateKey]) INCLUDE ([OrganizationKey]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 705.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": -342.0 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "IX_FF", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[FactFinance]", + "indexColumns": "[FinanceKey],[DateKey]", + "includedColumns": "[OrganizationKey]", + "indexActionStartTime": "2017-03-01T14:38:05.837", + "indexActionDuration": "00:01:00" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization", + "name": "DbParameterization", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Enabled", + "autoExecuteStatusInheritedFrom": "Database", + "recommendationsStatus": "DbParameterizationIssue", + "lastChecked": "2017-06-19T19:13:03Z", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization/recommendedActions/ForceDbParameterization", + "name": "ForceDbParameterization", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:37:44Z", + "lastRefresh": "2017-03-01T14:37:44Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-05-11T15:08:31Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-05-11T15:08:31Z", + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "ALTER DATABASE [IndexAdvisor_test_3] SET PARAMETERIZATION FORCED" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "CpuSavings", + "unit": "Percent", + "changeValueAbsolute": 22.5613696939135 + }, + { + "dimensionName": "QueryDurationDecrease", + "unit": "secs", + "changeValueAbsolute": 0.701823681806341 + } + ], + "observedImpact": [], + "timeSeries": [] + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue", + "name": "SchemaIssue", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PublicPreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendationsStatus": "SchemaIsNotConsistent", + "lastChecked": "2017-06-20T18:50:21Z", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue/recommendedActions/SchemaProblem_1A258C5714A7410C9D23", + "name": "SchemaProblem_1A258C5714A7410C9D23", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "SchemaProblem", + "validSince": "2017-03-01T14:37:48Z", + "lastRefresh": "2017-06-07T22:19:53Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:37:48Z" + }, + "isExecutableAction": false, + "isRevertableAction": false, + "isArchivedAction": false, + "score": 3, + "implementationDetails": {}, + "errorDetails": {}, + "estimatedImpact": [], + "observedImpact": [], + "timeSeries": [], + "details": { + "sqlErrorNumber": 208, + "sqlErrorMessage": "Invalid object name 'dbo.Companies'.", + "sqlErrorCount": 342482 + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/ForceLastGoodPlan", + "name": "ForceLastGoodPlan", + "type": "Microsoft.Sql/servers/databases/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PrivatePreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendedActions": [] + } + } + ] + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionUpdate.json new file mode 100644 index 000000000000..c31dca74be09 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRecommendedActionUpdate.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "databaseName": "IndexAdvisor_test_3", + "advisorName": "CreateIndex", + "recommendedActionName": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": { + "currentValue": "Pending" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:04Z", + "lastRefresh": "2017-03-01T14:38:04Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "User", + "lastModified": "2017-06-20T15:11:15Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-06-20T15:11:15Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 1440.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 209.3125 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money],[Power]", + "includedColumns": "[Hour], [System], [LastChanged]" + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsDelete.json new file mode 100644 index 000000000000..5b621a49d0f3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "restorePointName": "131546477590000000", + "location": "japaneast", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsGet.json new file mode 100644 index 000000000000..b60ef76322e9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "restorePointName": "131546477590000000", + "location": "japaneast", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/ContinuousRestorePoint", + "name": "ContinuousRestorePoint", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "CONTINUOUS", + "earliestRestoreDate": "2017-03-10T08:00:00Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsListByDatabase.json new file mode 100644 index 000000000000..4d1fc1844bac --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsListByDatabase.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6730", + "serverName": "sqlcrudtest-9007", + "databaseName": "3481", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-9007/databases/3481/restorepoints/ContinuousRestorePoint", + "name": "ContinuousRestorePoint", + "location": "West US", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "properties": { + "restorePointType": "CONTINUOUS", + "earliestRestoreDate": "2017-06-12T00:00:00Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsPost.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsPost.json new file mode 100644 index 000000000000..c2eb7755fc91 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseRestorePointsPost.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "location": "japaneast", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "restorePointLabel": "mylabel" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000", + "name": "131546477590000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "japaneast", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-03-10T08:00:00Z", + "restorePointLabel": "mylabel" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000", + "name": "131546477590000000", + "type": "Microsoft.Sql/servers/databases/restorePoints", + "location": "southeastasia", + "properties": { + "restorePointType": "DISCRETE", + "restorePointCreationDate": "2017-03-10T08:00:00Z", + "restorePointLabel": "mylabel" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/manageddatabaserestoreazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSchemaGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSchemaGet.json new file mode 100644 index 000000000000..1a5c40b0ebf0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSchemaGet.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/servers/databases/schemas" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSchemaListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSchemaListByDatabase.json new file mode 100644 index 000000000000..d45bf3934869 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSchemaListByDatabase.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/servers/databases/schemas" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/schema2", + "name": "schema2", + "type": "Microsoft.Sql/servers/databases/schemas" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertCreateMax.json new file mode 100644 index 000000000000..fbdf03e11e84 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertCreateMax.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@microsoft.com", + "user@microsoft.com" + ], + "disabledAlerts": [ + "Sql_Injection", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@microsoft.com", + "user@microsoft.com" + ], + "disabledAlerts": [ + "Sql_Injection", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@microsoft.com", + "user@microsoft.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertCreateMin.json new file mode 100644 index 000000000000..c8e8ec2d9767 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertCreateMin.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [], + "disabledAlerts": [], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [], + "disabledAlerts": [], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertGet.json new file mode 100644 index 000000000000..83a20a1380ea --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertGet.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-6852", + "serverName": "securityalert-2080", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/servers/securityalert-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com", + "user@consoto.com" + ], + "disabledAlerts": [ + "Usage_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "creationTime": "2020-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertListByDatabase.json new file mode 100644 index 000000000000..8c3cdb343333 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSecurityAlertListByDatabase.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-6852", + "serverName": "securityalert-2080", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/servers/securityalert-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com", + "user@consoto.com" + ], + "disabledAlerts": [ + "Usage_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "", + "creationTime": "2020-04-03T04:41:33.937Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json new file mode 100644 index 000000000000..1b7d5a3a316d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "latestScan": false, + "results": { + "VA2063": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ], + "VA2065": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "results": { + "VA2063": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ], + "VA2065": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/Default/baselines/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json new file mode 100644 index 000000000000..7d4a61bbd637 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "latestScan": true, + "results": {} + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "results": { + "VA1020": [], + "VA1054": [], + "VA1095": [], + "VA1096": [], + "VA1097": [], + "VA1099": [], + "VA1143": [ + [ + "True" + ] + ], + "VA1219": [ + [ + "False" + ] + ], + "VA1221": [], + "VA1223": [], + "VA1224": [], + "VA1246": [], + "VA1248": [], + "VA1258": [], + "VA1281": [], + "VA1282": [], + "VA2020": [], + "VA2033": [], + "VA2062": [], + "VA2064": [], + "VA2108": [], + "VA2109": [], + "VA2129": [], + "VA2130": [] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/Default/baselines/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json new file mode 100644 index 000000000000..71b059fa570a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "results": { + "VA1020": [], + "VA1054": [], + "VA1095": [], + "VA1096": [], + "VA1097": [], + "VA1099": [], + "VA1143": [ + [ + "True" + ] + ], + "VA1219": [ + [ + "False" + ] + ], + "VA1221": [], + "VA1223": [], + "VA1224": [], + "VA1246": [], + "VA1248": [], + "VA1258": [], + "VA1281": [], + "VA1282": [], + "VA2020": [], + "VA2033": [], + "VA2062": [], + "VA2064": [], + "VA2108": [], + "VA2109": [], + "VA2129": [], + "VA2130": [] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/Default/baselines/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json new file mode 100644 index 000000000000..bbe664b8e96b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "results": { + "VA1020": [], + "VA1054": [], + "VA1095": [], + "VA1096": [], + "VA1097": [], + "VA1099": [], + "VA1143": [ + [ + "True" + ] + ], + "VA1219": [ + [ + "False" + ] + ], + "VA1221": [], + "VA1223": [], + "VA1224": [], + "VA1246": [], + "VA1248": [], + "VA1258": [], + "VA1281": [], + "VA1282": [], + "VA2020": [], + "VA2033": [], + "VA2062": [], + "VA2064": [], + "VA2108": [], + "VA2109": [], + "VA2129": [], + "VA2130": [] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/Default/baselines/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..cfdfd37271d3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json new file mode 100644 index 000000000000..258eeed2caaf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json new file mode 100644 index 000000000000..de75c550fae1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json @@ -0,0 +1,133 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "testsvr", + "databaseName": "master", + "vulnerabilityAssessmentName": "default", + "scanId": "scanId1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "ruleId": "VA1234", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/testsvr/databases/master/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans/scanResults" + }, + { + "properties": { + "ruleId": "VA2341", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/testsvr/databases/master/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA2341", + "name": "VA2341", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans/scanResults" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json new file mode 100644 index 000000000000..f909a2525154 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "ruleId": "VA1001", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "latestScan": false, + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", + "name": "Scan123", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json new file mode 100644 index 000000000000..0cb0ee96be69 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "ruleId": "VA1001", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json new file mode 100644 index 000000000000..0816155339b1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "ruleId": "VA1001", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", + "name": "VA1001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json new file mode 100644 index 000000000000..48cb0c067132 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1002", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json new file mode 100644 index 000000000000..229482d4e9d1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-22T23:49:00.6455136-07:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false, + "lastScanTime": "2020-06-22T23:49:00.6455136-07:00" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json new file mode 100644 index 000000000000..c6ece3f4845d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-22T23:49:00.6455136-07:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false, + "lastScanTime": "2020-06-22T23:49:00.6455136-07:00" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan002", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-22T23:49:00.6455136-07:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false, + "lastScanTime": "2020-06-22T23:49:00.6455136-07:00" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan003", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-22T23:49:00.6455136-07:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false, + "lastScanTime": "2020-06-22T23:49:00.6455136-07:00" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json new file mode 100644 index 000000000000..c11521695dde --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/sqlVulnerabilityAssessmentOperationResults/00000000-1111-2222-3333-444444444444?api-version=2022-02-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json new file mode 100644 index 000000000000..929c91d825d9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "master", + "vulnerabilityAssessmentName": "default", + "scanId": "scanId1", + "scanResultId": "VA1234", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "ruleId": "VA1234", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseTableGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseTableGet.json new file mode 100644 index 000000000000..79ac6983bea4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseTableGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/servers/databases/schemas/tables" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseTableListBySchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseTableListBySchema.json new file mode 100644 index 000000000000..22384a6b1d51 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseTableListBySchema.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/servers/databases/schemas/tables" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table2", + "name": "table2", + "type": "Microsoft.Sql/servers/databases/schemas/tables" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json new file mode 100644 index 000000000000..687224a9e951 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json new file mode 100644 index 000000000000..ba7f306a3db8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json new file mode 100644 index 000000000000..ba1d509b3d13 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..513fa355ded1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..5bb5100a079d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json new file mode 100644 index 000000000000..61ccb038b66f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json new file mode 100644 index 000000000000..99acd84cf522 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "baselineName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json new file mode 100644 index 000000000000..f409a75c6258 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "baselineName": "default", + "ruleId": "VA1001", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json new file mode 100644 index 000000000000..41034a18f7b3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "baselineName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json new file mode 100644 index 000000000000..b880b50e69ab --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4799", + "serverName": "vulnerabilityassessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json new file mode 100644 index 000000000000..3534cc08390c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json new file mode 100644 index 000000000000..70c36ff65597 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan002", + "name": "scan002", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan003", + "name": "scan003", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "FailedToRun", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [ + { + "code": "StorageNotFound", + "message": "Storage not found" + } + ], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 0 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json new file mode 100644 index 000000000000..161ce789941c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan01", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.Sql/locations/westus/vulnerabilityAssessmentScanOperationResults/00000000-0000-0000-0000-000000000001?api-version=2017-10-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteDatabase.json new file mode 100644 index 000000000000..1f80900bad88 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteDatabase.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {}, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteInstancePool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteInstancePool.json new file mode 100644 index 000000000000..d925645eff3c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteInstancePool.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/instancepoolazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJob.json new file mode 100644 index 000000000000..b9c554dde1c0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJob.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobAgent.json new file mode 100644 index 000000000000..b3ae12936175 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobAgent.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/jobAgentOperationResults/00000000-1111-2222-3333-444444444444?api-version=2017-03-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobCredential.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobCredential.json new file mode 100644 index 000000000000..a3c15453a15a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobCredential.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "credentialName": "cred1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobPrivateEndpoint.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobPrivateEndpoint.json new file mode 100644 index 000000000000..0c12bf32a510 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobPrivateEndpoint.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "privateEndpointName": "endpoint1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/jobAgentPrivateEndpointOperationResults/00000000-1111-2222-3333-444444444444?api-version=2023-05-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobStep.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobStep.json new file mode 100644 index 000000000000..f25231c99b78 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobStep.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "stepName": "step1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobTargetGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobTargetGroup.json new file mode 100644 index 000000000000..19aa50832470 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobTargetGroup.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "targetGroupName": "targetGroup1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteWorkloadClassifier.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteWorkloadClassifier.json new file mode 100644 index 000000000000..4cdcdf1af735 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteWorkloadClassifier.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "workloadClassifierName": "wlm_workloadclassifier", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/OperationResults/00000000-1111-2222-3333-444444444444?api-version=2019-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteWorkloadGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteWorkloadGroup.json new file mode 100644 index 000000000000..00bb85ae1f43 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteWorkloadGroup.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/OperationResults/00000000-1111-2222-3333-444444444444?api-version=2019-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerGet.json new file mode 100644 index 000000000000..16f99fe8c764 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "deletedServerName": "sqlcrudtest-d-1414", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414", + "name": "sqlcrudtest-d-1414", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-1414.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-15T11:20:00.345Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerList.json new file mode 100644 index 000000000000..9d52fe699dd1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerList.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414", + "name": "sqlcrudtest-d-1414", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-1414.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-15T20:20:00.345Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-2424", + "name": "sqlcrudtest-d-2424", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-2424.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-13T10:10:00.678Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-2424" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerListBySubscription.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerListBySubscription.json new file mode 100644 index 000000000000..96d55f7103c7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerListBySubscription.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414", + "name": "sqlcrudtest-d-1414", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-1414.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-15T20:20:00.345Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-2424", + "name": "sqlcrudtest-d-2424", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-2424.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-13T10:10:00.678Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-2424" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerRecover.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerRecover.json new file mode 100644 index 000000000000..1dd5d13d6ae8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeletedServerRecover.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "deletedServerName": "sqlcrudtest-d-1414", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414", + "name": "sqlcrudtest-d-1414", + "type": "Microsoft.Sql/deletedServers", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-d-1414.database.windows.net", + "version": "12.0", + "deletionTime": "2017-06-15T11:20:00.345Z", + "originalId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedserverazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsCreateMax.json new file mode 100644 index 000000000000..9d8fa5663612 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsCreateMax.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "distributedAvailabilityGroupName": "dag", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "instanceLinkRole": "Primary", + "instanceAvailabilityGroupName": "testcl", + "partnerAvailabilityGroupName": "BoxLocalAg1", + "partnerEndpoint": "TCP://SERVER:7022", + "failoverMode": "None", + "seedingMode": "Automatic", + "databases": [ + { + "databaseName": "testdb" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "distributedAvailabilityGroupName": "dag", + "instanceLinkRole": "Primary", + "instanceAvailabilityGroupName": "testcl", + "partnerAvailabilityGroupName": "BoxLocalAg1", + "partnerEndpoint": "TCP://SERVER:7022", + "failoverMode": "None", + "seedingMode": "Automatic", + "databases": [ + { + "databaseName": "testdb" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag", + "name": "dag", + "type": "Microsoft.Sql/managedInstances/distributedAvailabilityGroups" + } + }, + "201": { + "body": { + "properties": { + "distributedAvailabilityGroupName": "dag", + "instanceLinkRole": "Primary", + "instanceAvailabilityGroupName": "testcl", + "partnerAvailabilityGroupName": "BoxLocalAg1", + "partnerEndpoint": "TCP://SERVER:7022", + "failoverMode": "None", + "seedingMode": "Automatic", + "databases": [ + { + "databaseName": "testdb" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag", + "name": "dag", + "type": "Microsoft.Sql/managedInstances/distributedAvailabilityGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsCreateMin.json new file mode 100644 index 000000000000..efb8f6806889 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsCreateMin.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "distributedAvailabilityGroupName": "dag", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "instanceAvailabilityGroupName": "testcl", + "partnerAvailabilityGroupName": "BoxLocalAg1", + "partnerEndpoint": "TCP://SERVER:7022", + "databases": [ + { + "databaseName": "testdb" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "distributedAvailabilityGroupName": "dag", + "instanceLinkRole": "Secondary", + "instanceAvailabilityGroupName": "testcl", + "partnerAvailabilityGroupName": "BoxLocalAg1", + "partnerEndpoint": "TCP://SERVER:7022", + "failoverMode": "None", + "seedingMode": "Automatic", + "databases": [ + { + "databaseName": "testdb" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag", + "name": "dag", + "type": "Microsoft.Sql/managedInstances/distributedAvailabilityGroups" + } + }, + "201": { + "body": { + "properties": { + "distributedAvailabilityGroupName": "dag", + "instanceLinkRole": "Secondary", + "instanceAvailabilityGroupName": "testcl", + "partnerAvailabilityGroupName": "BoxLocalAg1", + "partnerEndpoint": "TCP://SERVER:7022", + "failoverMode": "None", + "seedingMode": "Automatic", + "databases": [ + { + "databaseName": "testdb" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag", + "name": "dag", + "type": "Microsoft.Sql/managedInstances/distributedAvailabilityGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsDelete.json new file mode 100644 index 000000000000..d0ee34725875 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "distributedAvailabilityGroupName": "dag", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/distributedAvailabilityGroupsOperationResults/5b0b0b0b-0b0b-0b0b-0b0b-0b0b0b0b0b0b?api-version=2023-05-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsGet.json new file mode 100644 index 000000000000..574c8ba41961 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsGet.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "distributedAvailabilityGroupName": "dag", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "distributedAvailabilityGroupName": "dag", + "distributedAvailabilityGroupId": "c856cff5-a6fe-418e-8894-17799cc20f5d", + "replicationMode": "Async", + "partnerLinkRole": "Secondary", + "partnerAvailabilityGroupName": "BoxLocalAg1", + "partnerEndpoint": "TCP://SERVER:7022", + "instanceLinkRole": "Primary", + "instanceAvailabilityGroupName": "testcl", + "failoverMode": "None", + "seedingMode": "Automatic", + "databases": [ + { + "databaseName": "testdb", + "instanceReplicaId": "4713ed91-1e8c-497d-9bd4-d8a3935ae49a", + "partnerReplicaId": "8ffa9723-a1ec-4323-b929-c4aedee3894b", + "replicaState": "Catchup", + "synchronizationHealth": "HEALTHY", + "connectedState": "CONNECTED", + "lastReceivedLsn": "71000009407900001", + "lastReceivedTime": "2023-05-01T00:00:00Z", + "lastCommitLsn": "71000009407900004", + "lastCommitTime": "2023-05-01T00:00:00Z", + "lastHardenedLsn": "71000009408100001", + "lastHardenedTime": "2023-05-01T00:00:00Z", + "lastBackupLsn": "71000009405700001", + "lastBackupTime": "2023-05-01T00:00:00Z", + "instanceSendReplicationLagSeconds": 1, + "instanceRedoReplicationLagSeconds": 1 + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag", + "name": "dag", + "type": "Microsoft.Sql/managedInstances/distributedAvailabilityGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsListByInstance.json new file mode 100644 index 000000000000..4583917d14a4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsListByInstance.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "distributedAvailabilityGroupName": "dag", + "distributedAvailabilityGroupId": "c856cff5-a6fe-418e-8894-17799cc20f5d", + "replicationMode": "Async", + "partnerLinkRole": "Secondary", + "partnerAvailabilityGroupName": "BoxLocalAg1", + "partnerEndpoint": "TCP://SERVER:7022", + "instanceLinkRole": "Primary", + "instanceAvailabilityGroupName": "testcl", + "failoverMode": "None", + "seedingMode": "Automatic", + "databases": [ + { + "databaseName": "testdb", + "instanceReplicaId": "4713ed91-1e8c-497d-9bd4-d8a3935ae49a", + "partnerReplicaId": "8ffa9723-a1ec-4323-b929-c4aedee3894b", + "replicaState": "Catchup", + "synchronizationHealth": "HEALTHY", + "connectedState": "CONNECTED", + "lastReceivedLsn": "71000009407900001", + "lastReceivedTime": "2023-05-01T00:00:00Z", + "lastCommitLsn": "71000009407900004", + "lastCommitTime": "2023-05-01T00:00:00Z", + "lastHardenedLsn": "71000009408100001", + "lastHardenedTime": "2023-05-01T00:00:00Z", + "lastBackupLsn": "71000009405700001", + "lastBackupTime": "2023-05-01T00:00:00Z", + "instanceSendReplicationLagSeconds": 1, + "instanceRedoReplicationLagSeconds": 1 + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag", + "name": "dag", + "type": "Microsoft.Sql/managedInstances/distributedAvailabilityGroups" + }, + { + "properties": { + "distributedAvailabilityGroupName": "dag2", + "distributedAvailabilityGroupId": "8a52d869-c17e-4546-ab03-e038569e672a", + "replicationMode": "Async", + "partnerLinkRole": "Primary", + "partnerAvailabilityGroupName": "BoxLocalAg2", + "partnerEndpoint": "TCP://SERVER:7022", + "instanceLinkRole": "Secondary", + "instanceAvailabilityGroupName": "testcl2", + "databases": [ + { + "databaseName": "testdb2", + "instanceReplicaId": "81608df4-0840-4219-b3ae-9cc46be9dae9", + "partnerReplicaId": "57bc3421-e77a-4fdc-8a62-af105c4b1e38", + "replicaState": "Catchup", + "synchronizationHealth": "HEALTHY", + "connectedState": "CONNECTED", + "lastReceivedLsn": "71000009407900001", + "lastReceivedTime": "2023-05-01T00:00:00Z", + "lastCommitLsn": "71000009407900004", + "lastCommitTime": "2023-05-01T00:00:00Z", + "lastHardenedLsn": "71000009408100001", + "lastHardenedTime": "2023-05-01T00:00:00Z", + "lastBackupLsn": "71000009405700001", + "lastBackupTime": "2023-05-01T00:00:00Z" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag2", + "name": "dag2", + "type": "Microsoft.Sql/managedInstances/distributedAvailabilityGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsSetRole.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsSetRole.json new file mode 100644 index 000000000000..b22cece5e727 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsSetRole.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "distributedAvailabilityGroupName": "dag", + "api-version": "2023-05-01-preview", + "parameters": { + "instanceRole": "Primary", + "roleChangeType": "Forced" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "distributedAvailabilityGroupName": "dag", + "instanceLinkRole": "Primary" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag", + "name": "dag", + "type": "Microsoft.Sql/managedInstances/distributedAvailabilityGroups" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/f2669dff-5f08-45dd-b857-b2a60b72cdc9/providers/Microsoft.Sql/locations/westus/distributedAvailabilityGroupsOperationResults/00000000-1111-2222-3333-444444444444?api-version=2021-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsUpdate.json new file mode 100644 index 000000000000..d4dbf39ef778 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DistributedAvailabilityGroupsUpdate.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "distributedAvailabilityGroupName": "dag", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "replicationMode": "Sync" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "distributedAvailabilityGroupName": "dag", + "replicationMode": "Sync" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag", + "name": "dag", + "type": "Microsoft.Sql/managedInstances/distributedAvailabilityGroups" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/distributedAvailabilityGroupsOperationResults/1f2b3c4d-5f6g-7h8i-9j0k-1l2m3n4o5p6q?api-version=2023-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateMax.json new file mode 100644 index 000000000000..80890faba670 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateMax.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "Japan East", + "sku": { + "name": "GP_Gen4_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 2.0 + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_Gen4_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 2.0 + } + } + } + }, + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-10-01" + }, + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_Gen4_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 2.0 + } + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-10-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateMin.json new file mode 100644 index 000000000000..90da5a41a194 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateMin.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "Japan East" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "StandardPool", + "tier": "Standard", + "capacity": 100 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 100 + } + } + } + }, + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-10-01" + }, + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "StandardPool", + "tier": "Standard", + "capacity": 100 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 100 + } + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-10-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateServerlessProperties.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateServerlessProperties.json new file mode 100644 index 000000000000..1ad5b8e6edc0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateServerlessProperties.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "Japan East", + "sku": { + "name": "GP_S_Gen5_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "minCapacity": 0.5, + "autoPauseDelay": 60, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 2.0, + "autoPauseDelay": 80 + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_S_Gen5_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "minCapacity": 0.5, + "autoPauseDelay": 60, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 2.0, + "autoPauseDelay": 80 + } + } + } + }, + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-05-01" + }, + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_S_Gen5_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "minCapacity": 0.5, + "autoPauseDelay": 60, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 2.0, + "autoPauseDelay": 80 + } + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-05-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json new file mode 100644 index 000000000000..92e97d482a1a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "Japan East", + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "StandardPool", + "tier": "Standard", + "capacity": 100 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 100 + }, + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + }, + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2020-08-01" + }, + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "StandardPool", + "tier": "Standard", + "capacity": 100 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 100 + }, + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2020-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateWithDefaultPreferredEnclaveType.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateWithDefaultPreferredEnclaveType.json new file mode 100644 index 000000000000..0bf2f93df274 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateWithDefaultPreferredEnclaveType.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "Japan East", + "sku": { + "name": "GP_Gen5_4" + }, + "properties": { + "preferredEnclaveType": "Default" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2022-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "preferredEnclaveType": "Default" + } + } + }, + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + }, + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2022-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "preferredEnclaveType": "Default" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateWithVBSPreferredEnclaveType.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateWithVBSPreferredEnclaveType.json new file mode 100644 index 000000000000..2afe9840bb22 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolCreateWithVBSPreferredEnclaveType.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "Japan East", + "sku": { + "name": "GP_Gen5_4" + }, + "properties": { + "preferredEnclaveType": "VBS" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2022-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "preferredEnclaveType": "VBS" + } + } + }, + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + }, + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2022-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "preferredEnclaveType": "VBS" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolDelete.json new file mode 100644 index 000000000000..16da14f82db6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolDelete.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-3129", + "serverName": "sqlcrudtest-228", + "elasticPoolName": "sqlcrudtest-3851", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2020-08-01" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2020-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolGet.json new file mode 100644 index 000000000000..0f29fd25161c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolGet.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_Gen5_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-10-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 1.0 + }, + "zoneRedundant": true, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json new file mode 100644 index 000000000000..4f2c0cb8118e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2022-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "highAvailabilityReplicaCount": 2, + "preferredEnclaveType": "VBS" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolListByServer.json new file mode 100644 index 000000000000..9f062ab62205 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolListByServer.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-2729", + "name": "sqlcrudtest-2729", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_Gen4_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:27:21.32Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 1.0 + }, + "zoneRedundant": true, + "licenseType": "LicenseIncluded" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-3191", + "name": "sqlcrudtest-3191", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BasicPool", + "tier": "Basic", + "capacity": 50 + }, + "properties": { + "creationDate": "2017-02-10T01:26:26.45Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 5 + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BasicPool", + "tier": "Basic", + "capacity": 50 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 5 + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json new file mode 100644 index 000000000000..3f7123110bf6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BasicPool", + "tier": "Basic", + "capacity": 50 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 5 + }, + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2020-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateMax.json new file mode 100644 index 000000000000..c840e2ebb89f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateMax.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "properties": { + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 1.0 + }, + "zoneRedundant": true, + "licenseType": "LicenseIncluded" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:27:21.32Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 1.0 + }, + "zoneRedundant": true, + "licenseType": "LicenseIncluded" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-10-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateMin.json new file mode 100644 index 000000000000..558060218ef9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateMin.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BasicPool", + "tier": "Basic", + "capacity": 50 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 5 + } + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-10-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json new file mode 100644 index 000000000000..fe2d972c49cc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "BasicPool", + "tier": "Basic", + "capacity": 50 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 5 + } + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2020-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateServerlessProperties.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateServerlessProperties.json new file mode 100644 index 000000000000..8a513483c9a7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateServerlessProperties.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "GP_S_Gen5_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "minCapacity": 0.5, + "autoPauseDelay": 60, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 2.0, + "autoPauseDelay": 80 + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_S_Gen5_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-02-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 102400, + "minCapacity": 0.5, + "autoPauseDelay": 60, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 2.0, + "autoPauseDelay": 80 + } + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-05-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateWithDefaultPreferredEnclaveType.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateWithDefaultPreferredEnclaveType.json new file mode 100644 index 000000000000..d0a63c1e20ea --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateWithDefaultPreferredEnclaveType.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "GP_Gen5_4" + }, + "properties": { + "preferredEnclaveType": "Default" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2022-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "preferredEnclaveType": "Default" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateWithVBSPreferredEnclaveType.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateWithVBSPreferredEnclaveType.json new file mode 100644 index 000000000000..0e8c01644e64 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ElasticPoolUpdateWithVBSPreferredEnclaveType.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "GP_Gen5_4" + }, + "properties": { + "preferredEnclaveType": "VBS" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2022-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "preferredEnclaveType": "VBS" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json new file mode 100644 index 000000000000..48187f8de443 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "serverKeyType": "AzureKeyVault", + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "autoRotationEnabled": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/servers/encryptionProtector", + "location": "West US", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "autoRotationEnabled": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json new file mode 100644 index 000000000000..c06741920fa2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "serverKeyType": "ServiceManaged", + "serverKeyName": "ServiceManaged" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/servers/encryptionProtector", + "location": "West US", + "kind": "servicemanaged", + "properties": { + "serverKeyName": "ServiceManaged", + "serverKeyType": "ServiceManaged" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorGet.json new file mode 100644 index 000000000000..728a0641c657 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorGet.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/servers/encryptionProtector", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901", + "autoRotationEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorList.json new file mode 100644 index 000000000000..3cc930c22341 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorList.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/servers/encryptionProtector", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorRevalidate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorRevalidate.json new file mode 100644 index 000000000000..97c014eafe7e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EncryptionProtectorRevalidate.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/encryptionProtectorOperationResults/00000000-1111-2222-3333-444444444444?api-version=2020-02-02-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EndpointCertificatesGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EndpointCertificatesGet.json new file mode 100644 index 000000000000..36039e1c4e40 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EndpointCertificatesGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "38e0dc56-907f-45ba-a97c-74233baad471", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "endpointType": "DATABASE_MIRRORING", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "publicBlob": "0x308203B23082021AA003020102021034C597BA" + }, + "id": "/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/endpointCertificates/DATABASE_MIRRORING", + "name": "DATABASE_MIRRORING", + "type": "Microsoft.Sql/managedInstances/endpointCertificates" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EndpointCertificatesListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EndpointCertificatesListByInstance.json new file mode 100644 index 000000000000..d30f893b04f6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/EndpointCertificatesListByInstance.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "38e0dc56-907f-45ba-a97c-74233baad471", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "publicBlob": "0x308203B23082021AA003020102021034C597BA" + }, + "id": "/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/endpointCertificates/SERVICE_BROKER", + "name": "SERVICE_BROKER", + "type": "Microsoft.Sql/managedInstances/endpointCertificates" + }, + { + "properties": { + "publicBlob": "0x308203B23082021AA003020102021034C597BA" + }, + "id": "/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/endpointCertificates/DATABASE_MIRRORING", + "name": "DATABASE_MIRRORING", + "type": "Microsoft.Sql/managedInstances/endpointCertificates" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExportDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExportDatabase.json new file mode 100644 index 000000000000..0983ddea11d1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExportDatabase.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Export", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/importExportOperationResults/00000000-0000-0000-0000-000000000000" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExportDatabaseUsingDatabaseExtensions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExportDatabaseUsingDatabaseExtensions.json new file mode 100644 index 000000000000..85eed454b3a3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExportDatabaseUsingDatabaseExtensions.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "0ca8cd24-0b47-4ad5-bc7e-d70e35c44adf", + "resourceGroupName": "rg_d1ef9eae-044d-4710-ba59-b82e84ad3157", + "serverName": "srv_9243d320-ac4e-4f97-8e06-b1167dae5f4c", + "databaseName": "db_7fe424c8-23cf-4ac3-bdc3-e21f424bdb68", + "extensionName": "Export", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "operationMode": "Export", + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "storageUri": "https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "10000000-0000-0000-0000-000000000002", + "requestType": "Export", + "lastModifiedTime": "lastModifiedTime", + "serverName": "srv_9243d320-ac4e-4f97-8e06-b1167dae5f4c", + "databaseName": "db_7fe424c8-23cf-4ac3-bdc3-e21f424bdb68", + "status": "Completed", + "queuedTime": "09/10/2021 18:35:10", + "blobUri": "https://teststorage.blob.core.windows.net/testcontainer/samplebacpac.bacpac", + "privateEndpointConnections": [] + }, + "id": "10000000-0000-0000-0000-000000000002", + "name": "10000000-0000-0000-0000-000000000002", + "type": "Microsoft.Sql/servers/databases/extensions" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExportDatabaseWithNetworkIsolation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExportDatabaseWithNetworkIsolation.json new file mode 100644 index 000000000000..60f6806b5432 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExportDatabaseWithNetworkIsolation.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql", + "networkIsolation": { + "sqlServerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr", + "storageAccountResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Export", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/importExportOperationResults/00000000-0000-0000-0000-000000000000" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json new file mode 100644 index 000000000000..892a095c7bd9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true, + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "isAzureMonitorTargetEnabled": true, + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json new file mode 100644 index 000000000000..5320c277b76c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": true + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", + "UPDATE on database::TestDatabaseName by public" + ], + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": true + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json new file mode 100644 index 000000000000..5b2dd5b186d2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json new file mode 100644 index 000000000000..f2f812dc3bfb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-6852", + "serverName": "blobauditingtest-2080", + "databaseName": "testdb", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json new file mode 100644 index 000000000000..db3152495d0a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": true + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json new file mode 100644 index 000000000000..ab04eab6dd0d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": false + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedServerBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedServerBlobAuditingGet.json new file mode 100644 index 000000000000..7f63b33b14de --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ExtendedServerBlobAuditingGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverDatabase.json new file mode 100644 index 000000000000..ec72b486b645 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverDatabase.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "testServer", + "databaseName": "testDatabase", + "replicaType": "Primary", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Sql/locations/japaneast/databaseOperationResults/00000000-0000-0000-0000-000000000000" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverElasticPool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverElasticPool.json new file mode 100644 index 000000000000..a001b9e0b4c2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverElasticPool.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "testServer", + "elasticPoolName": "testElasticPool", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2018-06-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupCreateOrUpdate.json new file mode 100644 index 000000000000..79775917d6b1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupCreateOrUpdate.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "failoverGroupName": "failover-group-test-3", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2" + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2" + ] + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupCreateOrUpdateStandbySecondary.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupCreateOrUpdateStandbySecondary.json new file mode 100644 index 000000000000..085e73dd5614 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupCreateOrUpdateStandbySecondary.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "failoverGroupName": "failover-group-test-3", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2" + ], + "secondaryType": "Standby" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2" + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2" + ] + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupDelete.json new file mode 100644 index 000000000000..36e828c2425f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "failoverGroupName": "failover-group-test-1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupFailover.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupFailover.json new file mode 100644 index 000000000000..75dab445a1d2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupFailover.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-secondary-server", + "failoverGroupName": "failover-group-test-3", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan West", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server", + "location": "Japan East", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-2" + ] + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japanwest/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json new file mode 100644 index 000000000000..75dab445a1d2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-secondary-server", + "failoverGroupName": "failover-group-test-3", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan West", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server", + "location": "Japan East", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-2" + ] + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japanwest/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupGet.json new file mode 100644 index 000000000000..52f1a1561eb0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupGet.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failovergroupprimaryserver", + "failoverGroupName": "failovergrouptest3", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupprimaryserver/failoverGroups/failovergrouptest3", + "name": "failovergrouptest3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan West", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Enabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupsecondaryserver" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupsecondaryserver", + "location": "Japan East", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupprimaryserver/databases/testdb1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupprimaryserver/databases/testdb2" + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupList.json new file mode 100644 index 000000000000..10bf967c4b0e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupList.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test", + "name": "failover-group-test", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-2", + "name": "failover-group-test-2", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupTryPlannedBeforeForcedFailover.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupTryPlannedBeforeForcedFailover.json new file mode 100644 index 000000000000..c98a1c0320e2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupTryPlannedBeforeForcedFailover.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failovergroupsecondaryserver", + "failoverGroupName": "failovergrouptest3", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupsecondaryserver/failoverGroups/failovergrouptest3", + "name": "failovergrouptest3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan West", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupprimaryserver" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupprimaryserver", + "location": "Japan East", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupsecondaryserver/databases/testdb1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupsecondaryserver/databases/testdb2" + ] + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japanwest/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupUpdate.json new file mode 100644 index 000000000000..b531f613e7c2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupUpdate.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "failoverGroupName": "failover-group-test-1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1" + ] + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupUpdateStandbySecondary.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupUpdateStandbySecondary.json new file mode 100644 index 000000000000..41c50001a75f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupUpdateStandbySecondary.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "failover-group-primary-server", + "failoverGroupName": "failover-group-test-1", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1" + ], + "secondaryType": "Standby" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/servers/failoverGroups", + "location": "Japan East", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 120 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled", + "targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerServers": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server", + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "databases": [ + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1" + ] + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverManagedInstance.json new file mode 100644 index 000000000000..1f3b55457f8b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverManagedInstance.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "managedInstanceName": "instanceName", + "replicaType": "Primary", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/managedInstanceOperationResults/00000000-1111-2222-3333-444444444444?api-version=2019-06-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleCreate.json new file mode 100644 index 000000000000..cb272bb98feb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleCreate.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "firewallRuleName": "firewallrulecrudtest-5370", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "startIpAddress": "0.0.0.3", + "endIpAddress": "0.0.0.3" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.3", + "endIpAddress": "0.0.0.3" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "properties": { + "startIpAddress": "0.0.0.3", + "endIpAddress": "0.0.0.3" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleDelete.json new file mode 100644 index 000000000000..43df8cb6f991 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-9886", + "serverName": "firewallrulecrudtest-2368", + "firewallRuleName": "firewallrulecrudtest-7011", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleGet.json new file mode 100644 index 000000000000..ddd51bd618e1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "firewallRuleName": "firewallrulecrudtest-2304", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-2304", + "name": "firewallrulecrudtest-2304", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleList.json new file mode 100644 index 000000000000..600d0f61dc65 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleList.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-2304", + "name": "firewallrulecrudtest-2304", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "0.0.0.0" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927", + "name": "firewallrulecrudtest-3927", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.1", + "endIpAddress": "0.0.0.1" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.3", + "endIpAddress": "0.0.0.3" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5767", + "name": "firewallrulecrudtest-5767", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.2", + "endIpAddress": "0.0.0.2" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleReplace.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleReplace.json new file mode 100644 index 000000000000..a2ef04c432b7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleReplace.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "api-version": "2023-05-01-preview", + "parameters": { + "values": [ + { + "name": "firewallrulecrudtest-5370 ", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "100.0.0.0" + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.3", + "endIpAddress": "0.0.0.3" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleUpdate.json new file mode 100644 index 000000000000..0ba7a1070396 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FirewallRuleUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "firewallRuleName": "firewallrulecrudtest-3927", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "startIpAddress": "0.0.0.1", + "endIpAddress": "0.0.0.1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927", + "name": "firewallrulecrudtest-3927", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.1", + "endIpAddress": "0.0.0.1" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927", + "name": "firewallrulecrudtest-3927", + "type": "Microsoft.Sql/servers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.1", + "endIpAddress": "0.0.0.1" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GeoBackupPoliciesCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GeoBackupPoliciesCreateOrUpdate.json new file mode 100644 index 000000000000..f1c9a1a14ab0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GeoBackupPoliciesCreateOrUpdate.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-5961", + "databaseName": "testdw", + "geoBackupPolicyName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/geoBackupPolicies", + "location": null, + "kind": null, + "properties": { + "state": "Enabled", + "storageType": null + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/geoBackupPolicies", + "location": null, + "kind": null, + "properties": { + "state": "Enabled", + "storageType": null + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GeoBackupPoliciesGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GeoBackupPoliciesGet.json new file mode 100644 index 000000000000..e5471a420906 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GeoBackupPoliciesGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-5961", + "databaseName": "testdw", + "geoBackupPolicyName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/geoBackupPolicies", + "location": "Central US", + "kind": null, + "properties": { + "state": "Enabled", + "storageType": "Premium" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GeoBackupPoliciesList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GeoBackupPoliciesList.json new file mode 100644 index 000000000000..0bca516c8118 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GeoBackupPoliciesList.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-5961", + "databaseName": "testdw", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/geoBackupPolicies", + "location": "Central US", + "kind": null, + "properties": { + "state": "Enabled", + "storageType": "Premium" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDataWarehouseUserActivities.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDataWarehouseUserActivities.json new file mode 100644 index 000000000000..4a664f951249 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDataWarehouseUserActivities.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "dataWarehouseUserActivityName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "activeQueriesCount": 0 + }, + "id": "subscriptions/326affc3-21f4-4471-a545-e37430b70113/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/testsvr/databases/dwdb01/dataWarehouseUserActivities/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/dataWarehouseUserActivities" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDatabaseExtensions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDatabaseExtensions.json new file mode 100644 index 000000000000..0e495cef7bdc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDatabaseExtensions.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "a3473687-7581-41e1-ac24-6bcca5843f07", + "resourceGroupName": "rg_a1f9d6f8-30d5-4228-9504-8a364361bca3", + "serverName": "srv_65858e0f-b1d1-4bdc-8351-a7da86ca4939", + "databaseName": "11aa6c5e-58ed-4693-b303-3b8e3131deaa", + "extensionName": "polybaseimport", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDatabaseUsages.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDatabaseUsages.json new file mode 100644 index 000000000000..a72429b18b76 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDatabaseUsages.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "displayName": "Database Size", + "currentValue": 4194304.0, + "limit": 268435456000.0, + "unit": "Bytes" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/usages/database_size", + "name": "database_size", + "type": "Microsoft.Sql/servers/databases/usages" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDatabaseWithAvailabilityZone.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDatabaseWithAvailabilityZone.json new file mode 100644 index 000000000000..9eb20420ad0d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetDatabaseWithAvailabilityZone.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentBackupStorageRedundancy": "Geo", + "currentServiceObjectiveName": "S0", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isLedgerOn": false, + "availabilityZone": "1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetElasticPoolWithAvailabilityZone.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetElasticPoolWithAvailabilityZone.json new file mode 100644 index 000000000000..34bcda69bd45 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetElasticPoolWithAvailabilityZone.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_Gen5_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-10-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "perDatabaseSettings": { + "minCapacity": 0.25, + "maxCapacity": 1.0 + }, + "zoneRedundant": true, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1", + "availabilityZone": "1" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetElasticPoolWithServerlessProperties.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetElasticPoolWithServerlessProperties.json new file mode 100644 index 000000000000..1d78be6efc6f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetElasticPoolWithServerlessProperties.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": null, + "sku": { + "name": "GP_S_Gen5_2", + "tier": "GeneralPurpose", + "capacity": 2 + }, + "properties": { + "creationDate": "2017-10-10T01:25:25.033Z", + "state": "Ready", + "maxSizeBytes": 5242880000, + "minCapacity": 0.5, + "autoPauseDelay": 60, + "perDatabaseSettings": { + "minCapacity": 0, + "maxCapacity": 1.0, + "autoPauseDelay": 60 + }, + "zoneRedundant": true, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetInstancePool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetInstancePool.json new file mode 100644 index 000000000000..0f35e7dc2694 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetInstancePool.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded", + "dnsZone": "1234567890", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJob.json new file mode 100644 index 000000000000..1eee4145a729 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJob.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "my favourite job", + "version": 0, + "schedule": { + "startTime": "2015-09-24T18:30:01Z", + "endTime": "2015-09-24T23:59:59Z", + "type": "Once", + "enabled": true + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobAgent.json new file mode 100644 index 000000000000..58121fcefa05 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobAgent.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "JA400", + "capacity": 400 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobCredential.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobCredential.json new file mode 100644 index 000000000000..e97d417ea275 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobCredential.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "credentialName": "cred1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name": "cred1", + "type": "Microsoft.Sql/servers/jobAccounts/credentials", + "properties": { + "username": "myuser" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobExecution.json new file mode 100644 index 000000000000..ff431681324d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobExecution.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-12-21T19:02:00.8707045Z", + "startTime": "2017-12-21T19:12:00.8707045Z", + "endTime": "2017-12-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-11-13T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobExecutionStep.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobExecutionStep.json new file mode 100644 index 000000000000..b77782e73d04 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobExecutionStep.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "stepName": "step1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "stepName": "step1", + "stepId": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-27T04:33:15.7189151Z", + "startTime": "2017-12-27T04:33:16.176937Z", + "endTime": "2017-12-27T04:33:19.0600862Z", + "currentAttempts": 1, + "currentAttemptStartTime": "2017-12-27T04:33:17.4840068Z", + "lastMessage": "Step 1 succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobExecutionTarget.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobExecutionTarget.json new file mode 100644 index 000000000000..69703a1c119e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobExecutionTarget.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "stepName": "step1", + "targetId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "stepName": "step1", + "stepId": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-11-05T04:33:17.5133333Z", + "startTime": "2017-11-05T04:33:18.1230403Z", + "endTime": "2017-11-05T04:33:18.7031029Z", + "currentAttempts": 1, + "currentAttemptStartTime": "2017-11-05T04:33:18.2391013Z", + "lastMessage": "Step 1 succeeded execution on target (server 'server1', database 'database1').", + "target": { + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1/targets/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json new file mode 100644 index 000000000000..82cd42f11206 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "privateEndpointName": "endpoint1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint1", + "name": "endpoint1", + "type": "Microsoft.Sql/servers/jobAgents/privateEndpoints", + "properties": { + "targetServerAzureResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1", + "privateEndpointId": "EJ_47e33188-85ff-4705-8d78-444444444444_endpoint1" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobStepByJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobStepByJob.json new file mode 100644 index 000000000000..0f1442771cab --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobStepByJob.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "stepName": "step1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobStepByVersion.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobStepByVersion.json new file mode 100644 index 000000000000..acd5b30a4ccc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobStepByVersion.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobVersion": "1", + "stepName": "step1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions/steps" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobTargetGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobTargetGroup.json new file mode 100644 index 000000000000..7afb41074948 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobTargetGroup.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "targetGroupName": "targetGroup1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "members": [ + { + "membershipType": "Exclude", + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + }, + { + "membershipType": "Include", + "type": "SqlServer", + "serverName": "server1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlElasticPool", + "serverName": "server2", + "elasticPoolName": "pool1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlShardMap", + "serverName": "server3", + "shardMapName": "shardMap1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobVersion.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobVersion.json new file mode 100644 index 000000000000..6059e38bf7ab --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobVersion.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobVersion": "1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1", + "name": "1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetListManagedShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetListManagedShortTermRetentionPolicy.json new file mode 100644 index 000000000000..7b671b2a13c9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetListManagedShortTermRetentionPolicy.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json new file mode 100644 index 000000000000..c848d6527606 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "testsvr", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetMaintenanceWindowOptions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetMaintenanceWindowOptions.json new file mode 100644 index 000000000000..104f1dc11fa0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetMaintenanceWindowOptions.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "maintenanceWindowOptionsName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "isEnabled": true, + "maintenanceWindowCycles": [ + { + "dayOfWeek": "Saturday", + "startTime": "00:00:00", + "duration": "PT60M" + } + ], + "minDurationInMinutes": 60, + "defaultDurationInMinutes": 120, + "minCycles": 2, + "timeGranularityInMinutes": 5, + "allowMultipleMaintenanceWindowsPerCycle": true + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/maintenancewindowoptions/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/maintenancewindows" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetMaintenanceWindows.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetMaintenanceWindows.json new file mode 100644 index 000000000000..badc32d1801a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetMaintenanceWindows.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "maintenanceWindowName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "timeRanges": [ + { + "dayOfWeek": "Saturday", + "startTime": "00:00:00", + "duration": "PT60M" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/maintenancewindows/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/maintenancewindows" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetManagedInstanceOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetManagedInstanceOperation.json new file mode 100644 index 000000000000..6e41c7725a7e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetManagedInstanceOperation.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "operationId": "00000000-1111-2222-3333-444444444444", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "Cancelled", + "isCancellable": false, + "operationSteps": { + "totalSteps": "6", + "currentStep": 2, + "stepsList": [ + { + "order": 1, + "name": "Request validation", + "status": "Completed", + "stepEndTime": "2019-12-06T11:08:45.57Z", + "stepStartTime": "2019-12-06T11:08:44.49Z", + "timeElapsed": "0" + }, + { + "order": 2, + "name": "Virtual Cluster resize/creation", + "status": "Completed", + "stepEndTime": "2019-12-06T11:23:05.47Z", + "stepStartTime": "2019-12-06T11:08:46.05Z", + "timeElapsed": "14" + }, + { + "order": 3, + "name": "New SQL Instance Startup", + "status": "Canceled", + "stepEndTime": "2019-12-06T11:23:11.51Z", + "stepStartTime": "2019-12-06T11:23:05.55Z", + "timeElapsed": "0" + }, + { + "order": 4, + "name": "Seeding database files", + "status": "NotStarted" + }, + { + "order": 5, + "name": "Preparing Failover and Failover", + "status": "NotStarted" + }, + { + "order": 6, + "name": "Old SQL Instance cleanup", + "status": "NotStarted" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/managedInstances/operations" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetManagedShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetManagedShortTermRetentionPolicy.json new file mode 100644 index 000000000000..6c481790525b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetManagedShortTermRetentionPolicy.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json new file mode 100644 index 000000000000..25197285ddf9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "testsvr", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "policyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstance/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRecoverableManagedDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRecoverableManagedDatabase.json new file mode 100644 index 000000000000..233011aaae85 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRecoverableManagedDatabase.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "recoverableDatabaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "lastAvailableBackupDate": "2017-05-26T01:06:29.78Z" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/managedInstances/recoverableDatabases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRestorableDroppedDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRestorableDroppedDatabase.json new file mode 100644 index 000000000000..40952b7fd6f1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRestorableDroppedDatabase.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen4_2", + "tier": "BusinessCritical" + }, + "properties": { + "databaseName": "testdb", + "maxSizeBytes": 268435456000, + "creationDate": "2017-05-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z", + "backupStorageRedundancy": "Geo" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb", + "name": "testdb,131403269876900000", + "type": "Microsoft.Sql/servers/restorableDroppedDatabases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json new file mode 100644 index 000000000000..06c45d9dacfb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "api-version": "2023-05-01-preview", + "$expand": "keys" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen4_2", + "tier": "BusinessCritical" + }, + "properties": { + "databaseName": "testdb", + "maxSizeBytes": 268435456000, + "creationDate": "2017-05-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z", + "backupStorageRedundancy": "Geo", + "keys": { + "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": {}, + "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version": {} + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb", + "name": "testdb,131403269876900000", + "type": "Microsoft.Sql/servers/restorableDroppedDatabases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json new file mode 100644 index 000000000000..b9de9c922f6f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "databaseName": "testdb", + "creationDate": "2017-05-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000", + "name": "testdb,131403269876900000", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetShortTermRetentionPolicy.json new file mode 100644 index 000000000000..21fdd73cdf0a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetShortTermRetentionPolicy.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 7, + "diffBackupIntervalInHours": 24 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabase.json new file mode 100644 index 000000000000..151a903736b2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabase.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen5_2", + "requestedServiceObjectiveName": "BC_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1", + "currentSku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabaseDefaultEnclave.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabaseDefaultEnclave.json new file mode 100644 index 000000000000..86c1c759c1b1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabaseDefaultEnclave.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen5_2", + "requestedServiceObjectiveName": "BC_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1", + "currentSku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "preferredEnclaveType": "Default" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabaseVBSEnclave.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabaseVBSEnclave.json new file mode 100644 index 000000000000..859b5aa6c7bf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabaseVBSEnclave.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen5_2", + "requestedServiceObjectiveName": "BC_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1", + "currentSku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "preferredEnclaveType": "VBS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabaseWithExpandEqualsKeys.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabaseWithExpandEqualsKeys.json new file mode 100644 index 000000000000..5e76ae255298 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetVCoreDatabaseWithExpandEqualsKeys.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "$expand": "keys" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen5_2", + "requestedServiceObjectiveName": "BC_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1", + "currentSku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "keys": { + "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": {}, + "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version": {} + }, + "encryptionProtector": "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadClassifier.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadClassifier.json new file mode 100644 index 000000000000..d996b17af941 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadClassifier.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "workloadClassifierName": "wlm_classifier", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "memberName": "dbo", + "label": "test_label", + "context": "test_context", + "startTime": "12:00", + "endTime": "14:00", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_classifier", + "name": "wlm_classifier", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadClassifierList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadClassifierList.json new file mode 100644 index 000000000000..891475b02175 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadClassifierList.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "wlm_workloadgroup", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "memberName": "dbo", + "label": "", + "context": "", + "startTime": "", + "endTime": "", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier3", + "name": "classifier3", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + }, + { + "properties": { + "memberName": "dbo", + "label": "test_label", + "context": "test_context", + "startTime": "12:00", + "endTime": "14:00", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier1", + "name": "classifier1", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + }, + { + "properties": { + "memberName": "dbo", + "label": "", + "context": "", + "startTime": "11:00", + "endTime": "17:00", + "importance": "high" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier2", + "name": "classifier2", + "type": "Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadGroup.json new file mode 100644 index 000000000000..bd54369135b7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadGroup.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "workloadGroupName": "smallrc", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 3.0, + "maxResourcePercentPerRequest": 3.0, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadGroupList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadGroupList.json new file mode 100644 index 000000000000..4c429d3f98e1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetWorkloadGroupList.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 5, + "maxResourcePercentPerRequest": 5, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc", + "name": "smallrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + }, + { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 10, + "maxResourcePercentPerRequest": 10, + "importance": "normal", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/mediumrc", + "name": "mediumrc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + }, + { + "properties": { + "minResourcePercent": 0, + "maxResourcePercent": 100, + "minResourcePercentPerRequest": 20, + "maxResourcePercentPerRequest": 20, + "importance": "high", + "queryExecutionTimeout": 0 + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/largerc", + "name": "largerc", + "type": "Microsoft.Sql/servers/databases/workloadGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json new file mode 100644 index 000000000000..0d7a0ba60fcc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "Japan East", + "sku": { + "name": "HS_Gen5_4" + }, + "properties": { + "highAvailabilityReplicaCount": 2 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2021-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "highAvailabilityReplicaCount": 2 + } + } + }, + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2021-08-01" + }, + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2021-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "highAvailabilityReplicaCount": 2 + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2021-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/HyperscaleElasticPoolGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/HyperscaleElasticPoolGet.json new file mode 100644 index 000000000000..c4cf91ae34c6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/HyperscaleElasticPoolGet.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2021-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "highAvailabilityReplicaCount": 2 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json new file mode 100644 index 000000000000..752fa3c0e792 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-2369", + "serverName": "sqlcrudtest-8069", + "elasticPoolName": "sqlcrudtest-8102", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "highAvailabilityReplicaCount": 2 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102", + "name": "sqlcrudtest-8102", + "type": "Microsoft.Sql/servers/elasticPools", + "location": "Japan East", + "kind": "vcore,pool", + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 4 + }, + "properties": { + "state": "Ready", + "creationDate": "2021-08-26T03:46:20.57Z", + "maxSizeBytes": 0, + "perDatabaseSettings": { + "minCapacity": 0.0, + "maxCapacity": 4.0 + }, + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "highAvailabilityReplicaCount": 2 + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2021-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleCreate.json new file mode 100644 index 000000000000..473de5018147 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleCreate.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "firewallRuleName": "firewallrulecrudtest-5370", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0003", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0003" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "type": "Microsoft.Sql/servers/ipv6FirewallRules", + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0003", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0003" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0003", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0003" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleDelete.json new file mode 100644 index 000000000000..43df8cb6f991 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-9886", + "serverName": "firewallrulecrudtest-2368", + "firewallRuleName": "firewallrulecrudtest-7011", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleGet.json new file mode 100644 index 000000000000..f693d0616d52 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "firewallRuleName": "firewallrulecrudtest-2304", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-2304", + "name": "firewallrulecrudtest-2304", + "type": "Microsoft.Sql/servers/ipv6FirewallRules", + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0000", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0000" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleList.json new file mode 100644 index 000000000000..b13fb54000b8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleList.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-2304", + "name": "firewallrulecrudtest-2304", + "type": "Microsoft.Sql/servers/ipv6FirewallRules", + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0000", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0000" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-3927", + "name": "firewallrulecrudtest-3927", + "type": "Microsoft.Sql/servers/ipv6FirewallRules", + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0001", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0001" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-5370", + "name": "firewallrulecrudtest-5370", + "type": "Microsoft.Sql/servers/ipv6FirewallRules", + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0003", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0003" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-5767", + "name": "firewallrulecrudtest-5767", + "type": "Microsoft.Sql/servers/ipv6FirewallRules", + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0002", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0002" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleUpdate.json new file mode 100644 index 000000000000..e267c4c25301 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/IPv6FirewallRuleUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "firewallrulecrudtest-12", + "serverName": "firewallrulecrudtest-6285", + "firewallRuleName": "firewallrulecrudtest-3927", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0001", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0001" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-3927", + "name": "firewallrulecrudtest-3927", + "type": "Microsoft.Sql/servers/ipv6FirewallRules", + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0001", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0001" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-3927", + "name": "firewallrulecrudtest-3927", + "type": "Microsoft.Sql/servers/ipv6FirewallRules", + "properties": { + "startIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0001", + "endIPv6Address": "0000:0000:0000:0000:0000:ffff:0000:0001" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportDatabase.json new file mode 100644 index 000000000000..0fc7b49b459e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportDatabase.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Import", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/importExportOperationResults/00000000-0000-0000-0000-000000000000" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportDatabaseUsingDatabaseExtensions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportDatabaseUsingDatabaseExtensions.json new file mode 100644 index 000000000000..06dc20112537 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportDatabaseUsingDatabaseExtensions.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "17ca4d13-bf7d-4c33-a60e-b87a2820a325", + "resourceGroupName": "rg_062866bf-c4f4-41f9-abf0-b59132ca7924", + "serverName": "srv_2d6be2d2-26c8-4930-8fb6-82a5e95e0e82", + "databaseName": "db_2a47e946-e414-4c00-94ac-ed886bb78302", + "extensionName": "Import", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "operationMode": "Import", + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "storageUri": "https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "10000000-0000-0000-0000-000000000002", + "requestType": "Import", + "lastModifiedTime": "lastModifiedTime", + "serverName": "srv_2d6be2d2-26c8-4930-8fb6-82a5e95e0e82", + "databaseName": "db_2a47e946-e414-4c00-94ac-ed886bb78302", + "status": "Completed", + "queuedTime": "09/10/2021 18:35:10", + "blobUri": "https://teststorage.blob.core.windows.net/testcontainer/samplebacpac.bacpac", + "privateEndpointConnections": [] + }, + "id": "10000000-0000-0000-0000-000000000002", + "name": "10000000-0000-0000-0000-000000000002", + "type": "Microsoft.Sql/servers/databases/extensions" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportDatabaseWithNetworkIsolation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportDatabaseWithNetworkIsolation.json new file mode 100644 index 000000000000..99f2a577c522 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportDatabaseWithNetworkIsolation.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql", + "networkIsolation": { + "sqlServerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr", + "storageAccountResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Import", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/importExportOperationResults/00000000-0000-0000-0000-000000000000" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportNewDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportNewDatabase.json new file mode 100644 index 000000000000..f9ee53647e85 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportNewDatabase.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2023-05-01-preview", + "parameters": { + "databaseName": "testdb", + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Import", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/importExportOperationResults/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json new file mode 100644 index 000000000000..193a7f11364c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2023-05-01-preview", + "parameters": { + "databaseName": "testdb", + "storageKeyType": "StorageAccessKey", + "storageKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", + "storageUri": "https://test.blob.core.windows.net/test.bacpac", + "administratorLogin": "login", + "administratorLoginPassword": "password", + "authenticationType": "Sql", + "networkIsolation": { + "sqlServerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr", + "storageAccountResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "requestType": "Import", + "queuedTime": "2/2/2020 8:33:27 PM", + "lastModifiedTime": "2/2/2020 8:34:47 PM", + "blobUri": "https://test.blob.core.windows.net/test.bacpac", + "serverName": "testsvr.database.windows.net", + "databaseName": "testdb", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/servers/databases/importExportOperationResults" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/importExportOperationResults/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json new file mode 100644 index 000000000000..53d9bef300df --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1", + "location": "southeastasia", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Inaccessible" + }, + "type": "Microsoft.Sql/managedInstances/databases" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2", + "location": "southeastasia", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Inaccessible" + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json new file mode 100644 index 000000000000..8f1eefc87af0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "failoverGroupName": "failover-group-test-3", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "partnerRegions": [ + { + "location": "Japan West" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance" + } + ], + "secondaryType": "Geo" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/locations/instanceFailoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance" + } + ], + "secondaryType": "Geo" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/locations/instanceFailoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance" + } + ], + "secondaryType": "Geo" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupDelete.json new file mode 100644 index 000000000000..4cc05987969f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "failoverGroupName": "failover-group-test-1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroupOperationResults/00000000-1111-2222-3333-444444444444?api-version=2022-05-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupFailover.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupFailover.json new file mode 100644 index 000000000000..a160e45c9eb3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupFailover.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan West", + "failoverGroupName": "failover-group-test-3", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/locations/instanceFailoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan East", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance" + } + ], + "secondaryType": "Geo" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroupOperationResults/failover-group-test-3?api-version=2022-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json new file mode 100644 index 000000000000..a160e45c9eb3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan West", + "failoverGroupName": "failover-group-test-3", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/locations/instanceFailoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan East", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance" + } + ], + "secondaryType": "Geo" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroupOperationResults/failover-group-test-3?api-version=2022-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupGet.json new file mode 100644 index 000000000000..0b536559651c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupGet.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "failoverGroupName": "failover-group-test", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-3", + "name": "failover-group-test-3", + "type": "Microsoft.Sql/locations/instanceFailoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance" + } + ], + "secondaryType": "Geo" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupList.json new file mode 100644 index 000000000000..40fc367f8260 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/InstanceFailoverGroupList.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test", + "name": "failover-group-test", + "type": "Microsoft.Sql/locations/instanceFailoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance" + } + ], + "secondaryType": "Geo" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-1", + "name": "failover-group-test-1", + "type": "Microsoft.Sql/locations/instanceFailoverGroups", + "properties": { + "readWriteEndpoint": { + "failoverPolicy": "Automatic", + "failoverWithDataLossGracePeriodMinutes": 480 + }, + "readOnlyEndpoint": { + "failoverPolicy": "Disabled" + }, + "replicationRole": "Primary", + "replicationState": "CATCH_UP", + "partnerRegions": [ + { + "location": "Japan West", + "replicationRole": "Secondary" + } + ], + "managedInstancePairs": [ + { + "primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance-1", + "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance-1" + } + ], + "secondaryType": "Geo" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsDisable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsDisable.json new file mode 100644 index 000000000000..59425f81253f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsDisable.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "serverName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/ledgerDigestUpload/current/disable", + "name": "current", + "type": "Microsoft.Sql/servers/databases/ledgerDigestUploads", + "properties": { + "state": "Disabled" + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/locations/eastus/ledgerDigestUploadOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsEnable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsEnable.json new file mode 100644 index 000000000000..9f165e5265db --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsEnable.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "serverName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "digestStorageEndpoint": "https://MyAccount.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/ledgerDigestUpload/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/ledgerDigestUploads", + "properties": { + "digestStorageEndpoint": "https://mystorage.blob.core.windows.net", + "state": "Enabled" + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/locations/eastus/ledgerDigestUploadOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsGet.json new file mode 100644 index 000000000000..a2cf6d4bb382 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "serverName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/ledgerDigestUploads", + "properties": { + "digestStorageEndpoint": "https://mystorage.blob.core.windows.net", + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsList.json new file mode 100644 index 000000000000..f2da22538e7b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LedgerDigestUploadsList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "serverName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/ledgerDigestUploads", + "properties": { + "digestStorageEndpoint": "https://mystorage.blob.core.windows.net", + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDataWarehouseUserActivities.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDataWarehouseUserActivities.json new file mode 100644 index 000000000000..c4b8c2d0dac8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDataWarehouseUserActivities.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/326affc3-21f4-4471-a545-e37430b70113/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/testsvr/databases/dwdb01/dataWarehouseUserActivities/current", + "type": "Microsoft.Sql/servers/databases/dataWarehouseUserActivities", + "properties": { + "activeQueriesCount": 0 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDatabaseExtensions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDatabaseExtensions.json new file mode 100644 index 000000000000..b25d8953afe8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDatabaseExtensions.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "7b2515fe-f230-4017-8cf0-695163acab85", + "resourceGroupName": "rg_4007c5a9-b3b0-41e1-bd46-9eef38768a4a", + "serverName": "srv_3b67ec2a-519b-43a7-8533-fb62dce3431e", + "databaseName": "719d8fa4-bf0f-48fc-8cd3-ef40fe6ba1fe", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDatabaseOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDatabaseOperations.json new file mode 100644 index 000000000000..2416d681e1ea --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDatabaseOperations.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/servers/databases/operations", + "properties": { + "databaseName": "testdb", + "operation": "UpdateLogicalDatabase", + "operationFriendlyName": "ALTER DATABASE", + "percentComplete": 100, + "serverName": "testsvr", + "startTime": "2023-02-13T06:25:23.67Z", + "state": "Succeeded", + "estimatedCompletionTime": "2023-02-17T14:30:30.71Z", + "description": "'UpdateLogicalDatabase' on database 'testdb', Source ServiceLevelObjective 'SQLDB_GP_Gen5_2', target ServiceLevelObjective 'SQLDB_HS_Gen5_2', target database MaxSize '32'GB", + "isCancellable": true + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/operations/55555555-5555-5555-5555-555555555555", + "name": "55555555-5555-5555-5555-555555555555", + "type": "Microsoft.Sql/servers/databases/operations", + "properties": { + "databaseName": "testdb", + "operation": "UpdateLogicalDatabase", + "operationFriendlyName": "ALTER DATABASE", + "percentComplete": 19, + "serverName": "testsvr", + "startTime": "2023-02-13T06:25:23.67Z", + "state": "InProgress", + "estimatedCompletionTime": "2023-02-17T14:30:30.71Z", + "description": "'UpdateLogicalDatabase' on database 'testdb', Source ServiceLevelObjective 'SQLDB_GP_Gen5_2', target ServiceLevelObjective 'SQLDB_HS_Gen5_2', target database MaxSize '32'GB", + "isCancellable": true, + "operationPhaseDetails": { + "phase": "WaitingForCutover", + "phaseInformation": { + "currentStep": "3", + "totalSteps": "4", + "performCutoverBy": "2023-02-17T11:57:06.71Z", + "dataDelayInMb": "31" + } + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/operations/55555555-5555-5555-5555-555555555555", + "name": "55555555-5555-5555-5555-555555555555", + "type": "Microsoft.Sql/servers/databases/operations", + "properties": { + "databaseName": "testdb", + "operation": "UpdateLogicalDatabase", + "operationFriendlyName": "ALTER DATABASE", + "percentComplete": 100, + "serverName": "testsvr", + "startTime": "2023-02-24T11:48:29.16Z", + "state": "Failed", + "errorCode": 40640, + "errorDescription": "The server encountered an unexpected exception.", + "errorSeverity": 20, + "isUserError": true, + "description": "'UpdateLogicalDatabase' on database 'testdb'" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDatabasesByElasticPool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDatabasesByElasticPool.json new file mode 100644 index 000000000000..1b8b3bc655aa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListDatabasesByElasticPool.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "elasticPoolName": "pool1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "ElasticPool", + "tier": "Standard" + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "elasticPoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/elasticPools/Pool1", + "status": "Online", + "databaseId": "bfe0735f-bc87-447f-b2c2-481f4b100614", + "creationDate": "2017-07-12T22:08:39.163Z", + "currentServiceObjectiveName": "ElasticPool", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/DB001", + "name": "DB001", + "type": "Microsoft.Sql/servers/databases" + }, + { + "sku": { + "name": "ElasticPool", + "tier": "Standard" + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "elasticPoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/elasticPools/Pool1", + "status": "Online", + "databaseId": "82246152-3177-4357-b81c-a16d87ce3593", + "creationDate": "2017-07-12T22:10:10.773Z", + "currentServiceObjectiveName": "ElasticPool", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/DB002", + "name": "DB002", + "type": "Microsoft.Sql/servers/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListElasticPoolOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListElasticPoolOperations.json new file mode 100644 index 000000000000..47803341b288 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListElasticPoolOperations.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtestgroup", + "serverName": "sqlcrudtestserver", + "elasticPoolName": "testpool", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtestgroup/providers/Microsoft.Sql/servers/sqlcrudtestserver/elasticPools/testpool/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/servers/elasticPools/operations", + "properties": { + "elasticPoolName": "testpool", + "operation": "UPDATE", + "operationFriendlyName": "UPDATE", + "percentComplete": 100, + "serverName": "sqlcrudtestserver", + "startTime": "2017-10-30T09:10:08.1Z", + "state": "COMPLETED" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtestgroup/providers/Microsoft.Sql/servers/sqlcrudtestserver/elasticPools/testpool/operations/55555555-5555-5555-5555-555555555555", + "name": "55555555-5555-5555-5555-555555555555", + "type": "Microsoft.Sql/servers/elasticPools/operations", + "properties": { + "elasticPoolName": "testpool", + "operation": "UPDATE", + "operationFriendlyName": "UPDATE", + "percentComplete": 0, + "serverName": "sqlcrudtestserver", + "startTime": "2017-10-30T10:10:08.1Z", + "state": "IN_PROGRESS" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolUsage.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolUsage.json new file mode 100644 index 000000000000..d90d5d76db51 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolUsage.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/vcore_utilization", + "name": { + "value": "VCore utilization", + "localizedValue": "VCore utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "VCores", + "currentValue": 12, + "limit": 16, + "requestedLimit": 40 + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/storage_utilization", + "name": { + "value": "Storage utilization", + "localizedValue": "Storage utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "VCores", + "currentValue": 384, + "limit": 8196, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/database_utilization", + "name": { + "value": "Database utilization", + "localizedValue": "Database utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "Number Of Databases", + "currentValue": 5, + "limit": 100, + "requestedLimit": null + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolUsageExpanded.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolUsageExpanded.json new file mode 100644 index 000000000000..e5058b813f55 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolUsageExpanded.json @@ -0,0 +1,125 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "expandChildren": true, + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/vcore_utilization", + "name": { + "value": "VCore utilization", + "localizedValue": "VCore utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "VCores", + "currentValue": 12, + "limit": 16, + "requestedLimit": 40 + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/storage_utilization", + "name": { + "value": "Storage utilization", + "localizedValue": "Storage utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "VCores", + "currentValue": 384, + "limit": 8196, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/database_utilization", + "name": { + "value": "Database utilization", + "localizedValue": "Database utilization" + }, + "type": "Microsoft.Sql/instancePools/usages", + "unit": "Number Of Databases", + "currentValue": 5, + "limit": 100, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance1/usages/vcore_utilization", + "name": { + "value": "VCore utilization", + "localizedValue": "VCore utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "VCores", + "currentValue": null, + "limit": 4, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance2/usages/vcore_utilization", + "name": { + "value": "VCore utilization", + "localizedValue": "VCore utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "VCores", + "currentValue": null, + "limit": 4, + "requestedLimit": 8 + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance1/usages/storage_utilization", + "name": { + "value": "Storage utilization", + "localizedValue": "Storage utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "Gigabytes", + "currentValue": null, + "limit": 128, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance2/usages/storage_utilization", + "name": { + "value": "VCore utilization", + "localizedValue": "VCore utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "Gigabytes", + "currentValue": null, + "limit": 128, + "requestedLimit": 256 + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance1/usages/database_utilization", + "name": { + "value": "Database utilization", + "localizedValue": "Database utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "Number Of Databases", + "currentValue": 2, + "limit": 100, + "requestedLimit": null + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance2/usages/database_utilization", + "name": { + "value": "Database utilization", + "localizedValue": "Database utilization" + }, + "type": "Microsoft.Sql/instancePools/managedInstances/usages", + "unit": "Number Of Databases", + "currentValue": 3, + "limit": 100, + "requestedLimit": null + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolsByResourceGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolsByResourceGroup.json new file mode 100644 index 000000000000..16d3e2d6f750 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolsByResourceGroup.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded", + "dnsZone": "1234567890", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + }, + { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded", + "dnsZone": "1234567890", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP2", + "name": "testIP2", + "type": "Microsoft.Sql/instancePools" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolsBySubscriptionId.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolsBySubscriptionId.json new file mode 100644 index 000000000000..567d23e6d6d7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolsBySubscriptionId.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded", + "dnsZone": "1234567890", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + }, + { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group2/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded", + "dnsZone": "1234567890", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + }, + "location": "japaneast", + "tags": { + "a": "b" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group2/providers/Microsoft.Sql/instancePools/testIP2", + "name": "testIP2", + "type": "Microsoft.Sql/instancePools" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobAgentsByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobAgentsByServer.json new file mode 100644 index 000000000000..f159dd281b22 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobAgentsByServer.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "JA200", + "capacity": 200 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/jobAgent2", + "name": "jobAgent2", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "sku": { + "name": "JA400", + "capacity": 400 + }, + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db12" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobCredentialsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobCredentialsByAgent.json new file mode 100644 index 000000000000..fdd9f9250aae --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobCredentialsByAgent.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name": "cred1", + "type": "Microsoft.Sql/servers/jobAccounts/credentials", + "properties": { + "username": "myuser" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred2", + "name": "cred2", + "type": "Microsoft.Sql/servers/jobAccounts/credentials", + "properties": { + "username": "anotherUser" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionSteps.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionSteps.json new file mode 100644 index 000000000000..0be40b053b20 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionSteps.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "stepName": "step1", + "stepId": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-03T04:33:15.7189151Z", + "startTime": "2017-12-03T04:33:16.176937Z", + "endTime": "2017-12-03T04:33:19.0600862Z", + "currentAttempts": 1, + "currentAttemptStartTime": "2017-12-03T04:33:17.4840068Z", + "lastMessage": "Step 1 succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionTargetsByExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionTargetsByExecution.json new file mode 100644 index 000000000000..dd08791e5c51 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionTargetsByExecution.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "stepName": "step1", + "stepId": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-07-01T04:33:17.5133333Z", + "startTime": "2017-07-01T04:33:18.1230403Z", + "endTime": "2017-07-01T04:33:18.7031029Z", + "currentAttempts": 1, + "currentAttemptStartTime": "2017-07-01T04:33:18.2391013Z", + "lastMessage": "Step 1 succeeded execution on target (server 'server1', database 'database1').", + "target": { + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1/targets/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionTargetsByStep.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionTargetsByStep.json new file mode 100644 index 000000000000..62f8c26f14ef --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionTargetsByStep.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "stepName": "step1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "stepName": "step1", + "stepId": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-07-01T04:33:17.5133333Z", + "startTime": "2017-07-01T04:33:18.1230403Z", + "endTime": "2017-07-01T04:33:18.7031029Z", + "currentAttempts": 1, + "currentAttemptStartTime": "2017-07-01T04:33:18.2391013Z", + "lastMessage": "Step 1 succeeded execution on target (server 'server1', database 'database1').", + "target": { + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1/targets/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionsByAgent.json new file mode 100644 index 000000000000..1fcafdd782cd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionsByAgent.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-03-21T19:02:00.8707045Z", + "startTime": "2017-03-21T19:12:00.8707045Z", + "endTime": "2017-03-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-03-21T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + }, + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-15T19:02:00.8707045Z", + "startTime": "2017-12-15T19:12:00.8707045Z", + "endTime": "2017-12-15T19:22:00.8707045Z", + "currentAttempts": 1, + "lastMessage": "Job execution succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1//executions?api-version=2017-03-01-preview&%24skip=2" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionsByAgentWithFilter.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionsByAgentWithFilter.json new file mode 100644 index 000000000000..37b80d05f70a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionsByAgentWithFilter.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview", + "createTimeMin": "2017-03-21T19:00:00Z", + "createTimeMax": "2017-03-21T19:05:00Z", + "endTimeMin": "2017-03-21T19:20:00Z", + "endTimeMax": "2017-03-21T19:25:00Z", + "isActive": false + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-03-21T19:02:00.8707045Z", + "startTime": "2017-03-21T19:12:00.8707045Z", + "endTime": "2017-03-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-03-21T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + }, + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-15T19:02:00.8707045Z", + "startTime": "2017-12-15T19:12:00.8707045Z", + "endTime": "2017-12-15T19:22:00.8707045Z", + "currentAttempts": 1, + "lastMessage": "Job execution succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1//executions?api-version=2017-03-01-preview&%24skip=2" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionsByJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionsByJob.json new file mode 100644 index 000000000000..18ed58e6c1d0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobExecutionsByJob.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5A86BF65-43AC-F258-2524-9E92992F97CA", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-03-21T19:02:00.8707045Z", + "startTime": "2017-03-21T19:12:00.8707045Z", + "endTime": "2017-03-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-03-21T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + }, + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-15T19:02:00.8707045Z", + "startTime": "2017-12-15T19:12:00.8707045Z", + "endTime": "2017-12-15T19:22:00.8707045Z", + "currentAttempts": 1, + "lastMessage": "Job execution succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions?api-version=2017-03-01-preview&%24skip=2" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobPrivateEndpointsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobPrivateEndpointsByAgent.json new file mode 100644 index 000000000000..af972d248275 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobPrivateEndpointsByAgent.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint1", + "name": "endpoint1", + "type": "Microsoft.Sql/servers/jobAgents/privateEndpoints", + "properties": { + "targetServerAzureResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1", + "privateEndpointId": "EJ_47e33188-85ff-4705-8d78-444444444444_endpoint1" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint2", + "name": "endpoint2", + "type": "Microsoft.Sql/servers/jobAgents/privateEndpoints", + "properties": { + "targetServerAzureResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver2", + "privateEndpointId": "EJ_00000000-85ff-222-8d78-444444444444_endpoint2" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobStepsByJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobStepsByJob.json new file mode 100644 index 000000000000..ec6d07e01dfc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobStepsByJob.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + }, + { + "properties": { + "stepId": 2, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step2", + "name": "step2", + "type": "Microsoft.Sql/servers/jobAgents/jobs/steps" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobStepsByVersion.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobStepsByVersion.json new file mode 100644 index 000000000000..dddc77fcaca7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobStepsByVersion.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobVersion": "1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "stepId": 1, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step1", + "name": "step1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions/steps" + }, + { + "properties": { + "stepId": 2, + "targetGroup": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action": { + "type": "TSql", + "source": "Inline", + "value": "select 2" + }, + "output": { + "type": "SqlDatabase", + "subscriptionId": "3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroupName": "group3", + "serverName": "server3", + "databaseName": "database3", + "schemaName": "myschema1234", + "tableName": "mytable5678", + "credential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions": { + "timeoutSeconds": 1234, + "retryAttempts": 42, + "initialRetryIntervalSeconds": 11, + "maximumRetryIntervalSeconds": 222, + "retryIntervalBackoffMultiplier": 3.0 + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step2", + "name": "step2", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions/steps" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobTargetGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobTargetGroups.json new file mode 100644 index 000000000000..1a71e008acf6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobTargetGroups.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "members": [ + { + "membershipType": "Exclude", + "type": "SqlDatabase", + "serverName": "server1", + "databaseName": "database1" + }, + { + "membershipType": "Include", + "type": "SqlServer", + "serverName": "server1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlElasticPool", + "serverName": "server2", + "elasticPoolName": "pool1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType": "Include", + "type": "SqlShardMap", + "serverName": "server3", + "shardMapName": "shardMap1", + "refreshCredential": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name": "targetGroup1", + "type": "Microsoft.Sql/servers/jobAgents/targetGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobVersions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobVersions.json new file mode 100644 index 000000000000..e69a80dd0671 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobVersions.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1", + "name": "1", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/2", + "name": "2", + "type": "Microsoft.Sql/servers/jobAgents/jobs/versions" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobsByAgent.json new file mode 100644 index 000000000000..692eeca385f7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobsByAgent.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name": "job1", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "my favourite job", + "version": 0, + "schedule": { + "startTime": "2015-09-24T18:30:01Z", + "endTime": "2015-09-24T23:59:59Z", + "type": "Recurring", + "interval": "PT5M", + "enabled": true + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job3", + "name": "job3", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "this job will be scheduled once", + "version": 1, + "schedule": { + "startTime": "2017-07-01T03:45:00Z", + "endTime": "2017-12-27T06:00:00Z", + "type": "Once", + "enabled": true + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2", + "name": "job2", + "type": "Microsoft.Sql/servers/jobAccounts/jobs", + "properties": { + "description": "this job will never be automatically scheduled", + "version": 1, + "schedule": { + "startTime": "2017-07-01T03:45:00Z", + "endTime": "2017-12-27T06:00:00Z", + "type": "Once", + "enabled": false + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListManagedInstanceOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListManagedInstanceOperations.json new file mode 100644 index 000000000000..3cb0e2624658 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListManagedInstanceOperations.json @@ -0,0 +1,133 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "Cancelled", + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 50, + "startTime": "2019-12-06T11:08:44.49Z", + "state": "InProgress", + "isCancellable": true, + "operationParameters": { + "currentParameters": { + "family": "Gen4", + "tier": "GeneralPurpose", + "vCores": 8, + "storageSizeInGB": 32 + }, + "requestedParameters": { + "family": "Gen4", + "tier": "BusinessCritical", + "vCores": 8, + "storageSizeInGB": 128 + } + }, + "operationSteps": { + "totalSteps": "3", + "currentStep": 3, + "stepsList": [ + { + "order": 1, + "name": "Request validation", + "status": "Completed", + "stepEndTime": "2019-12-06T11:08:45.57Z", + "stepStartTime": "2019-12-06T11:08:44.49Z", + "timeElapsed": "0" + }, + { + "order": 2, + "name": "Virtual Cluster resize/creation", + "status": "Completed", + "stepEndTime": "2019-12-06T11:22:47.35Z", + "stepStartTime": "2019-12-06T11:08:46.15Z", + "timeElapsed": "14" + }, + { + "order": 3, + "name": "New SQL Instance Startup", + "status": "InProgress", + "stepEndTime": "2019-12-06T11:24:50.51Z", + "stepStartTime": "2019-12-06T11:22:47.42Z", + "timeElapsed": "2" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "UpsertManagedServer", + "operationFriendlyName": "UPDATE MANAGED SERVER", + "percentComplete": 100, + "startTime": "2019-12-06T14:48:34.583Z", + "state": "Failed", + "errorCode": 45157, + "errorDescription": "Server 'sqlcrudtest-4645' is busy with another operation. Please try your operation later.", + "errorSeverity": 16, + "isUserError": true, + "isCancellable": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333", + "name": "33333333-3333-3333-3333-333333333333", + "type": "Microsoft.Sql/managedInstances/operations" + }, + { + "properties": { + "managedInstanceName": "sqlcrudtest-4645", + "operation": "MakeAllManagedDatabasesAccessible", + "operationFriendlyName": "MAKE ALL MANAGED DBS ACCESSIBLE", + "percentComplete": 100, + "startTime": "2019-12-04T09:00:08.1Z", + "state": "Failed", + "operationSteps": { + "totalSteps": "1", + "currentStep": 1, + "stepsList": [ + { + "order": 1, + "name": "Request validation", + "status": "Failed", + "stepEndTime": "2019-12-04T09:01:00.57Z", + "stepStartTime": "2019-12-04T09:00:30.15Z", + "timeElapsed": "0" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444", + "name": "44444444-4444-4444-4444-444444444444", + "type": "Microsoft.Sql/managedInstances/operations" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListOperations.json new file mode 100644 index 000000000000..70f7e7252d60 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListOperations.json @@ -0,0 +1,211 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Sql/servers/read", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Server", + "operation": "List/Get Azure SQL Server(s)", + "description": "Return the list of servers or gets the properties for the specified server." + } + }, + { + "name": "Microsoft.Sql/servers/write", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Server", + "operation": "Create/Update Azure SQL Server", + "description": "Creates a server with the specified parameters or update the properties or tags for the specified server." + } + }, + { + "name": "Microsoft.Sql/servers/delete", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Server", + "operation": "Delete Azure SQL Server", + "description": "Deletes an existing server." + } + }, + { + "name": "Microsoft.Sql/servers/databases/read", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Database", + "operation": "List/Get Azure SQL Database(s)", + "description": "Return the list of databases or gets the properties for the specified database." + } + }, + { + "name": "Microsoft.Sql/servers/databases/write", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Database", + "operation": "Create/Update Azure SQL Database", + "description": "Creates a database with the specified parameters or update the properties or tags for the specified database." + } + }, + { + "name": "Microsoft.Sql/servers/databases/delete", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Database", + "operation": "Delete Azure SQL Database", + "description": "Deletes an existing database." + } + }, + { + "name": "Microsoft.Sql/servers/elasticPools/databases/read", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Database", + "operation": "Gets a list of databases for an elastic pool", + "description": "Gets a list of databases for an elastic pool" + } + }, + { + "name": "Microsoft.Sql/servers/databases/failover/action", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Database", + "operation": "Issue failover on the database.", + "description": "Customer initiated database failover." + } + }, + { + "name": "Microsoft.Sql/servers/inaccessibleDatabases/read", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Database", + "operation": "List Azure database(s) with inaccessible status in a logical server.", + "description": "Return a list of inaccessible database(s) in a logical server." + } + }, + { + "name": "Microsoft.Sql/servers/databases/pause/action", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Database", + "operation": "Pause a Datawarehouse database.", + "description": "Pause Azure SQL Datawarehouse Database" + } + }, + { + "name": "Microsoft.Sql/servers/databases/resume/action", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Azure SQL Database", + "operation": "Resume a Datawarehouse database.", + "description": "Resume Azure SQL Datawarehouse Database" + } + }, + { + "name": "Microsoft.Sql/locations/networkSecurityPerimeterAssociationProxyOperationResults/read", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Network Security Perimeter Association Proxy", + "operation": "Get network security perimeter operation result", + "description": "Get network security perimeter operation result" + } + }, + { + "name": "Microsoft.Sql/locations/networkSecurityPerimeterAssociationProxyAzureAsyncOperation/read", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Network Security Perimeter Association Proxy", + "operation": "Get network security perimeter proxy azure async operation", + "description": "Get network security perimeter proxy azure async operation" + } + }, + { + "name": "Microsoft.Sql/servers/restorableDroppedDatabases/read", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Restorable Dropped Database", + "operation": "Get a list of restorable dropped databases", + "description": "Get a list of databases that were dropped on a given server that are still within retention policy." + } + }, + { + "name": "Microsoft.Sql/locations/networkSecurityPerimeterProxies/profileProxies/accessRuleProxies/read", + "display": { + "provider": "Microsoft SQL Database", + "resource": "NSP Access Rule Proxy", + "operation": "Get NSP Access Rule Proxy", + "description": "Get NSP Access Rule Proxy" + } + }, + { + "name": "Microsoft.Sql/locations/networkSecurityPerimeterProxies/profileProxies/accessRuleProxies/write", + "display": { + "provider": "Microsoft SQL Database", + "resource": "NSP Access Rule Proxy", + "operation": "Create or Update NSP Access Rule Proxy", + "description": "Create or Update NSP Access Rule Proxy" + } + }, + { + "name": "Microsoft.Sql/locations/networkSecurityPerimeterProxies/profileProxies/accessRuleProxies/delete", + "display": { + "provider": "Microsoft SQL Database", + "resource": "NSP Access Rule Proxy", + "operation": "Delete NSP Access Rule Proxy", + "description": "Delete NSP Access Rule Proxy" + } + }, + { + "name": "Microsoft.Sql/locations/networkSecurityPerimeterProxies/profileProxies/read", + "display": { + "provider": "Microsoft SQL Database", + "resource": "NSP Profile Proxy", + "operation": "Get NSP Profile Proxy", + "description": "Get NSP Profile Proxy" + } + }, + { + "name": "Microsoft.Sql/locations/networkSecurityPerimeterProxies/profileProxies/write", + "display": { + "provider": "Microsoft SQL Database", + "resource": "NSP Profile Proxy", + "operation": "Create or Update NSP Profile Proxy", + "description": "Create or Update NSP Profile Proxy" + } + }, + { + "name": "Microsoft.Sql/locations/networkSecurityPerimeterProxies/profileProxies/delete", + "display": { + "provider": "Microsoft SQL Database", + "resource": "NSP Profile Proxy", + "operation": "Delete NSP Proxy", + "description": "Delete NSP Proxy" + } + }, + { + "name": "Microsoft.Sql/locations/networkSecurityPerimeterProxies/read", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Network Security Perimeter Proxy", + "operation": "Get NSP Proxy", + "description": "Get NSP Proxy" + } + }, + { + "name": "Microsoft.Sql/locations/networkSecurityPerimeterProxies/write", + "display": { + "provider": "Microsoft SQL Database", + "resource": "Network Security Perimeter Proxy", + "operation": "Create or Update NSP Proxy", + "description": "Create or Update NSP Proxy" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListOutboundNetworkDependenciesByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListOutboundNetworkDependenciesByManagedInstance.json new file mode 100644 index 000000000000..09ea0b5a161c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListOutboundNetworkDependenciesByManagedInstance.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "category": "Azure SQL Database", + "endpoints": [ + { + "domainName": "control.database.windows.net", + "endpointDetails": [ + { + "port": 443 + } + ] + }, + { + "domainName": "worker.database.windows.net", + "endpointDetails": [ + { + "port": 443 + } + ] + } + ] + }, + { + "category": "Azure Storage", + "endpoints": [ + { + "domainName": "blob.core.windows.net", + "endpointDetails": [ + { + "port": 443 + } + ] + }, + { + "domainName": "table.core.windows.net", + "endpointDetails": [ + { + "port": 443 + } + ] + } + ] + }, + { + "category": "Service Bus", + "endpoints": [ + { + "domainName": "servicebus.windows.net", + "endpointDetails": [ + { + "port": 443 + } + ] + } + ] + }, + { + "category": "Certificate Verification", + "endpoints": [ + { + "domainName": "dsms.core.windows.net", + "endpointDetails": [ + { + "port": 443 + } + ] + }, + { + "domainName": "dsts.core.windows.net", + "endpointDetails": [ + { + "port": 443 + } + ] + }, + { + "domainName": "login.windows.net", + "endpointDetails": [ + { + "port": 443 + } + ] + } + ] + }, + { + "category": "Telemetry", + "endpoints": [ + { + "domainName": "azurewatsonanalysis-prod.core.windows.net", + "endpointDetails": [ + { + "port": 443 + } + ] + }, + { + "domainName": "global.metrics.nsatc.net", + "endpointDetails": [ + { + "port": 443 + } + ] + }, + { + "domainName": "production.diagnostics.monitoring.core.windows.net", + "endpointDetails": [ + { + "port": 443 + } + ] + } + ] + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListRecoverableManagedDatabasesByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListRecoverableManagedDatabasesByServer.json new file mode 100644 index 000000000000..bad92cc322b4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListRecoverableManagedDatabasesByServer.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "lastAvailableBackupDate": "2017-05-26T01:06:29.78Z" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDaatabases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/managedInstances/recoverableDaatabases" + }, + { + "properties": { + "lastAvailableBackupDate": "2018-04-26T02:17:23.44Z" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDaatabases/testdb2", + "name": "testdb2", + "type": "Microsoft.Sql/managedInstances/recoverableDaatabases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListRestorableDroppedDatabasesByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListRestorableDroppedDatabasesByServer.json new file mode 100644 index 000000000000..c87e44e2ba6e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListRestorableDroppedDatabasesByServer.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "BC_Gen4_2", + "tier": "BusinessCritical" + }, + "properties": { + "databaseName": "testdb", + "maxSizeBytes": 268435456000, + "creationDate": "2017-06-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z", + "backupStorageRedundancy": "Geo" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb", + "name": "testdb,131403269876900000", + "type": "Microsoft.Sql/servers/restorableDroppedDatabases" + }, + { + "sku": { + "name": "GP_Gen4_2", + "tier": "GeneralPurpose" + }, + "properties": { + "databaseName": "testdb2", + "maxSizeBytes": 268435456000, + "creationDate": "2017-06-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z", + "backupStorageRedundancy": "Geo" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb2", + "name": "testdb2,131403269876900000", + "type": "Microsoft.Sql/servers/restorableDroppedDatabases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListServerOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListServerOperations.json new file mode 100644 index 000000000000..ef166aade639 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListServerOperations.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111", + "name": "11111111-1111-1111-1111-111111111111", + "type": "Microsoft.Sql/servers/operations", + "properties": { + "operation": "MakeAllLogicalDatabasesAccessible", + "operationFriendlyName": "MAKE ALL DBS ACCESSIBLE", + "percentComplete": 0, + "serverName": "sqlcrudtest-4645", + "startTime": "2017-06-01T09:10:08.1Z", + "state": "InProgress" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222", + "name": "22222222-2222-2222-2222-222222222222", + "type": "Microsoft.Sql/servers/operations", + "properties": { + "operation": "MakeAllLogicalDatabasesAccessible", + "operationFriendlyName": "MAKE ALL DBS ACCESSIBLE", + "percentComplete": 100, + "serverName": "sqlcrudtest-4645", + "startTime": "2017-06-01T09:00:08.1Z", + "state": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json new file mode 100644 index 000000000000..79b9d91123a7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 7, + "diffBackupIntervalInHours": 24 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListVCoreDatabasesByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListVCoreDatabasesByServer.json new file mode 100644 index 000000000000..3b37db79c0b2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListVCoreDatabasesByServer.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "requestedServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Zone", + "requestedBackupStorageRedundancy": "Zone", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + }, + { + "sku": { + "name": "System0", + "tier": "System", + "capacity": 0 + }, + "kind": "v12.0,system", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 32212254720, + "status": "Online", + "databaseId": "e6be351f-2cc9-4604-9e52-b0b28b2710b0", + "creationDate": "2017-06-07T04:23:42.537Z", + "currentServiceObjectiveName": "System0", + "requestedServiceObjectiveName": "System0", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Disabled", + "currentSku": { + "name": "System0", + "tier": "System", + "capacity": 0 + }, + "currentBackupStorageRedundancy": "Local", + "requestedBackupStorageRedundancy": "Local", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/master", + "name": "master", + "type": "Microsoft.Sql/servers/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListVCoreDatabasesEnclaveTypeByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListVCoreDatabasesEnclaveTypeByServer.json new file mode 100644 index 000000000000..d085bd21fe16 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListVCoreDatabasesEnclaveTypeByServer.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "requestedServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Zone", + "requestedBackupStorageRedundancy": "Zone", + "isLedgerOn": false, + "preferredEnclaveType": "Default" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + }, + { + "sku": { + "name": "System0", + "tier": "System", + "capacity": 0 + }, + "kind": "v12.0,system", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 32212254720, + "status": "Online", + "databaseId": "e6be351f-2cc9-4604-9e52-b0b28b2710b0", + "creationDate": "2017-06-07T04:23:42.537Z", + "currentServiceObjectiveName": "System0", + "requestedServiceObjectiveName": "System0", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Disabled", + "currentSku": { + "name": "System0", + "tier": "System", + "capacity": 0 + }, + "currentBackupStorageRedundancy": "Local", + "requestedBackupStorageRedundancy": "Local", + "isLedgerOn": false, + "preferredEnclaveType": "VBS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/master", + "name": "master", + "type": "Microsoft.Sql/servers/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json new file mode 100644 index 000000000000..3a507fbd42d2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Inaccessible", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "readScale": "Enabled" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LocationCapabilityListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LocationCapabilityListByLocation.json new file mode 100644 index 000000000000..b6b4be3f2518 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LocationCapabilityListByLocation.json @@ -0,0 +1,3256 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "eastus", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "name": "East US", + "supportedServerVersions": [ + { + "name": "12.0", + "supportedEditions": [ + { + "name": "Hyperscale", + "supportedServiceLevelObjectives": [ + { + "id": "9380cd0e-b025-4e9d-829c-c1918c1614bb", + "name": "HS_Gen4_1", + "performanceLevel": { + "value": 1, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 1 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "34497c3f-24b9-4cee-968d-6e5e854670fe", + "name": "HS_Gen4_2", + "performanceLevel": { + "value": 2, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 2 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "a420d2b2-ca32-4152-b1c6-dd8d4d9fd734", + "name": "HS_Gen5_2", + "performanceLevel": { + "value": 2, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 2 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Default" + }, + { + "id": "5de845d2-2055-428c-b507-94131358cdd7", + "name": "HS_Gen4_3", + "performanceLevel": { + "value": 3, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 3 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "d060b874-21f3-47b0-a9bd-a1a737cfcc6e", + "name": "HS_Gen4_4", + "performanceLevel": { + "value": 4, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 4 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "60dba88b-2dfa-4123-be57-bd0dbfd92a72", + "name": "HS_Gen5_4", + "performanceLevel": { + "value": 4, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 4 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "925a0916-15fb-4764-aa76-533d97f2d782", + "name": "HS_Gen4_5", + "performanceLevel": { + "value": 5, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 5 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "d7aa11c2-e4c7-442a-962e-308b371f5ec1", + "name": "HS_Gen4_6", + "performanceLevel": { + "value": 6, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 6 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "b9c594ec-a3fe-4bfe-808d-a595410d0a07", + "name": "HS_Gen5_6", + "performanceLevel": { + "value": 6, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 6 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "d77eef57-6c00-4003-b140-822509b8736a", + "name": "HS_Gen4_7", + "performanceLevel": { + "value": 7, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 7 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "694bf389-7cb2-4461-8fa2-0b06d8438315", + "name": "HS_Gen4_8", + "performanceLevel": { + "value": 8, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 8 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "efdfac5f-3f8e-4500-95b1-684c07349860", + "name": "HS_Gen5_8", + "performanceLevel": { + "value": 8, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 8 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "554ea52a-9ecc-4d87-bbc7-1e257705da3f", + "name": "HS_Gen4_9", + "performanceLevel": { + "value": 9, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 9 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "576f3f38-b950-4eaa-b74e-33d831193441", + "name": "HS_Gen4_10", + "performanceLevel": { + "value": 10, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 10 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "69697c3a-1946-4eb8-a5a4-a269168dde27", + "name": "HS_Gen5_10", + "performanceLevel": { + "value": 10, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 10 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "1bee9dc8-68b4-44df-b870-8ab0e4d71e94", + "name": "HS_Gen5_12", + "performanceLevel": { + "value": 12, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 12 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "07a8341d-c0b2-4000-bc7a-5b4dae2ad210", + "name": "HS_Gen5_14", + "performanceLevel": { + "value": 14, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 14 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "7fc1f700-a45d-499e-901f-2a00645c54db", + "name": "HS_Gen4_16", + "performanceLevel": { + "value": 16, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 16 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "6b56f70b-52e5-44ba-8cd5-4f63d224b206", + "name": "HS_Gen5_16", + "performanceLevel": { + "value": 16, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 16 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "ba0029f2-3ff4-4ef6-9e65-e8f77b5dd1e2", + "name": "HS_Gen5_18", + "performanceLevel": { + "value": 18, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 18 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "f1b2a082-f622-4fb8-bbef-e74deac3ec89", + "name": "HS_Gen5_20", + "performanceLevel": { + "value": 20, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 20 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "f016d419-a031-4b93-ab62-7f3d2a789376", + "name": "HS_Gen4_24", + "performanceLevel": { + "value": 24, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen4", + "tier": "Hyperscale", + "family": "Gen4", + "capacity": 24 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "222bc0ee-e195-4bbc-be05-3b849c3a8195", + "name": "HS_Gen5_24", + "performanceLevel": { + "value": 24, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 24 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "05366cca-cc70-486e-a697-bb3fab877f75", + "name": "HS_Gen5_32", + "performanceLevel": { + "value": 32, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 32 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "32542ef7-124d-4e66-8b41-9c6c0ab963c2", + "name": "HS_Gen5_40", + "performanceLevel": { + "value": 40, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 40 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "id": "6509db45-febe-44dd-a079-35f11d477984", + "name": "HS_Gen5_80", + "performanceLevel": { + "value": 80, + "unit": "VCores" + }, + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 80 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "computeModel": "Provisioned", + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + } + ], + "status": "Available" + } + ], + "zoneRedundant": false, + "zonePinning": true, + "readScale": { + "maxNumberOfReplicas": 4 + }, + "supportedStorageCapabilities": [ + { + "storageAccountType": "GRS", + "status": "Default" + }, + { + "storageAccountType": "LRS", + "status": "Available" + }, + { + "storageAccountType": "ZRS", + "status": "Available", + "reason": "ZRS is available in multi-az regions" + }, + { + "storageAccountType": "GZRS", + "status": "Available", + "reason": "GZRS is available in multi-az regions" + } + ], + "status": "Available" + } + ], + "supportedElasticPoolEditions": [ + { + "name": "BusinessCritical", + "supportedElasticPoolPerformanceLevels": [ + { + "performanceLevel": { + "value": 3, + "unit": "VCores" + }, + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "family": "Gen4", + "capacity": 3 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "maxDatabaseCount": 100, + "supportedMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 1048576, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 1048576, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxPerformanceLevels": [ + { + "limit": 0.25, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 3, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 3, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Default" + } + ], + "zoneRedundant": false, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_1", + "status": "Available", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_2", + "status": "Available", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "performanceLevel": { + "value": 12, + "unit": "VCores" + }, + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "family": "Gen5", + "capacity": 12 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "maxDatabaseCount": 100, + "supportedMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3144704, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "logSize": { + "limit": 1048576, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3144704, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxPerformanceLevels": [ + { + "limit": 0.25, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 6, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 6, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 8, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 6, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 6, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 0.25, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 0.5, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 1, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 2, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 4, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 6, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Default" + } + ], + "zoneRedundant": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_1", + "status": "Available", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_2", + "status": "Available", + "zoneRedundant": false + } + ], + "status": "Available" + }, + { + "performanceLevel": { + "value": 128, + "unit": "VCores" + }, + "sku": { + "name": "BC_M", + "tier": "BusinessCritical", + "family": "M", + "capacity": 128 + }, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "maxDatabaseCount": 100, + "supportedMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3144704, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 30, + "unit": "Percent" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 4194304, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "logSize": { + "limit": 1048576, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxSizes": [ + { + "minValue": { + "limit": 1024, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 31744, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 32768, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 0, + "unit": "Megabytes" + }, + "status": "Default" + }, + { + "minValue": { + "limit": 33792, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 3144704, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "minValue": { + "limit": 3145728, + "unit": "Megabytes" + }, + "maxValue": { + "limit": 4194304, + "unit": "Megabytes" + }, + "scaleSize": { + "limit": 1024, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "supportedPerDatabaseMaxPerformanceLevels": [ + { + "limit": 8, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 40, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 40, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 64, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 40, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 64, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 80, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 40, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 64, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 80, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Available" + }, + { + "limit": 128, + "unit": "VCores", + "supportedPerDatabaseMinPerformanceLevels": [ + { + "limit": 0, + "unit": "VCores", + "status": "Default" + }, + { + "limit": 8, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 10, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 12, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 14, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 16, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 18, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 20, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 24, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 32, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 40, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 64, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 80, + "unit": "VCores", + "status": "Available" + }, + { + "limit": 128, + "unit": "VCores", + "status": "Available" + } + ], + "status": "Default" + } + ], + "zoneRedundant": false, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_1", + "status": "Available", + "zoneRedundant": false + }, + { + "name": "SQL_EastUS_DB_2", + "status": "Available", + "zoneRedundant": false + } + ], + "status": "Available" + } + ], + "zoneRedundant": false, + "status": "Available" + } + ], + "status": "Default" + } + ], + "supportedManagedInstanceVersions": [ + { + "name": "12.0", + "supportedEditions": [ + { + "name": "GeneralPurpose", + "supportedFamilies": [ + { + "name": "Gen4", + "sku": "GP_Gen4", + "zoneRedundant": true, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "supportedVcoresValues": [ + { + "name": "8", + "value": 8, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Default" + }, + { + "name": "16", + "value": 16, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Available" + }, + { + "name": "24", + "value": 24, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Available" + } + ], + "status": "Available" + }, + { + "name": "Gen5", + "sku": "GP_Gen5", + "zoneRedundant": true, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "supportedVcoresValues": [ + { + "name": "8", + "value": 8, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Default" + }, + { + "name": "16", + "value": 16, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Available" + }, + { + "name": "24", + "value": 24, + "includedMaxSize": { + "limit": 262144, + "unit": "Megabytes" + }, + "supportedStorageSizes": [ + { + "minValue": { + "limit": 32, + "unit": "Gigabytes" + }, + "maxValue": { + "limit": 8, + "unit": "Terabytes" + }, + "scaleSize": { + "limit": 32, + "unit": "Gigabytes" + }, + "status": "Available" + } + ], + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + }, + { + "name": "SQL_EastUS_MI_1", + "status": "Available" + }, + { + "name": "SQL_EastUS_MI_2", + "status": "Available" + } + ], + "status": "Available" + } + ], + "status": "Default" + } + ], + "supportedStorageCapabilities": [ + { + "storageAccountType": "GRS", + "status": "Default" + }, + { + "storageAccountType": "LRS", + "status": "Available" + }, + { + "storageAccountType": "ZRS", + "status": "Visible", + "reason": "ZRS is available in multi-az regions" + }, + { + "storageAccountType": "GZRS", + "status": "Available", + "reason": "GZRS is available in multi-az regions" + } + ], + "status": "Default" + }, + { + "name": "Hyperscale", + "supportedFamilies": [ + { + "name": "Gen4", + "sku": "HS_Gen4", + "zoneRedundant": false, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "supportedVcoresValues": [ + { + "name": "4", + "value": 4, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "8", + "value": 8, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Default" + }, + { + "name": "16", + "value": 16, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "24", + "value": 24, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + } + ], + "status": "Default" + }, + { + "name": "Gen5", + "sku": "HS_Gen5", + "zoneRedundant": false, + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "supportedVcoresValues": [ + { + "name": "4", + "value": 4, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "8", + "value": 8, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Default" + }, + { + "name": "16", + "value": 16, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "24", + "value": 24, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "32", + "value": 32, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "40", + "value": 40, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "48", + "value": 48, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "64", + "value": 64, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + }, + { + "name": "80", + "value": 80, + "instancePoolSupported": true, + "standaloneSupported": true, + "supportedMaintenanceConfigurations": [ + { + "name": "SQL_Default", + "status": "Default" + } + ], + "status": "Available" + } + ], + "status": "Available" + } + ], + "supportedStorageCapabilities": [ + { + "storageAccountType": "GRS", + "status": "Default" + }, + { + "storageAccountType": "LRS", + "status": "Available" + }, + { + "storageAccountType": "ZRS", + "status": "Available", + "reason": "ZRS is available in multi-az regions" + }, + { + "storageAccountType": "GZRS", + "status": "Available", + "reason": "GZRS is available in multi-az regions" + } + ], + "status": "Available" + } + ], + "supportedInstancePoolEditions": [ + { + "name": "GeneralPurpose", + "supportedFamilies": [ + { + "name": "Gen5", + "supportedLicenseTypes": [ + { + "name": "LicenseIncluded", + "status": "Default" + }, + { + "name": "BasePrice", + "status": "Available" + } + ], + "supportedVcoresValues": [ + { + "name": "GP_Gen5_8", + "value": 8, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Default" + }, + { + "name": "GP_Gen5_16", + "value": 16, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "name": "GP_Gen5_24", + "value": 24, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "name": "GP_Gen5_32", + "value": 32, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "name": "GP_Gen5_40", + "value": 40, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "name": "GP_Gen5_64", + "value": 64, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + }, + { + "name": "GP_Gen5_80", + "value": 80, + "storageLimit": { + "limit": 8388608, + "unit": "Megabytes" + }, + "status": "Available" + } + ], + "status": "Default" + } + ], + "status": "Default" + } + ], + "status": "Default" + } + ], + "supportedJobAgentVersions": [ + { + "name": "1.0", + "status": "Default", + "supportedEditions": [ + { + "name": "1.0", + "status": "Default", + "supportedServiceLevelObjectives": [ + { + "name": "JA100", + "status": "Default", + "sku": { + "name": "JA100", + "capacity": 100 + } + }, + { + "name": "JA200", + "status": "Available", + "sku": { + "name": "JA200", + "capacity": 200 + } + }, + { + "name": "JA400", + "status": "Available", + "sku": { + "name": "JA400", + "capacity": 400 + } + }, + { + "name": "JA800", + "status": "Available", + "sku": { + "name": "JA800", + "capacity": 800 + } + } + ] + } + ] + } + ], + "status": "Available" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupCopy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupCopy.json new file mode 100644 index 000000000000..5bde64ade0d2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupCopy.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "targetServerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2", + "targetDatabaseName": "testDatabase2", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "name": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "type": "Microsoft.Sql/locations/longTermRetentionBackupOperationResults", + "properties": { + "requestId": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "fromBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "operationType": "CopyBackup", + "status": "Succeeded", + "toBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver2/longterRetentionDatabases/testDatabase2/longTermRetentionBackups/55555555-6666-7777-8888-111111111111;131637960820000000", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706?api-version=2021-05-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupDelete.json new file mode 100644 index 000000000000..c5252403c85a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Hot/operations/55555555-6666-7777-8888-999999999999?api-version=2021-05-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupGet.json new file mode 100644 index 000000000000..836f7abc66a5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByDatabase.json new file mode 100644 index 000000000000..8eede51bc15b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByDatabase.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131677960820000000;Hot", + "name": "55555555-6666-7777-8888-999999999999;131677960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": "2017-09-07T08:00:00Z", + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Hot" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByLocation.json new file mode 100644 index 000000000000..a6099975c311 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByLocation.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver1", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver1", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver2/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000;Archive", + "name": "12341234-1234-1234-1234-123123123123;131657960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver2", + "serverCreateTime": "2017-04-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByServer.json new file mode 100644 index 000000000000..4e38433b94d8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByServer.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000;Archive", + "name": "12341234-1234-1234-1234-123123123123;131657960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupUpdate.json new file mode 100644 index 000000000000..5973f8f7e1be --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupUpdate.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "requestedBackupStorageRedundancy": "Geo" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "name": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "type": "Microsoft.Sql/locations/longTermRetentionBackupOperationResults", + "properties": { + "requestId": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "fromBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "operationType": "UpdateBackup", + "status": "Succeeded", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706?api-version=2021-05-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json new file mode 100644 index 000000000000..0d11d83833e2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "serverName": "testserver", + "databaseName": "testDatabase", + "policyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/servers/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyGet.json new file mode 100644 index 000000000000..3659b990a6fa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "serverName": "testserver", + "databaseName": "testDatabase", + "policyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/servers/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyListByDatabase.json new file mode 100644 index 000000000000..d5f07c508a45 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyListByDatabase.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "serverName": "testserver", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/servers/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedColumnsListByDatabaseMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedColumnsListByDatabaseMax.json new file mode 100644 index 000000000000..8946e91789f4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedColumnsListByDatabaseMax.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "serverName", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview", + "schema": [ + "dbo" + ], + "table": [ + "customer", + "address" + ], + "column": [ + "username" + ], + "orderBy": [ + "schema asc", + "table", + "column desc" + ], + "$skip": "5", + "$top": "50" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "columnType": "nvarchar", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/serverName/databases/myDatabase/schemas/dbo/tables/customer/columns/username", + "name": "username", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedColumnsListByDatabaseMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedColumnsListByDatabaseMin.json new file mode 100644 index 000000000000..be3d4b8a66c4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedColumnsListByDatabaseMin.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "serverName", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "columnType": "int", + "temporalType": "NonTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1", + "name": "col1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns" + }, + { + "properties": { + "columnType": "bit", + "temporalType": "SystemVersionedTemporalTable", + "memoryOptimized": false, + "isComputed": false + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2", + "name": "col2", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMax.json new file mode 100644 index 000000000000..2503758dc0d2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMax.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "managedInstanceName": "threatprotection-6440", + "databaseName": "testdb", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMin.json new file mode 100644 index 000000000000..df3d171b2abe --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMin.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "managedInstanceName": "threatprotection-6440", + "databaseName": "testdb", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Disabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json new file mode 100644 index 000000000000..10fca8af4564 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-6852", + "managedInstanceName": "threatprotection-2080", + "databaseName": "testdb", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabase.json new file mode 100644 index 000000000000..a0b605ee1a2c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabase.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-6852", + "managedInstanceName": "threatprotection-2080", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-6852/providers/Microsoft.Sql/managedInstances/threatprotection-2080/databases/testdb/advancedThreatProtectionSettings", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCancelMove.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCancelMove.json new file mode 100644 index 000000000000..ac9685a6e47c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCancelMove.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "managedInstanceName": "testInstanceSrc", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "destinationManagedDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2021-02-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnGet.json new file mode 100644 index 000000000000..fafcaebfd247 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "columnName": "column1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/column1", + "name": "column1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns", + "properties": { + "columnType": "bit" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnListByTable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnListByTable.json new file mode 100644 index 000000000000..d6b69104ba89 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnListByTable.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1", + "name": "col1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns", + "properties": { + "columnType": "nvarchar" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2", + "name": "col2", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns", + "properties": { + "columnType": "bit" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json new file mode 100644 index 000000000000..e3ed10bccfdc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High", + "clientClassificationSource": "Native" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json new file mode 100644 index 000000000000..1a7135841548 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json new file mode 100644 index 000000000000..8eb6a2cf8d9e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "Low" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json new file mode 100644 index 000000000000..ebba84e3ff0b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "lastBackupName": "testdb1_log4" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2018-06-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCompleteMove.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCompleteMove.json new file mode 100644 index 000000000000..ac9685a6e47c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCompleteMove.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "managedInstanceName": "testInstanceSrc", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "destinationManagedDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2021-02-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateCrossSubscriptionPointInTimeRestore.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateCrossSubscriptionPointInTimeRestore.json new file mode 100644 index 000000000000..3a686310369d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateCrossSubscriptionPointInTimeRestore.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "createMode": "PointInTimeRestore", + "crossSubscriptionTargetManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr", + "crossSubscriptionSourceDatabaseId": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr2/databases/testdb", + "restorePointInTime": "2017-07-14T05:35:31.503Z" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateMax.json new file mode 100644 index 000000000000..9547fd742afe --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateMax.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateMin.json new file mode 100644 index 000000000000..b4e6144bc739 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateMin.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json new file mode 100644 index 000000000000..730575859bc9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "createMode": "PointInTimeRestore", + "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb", + "restorePointInTime": "2017-07-14T05:35:31.503Z" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRecovery.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRecovery.json new file mode 100644 index 000000000000..6c8237b3a4db --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRecovery.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "server1", + "databaseName": "testdb_recovered", + "api-version": "2023-05-01-preview", + "parameters": { + "location": "southeastasia", + "properties": { + "createMode": "Recovery", + "recoverableDatabaseId": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-WestEurope/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/server1/recoverableDatabases/testdb_recovered", + "name": "testdb_recovered", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2018-11-07T04:41:33.937Z", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb_recovered", + "name": "testdb_recovered", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2018-11-07T04:41:33.937Z", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json new file mode 100644 index 000000000000..a665c1369276 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "createMode": "RestoreExternalBackup", + "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups", + "storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "autoCompleteRestore": true, + "lastBackupName": "last_backup_name" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackupManagedIdentity.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackupManagedIdentity.json new file mode 100644 index 000000000000..ca781f2350b1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackupManagedIdentity.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "createMode": "RestoreExternalBackup", + "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups", + "storageContainerIdentity": "ManagedIdentity", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "autoCompleteRestore": true, + "lastBackupName": "last_backup_name" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json new file mode 100644 index 000000000000..f396b0ba17f4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "createMode": "RestoreExternalBackup", + "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups", + "storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234", + "collation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "201": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseDelete.json new file mode 100644 index 000000000000..f96ee82122f3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseGet.json new file mode 100644 index 000000000000..82de4b2f6095 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseGet.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1", + "location": "southeastasia", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Online", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseListByManagedInstance.json new file mode 100644 index 000000000000..db8c9bcd9f96 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseListByManagedInstance.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "databaseName": "managedDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1", + "location": "southeastasia", + "name": "testdb1", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Online", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2", + "location": "southeastasia", + "name": "testdb2", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "creationDate": "2017-08-04T15:00:17.73Z", + "defaultSecondaryLocation": "North Europe", + "status": "Online", + "isLedgerOn": false + }, + "type": "Microsoft.Sql/managedInstances/databases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultGet.json new file mode 100644 index 000000000000..a8c66fab2d24 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "rg1", + "locationName": "westeurope", + "operationId": "15961324-d809-46ed-86b9-d786953140e2", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "isCancellable": true, + "operation": "StartManagedInstanceDatabaseMove", + "operationFriendlyName": "Start Azure SQL Managed Instance database move", + "operationMode": "Move", + "sourceDatabaseName": "db1", + "sourceManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1", + "sourceManagedInstanceName": "mi1", + "startTime": "2022-05-24T12:54:29.72Z", + "state": "InProgress", + "targetDatabaseName": "db1", + "targetManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2", + "targetManagedInstanceName": "mi2" + }, + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/15961324-d809-46ed-86b9-d786953140e2", + "name": "15961324-d809-46ed-86b9-d786953140e2", + "type": "Microsoft.Sql/locations/managedDatabaseMoveOperationResults" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultList.json new file mode 100644 index 000000000000..a793f8de72e5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultList.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "rg1", + "locationName": "westeurope", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "isCancellable": false, + "operation": "startManagedInstanceDatabaseMove", + "operationFriendlyName": "Start Azure SQL Managed Instance database move", + "operationMode": "Move", + "sourceDatabaseName": "db1", + "sourceManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1", + "sourceManagedInstanceName": "mi1", + "startTime": "2022-05-24T12:54:29.72Z", + "state": "Succeeded", + "targetDatabaseName": "db1", + "targetManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2", + "targetManagedInstanceName": "mi2" + }, + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/15961324-d809-46ed-86b9-d786953140e2", + "name": "15961324-d809-46ed-86b9-d786953140e2", + "type": "Microsoft.Sql/locations/managedDatabaseMoveOperationResults" + }, + { + "properties": { + "isCancellable": true, + "operation": "ContinueManagedInstanceDatabaseMove", + "operationFriendlyName": "Complete Azure SQL Managed Instance database move", + "operationMode": "Move", + "sourceDatabaseName": "db1", + "sourceManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1", + "sourceManagedInstanceName": "mi1", + "startTime": "2022-05-24T12:54:29.72Z", + "state": "InProgress", + "targetDatabaseName": "db1", + "targetManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2", + "targetManagedInstanceName": "mi2" + }, + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/12341324-e123-45cd-86b9-d786953131a5", + "name": "12341324-e123-45cd-86b9-d786953131a5", + "type": "Microsoft.Sql/locations/managedDatabaseMoveOperationResults" + }, + { + "properties": { + "isCancellable": true, + "operation": "StartManagedInstanceDatabaseMove", + "operationFriendlyName": "Start Azure SQL Managed Instance database move", + "operationMode": "Copy", + "sourceDatabaseName": "db2", + "sourceManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1", + "sourceManagedInstanceName": "mi1", + "startTime": "2022-05-24T13:37:19.71Z", + "state": "InProgress", + "targetDatabaseName": "db2", + "targetManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2", + "targetManagedInstanceName": "mi2" + }, + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/87654321-30a2-f39a-z171-b78695fg32a8", + "name": "87654321-30a2-f39a-z171-b78695fg32a8", + "type": "Microsoft.Sql/locations/managedDatabaseMoveOperationResults" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultListLastOperations.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultListLastOperations.json new file mode 100644 index 000000000000..8823e5bdcaa2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultListLastOperations.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "rg1", + "locationName": "westeurope", + "onlyLastPerDatabase": "true", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "isCancellable": true, + "operation": "ContinueManagedInstanceDatabaseMove", + "operationFriendlyName": "Complete Azure SQL Managed Instance database move", + "operationMode": "Move", + "sourceDatabaseName": "db1", + "sourceManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1", + "sourceManagedInstanceName": "mi1", + "startTime": "2022-05-24T12:54:29.72Z", + "state": "InProgress", + "targetDatabaseName": "db1", + "targetManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2", + "targetManagedInstanceName": "mi2" + }, + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/12341324-e123-45cd-86b9-d786953131a5", + "name": "12341324-e123-45cd-86b9-d786953131a5", + "type": "Microsoft.Sql/locations/managedDatabaseMoveOperationResults" + }, + { + "properties": { + "isCancellable": true, + "operation": "StartManagedInstanceDatabaseMove", + "operationFriendlyName": "Start Azure SQL Managed Instance database move", + "operationMode": "Copy", + "sourceDatabaseName": "db2", + "sourceManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1", + "sourceManagedInstanceName": "mi1", + "startTime": "2022-05-24T13:37:19.71Z", + "state": "InProgress", + "targetDatabaseName": "db2", + "targetManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2", + "targetManagedInstanceName": "mi2" + }, + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/87654321-30a2-f39a-z171-b78695fg32a8", + "name": "87654321-30a2-f39a-z171-b78695fg32a8", + "type": "Microsoft.Sql/locations/managedDatabaseMoveOperationResults" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultListMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultListMax.json new file mode 100644 index 000000000000..723fb97ca6eb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseMoveOperationResultListMax.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "rg1", + "locationName": "westeurope", + "$filter": "Properties/Operation eq 'StartManagedInstanceDatabaseMove'", + "onlyLastPerDatabase": "true", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "isCancellable": true, + "operation": "StartManagedInstanceDatabaseMove", + "operationFriendlyName": "Start Azure SQL Managed Instance database move", + "operationMode": "Copy", + "sourceDatabaseName": "db1", + "sourceManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1", + "sourceManagedInstanceName": "mi1", + "startTime": "2022-05-24T12:54:29.72Z", + "state": "InProgress", + "targetDatabaseName": "db1", + "targetManagedInstanceId": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2", + "targetManagedInstanceName": "mi2" + }, + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/87654321-30a2-f39a-z171-b78695fg32a8", + "name": "87654321-30a2-f39a-z171-b78695fg32a8", + "type": "Microsoft.Sql/locations/managedDatabaseMoveOperationResults" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json new file mode 100644 index 000000000000..b6eec51b28b6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json new file mode 100644 index 000000000000..b6eec51b28b6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseRestoreDetails.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseRestoreDetails.json new file mode 100644 index 000000000000..4c2e28bfaaf1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseRestoreDetails.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "restoreDetailsName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "type": "LRSRestore", + "status": "Restoring", + "lastUploadedFileName": "RestoreDetailsFullBlownExampleLog11.bak", + "lastUploadedFileTime": "2022-03-01T07:54:21Z", + "lastRestoredFileName": "RestoreDetailsFullBlownExampleLog9_1.bak", + "lastRestoredFileTime": "2022-05-09T12:27:20.4936305Z", + "percentCompleted": 53, + "currentRestoredSizeMB": 25, + "currentRestorePlanSizeMB": 47, + "currentBackupType": "Log", + "currentRestoringFileName": "RestoreDetailsFullBlownExampleLog10.bak", + "numberOfFilesDetected": 25, + "numberOfFilesQueued": 1, + "numberOfFilesSkipped": 8, + "numberOfFilesRestoring": 1, + "numberOfFilesRestored": 14, + "numberOfFilesUnrestorable": 1, + "fullBackupSets": [ + { + "status": "Skipped", + "firstStripeName": "RestoreDetailsFullBlownExampleFull2.bak", + "numberOfStripes": 1, + "backupSizeMB": 2 + }, + { + "status": "Restored", + "firstStripeName": "RestoreDetailsFullBlownExampleFull3_1.bak", + "numberOfStripes": 3, + "backupSizeMB": 3, + "restoreStartedTimestampUtc": "2022-05-09T12:15:40.3143263Z", + "restoreFinishedTimestampUtc": "2022-05-09T12:18:41.3785089Z" + } + ], + "diffBackupSets": [ + { + "status": "Skipped", + "firstStripeName": "RestoreDetailsFullBlownExampleDiff2.bak", + "numberOfStripes": 1, + "backupSizeMB": 0 + }, + { + "status": "Restored", + "firstStripeName": "RestoreDetailsFullBlownExampleDiff3_1.bak", + "numberOfStripes": 3, + "backupSizeMB": 1, + "restoreStartedTimestampUtc": "2022-05-09T12:19:40.5455092Z", + "restoreFinishedTimestampUtc": "2022-05-09T12:20:21.3667454Z" + } + ], + "logBackupSets": [ + { + "status": "Skipped", + "firstStripeName": "RestoreDetailsFullBlownExampleLog2.bak", + "numberOfStripes": 1, + "backupSizeMB": 0 + }, + { + "status": "Skipped", + "firstStripeName": "RestoreDetailsFullBlownExampleLog3.bak", + "numberOfStripes": 1, + "backupSizeMB": 8 + }, + { + "status": "Skipped", + "firstStripeName": "RestoreDetailsFullBlownExampleLog4.bak", + "numberOfStripes": 1, + "backupSizeMB": 11 + }, + { + "status": "Restored", + "firstStripeName": "RestoreDetailsFullBlownExampleLog5.bak", + "numberOfStripes": 1, + "backupSizeMB": 7, + "restoreStartedTimestampUtc": "2022-05-09T12:21:01.7717453Z", + "restoreFinishedTimestampUtc": "2022-05-09T12:21:54.7557851Z" + }, + { + "status": "Restored", + "firstStripeName": "RestoreDetailsFullBlownExampleLog6.bak", + "numberOfStripes": 1, + "backupSizeMB": 3, + "restoreStartedTimestampUtc": "2022-05-09T12:22:41.8784062Z", + "restoreFinishedTimestampUtc": "2022-05-09T12:23:03.709407Z" + }, + { + "status": "Restored", + "firstStripeName": "RestoreDetailsFullBlownExampleLog7.bak", + "numberOfStripes": 1, + "backupSizeMB": 4, + "restoreStartedTimestampUtc": "2022-05-09T12:23:36.6264066Z", + "restoreFinishedTimestampUtc": "2022-05-09T12:23:52.9274047Z" + }, + { + "status": "Restored", + "firstStripeName": "RestoreDetailsFullBlownExampleLog8.bak", + "numberOfStripes": 1, + "backupSizeMB": 3, + "restoreStartedTimestampUtc": "2022-05-09T12:24:25.899407Z", + "restoreFinishedTimestampUtc": "2022-05-09T12:24:37.9954063Z" + }, + { + "status": "Restored", + "firstStripeName": "RestoreDetailsFullBlownExampleLog9_1.bak", + "numberOfStripes": 4, + "backupSizeMB": 4, + "restoreStartedTimestampUtc": "2022-05-09T12:25:10.8804065Z", + "restoreFinishedTimestampUtc": "2022-05-09T12:25:27.808409Z" + }, + { + "status": "Restoring", + "firstStripeName": "RestoreDetailsFullBlownExampleLog10.bak", + "numberOfStripes": 1, + "backupSizeMB": 15, + "restoreStartedTimestampUtc": "2022-05-09T12:26:00.7813103Z" + }, + { + "status": "Queued", + "firstStripeName": "RestoreDetailsFullBlownExampleLog11.bak", + "numberOfStripes": 1, + "backupSizeMB": 7 + } + ], + "unrestorableFiles": [ + { + "name": "ImageFile.JPG" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/testdb/restoreDetails/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/restoreDetails" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSchemaGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSchemaGet.json new file mode 100644 index 000000000000..c1cb2c1f7b24 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSchemaGet.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/managedInstances/databases/schemas" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json new file mode 100644 index 000000000000..b978e7fc5902 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/managedInstances/databases/schemas" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/schema2", + "name": "schema2", + "type": "Microsoft.Sql/managedInstances/databases/schemas" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json new file mode 100644 index 000000000000..791723b5c2df --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@contoso.com", + "user@contoso.com" + ], + "disabledAlerts": [ + "Sql_Injection", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@contoso.com", + "user@contoso.com" + ], + "disabledAlerts": [ + "Sql_Injection", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@contoso.com", + "user@contoso.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 6, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json new file mode 100644 index 000000000000..69d48e90fab5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstance/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [], + "disabledAlerts": [], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstance/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [], + "disabledAlerts": [], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertGet.json new file mode 100644 index 000000000000..33c48e9f8238 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertGet.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-6852", + "managedInstanceName": "securityalert-2080", + "databaseName": "testdb", + "securityAlertPolicyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/managedInstances/securityalert-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@contoso.com", + "user@contoso.com" + ], + "disabledAlerts": [ + "Usage_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json new file mode 100644 index 000000000000..6ce7e8d05fa1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-6852", + "managedInstanceName": "securityalert-2080", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/managedInstances/securityalert-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/securityAlertPolicies", + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@contoso.com", + "user@contoso.com" + ], + "disabledAlerts": [ + "Usage_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json new file mode 100644 index 000000000000..51c1ae2177f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "databaseName": "database1", + "api-version": "2023-05-01-preview", + "$filter": "ShowServerRecords eq true", + "$skip": "0", + "$top": "1", + "$skiptoken": "eyJCbG9iTmFtZURhdGVUaW1lIjoiXC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbG92ZXJJbmRleCI6IjAiLCJFbmREYXRlIjoiXC9EYXRlKDE1MTI0NjYyMDA1MjkpXC8iLCJJc1NraXBUb2tlblNldCI6ZmFsc2UsIklzVjJCbG9iVGltZUZvcm1hdCI6dHJ1ZSwiU2hvd1NlcnZlclJlY29yZHMiOmZhbHNlLCJTa2lwVmFsdWUiOjAsIlRha2VWYWx1ZSI6MTB9" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents?$skipToken=C9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sb&api-version=2017-10-01-preview", + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000001", + "name": "06364798761800000000000000001", + "type": "Microsoft.Sql/servers/databases/securityEvents", + "properties": { + "eventTime": "2017-12-24T10:13:24.729Z", + "securityEventType": "SqlInjectionExploit", + "subscription": "00000000-1111-2222-3333-444444444444", + "server": "testcl", + "database": "database1", + "clientIp": "10.166.113.220", + "applicationName": "myApp", + "principalName": "maliciousUser", + "securityEventSqlInjectionAdditionalProperties": { + "threatId": "1", + "statement": "select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test11'", + "statementHighlightOffset": 52, + "statementHighlightLength": 13, + "errorCode": 0, + "errorSeverity": 0, + "errorMessage": "" + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityEventsGetMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityEventsGetMin.json new file mode 100644 index 000000000000..37e14c1281ef --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSecurityEventsGetMin.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "databaseName": "database1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000001", + "name": "06364798761800000000000000001", + "type": "Microsoft.Sql/servers/databases/securityEvents", + "properties": { + "eventTime": "2017-12-24T10:13:24.729Z", + "securityEventType": "SqlInjectionExploit", + "subscription": "00000000-1111-2222-3333-444444444444", + "server": "testcl", + "database": "database1", + "clientIp": "10.166.113.220", + "applicationName": "myApp", + "principalName": "maliciousUser", + "securityEventSqlInjectionAdditionalProperties": { + "threatId": "1", + "statement": "select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test11'", + "statementHighlightOffset": 52, + "statementHighlightLength": 13, + "errorCode": 0, + "errorSeverity": 0, + "errorMessage": "" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000002", + "name": "06364798761800000000000000002", + "type": "Microsoft.Sql/servers/databases/securityEvents", + "properties": { + "eventTime": "2017-12-24T10:11:14.121Z", + "securityEventType": "SqlInjectionExploit", + "subscription": "00000000-1111-2222-3333-444444444444", + "server": "testcl", + "database": "database1", + "clientIp": "10.166.113.220", + "applicationName": "myApp", + "principalName": "maliciousUser", + "securityEventSqlInjectionAdditionalProperties": { + "threatId": "1", + "statement": "select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test10'", + "statementHighlightOffset": 52, + "statementHighlightLength": 13, + "errorCode": 0, + "errorSeverity": 0, + "errorMessage": "" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000003", + "name": "06364798761800000000000000003", + "type": "Microsoft.Sql/servers/databases/securityEvents", + "properties": { + "eventTime": "2017-12-24T10:03:17.066Z", + "securityEventType": "SqlInjectionExploit", + "subscription": "00000000-1111-2222-3333-444444444444", + "server": "testcl", + "database": "database1", + "clientIp": "10.166.113.220", + "applicationName": "myApp", + "principalName": "maliciousUser", + "securityEventSqlInjectionAdditionalProperties": { + "threatId": "1", + "statement": "select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test9'", + "statementHighlightOffset": 52, + "statementHighlightLength": 13, + "errorCode": 0, + "errorSeverity": 0, + "errorMessage": "" + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json new file mode 100644 index 000000000000..2214c2b8ce6e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "operations": [ + { + "properties": { + "op": "set", + "schema": "dbo", + "table": "table1", + "column": "column1", + "sensitivityLabel": { + "properties": { + "labelName": "Highly Confidential", + "labelId": "3A477B16-9423-432B-AA97-6069B481CEC3", + "informationType": "Financial", + "informationTypeId": "1D3652D6-422C-4115-82F1-65DAEBC665C8" + } + } + } + }, + { + "properties": { + "op": "set", + "schema": "dbo", + "table": "table2", + "column": "column2", + "sensitivityLabel": { + "properties": { + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII" + } + } + } + }, + { + "properties": { + "op": "remove", + "schema": "dbo", + "table": "Table1", + "column": "Column3" + } + } + ] + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabase.json new file mode 100644 index 000000000000..1cb501423599 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabase.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "Financial", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "labelName": "Sensitive", + "rank": "Critical" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended", + "name": "recommended", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn2", + "informationType": "Email", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "Medium" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json new file mode 100644 index 000000000000..bdc237936d4a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "sensitivityLabelSource": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "Financial", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "labelName": "Sensitive", + "rank": "Critical" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn3/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn3", + "informationType": "Email", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "High" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json new file mode 100644 index 000000000000..be81f15f2529 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "sensitivityLabelSource": "recommended", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended", + "name": "recommended", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn2", + "informationType": "Financial", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "labelName": "Sensitive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn4/sensitivityLabels/recommended", + "name": "recommended", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn4", + "informationType": "Email", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json new file mode 100644 index 000000000000..49bfca1c52f8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "operations": [ + { + "properties": { + "op": "enable", + "schema": "dbo", + "table": "table1", + "column": "column1" + } + }, + { + "properties": { + "op": "disable", + "schema": "dbo", + "table": "table2", + "column": "column2" + } + }, + { + "properties": { + "op": "disable", + "schema": "dbo", + "table": "Table1", + "column": "Column3" + } + } + ] + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseStartMoveMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseStartMoveMax.json new file mode 100644 index 000000000000..f33ca42b89fc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseStartMoveMax.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "managedInstanceName": "testInstanceSrc", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "destinationManagedDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase", + "operationMode": "Copy" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2021-02-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseStartMoveMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseStartMoveMin.json new file mode 100644 index 000000000000..ac9685a6e47c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseStartMoveMin.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "managedInstanceName": "testInstanceSrc", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "destinationManagedDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2021-02-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseTableGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseTableGet.json new file mode 100644 index 000000000000..68daf0e28969 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseTableGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseTableListBySchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseTableListBySchema.json new file mode 100644 index 000000000000..a747023982ea --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseTableListBySchema.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table2", + "name": "table2", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseUpdateMax.json new file mode 100644 index 000000000000..5db8effcf85c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseUpdateMax.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb" + }, + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "type": "Microsoft.Sql/servers/databases", + "isLedgerOn": false + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseUpdateMin.json new file mode 100644 index 000000000000..5db8effcf85c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseUpdateMin.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb" + }, + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "status": "Online", + "creationDate": "2017-06-07T04:41:33.937Z", + "defaultSecondaryLocation": "North Europe", + "type": "Microsoft.Sql/servers/databases", + "isLedgerOn": false + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json new file mode 100644 index 000000000000..5e7e5461af9f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json new file mode 100644 index 000000000000..ec69b002680b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": false, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": false, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..78c0e4d8f567 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..064fbea39913 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json new file mode 100644 index 000000000000..e5861b2cb940 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json new file mode 100644 index 000000000000..7b4f72a6b549 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "baselineName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json new file mode 100644 index 000000000000..8d4131f24897 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "baselineName": "default", + "ruleId": "VA1001", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json new file mode 100644 index 000000000000..f8b67fb87b58 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "managedInstanceName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "baselineName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "baselineResults": [ + { + "result": [ + "userA", + "SELECT" + ] + }, + { + "result": [ + "userB", + "SELECT" + ] + }, + { + "result": [ + "userC", + "SELECT", + "tableId_4" + ] + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json new file mode 100644 index 000000000000..b392818c98f6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4799", + "managedInstanceName": "vulnerabilityassessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json new file mode 100644 index 000000000000..c203078938d5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "managedInstanceName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json new file mode 100644 index 000000000000..a8d5474444cc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "managedInstanceName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan002", + "name": "scan002", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan003", + "name": "scan003", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "FailedToRun", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [ + { + "code": "StorageNotFound", + "message": "Storage not found" + } + ], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 0 + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json new file mode 100644 index 000000000000..076f9b3d64f6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "managedInstanceName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan01", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/vulnerabilityAssessmentScanOperationResults/00000000-1111-2222-3333-444444444444?api-version=2017-10-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorCreate.json new file mode 100644 index 000000000000..e8f58b0e71f3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorCreate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "administratorName": "ActiveDirectory", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorDelete.json new file mode 100644 index 000000000000..ffed76cf99d7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorDelete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "administratorName": "ActiveDirectory", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/managedinstanceadministratorazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorGet.json new file mode 100644 index 000000000000..424ee975a9ab --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "administratorName": "ActiveDirectory", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorListByInstance.json new file mode 100644 index 000000000000..088387f1c7dc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorListByInstance.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorUpdate.json new file mode 100644 index 000000000000..e8f58b0e71f3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdministratorUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "administratorName": "ActiveDirectory", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "44444444-3333-2222-1111-000000000000", + "tenantId": "55555555-4444-3333-2222-111111111111" + }, + "type": "Microsoft.Sql/managedInstances/administrators" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMax.json new file mode 100644 index 000000000000..2562e0652728 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMax.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "managedInstanceName": "threatprotection-6440", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMin.json new file mode 100644 index 000000000000..8928e5140d91 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMin.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "managedInstanceName": "threatprotection-6440", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Disabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json new file mode 100644 index 000000000000..0dc7299f354c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "managedInstanceName": "threatprotection-6440", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsListByInstance.json new file mode 100644 index 000000000000..d2a9ce91ae99 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsListByInstance.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "managedInstanceName": "threatprotection-6440", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/threatprotection-6440/advancedThreatProtectionSettings", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json new file mode 100644 index 000000000000..0a6327143891 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "authenticationName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json new file mode 100644 index 000000000000..5f38fc96e34f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "authenticationName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/managedinstanceAdOnlyAuthazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json new file mode 100644 index 000000000000..14a504d993ad --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "authenticationName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": true + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json new file mode 100644 index 000000000000..8c44d19be740 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance", + "authenticationName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/azureadonlyauthentications", + "properties": { + "azureADOnlyAuthentication": true + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceCreateMax.json new file mode 100644 index 000000000000..612eccd0bd1a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceCreateMax.json @@ -0,0 +1,155 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + }, + "location": "Japan East", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "PLACEHOLDER", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "dnsZonePartner": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "timezoneId": "UTC", + "instancePoolId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "requestedBackupStorageRedundancy": "Geo", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "hybridSecondaryUsage": "Passive", + "servicePrincipal": { + "type": "SystemAssigned" + }, + "databaseFormat": "AlwaysUpToDate" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Creating", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "timezoneId": "UTC", + "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "servicePrincipal": { + "principalId": "00000011-1111-2222-2222-123456789111", + "clientId": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "type": "SystemAssigned" + }, + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "databaseFormat": "AlwaysUpToDate" + }, + "location": "japaneast", + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "201": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Creating", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "timezoneId": "UTC", + "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "servicePrincipal": { + "principalId": "00000011-1111-2222-2222-123456789111", + "clientId": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "type": "SystemAssigned" + }, + "hybridSecondaryUsage": "Passive", + "databaseFormat": "AlwaysUpToDate" + }, + "location": "japaneast", + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceCreateMin.json new file mode 100644 index 000000000000..a27faa07dcbb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceCreateMin.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "subscriptionId": "20D7082A-0FC7-4468-82BD-542694D5042B", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "PLACEHOLDER", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded" + }, + "location": "Japan East" + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Creating", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "dnsZone": "1b4e2caff2530", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "databaseFormat": "SQLServer2022" + }, + "location": "japaneast", + "tags": {}, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "201": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Creating", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "dnsZone": "1b4e2caff2530", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "databaseFormat": "SQLServer2022" + }, + "location": "japaneast", + "tags": {}, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDelete.json new file mode 100644 index 000000000000..a29ba8523768 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDelete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/eastus/managedInstanceOperationResults/11111111-1111-1111-1111-111111111111", + "Azure-AsyncOperation": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/eastus/managedInstanceAzureAsyncOperation/11111111-1111-1111-1111-111111111111" + }, + "operation": "DropManagedServer", + "startTime": "2022-11-01T01:01:01.011Z" + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcGet.json new file mode 100644 index 000000000000..888b7417e559 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcGet.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "dtcName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "dtcEnabled": true, + "securitySettings": { + "transactionManagerCommunicationSettings": { + "allowInboundEnabled": false, + "allowOutboundEnabled": true, + "authentication": "NoAuth" + }, + "xaTransactionsEnabled": false, + "snaLu6point2TransactionsEnabled": false, + "xaTransactionsDefaultTimeout": 1000, + "xaTransactionsMaximumTimeout": 3000 + }, + "externalDnsSuffixSearchList": [ + "dns.example1.com", + "dns.example2.com" + ], + "dtcHostNameDnsSuffix": "dtcHostNameSuffixExample.com", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/dtc/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/dtc" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcList.json new file mode 100644 index 000000000000..d5474bf32de1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcList.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "dtcEnabled": true, + "securitySettings": { + "transactionManagerCommunicationSettings": { + "allowInboundEnabled": false, + "allowOutboundEnabled": true, + "authentication": "NoAuth" + }, + "xaTransactionsEnabled": false, + "snaLu6point2TransactionsEnabled": false, + "xaTransactionsDefaultTimeout": 1000, + "xaTransactionsMaximumTimeout": 3000 + }, + "externalDnsSuffixSearchList": [ + "dns.example1.com", + "dns.example2.com" + ], + "dtcHostNameDnsSuffix": "dtcHostNameSuffixExample.com", + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/dtc/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/dtc" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcUpdateEnableDtc.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcUpdateEnableDtc.json new file mode 100644 index 000000000000..7d2b1e2610dd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcUpdateEnableDtc.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "dtcName": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "dtcEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "dtcEnabled": true, + "securitySettings": { + "transactionManagerCommunicationSettings": { + "allowInboundEnabled": false, + "allowOutboundEnabled": true, + "authentication": "NoAuth" + }, + "xaTransactionsEnabled": false, + "snaLu6point2TransactionsEnabled": false, + "xaTransactionsDefaultTimeout": 1000, + "xaTransactionsMaximumTimeout": 3000 + }, + "externalDnsSuffixSearchList": [ + "dns.example1.com", + "dns.example2.com" + ], + "dtcHostNameDnsSuffix": "dtcHostNameSuffixExample.com", + "provisioningState": "Updating" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/dtc/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/dtc" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcUpdateMax.json new file mode 100644 index 000000000000..a2f706a489e2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceDtcUpdateMax.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "dtcName": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "dtcEnabled": true, + "securitySettings": { + "transactionManagerCommunicationSettings": { + "allowInboundEnabled": false, + "allowOutboundEnabled": true, + "authentication": "NoAuth" + }, + "xaTransactionsEnabled": false, + "snaLu6point2TransactionsEnabled": false, + "xaTransactionsDefaultTimeout": 1000, + "xaTransactionsMaximumTimeout": 3000 + }, + "externalDnsSuffixSearchList": [ + "dns.example1.com", + "dns.example2.com" + ] + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "dtcEnabled": true, + "securitySettings": { + "transactionManagerCommunicationSettings": { + "allowInboundEnabled": false, + "allowOutboundEnabled": true, + "authentication": "NoAuth" + }, + "xaTransactionsEnabled": false, + "snaLu6point2TransactionsEnabled": false, + "xaTransactionsDefaultTimeout": 1000, + "xaTransactionsMaximumTimeout": 3000 + }, + "externalDnsSuffixSearchList": [ + "dns.example1.com", + "dns.example2.com" + ], + "dtcHostNameDnsSuffix": "dtcHostNameSuffixExample.com", + "provisioningState": "Updating" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/dtc/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/dtc" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json new file mode 100644 index 000000000000..b99040f46b69 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "serverKeyType": "AzureKeyVault", + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "autoRotationEnabled": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/encryptionProtector", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "autoRotationEnabled": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json new file mode 100644 index 000000000000..4a8a1a23162a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "serverKeyType": "ServiceManaged", + "serverKeyName": "ServiceManaged" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/encryptionProtector", + "kind": "servicemanaged", + "properties": { + "serverKeyName": "ServiceManaged", + "serverKeyType": "ServiceManaged" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json new file mode 100644 index 000000000000..cf49a8a29180 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/encryptionProtector", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901", + "autoRotationEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorList.json new file mode 100644 index 000000000000..76aba3aaa25d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/encryptionProtector", + "kind": "azurekeyvault", + "properties": { + "serverKeyName": "someVault_someKey_01234567890123456789012345678901", + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json new file mode 100644 index 000000000000..72a26d543db0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/managedinstanceencryptionprotectorazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGet.json new file mode 100644 index 000000000000..6efb546acb3c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGet.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "servicePrincipal": { + "principalId": "00000011-1111-2222-2222-123456789111", + "clientId": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "type": "SystemAssigned" + }, + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + }, + "location": "japaneast", + "tags": { + "key": "value" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json new file mode 100644 index 000000000000..8fe2ac14cf7b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Updating", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "externalGovernanceStatus": "Enabled", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "authenticationMetadata": "Windows", + "databaseFormat": "SQLServer2022" + }, + "location": "japaneast", + "tags": { + "key": "value" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..158a7ec447e8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + }, + "location": "japaneast", + "tags": { + "key": "value" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json new file mode 100644 index 000000000000..acb83c601a99 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-01T00:00:00Z", + "autoRotationEnabled": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-01T00:00:00Z", + "autoRotationEnabled": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyDelete.json new file mode 100644 index 000000000000..ddc8df36d05b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/managedInstanceKeyOperationResults/00000000-1111-2222-3333-444444444444?api-version=2020-11-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyGet.json new file mode 100644 index 000000000000..7b758139a552 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-01T00:00:00Z", + "autoRotationEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyList.json new file mode 100644 index 000000000000..5d4aa7f54d34 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceKeyList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "someVault_someKey_01234567890123456789012345678901", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/myVault_myKey_11111111111111111111111111111111", + "name": "myVault_myKey_11111111111111111111111111111111", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "AAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBB", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/ServiceManaged", + "name": "ServiceManaged", + "type": "Microsoft.Sql/managedInstances/keys", + "kind": "servicemanaged", + "properties": {} + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceList.json new file mode 100644 index 000000000000..daf5549d1d07 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceList.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "japaneast", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + }, + { + "location": "japaneast", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 16, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "2c3d1bdae3412", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-444444444444", + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByInstancePool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByInstancePool.json new file mode 100644 index 000000000000..40940049a3a2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByInstancePool.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "instancePoolName": "pool1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "canadacentral", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "dnsZone": "1b4e2caff2530", + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + }, + { + "location": "canadacentral", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 16, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "dnsZone": "2c3d1bdae3412", + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..82da46cef7df --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "instancePoolName": "pool1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "canadacentral", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "dnsZone": "1b4e2caff2530", + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + }, + { + "location": "canadacentral", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 16, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "dnsZone": "2c3d1bdae3412", + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_2", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByResourceGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByResourceGroup.json new file mode 100644 index 000000000000..025956c79343 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByResourceGroup.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "japaneast", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + }, + { + "location": "japaneast", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 16, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "2c3d1bdae3412", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-444444444444", + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..31a8bf9d292c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "japaneast", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "externalGovernanceStatus": "Enabled", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + }, + { + "location": "japaneast", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 16, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "2c3d1bdae3412", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_2", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-444444444444", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..4e93ace547f8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "japaneast", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1", + "name": "testinstance1", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance1.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-999999999999", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + }, + { + "location": "japaneast", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2", + "name": "testinstance2", + "type": "Microsoft.Sql/managedInstances", + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 16, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance2.2c3d1bdae3412.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 16, + "storageSizeInGB": 1024, + "licenseType": "Full", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "2c3d1bdae3412", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_2", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "virtualClusterId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-5555555-6666-7777-8888-444444444444", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "pricingModel": "Regular", + "createTime": "2022-11-01T01:01:01.011Z", + "databaseFormat": "SQLServer2022" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json new file mode 100644 index 000000000000..35a1162d36cd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/longTermRetentionManagedInstanceBackupOperationResults/00000000-1111-2222-3333-444444444444?api-version=2023-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json new file mode 100644 index 000000000000..223971870105 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-09-01T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2018-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json new file mode 100644 index 000000000000..2a571dfa3eb3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z;Archive", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2018-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z;Hot", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2018-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z;Hot", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": "2018-09-07T08:00:00Z", + "backupTime": "2018-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Hot" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json new file mode 100644 index 000000000000..2dfa22a8cc42 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000;Hot", + "name": "12341234-1234-1234-1234-123123123123;131657960820000000;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000;Archive", + "name": "43214321-4321-4321-4321-321321321321;131667960820000000", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json new file mode 100644 index 000000000000..c5f141ef56ce --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "managedInstanceName": "testInstance1", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testserver2/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000;Hot", + "name": "12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "managedInstanceName": "testInstance2", + "managedInstanceCreateTime": "2017-04-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testserver3/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000;Archive", + "name": "43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance3", + "managedInstanceCreateTime": "2017-05-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocationMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocationMax.json new file mode 100644 index 000000000000..a59fe66f4f30 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocationMax.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "japaneast", + "api-version": "2023-05-01-preview", + "$skip": "0", + "$top": "2", + "$filter": "Properties/ManagedInstanceName eq 'testInstance1'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance1/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "managedInstanceName": "testInstance1", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance1/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000;Hot", + "name": "12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "managedInstanceName": "testInstance1", + "managedInstanceCreateTime": "2017-04-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Hot" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json new file mode 100644 index 000000000000..f196f35c634d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "policyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5, + "backupStorageAccessTier": "Hot" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/managedInstances/testInstance/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/managedInstances/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5, + "backupStorageAccessTier": "Hot" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyDelete.json new file mode 100644 index 000000000000..2eff7e5bff29 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyDelete.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "policyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/managedInstances/testInstance/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/managedInstances/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "PT0S", + "monthlyRetention": "PT0S", + "yearlyRetention": "PT0S", + "weekOfYear": 0 + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/managedInstanceLongTermRetentionPolicyOperationResults/00000000-1111-2222-3333-444444444444?api-version=2023-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json new file mode 100644 index 000000000000..3bdc6ae5f116 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "policyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql//managedInstances/testInstance/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/managedInstances/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5, + "backupStorageAccessTier": "Archive" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json new file mode 100644 index 000000000000..9c8e32f9f875 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/managedInstances/testInstance/databases/testDatabase/backupLongTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/resourceGroups/managedInstances/databases/backupLongTermRetentionPolicies", + "properties": { + "weeklyRetention": "P1M", + "monthlyRetention": "P1Y", + "yearlyRetention": "P5Y", + "weekOfYear": 5, + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json new file mode 100644 index 000000000000..bb091eee3323 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/managedInstancePrivateEndpointConnectionOperationResults/00000000-1111-2222-3333-444444444444?api-version=2019-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json new file mode 100644 index 000000000000..391435d5d7ce --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/managedInstances/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json new file mode 100644 index 000000000000..6b7f0c4dcdf5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/managedInstances/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name-2", + "name": "private-endpoint-connection-name-2", + "type": "Microsoft.Sql/managedInstances/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name-2" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json new file mode 100644 index 000000000000..2efd6c87c717 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by johndoe@contoso.com" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/managedInstances/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None" + } + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json new file mode 100644 index 000000000000..a889c440d392 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "groupName": "plr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateLinkResources/plr", + "name": "plr", + "type": "Microsoft.Sql/managedInstances/privateLinkResources", + "properties": { + "groupId": "managedInstance", + "requiredMembers": [ + "managedInstance" + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json new file mode 100644 index 000000000000..a5dc590a36f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "test-cl", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateLinkResources/plr", + "name": "plr", + "type": "Microsoft.Sql/managedInstances/privateLinkResources", + "properties": { + "groupId": "managedInstance", + "requiredMembers": [ + "managedInstance" + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryGet.json new file mode 100644 index 000000000000..4770738a7483 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "databaseName": "database_1", + "queryId": "42", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "42", + "type": "Microsoft.Sql/managedInstances/databases/queries", + "properties": { + "queryText": "select * from DUMMY_TABLE" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryStatisticsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryStatisticsList.json new file mode 100644 index 000000000000..9398bd076833 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryStatisticsList.json @@ -0,0 +1,278 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "databaseName": "database_1", + "queryId": "42", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseName": "db1", + "queryId": "35", + "startTime": "03/01/2020 18:34:58", + "endTime": "03/02/2020 18:34:58", + "intervals": [ + { + "intervalStartTime": "03/02/2020 08:00:00", + "intervalType": "PT1H", + "executionCount": 160, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 1.507638888888889E-05, + "max": 2.5243055555555557E-05, + "avg": 1.665347222222222E-05, + "sum": 0.0026645555555555554, + "stdev": 1.4894345929850385E-06 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 4373.0, + "max": 18490.0, + "avg": 5026.625, + "sum": 804260.0, + "stdev": 1487.3520882343225 + } + ] + }, + { + "intervalStartTime": "03/02/2020 09:00:00", + "intervalType": "PT1H", + "executionCount": 20, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 2.3430555555555557E-05, + "max": 0.00014645833333333332, + "avg": 4.4797743055555553E-05, + "sum": 0.00089595486111111115, + "stdev": 3.8301183442043949E-05 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 6813.0, + "max": 42289.0, + "avg": 12963.2, + "sum": 259264.0, + "stdev": 11040.140794392071 + } + ] + }, + { + "intervalStartTime": "03/02/2020 15:00:00", + "intervalType": "PT1H", + "executionCount": 80, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 1.8215277777777777E-05, + "max": 2.764236111111111E-05, + "avg": 1.9315538194444445E-05, + "sum": 0.0015452430555555556, + "stdev": 1.0716305801875179E-06 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 5264.0, + "max": 7982.0, + "avg": 5586.2625, + "sum": 446901.0, + "stdev": 310.49157572107271 + } + ] + }, + { + "intervalStartTime": "03/02/2020 17:00:00", + "intervalType": "PT1H", + "executionCount": 80, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 1.7819444444444443E-05, + "max": 2.782638888888889E-05, + "avg": 1.9085373263888888E-05, + "sum": 0.0015268298611111112, + "stdev": 1.2309244108727927E-06 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 5147.0, + "max": 8052.0, + "avg": 5517.2, + "sum": 441376.0, + "stdev": 356.87635814102259 + } + ] + } + ] + }, + "id": "35", + "type": "Microsoft.Sql/managedInstances/databases/queries/statistics" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json new file mode 100644 index 000000000000..d370131e292a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "databaseName": "database_1", + "queryId": "42", + "api-version": "2023-05-01-preview", + "interval": "P1D", + "startTime": "03/01/2020 16:23:09", + "endTime": "03/11/2020 14:00:00" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseName": "db1", + "queryId": "28", + "startTime": "03/01/2020 16:23:09", + "endTime": "03/11/2020 14:00:00", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "intervalType": "P1D", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 0.0015934667245370371, + "max": 0.0015934667245370371, + "avg": 0.0015934667245370371, + "sum": 0.0015934667245370371, + "stdev": 0.0 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 4.2245370370370369E-06, + "max": 4.2245370370370369E-06, + "avg": 4.2245370370370369E-06, + "sum": 4.2245370370370369E-06, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 8336.0, + "max": 8336.0, + "avg": 8336.0, + "sum": 8336.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 11091296.0, + "max": 11091296.0, + "avg": 11091296.0, + "sum": 11091296.0, + "stdev": 0.0 + } + ] + } + ] + }, + "id": "28", + "type": "Microsoft.Sql/managedInstances/databases/queries/statistics" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json new file mode 100644 index 000000000000..fd5588d12e14 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "databaseName": "database_1", + "queryId": "42", + "api-version": "2023-05-01-preview", + "interval": "PT1H" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseName": "db1", + "queryId": "28", + "startTime": "03/10/2020 14:00:30", + "endTime": "03/11/2020 14:00:30", + "intervals": [ + { + "intervalStartTime": "03/11/2020 11:00:00", + "intervalType": "PT1H", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0, + "min": 0.038243201388888891, + "max": 0.038243201388888891, + "avg": 0.038243201388888891, + "sum": 0.038243201388888891, + "stdev": 0.0 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0, + "min": 0.0001013888888888889, + "max": 0.0001013888888888889, + "avg": 0.0001013888888888889, + "sum": 0.0001013888888888889, + "stdev": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0, + "min": 0.0, + "max": 0.0, + "avg": 0.0, + "sum": 0.0, + "stdev": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0, + "min": 8336.0, + "max": 8336.0, + "avg": 8336.0, + "sum": 8336.0, + "stdev": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 0.0, + "min": 11091296.0, + "max": 11091296.0, + "avg": 11091296.0, + "sum": 11091296.0, + "stdev": 0.0 + } + ] + } + ] + }, + "id": "28", + "type": "Microsoft.Sql/managedInstances/databases/queries/statistics" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceRefreshExternalGovernanceStatus.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceRefreshExternalGovernanceStatus.json new file mode 100644 index 000000000000..4ae59e248773 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceRefreshExternalGovernanceStatus.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "00000000-0000-0000-0000-000000000000", + "requestType": "UpdatePurviewMetadata", + "queuedTime": "2/12/2022 8:33:27 PM", + "managedInstanceName": "testsvr.database.windows.net", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/refreshExternalGovernanceStatusMIOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/locations/refreshExternalGovernanceStatusMIOperationResults" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/refreshExternalGovernanceStatusMIOperationResults/00000000-0000-0000-0000-000000000000?api-version=2023-02-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json new file mode 100644 index 000000000000..ce0fd0383c93 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview", + "location": "japaneast", + "parameters": { + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default" + } + } + }, + "responses": { + "200": { + "headers": { + "Azure-AsyncOperation": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/japaneast/managedInstanceAzureAsyncOperation/11111111-1111-1111-1111-111111111111" + }, + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "hybridSecondaryUsage": "Passive", + "externalGovernanceStatus": "Enabled", + "authenticationMetadata": "Windows", + "databaseFormat": "SQLServer2022" + }, + "location": "japaneast", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/eastus/managedInstanceOperationResults/11111111-1111-1111-1111-111111111111", + "Azure-AsyncOperation": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/eastus/managedInstanceAzureAsyncOperation/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTdeCertificate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTdeCertificate.json new file mode 100644 index 000000000000..cf53224e8ae3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTdeCertificate.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000001", + "resourceGroupName": "testtdecert", + "managedInstanceName": "testtdecert", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "privateBlob": "MIIXXXXXXXX" + } + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.Sql/locations/westus/managedInstanceTdeCertificateOperationResults/00000000-0000-0000-0000-000000000001?api-version=2017-10-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTimeZoneGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTimeZoneGet.json new file mode 100644 index 000000000000..508a51eb46b2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTimeZoneGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "37d5e605-6142-4d79-b564-28b6dbfeec0f", + "locationName": "canadaeast", + "timeZoneId": "Haiti Standard Time", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "timeZoneId": "Haiti Standard Time", + "displayName": "(UTC-05:00) Haiti" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Haiti Standard Time", + "name": "Haiti Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json new file mode 100644 index 000000000000..536c2bb5b21c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json @@ -0,0 +1,1266 @@ +{ + "parameters": { + "subscriptionId": "37d5e605-6142-4d79-b564-28b6dbfeec0f", + "locationName": "canadaeast", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "timeZoneId": "Afghanistan Standard Time", + "displayName": "(UTC+04:30) Kabul" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Afghanistan Standard Time", + "name": "Afghanistan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Alaskan Standard Time", + "displayName": "(UTC-09:00) Alaska" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Alaskan Standard Time", + "name": "Alaskan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Aleutian Standard Time", + "displayName": "(UTC-10:00) Aleutian Islands" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Aleutian Standard Time", + "name": "Aleutian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Altai Standard Time", + "displayName": "(UTC+07:00) Barnaul, Gorno-Altaysk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Altai Standard Time", + "name": "Altai Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Arab Standard Time", + "displayName": "(UTC+03:00) Kuwait, Riyadh" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Arab Standard Time", + "name": "Arab Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Arabian Standard Time", + "displayName": "(UTC+04:00) Abu Dhabi, Muscat" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Arabian Standard Time", + "name": "Arabian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Arabic Standard Time", + "displayName": "(UTC+03:00) Baghdad" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Arabic Standard Time", + "name": "Arabic Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Argentina Standard Time", + "displayName": "(UTC-03:00) City of Buenos Aires" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Argentina Standard Time", + "name": "Argentina Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Astrakhan Standard Time", + "displayName": "(UTC+04:00) Astrakhan, Ulyanovsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Astrakhan Standard Time", + "name": "Astrakhan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Atlantic Standard Time", + "displayName": "(UTC-04:00) Atlantic Time (Canada)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Atlantic Standard Time", + "name": "Atlantic Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "AUS Central Standard Time", + "displayName": "(UTC+09:30) Darwin" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/AUS Central Standard Time", + "name": "AUS Central Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Aus Central W. Standard Time", + "displayName": "(UTC+08:45) Eucla" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Aus Central W. Standard Time", + "name": "Aus Central W. Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "AUS Eastern Standard Time", + "displayName": "(UTC+10:00) Canberra, Melbourne, Sydney" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/AUS Eastern Standard Time", + "name": "AUS Eastern Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Azerbaijan Standard Time", + "displayName": "(UTC+04:00) Baku" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Azerbaijan Standard Time", + "name": "Azerbaijan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Azores Standard Time", + "displayName": "(UTC-01:00) Azores" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Azores Standard Time", + "name": "Azores Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Bahia Standard Time", + "displayName": "(UTC-03:00) Salvador" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Bahia Standard Time", + "name": "Bahia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Bangladesh Standard Time", + "displayName": "(UTC+06:00) Dhaka" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Bangladesh Standard Time", + "name": "Bangladesh Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Belarus Standard Time", + "displayName": "(UTC+03:00) Minsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Belarus Standard Time", + "name": "Belarus Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Bougainville Standard Time", + "displayName": "(UTC+11:00) Bougainville Island" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Bougainville Standard Time", + "name": "Bougainville Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Canada Central Standard Time", + "displayName": "(UTC-06:00) Saskatchewan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Canada Central Standard Time", + "name": "Canada Central Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Cape Verde Standard Time", + "displayName": "(UTC-01:00) Cabo Verde Is." + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Cape Verde Standard Time", + "name": "Cape Verde Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Caucasus Standard Time", + "displayName": "(UTC+04:00) Yerevan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Caucasus Standard Time", + "name": "Caucasus Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Cen. Australia Standard Time", + "displayName": "(UTC+09:30) Adelaide" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Cen. Australia Standard Time", + "name": "Cen. Australia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central America Standard Time", + "displayName": "(UTC-06:00) Central America" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central America Standard Time", + "name": "Central America Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Asia Standard Time", + "displayName": "(UTC+06:00) Nur-Sultan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Asia Standard Time", + "name": "Central Asia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Brazilian Standard Time", + "displayName": "(UTC-04:00) Cuiaba" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Brazilian Standard Time", + "name": "Central Brazilian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Europe Standard Time", + "displayName": "(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Europe Standard Time", + "name": "Central Europe Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central European Standard Time", + "displayName": "(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central European Standard Time", + "name": "Central European Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Pacific Standard Time", + "displayName": "(UTC+11:00) Solomon Is., New Caledonia" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Pacific Standard Time", + "name": "Central Pacific Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Standard Time", + "displayName": "(UTC-06:00) Central Time (US & Canada)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Standard Time", + "name": "Central Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Central Standard Time (Mexico)", + "displayName": "(UTC-06:00) Guadalajara, Mexico City, Monterrey" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Standard Time (Mexico)", + "name": "Central Standard Time (Mexico)", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Chatham Islands Standard Time", + "displayName": "(UTC+12:45) Chatham Islands" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Chatham Islands Standard Time", + "name": "Chatham Islands Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "China Standard Time", + "displayName": "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/China Standard Time", + "name": "China Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Cuba Standard Time", + "displayName": "(UTC-05:00) Havana" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Cuba Standard Time", + "name": "Cuba Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Dateline Standard Time", + "displayName": "(UTC-12:00) International Date Line West" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Dateline Standard Time", + "name": "Dateline Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "E. Africa Standard Time", + "displayName": "(UTC+03:00) Nairobi" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. Africa Standard Time", + "name": "E. Africa Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "E. Australia Standard Time", + "displayName": "(UTC+10:00) Brisbane" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. Australia Standard Time", + "name": "E. Australia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "E. Europe Standard Time", + "displayName": "(UTC+02:00) Chisinau" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. Europe Standard Time", + "name": "E. Europe Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "E. South America Standard Time", + "displayName": "(UTC-03:00) Brasilia" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. South America Standard Time", + "name": "E. South America Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Easter Island Standard Time", + "displayName": "(UTC-06:00) Easter Island" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Easter Island Standard Time", + "name": "Easter Island Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Eastern Standard Time", + "displayName": "(UTC-05:00) Eastern Time (US & Canada)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Eastern Standard Time", + "name": "Eastern Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Eastern Standard Time (Mexico)", + "displayName": "(UTC-05:00) Chetumal" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Eastern Standard Time (Mexico)", + "name": "Eastern Standard Time (Mexico)", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Egypt Standard Time", + "displayName": "(UTC+02:00) Cairo" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Egypt Standard Time", + "name": "Egypt Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Ekaterinburg Standard Time", + "displayName": "(UTC+05:00) Ekaterinburg" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Ekaterinburg Standard Time", + "name": "Ekaterinburg Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Fiji Standard Time", + "displayName": "(UTC+12:00) Fiji" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Fiji Standard Time", + "name": "Fiji Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "FLE Standard Time", + "displayName": "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/FLE Standard Time", + "name": "FLE Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Georgian Standard Time", + "displayName": "(UTC+04:00) Tbilisi" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Georgian Standard Time", + "name": "Georgian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "GMT Standard Time", + "displayName": "(UTC+00:00) Dublin, Edinburgh, Lisbon, London" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/GMT Standard Time", + "name": "GMT Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Greenland Standard Time", + "displayName": "(UTC-03:00) Greenland" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Greenland Standard Time", + "name": "Greenland Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Greenwich Standard Time", + "displayName": "(UTC+00:00) Monrovia, Reykjavik" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Greenwich Standard Time", + "name": "Greenwich Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "GTB Standard Time", + "displayName": "(UTC+02:00) Athens, Bucharest" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/GTB Standard Time", + "name": "GTB Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Haiti Standard Time", + "displayName": "(UTC-05:00) Haiti" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Haiti Standard Time", + "name": "Haiti Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Hawaiian Standard Time", + "displayName": "(UTC-10:00) Hawaii" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Hawaiian Standard Time", + "name": "Hawaiian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "India Standard Time", + "displayName": "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/India Standard Time", + "name": "India Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Iran Standard Time", + "displayName": "(UTC+03:30) Tehran" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Iran Standard Time", + "name": "Iran Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Israel Standard Time", + "displayName": "(UTC+02:00) Jerusalem" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Israel Standard Time", + "name": "Israel Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Jordan Standard Time", + "displayName": "(UTC+02:00) Amman" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Jordan Standard Time", + "name": "Jordan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Kaliningrad Standard Time", + "displayName": "(UTC+02:00) Kaliningrad" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Kaliningrad Standard Time", + "name": "Kaliningrad Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Kamchatka Standard Time", + "displayName": "(UTC+12:00) Petropavlovsk-Kamchatsky - Old" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Kamchatka Standard Time", + "name": "Kamchatka Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Korea Standard Time", + "displayName": "(UTC+09:00) Seoul" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Korea Standard Time", + "name": "Korea Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Libya Standard Time", + "displayName": "(UTC+02:00) Tripoli" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Libya Standard Time", + "name": "Libya Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Line Islands Standard Time", + "displayName": "(UTC+14:00) Kiritimati Island" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Line Islands Standard Time", + "name": "Line Islands Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Lord Howe Standard Time", + "displayName": "(UTC+10:30) Lord Howe Island" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Lord Howe Standard Time", + "name": "Lord Howe Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Magadan Standard Time", + "displayName": "(UTC+11:00) Magadan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Magadan Standard Time", + "name": "Magadan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Magallanes Standard Time", + "displayName": "(UTC-03:00) Punta Arenas" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Magallanes Standard Time", + "name": "Magallanes Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Marquesas Standard Time", + "displayName": "(UTC-09:30) Marquesas Islands" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Marquesas Standard Time", + "name": "Marquesas Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Mauritius Standard Time", + "displayName": "(UTC+04:00) Port Louis" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mauritius Standard Time", + "name": "Mauritius Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Mid-Atlantic Standard Time", + "displayName": "(UTC-02:00) Mid-Atlantic - Old" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mid-Atlantic Standard Time", + "name": "Mid-Atlantic Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Middle East Standard Time", + "displayName": "(UTC+02:00) Beirut" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Middle East Standard Time", + "name": "Middle East Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Montevideo Standard Time", + "displayName": "(UTC-03:00) Montevideo" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Montevideo Standard Time", + "name": "Montevideo Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Morocco Standard Time", + "displayName": "(UTC+01:00) Casablanca" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Morocco Standard Time", + "name": "Morocco Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Mountain Standard Time", + "displayName": "(UTC-07:00) Mountain Time (US & Canada)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mountain Standard Time", + "name": "Mountain Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Mountain Standard Time (Mexico)", + "displayName": "(UTC-07:00) Chihuahua, La Paz, Mazatlan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mountain Standard Time (Mexico)", + "name": "Mountain Standard Time (Mexico)", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Myanmar Standard Time", + "displayName": "(UTC+06:30) Yangon (Rangoon)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Myanmar Standard Time", + "name": "Myanmar Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "N. Central Asia Standard Time", + "displayName": "(UTC+07:00) Novosibirsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/N. Central Asia Standard Time", + "name": "N. Central Asia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Namibia Standard Time", + "displayName": "(UTC+02:00) Windhoek" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Namibia Standard Time", + "name": "Namibia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Nepal Standard Time", + "displayName": "(UTC+05:45) Kathmandu" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Nepal Standard Time", + "name": "Nepal Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "New Zealand Standard Time", + "displayName": "(UTC+12:00) Auckland, Wellington" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/New Zealand Standard Time", + "name": "New Zealand Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Newfoundland Standard Time", + "displayName": "(UTC-03:30) Newfoundland" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Newfoundland Standard Time", + "name": "Newfoundland Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Norfolk Standard Time", + "displayName": "(UTC+11:00) Norfolk Island" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Norfolk Standard Time", + "name": "Norfolk Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "North Asia East Standard Time", + "displayName": "(UTC+08:00) Irkutsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/North Asia East Standard Time", + "name": "North Asia East Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "North Asia Standard Time", + "displayName": "(UTC+07:00) Krasnoyarsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/North Asia Standard Time", + "name": "North Asia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "North Korea Standard Time", + "displayName": "(UTC+09:00) Pyongyang" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/North Korea Standard Time", + "name": "North Korea Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Omsk Standard Time", + "displayName": "(UTC+06:00) Omsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Omsk Standard Time", + "name": "Omsk Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Pacific SA Standard Time", + "displayName": "(UTC-04:00) Santiago" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pacific SA Standard Time", + "name": "Pacific SA Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Pacific Standard Time", + "displayName": "(UTC-08:00) Pacific Time (US & Canada)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pacific Standard Time", + "name": "Pacific Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Pacific Standard Time (Mexico)", + "displayName": "(UTC-08:00) Baja California" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pacific Standard Time (Mexico)", + "name": "Pacific Standard Time (Mexico)", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Pakistan Standard Time", + "displayName": "(UTC+05:00) Islamabad, Karachi" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pakistan Standard Time", + "name": "Pakistan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Paraguay Standard Time", + "displayName": "(UTC-04:00) Asuncion" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Paraguay Standard Time", + "name": "Paraguay Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Qyzylorda Standard Time", + "displayName": "(UTC+05:00) Qyzylorda" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Qyzylorda Standard Time", + "name": "Qyzylorda Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Romance Standard Time", + "displayName": "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Romance Standard Time", + "name": "Romance Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Russia Time Zone 10", + "displayName": "(UTC+11:00) Chokurdakh" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russia Time Zone 10", + "name": "Russia Time Zone 10", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Russia Time Zone 11", + "displayName": "(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russia Time Zone 11", + "name": "Russia Time Zone 11", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Russia Time Zone 3", + "displayName": "(UTC+04:00) Izhevsk, Samara" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russia Time Zone 3", + "name": "Russia Time Zone 3", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Russian Standard Time", + "displayName": "(UTC+03:00) Moscow, St. Petersburg" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russian Standard Time", + "name": "Russian Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "SA Eastern Standard Time", + "displayName": "(UTC-03:00) Cayenne, Fortaleza" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SA Eastern Standard Time", + "name": "SA Eastern Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "SA Pacific Standard Time", + "displayName": "(UTC-05:00) Bogota, Lima, Quito, Rio Branco" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SA Pacific Standard Time", + "name": "SA Pacific Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "SA Western Standard Time", + "displayName": "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SA Western Standard Time", + "name": "SA Western Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Saint Pierre Standard Time", + "displayName": "(UTC-03:00) Saint Pierre and Miquelon" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Saint Pierre Standard Time", + "name": "Saint Pierre Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Sakhalin Standard Time", + "displayName": "(UTC+11:00) Sakhalin" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sakhalin Standard Time", + "name": "Sakhalin Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Samoa Standard Time", + "displayName": "(UTC+13:00) Samoa" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Samoa Standard Time", + "name": "Samoa Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Sao Tome Standard Time", + "displayName": "(UTC+00:00) Sao Tome" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sao Tome Standard Time", + "name": "Sao Tome Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Saratov Standard Time", + "displayName": "(UTC+04:00) Saratov" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Saratov Standard Time", + "name": "Saratov Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "SE Asia Standard Time", + "displayName": "(UTC+07:00) Bangkok, Hanoi, Jakarta" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SE Asia Standard Time", + "name": "SE Asia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Singapore Standard Time", + "displayName": "(UTC+08:00) Kuala Lumpur, Singapore" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Singapore Standard Time", + "name": "Singapore Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "South Africa Standard Time", + "displayName": "(UTC+02:00) Harare, Pretoria" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/South Africa Standard Time", + "name": "South Africa Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Sri Lanka Standard Time", + "displayName": "(UTC+05:30) Sri Jayawardenepura" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sri Lanka Standard Time", + "name": "Sri Lanka Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Sudan Standard Time", + "displayName": "(UTC+02:00) Khartoum" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sudan Standard Time", + "name": "Sudan Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Syria Standard Time", + "displayName": "(UTC+02:00) Damascus" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Syria Standard Time", + "name": "Syria Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Taipei Standard Time", + "displayName": "(UTC+08:00) Taipei" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Taipei Standard Time", + "name": "Taipei Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Tasmania Standard Time", + "displayName": "(UTC+10:00) Hobart" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tasmania Standard Time", + "name": "Tasmania Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Tocantins Standard Time", + "displayName": "(UTC-03:00) Araguaina" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tocantins Standard Time", + "name": "Tocantins Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Tokyo Standard Time", + "displayName": "(UTC+09:00) Osaka, Sapporo, Tokyo" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tokyo Standard Time", + "name": "Tokyo Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Tomsk Standard Time", + "displayName": "(UTC+07:00) Tomsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tomsk Standard Time", + "name": "Tomsk Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Tonga Standard Time", + "displayName": "(UTC+13:00) Nuku'alofa" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tonga Standard Time", + "name": "Tonga Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Transbaikal Standard Time", + "displayName": "(UTC+09:00) Chita" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Transbaikal Standard Time", + "name": "Transbaikal Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Türkiye Standard Time", + "displayName": "(UTC+03:00) Istanbul" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Türkiye Standard Time", + "name": "Türkiye Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Turks And Caicos Standard Time", + "displayName": "(UTC-05:00) Turks and Caicos" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Turks And Caicos Standard Time", + "name": "Turks And Caicos Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Ulaanbaatar Standard Time", + "displayName": "(UTC+08:00) Ulaanbaatar" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Ulaanbaatar Standard Time", + "name": "Ulaanbaatar Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "US Eastern Standard Time", + "displayName": "(UTC-05:00) Indiana (East)" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/US Eastern Standard Time", + "name": "US Eastern Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "US Mountain Standard Time", + "displayName": "(UTC-07:00) Arizona" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/US Mountain Standard Time", + "name": "US Mountain Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC", + "displayName": "(UTC) Coordinated Universal Time" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC", + "name": "UTC", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC+12", + "displayName": "(UTC+12:00) Coordinated Universal Time+12" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC+12", + "name": "UTC+12", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC+13", + "displayName": "(UTC+13:00) Coordinated Universal Time+13" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC+13", + "name": "UTC+13", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC-02", + "displayName": "(UTC-02:00) Coordinated Universal Time-02" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-02", + "name": "UTC-02", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC-08", + "displayName": "(UTC-08:00) Coordinated Universal Time-08" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-08", + "name": "UTC-08", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC-09", + "displayName": "(UTC-09:00) Coordinated Universal Time-09" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-09", + "name": "UTC-09", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "UTC-11", + "displayName": "(UTC-11:00) Coordinated Universal Time-11" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-11", + "name": "UTC-11", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Venezuela Standard Time", + "displayName": "(UTC-04:00) Caracas" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Venezuela Standard Time", + "name": "Venezuela Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Vladivostok Standard Time", + "displayName": "(UTC+10:00) Vladivostok" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Vladivostok Standard Time", + "name": "Vladivostok Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Volgograd Standard Time", + "displayName": "(UTC+04:00) Volgograd" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Volgograd Standard Time", + "name": "Volgograd Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "W. Australia Standard Time", + "displayName": "(UTC+08:00) Perth" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Australia Standard Time", + "name": "W. Australia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "W. Central Africa Standard Time", + "displayName": "(UTC+01:00) West Central Africa" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Central Africa Standard Time", + "name": "W. Central Africa Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "W. Europe Standard Time", + "displayName": "(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Europe Standard Time", + "name": "W. Europe Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "W. Mongolia Standard Time", + "displayName": "(UTC+07:00) Hovd" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Mongolia Standard Time", + "name": "W. Mongolia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "West Asia Standard Time", + "displayName": "(UTC+05:00) Ashgabat, Tashkent" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/West Asia Standard Time", + "name": "West Asia Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "West Bank Standard Time", + "displayName": "(UTC+02:00) Gaza, Hebron" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/West Bank Standard Time", + "name": "West Bank Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "West Pacific Standard Time", + "displayName": "(UTC+10:00) Guam, Port Moresby" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/West Pacific Standard Time", + "name": "West Pacific Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + }, + { + "properties": { + "timeZoneId": "Yakutsk Standard Time", + "displayName": "(UTC+09:00) Yakutsk" + }, + "id": "/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Yakutsk Standard Time", + "name": "Yakutsk Standard Time", + "type": "Microsoft.Sql/locations/timeZones" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesList.json new file mode 100644 index 000000000000..26d672185d1b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesList.json @@ -0,0 +1,238 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview", + "observationMetric": "duration", + "interval": "PT1H" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "numberOfQueries": 5, + "aggregationFunction": "sum", + "observationMetric": "cpu", + "intervalType": "P1D", + "startTime": "03/01/2020 00:00:00", + "endTime": "03/05/2020 13:00:00", + "queries": [ + { + "databaseName": "db1", + "queryId": "25", + "intervals": [ + { + "intervalStartTime": "03/03/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0015841714409722222 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 4.3402777777777778E-06 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 8336.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 11306905.0 + } + ] + } + ] + }, + { + "databaseName": "db1", + "queryId": "21", + "intervals": [ + { + "intervalStartTime": "03/03/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00095214322916666668 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 2.3148148148148148E-07 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 1024.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 6620020.0 + } + ] + } + ] + }, + { + "databaseName": "db3", + "queryId": "3", + "intervals": [ + { + "intervalStartTime": "03/04/2020 00:00:00", + "executionCount": 104, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00080066116898148151 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 5543088.0 + } + ] + } + ] + }, + { + "databaseName": "db2", + "queryId": "3", + "intervals": [ + { + "intervalStartTime": "03/03/2020 00:00:00", + "executionCount": 89, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00068825434027777776 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 4761877.0 + } + ] + } + ] + }, + { + "databaseName": "db3", + "queryId": "22", + "intervals": [ + { + "intervalStartTime": "03/04/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00062206611689814817 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 1024.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 4454161.0 + } + ] + } + ] + } + ] + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesListMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesListMax.json new file mode 100644 index 000000000000..09a9469f360f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesListMax.json @@ -0,0 +1,241 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview", + "interval": "P1D", + "startTime": "2020-03-10T12:00:00Z", + "endTime": "2020-03-12T12:00:00Z", + "observationMetric": "cpu", + "databases": "db1,db2" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "numberOfQueries": 5, + "aggregationFunction": "sum", + "observationMetric": "cpu", + "intervalType": "P1D", + "startTime": "03/10/2020 00:00:00", + "endTime": "03/12/2020 13:00:00", + "queries": [ + { + "databaseName": "db1", + "queryId": "28", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.0015934667245370371 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 4.2245370370370369E-06 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 8336.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 11091296.0 + } + ] + } + ] + }, + { + "databaseName": "db1", + "queryId": "24", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00095227835648148147 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 1.7361111111111112E-07 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 1024.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 6625562.0 + } + ] + } + ] + }, + { + "databaseName": "db1", + "queryId": "3", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "executionCount": 82, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00071831394675925925 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 0.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 4970199.0 + } + ] + } + ] + }, + { + "databaseName": "db1", + "queryId": "29", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00064944545717592593 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 5.0347222222222223E-06 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 1024.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 4530668.0 + } + ] + } + ] + }, + { + "databaseName": "db2", + "queryId": "25", + "intervals": [ + { + "intervalStartTime": "03/11/2020 00:00:00", + "executionCount": 1, + "metrics": [ + { + "name": "cpu", + "displayName": "Cpu", + "unit": "percentage", + "value": 0.00062753689236111116 + }, + { + "name": "io", + "displayName": "Physical Io Reads", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "logIo", + "displayName": "Log Writes", + "unit": "percentage", + "value": 0.0 + }, + { + "name": "memory", + "displayName": "Memory consumption", + "unit": "KB", + "value": 1024.0 + }, + { + "name": "duration", + "displayName": "Query duration", + "unit": "microseconds", + "value": 4349943.0 + } + ] + } + ] + } + ] + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesListMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesListMin.json new file mode 100644 index 000000000000..a8b7d7cfc1f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceTopQueriesListMin.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "numberOfQueries": 5, + "aggregationFunction": "sum", + "observationMetric": "cpu", + "intervalType": "PT1H", + "startTime": "03/10/2020 12:00:00", + "endTime": "03/11/2020 12:24:07", + "queries": [] + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceUpdateMax.json new file mode 100644 index 000000000000..5f4180ff9fb2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceUpdateMax.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + }, + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8 + }, + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "PLACEHOLDER", + "proxyOverride": "Redirect", + "publicDataEndpointEnabled": false, + "minimalTlsVersion": "1.2", + "licenseType": "BasePrice", + "vCores": 8, + "storageSizeInGB": 448, + "collation": "SQL_Latin1_General_CP1_CI_AS", + "requestedBackupStorageRedundancy": "Geo", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "databaseFormat": "AlwaysUpToDate" + } + } + }, + "responses": { + "200": { + "headers": { + "Azure-AsyncOperation": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/eastus/managedInstanceAzureAsyncOperation/11111111-1111-1111-1111-111111111111" + }, + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances", + "location": "japaneast", + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 448, + "licenseType": "BasePrice", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Redirect", + "minimalTlsVersion": "1.2", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "databaseFormat": "AlwaysUpToDate" + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/eastus/managedInstanceOperationResults/11111111-1111-1111-1111-111111111111", + "Azure-AsyncOperation": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/eastus/managedInstanceAzureAsyncOperation/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceUpdateMin.json new file mode 100644 index 000000000000..1404060d1451 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceUpdateMin.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview", + "parameters": { + "tags": { + "tagKey1": "TagValue1" + } + } + }, + "responses": { + "200": { + "headers": { + "Azure-AsyncOperation": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/eastus/managedInstanceAzureAsyncOperation/11111111-1111-1111-1111-111111111111" + }, + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen4" + }, + "properties": { + "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net", + "administratorLogin": "PLACEHOLDER", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "dnsZone": "1b4e2caff2530", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "databaseFormat": "SQLServer2022" + }, + "location": "japaneast", + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance", + "name": "testinstance", + "type": "Microsoft.Sql/managedInstances" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/eastus/managedInstanceOperationResults/11111111-1111-1111-1111-111111111111", + "Azure-AsyncOperation": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/eastus/managedInstanceAzureAsyncOperation/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json new file mode 100644 index 000000000000..78b7623721f4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json new file mode 100644 index 000000000000..fad0e7f802ba --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json new file mode 100644 index 000000000000..9cbb4d5ac2b3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..aaab2217817c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..b1635bae127f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json new file mode 100644 index 000000000000..2ca41e4dace0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsDisable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsDisable.json new file mode 100644 index 000000000000..e3a212f876c4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsDisable.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "managedInstanceName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/managedInstances/ledgertestserver/databases/testdb/ledgerDigestUploads/current/disable", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/ledgerDigestUploads", + "properties": { + "state": "Disabled" + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/locations/eastus/managedLedgerDigestUploadsOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsEnable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsEnable.json new file mode 100644 index 000000000000..7c024e6b6b71 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsEnable.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "managedInstanceName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "digestStorageEndpoint": "https://MyAccount.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/managedInstances/ledgertestserver/databases/testdb/ledgerDigestUploads/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/ledgerDigestUploads", + "properties": { + "digestStorageEndpoint": "https://mystorage.blob.core.windows.net", + "state": "Enabled" + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/locations/eastus/managedLedgerDigestUploadsOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsGet.json new file mode 100644 index 000000000000..7cc62ca3cdf7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "managedInstanceName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/managedInstances/ledgertestserver/databases/testdb/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/ledgerDigestUploads", + "properties": { + "digestStorageEndpoint": "https://mystorage.blob.core.windows.net", + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsList.json new file mode 100644 index 000000000000..3de831ae2e3a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedLedgerDigestUploadsList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "ledgertestrg", + "managedInstanceName": "ledgertestserver", + "databaseName": "testdb", + "ledgerDigestUploads": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/managedInstances/ledgertestserver/databases/testdb/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/ledgerDigestUploads", + "properties": { + "digestStorageEndpoint": "https://mystorage.blob.core.windows.net", + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasAcquire.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasAcquire.json new file mode 100644 index 000000000000..aee592366592 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasAcquire.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "new-mi", + "dnsAliasName": "dns-alias-mi", + "api-version": "2023-05-01-preview", + "parameters": { + "oldManagedServerDnsAliasResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/old-mi/dnsAliases/alias1" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/new-mi/dnsAliases/alias1", + "name": "alias1", + "type": "Microsoft.Sql/managedInstances/dnsAliases", + "properties": { + "azureDnsRecord": "alias1.abcd1234.database.windows.net" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/managedDnsAliasOperationResults/00000000-1111-2222-3333-444444444444?api-version=2021-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasCreateOrUpdate.json new file mode 100644 index 000000000000..a54caeb738aa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasCreateOrUpdate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "dns-mi", + "dnsAliasName": "dns-alias-mi", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/dns-mi/dnsAliases/dns-alias-mi", + "name": "dns-alias-mi", + "type": "Microsoft.Sql/managedInstances/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-mi.abcd1234.database.windows.net" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/dns-mi/dnsAliases/dns-alias-mi", + "name": "dns-alias-mi", + "type": "Microsoft.Sql/managedInstances/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-mi.abcd1234.database.windows.net" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasDelete.json new file mode 100644 index 000000000000..ffb73970a99a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "dns-mi", + "dnsAliasName": "dns-alias-mi", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/managedDnsAliasOperationResults/00000000-1111-2222-3333-444444444444?api-version=2021-05-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasGet.json new file mode 100644 index 000000000000..49212e548301 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "dns-mi", + "dnsAliasName": "dns-alias-mi", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/dns-mi/dnsAliases/dns-alias-mi", + "name": "dns-alias-mi", + "type": "Microsoft.Sql/managedInstances/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-mi.abcd1234.database.windows.net", + "publicAzureDnsRecord": "dns-alias-mi.public.abcd1234.database.windows.net" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasList.json new file mode 100644 index 000000000000..d1f793da3d58 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerDnsAliasList.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "managedInstanceName": "dns-mi", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/dns-mi/dnsAliases/dns-alias-mi", + "name": "dns-alias-mi", + "type": "Microsoft.Sql/managedInstances/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-mi.abcd1234.database.windows.net", + "publicAzureDnsRecord": "dns-alias-mi.public.abcd1234.database.windows.net" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/dns-mi/dnsAliases/dns-alias-mi-2", + "name": "dns-alias-mi-2", + "type": "Microsoft.Sql/managedInstances/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-mi-2.abcd1234.database.windows.net", + "publicAzureDnsRecord": "dns-alias-mi-2.public.abcd1234.database.windows.net" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertCreateMax.json new file mode 100644 index 000000000000..1f046c0afe22 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertCreateMax.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "testSecurityAlert@microsoft.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 5, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "testSecurityAlert@microsoft.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 5, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertCreateMin.json new file mode 100644 index 000000000000..8e019f187bc0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertCreateMin.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [], + "disabledAlerts": [], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertGet.json new file mode 100644 index 000000000000..0bc13327cea0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertGet.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com;user@consoto.com" + ], + "disabledAlerts": [ + "Access_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "", + "creationTime": "2020-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertListByInstance.json new file mode 100644 index 000000000000..f2fc0caadb1a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedServerSecurityAlertListByInstance.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "managedInstanceName": "securityalert-6440", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440", + "name": "Default", + "type": "Microsoft.Sql/managedInstances/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com;user@consoto.com" + ], + "disabledAlerts": [ + "Access_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "", + "creationTime": "2020-04-03T04:41:33.937Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedTransparentDataEncryptionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedTransparentDataEncryptionGet.json new file mode 100644 index 000000000000..5aadc906e4de --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedTransparentDataEncryptionGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "security-tde-resourcegroup", + "managedInstanceName": "securitytde", + "databaseName": "testdb", + "tdeName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/managedInstances/securitytde/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedTransparentDataEncryptionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedTransparentDataEncryptionList.json new file mode 100644 index 000000000000..593825ba64f5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedTransparentDataEncryptionList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "security-tde-resourcegroup", + "managedInstanceName": "securitytde", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/managedInstances/securitytde/databases/testdb", + "name": "current", + "type": "Microsoft.Sql/managedInstances/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json new file mode 100644 index 000000000000..eddf6371c8f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securitytde-42-rg", + "managedInstanceName": "securitytde-42", + "databaseName": "testdb", + "tdeName": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/managedInstances/securitytde-42/databases/testdb/transparentDataEncryption", + "name": "current", + "type": "Microsoft.Sql/managedInstance/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/managedInstances/securitytde-42/databases/testdb/transparentDataEncryption", + "name": "current", + "type": "Microsoft.Sql/managedInstance/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json new file mode 100644 index 000000000000..7d628e50756a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-7398", + "nspConfigName": "00000001-2222-3333-4444-111144444444.assoc1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", + "name": "00000001-2222-3333-4444-111144444444.assoc1", + "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", + "properties": { + "provisioningState": "Accepted", + "networkSecurityPerimeter": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", + "location": "japaneast" + }, + "resourceAssociation": { + "name": "assoc1", + "accessMode": "Enforced" + }, + "profile": { + "name": "profile1", + "accessRulesVersion": "0", + "accessRules": [ + { + "name": "rule1", + "properties": { + "direction": "Inbound", + "addressPrefixes": [ + "148.0.0.0/8", + "152.4.6.0/24" + ] + } + } + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json new file mode 100644 index 000000000000..a63b5db5665c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-7398", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", + "name": "00000001-2222-3333-4444-111144444444.assoc1", + "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", + "properties": { + "provisioningState": "Accepted", + "networkSecurityPerimeter": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", + "location": "japaneast" + }, + "resourceAssociation": { + "name": "assoc1", + "accessMode": "Enforced" + }, + "profile": { + "name": "profile1", + "accessRulesVersion": "0", + "accessRules": [ + { + "name": "rule1", + "properties": { + "direction": "Inbound", + "addressPrefixes": [ + "148.0.0.0/8", + "152.4.6.0/24" + ] + } + } + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json new file mode 100644 index 000000000000..0d679ad4fd19 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-7398", + "nspConfigName": "00000001-2222-3333-4444-111144444444.assoc1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/networkSecurityPerimeterConfigurations/00000001-2222-3333-4444-111144444444.assoc1", + "name": "00000001-2222-3333-4444-111144444444.assoc1", + "type": "Microsoft.Sql/servers/networkSecurityPerimeterConfigurations", + "properties": { + "provisioningState": "Accepted", + "networkSecurityPerimeter": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/networkRG/providers/Microsoft.Network/networkSecurityPerimeters/perimeter1", + "location": "japaneast" + }, + "resourceAssociation": { + "name": "assoc1", + "accessMode": "Enforced" + }, + "profile": { + "name": "profile1", + "accessRulesVersion": "0", + "accessRules": [ + { + "name": "rule1", + "properties": { + "direction": "Inbound", + "addressPrefixes": [ + "148.0.0.0/8", + "152.4.6.0/24" + ] + } + } + ] + } + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/locations/japaneast/networkSecurityPerimeterReconciliationOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleCreate.json new file mode 100644 index 000000000000..cd559952f901 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleCreate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "outboundRuleFqdn": "server.database.windows.net", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net", + "name": "server.database.windows.net", + "type": "Microsoft.Sql/servers/outboundFirewallRules", + "properties": { + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net", + "name": "server.database.windows.net", + "type": "Microsoft.Sql/servers/outboundFirewallRules", + "properties": { + "provisioningState": "Creating" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleDelete.json new file mode 100644 index 000000000000..d6d657b1e7e8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-6661", + "outboundRuleFqdn": "server.database.windows.net", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/outboundFirewallRulesOperationResults/00000000-1111-2222-3333-444444444444?api-version=2021-02-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleGet.json new file mode 100644 index 000000000000..c707e28f9e05 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "outboundRuleFqdn": "server.database.windows.net", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net", + "name": "server.database.windows.net", + "type": "Microsoft.Sql/servers/outboundFirewallRules", + "properties": { + "provisioningState": "Ready" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleList.json new file mode 100644 index 000000000000..fa3d98b665b3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/OutboundFirewallRuleList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net", + "name": "server.database.windows.net", + "type": "Microsoft.Sql/servers/outboundFirewallRules", + "properties": { + "provisioningState": "Ready" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/storage.blob.windows.net", + "name": "storage.blob.windows.net", + "type": "Microsoft.Sql/servers/outboundFirewallRules", + "properties": { + "provisioningState": "Creating" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchDatabaseDefaultEnclave.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchDatabaseDefaultEnclave.json new file mode 100644 index 000000000000..9c681b05c6e5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchDatabaseDefaultEnclave.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "preferredEnclaveType": "Default" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S0", + "currentBackupStorageRedundancy": "Geo", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "preferredEnclaveType": "Default" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchDatabaseVBSEnclave.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchDatabaseVBSEnclave.json new file mode 100644 index 000000000000..8265895b3d53 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchDatabaseVBSEnclave.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "preferredEnclaveType": "VBS" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "kind": "v12.0,user", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 268435456000, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "currentSku": { + "name": "Standard", + "tier": "Standard", + "capacity": 10 + }, + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "S0", + "currentBackupStorageRedundancy": "Geo", + "defaultSecondaryLocation": "North Europe", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "readScale": "Disabled", + "requestedBackupStorageRedundancy": "Geo", + "requestedServiceObjectiveName": "S0", + "zoneRedundant": false, + "preferredEnclaveType": "VBS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchInstancePool.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchInstancePool.json new file mode 100644 index 000000000000..234bb78e4321 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchInstancePool.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "instancePoolName": "testIP", + "api-version": "2023-05-01-preview", + "parameters": { + "tags": { + "x": "y" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5" + }, + "properties": { + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1", + "vCores": 8, + "licenseType": "LicenseIncluded", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1" + }, + "location": "japaneast", + "tags": { + "x": "y" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP", + "name": "testIP", + "type": "Microsoft.Sql/instancePools" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/instancepoolazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabase.json new file mode 100644 index 000000000000..c0864dd50df0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabase.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "BC_Gen4_4" + }, + "properties": { + "maxSizeBytes": 1073741824, + "licenseType": "LicenseIncluded" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 4 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "requestedServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 4 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Local", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json new file mode 100644 index 000000000000..911cd7e86a43 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "BC_Gen5_4" + }, + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 4 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen5_2", + "requestedServiceObjectiveName": "BC_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "currentSku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 4 + }, + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json new file mode 100644 index 000000000000..2010c7cd5222 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "BC_Gen5_4" + }, + "properties": { + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 4 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen5_4", + "requestedServiceObjectiveName": "BC_Gen5_4", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "currentSku": { + "name": "BC_Gen5", + "tier": "BusinessCritical", + "capacity": 4 + } + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabaseWithKeysAndEncryptionProtector.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabaseWithKeysAndEncryptionProtector.json new file mode 100644 index 000000000000..d8052b2ca6f9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchVCoreDatabaseWithKeysAndEncryptionProtector.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "identity": { + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi": {}, + "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umiToDelete": null + }, + "type": "UserAssigned" + }, + "sku": { + "name": "S0", + "tier": "Standard" + }, + "properties": { + "keys": { + "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": {}, + "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2VersionToDelete": null + }, + "encryptionProtector": "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 4 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 1073741824, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-06-07T04:41:33.937Z", + "currentServiceObjectiveName": "BC_Gen4_2", + "requestedServiceObjectiveName": "BC_Gen4_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 104857600, + "isInfraEncryptionEnabled": false, + "zoneRedundant": false, + "readScale": "Enabled", + "earliestRestoreDate": "2017-06-07T04:51:33.937Z", + "currentSku": { + "name": "BC_Gen4", + "tier": "BusinessCritical", + "capacity": 4 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Local", + "isLedgerOn": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PauseDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PauseDatabase.json new file mode 100644 index 000000000000..838a40535054 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PauseDatabase.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdwdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "DataWarehouse" + }, + "kind": "v12.0,user,datawarehouse", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 10995116277760, + "status": "Paused", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-07-13T02:04:26.187Z", + "currentServiceObjectiveName": "D1", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdwdb", + "name": "testdwdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/japaneast/databaseOperationResults/00000000-0000-0000-0000-000000000000" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionDelete.json new file mode 100644 index 000000000000..fb9c15134dd7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/privateEndpointConnectionProxyOperationResults/00000000-1111-2222-3333-444444444444?api-version=2018-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionGet.json new file mode 100644 index 000000000000..dca703be3e15 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/servers/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionList.json new file mode 100644 index 000000000000..30408f3f89b5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionList.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name-2", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/servers/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name-2", + "name": "private-endpoint-connection-name-2", + "type": "Microsoft.Sql/servers/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name-2" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionUpdate.json new file mode 100644 index 000000000000..c78514708b8f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateEndpointConnectionUpdate.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "privateEndpointConnectionName": "private-endpoint-connection-name", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by johndoe@contoso.com" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name", + "name": "private-endpoint-connection-name", + "type": "Microsoft.Sql/servers/privateEndpointConnections", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None" + } + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateLinkResourcesGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateLinkResourcesGet.json new file mode 100644 index 000000000000..9678c60aabb7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateLinkResourcesGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "groupName": "plr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateLinkResources/plr", + "name": "plr", + "type": "Microsoft.Sql/servers/privateLinkResources", + "properties": { + "groupId": "sqlServer", + "requiredMembers": [ + "sqlServer" + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateLinkResourcesList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateLinkResourcesList.json new file mode 100644 index 000000000000..166bf71cc721 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PrivateLinkResourcesList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "test-svr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateLinkResources/plr", + "name": "plr", + "type": "Microsoft.Sql/servers/privateLinkResources", + "properties": { + "groupId": "sqlServer", + "requiredMembers": [ + "sqlServer" + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json new file mode 100644 index 000000000000..7f5139d01353 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json new file mode 100644 index 000000000000..7f5139d01353 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecoverableDatabaseGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecoverableDatabaseGet.json new file mode 100644 index 000000000000..92e1d3221f9e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecoverableDatabaseGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "recoverabledatabasetest-6852", + "serverName": "recoverabledatabasetest-2080", + "databaseName": "recoverabledatabasetest-9187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-6852/providers/Microsoft.Sql/servers/recoverabledatabasetest-2080/recoverableDatabases/recoverabledatabasetest-9187", + "name": "recoverabledatabasetest-9187", + "type": "Microsoft.Sql/servers/recoverableDatabases", + "properties": { + "edition": "Basic", + "serviceLevelObjective": "Basic", + "lastAvailableBackupDate": "2017-05-26T01:06:29.78Z", + "elasticPoolName": null + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json new file mode 100644 index 000000000000..e8401c155e04 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "recoverabledatabasetest-6852", + "serverName": "recoverabledatabasetest-2080", + "databaseName": "recoverabledatabasetest-9187", + "api-version": "2023-05-01-preview", + "$expand": "keys" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-6852/providers/Microsoft.Sql/servers/recoverabledatabasetest-2080/recoverableDatabases/recoverabledatabasetest-9187", + "name": "recoverabledatabasetest-9187", + "type": "Microsoft.Sql/servers/recoverableDatabases", + "properties": { + "edition": "Basic", + "serviceLevelObjective": "Basic", + "lastAvailableBackupDate": "2017-05-26T01:06:29.78Z", + "elasticPoolName": null, + "keys": { + "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": {}, + "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version": {} + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecoverableDatabaseList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecoverableDatabaseList.json new file mode 100644 index 000000000000..9fad576ded02 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RecoverableDatabaseList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "recoverabledatabasetest-1234", + "serverName": "recoverabledatabasetest-7177", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-1234/providers/Microsoft.Sql/servers/recoverabledatabasetest-7177/recoverableDatabases/recoverabledatabasetest-1235", + "name": "recoverabledatabasetest-1235", + "type": "Microsoft.Sql/servers/recoverableDatabases", + "properties": { + "edition": "Standard", + "serviceLevelObjective": "S0", + "lastAvailableBackupDate": "2017-05-26T01:06:29.78Z", + "elasticPoolName": null + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-1234/providers/Microsoft.Sql/servers/recoverabledatabasetest-7177/recoverableDatabases/recoverabledatabasetest-9231", + "name": "recoverabledatabasetest-9231", + "type": "Microsoft.Sql/servers/recoverableDatabases", + "properties": { + "edition": "Premium", + "serviceLevelObjective": "P1", + "lastAvailableBackupDate": "2017-05-26T03:20:31.78Z", + "elasticPoolName": null + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-1234/providers/Microsoft.Sql/servers/recoverabledatabasetest-7177/recoverabledatabases/recoverabledatabasetest-0342", + "name": "recoverabledatabasetest-0342", + "type": "Microsoft.Sql/servers/recoverabledatabases", + "properties": { + "edition": "Basic", + "serviceLevelObjective": "Basic", + "lastAvailableBackupDate": "2017-05-24T02:06:18.78Z", + "elasticPoolName": null + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RefreshExternalGovernanceStatus.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RefreshExternalGovernanceStatus.json new file mode 100644 index 000000000000..ece5fd050db3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RefreshExternalGovernanceStatus.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "requestId": "00000000-0000-0000-0000-000000000000", + "requestType": "UpdatePurviewMetadata", + "queuedTime": "2/12/2022 8:33:27 PM", + "serverName": "testsvr.database.windows.net", + "status": "Completed" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/refreshExternalGovernanceStatusOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4", + "name": "9d9a794a-5cec-4f23-af70-d29511b522a4", + "type": "Microsoft.Sql/locations/refreshExternalGovernanceStatusOperationResults" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/refreshExternalGovernanceStatusOperationResults/00000000-0000-0000-0000-000000000000?api-version=2022-08-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RenameDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RenameDatabase.json new file mode 100644 index 000000000000..2fc577ff5369 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RenameDatabase.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/newtestdb" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkCreateOrUpdate.json new file mode 100644 index 000000000000..979d575a4442 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkCreateOrUpdate.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "databaseName": "gamma-db", + "linkId": "00000000-1111-2222-3333-666666666666", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "linkType": "STANDBY" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "gamma-db", + "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/testsvr/databases/gamma-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:12:43.783Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "STANDBY" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb", + "name": "00000000-1111-2222-3333-666666666666" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/replicationLinksOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkDelete.json new file mode 100644 index 000000000000..2ab2abd16c72 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "databaseName": "gamma-db", + "linkId": "4891ca10-ebd0-47d7-9182-c722651780fb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/JapanWest/replicationLinksOperationResults/replicationlink-group-test-3?api-version=2022-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkFailover.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkFailover.json new file mode 100644 index 000000000000..284dcfed8fc6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkFailover.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "databaseName": "gamma-db", + "linkId": "4891ca10-ebd0-47d7-9182-c722651780fb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "gamma-db", + "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/testsvr/databases/gamma-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:12:43.783Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb", + "name": "4891ca10-ebd0-47d7-9182-c722651780fb" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/JapanWest/replicationLinksOperationResults/replicationlink-group-test-3?api-version=2022-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkFailoverAllowDataLoss.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkFailoverAllowDataLoss.json new file mode 100644 index 000000000000..284dcfed8fc6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkFailoverAllowDataLoss.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "databaseName": "gamma-db", + "linkId": "4891ca10-ebd0-47d7-9182-c722651780fb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "gamma-db", + "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/testsvr/databases/gamma-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:12:43.783Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb", + "name": "4891ca10-ebd0-47d7-9182-c722651780fb" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/JapanWest/replicationLinksOperationResults/replicationlink-group-test-3?api-version=2022-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkGet.json new file mode 100644 index 000000000000..35620859b299 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "databaseName": "gamma-db", + "linkId": "4891ca10-ebd0-47d7-9182-c722651780fb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "gamma-db", + "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/testsvr/databases/gamma-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:12:43.783Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb", + "name": "4891ca10-ebd0-47d7-9182-c722651780fb" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkListByDatabase.json new file mode 100644 index 000000000000..64962df00ded --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkListByDatabase.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "databaseName": "tetha-db", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "tetha-db", + "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/testsvr/databases/tetha-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:11:46.907Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/fb92de60-eb87-4a58-b250-3362d0cfdf26", + "name": "fb92de60-eb87-4a58-b250-3362d0cfdf26" + }, + { + "properties": { + "partnerServer": "targetsvr", + "partnerDatabase": "tetha-db", + "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/targetsvr/databases/tetha-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:11:34.423Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/6ad1eefc-18a2-4fcb-94f3-4b654ba788d7", + "name": "6ad1eefc-18a2-4fcb-94f3-4b654ba788d7" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkListByServer.json new file mode 100644 index 000000000000..0801181123b5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkListByServer.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "tetha-db", + "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/testsvr/databases/tetha-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:11:46.907Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/fb92de60-eb87-4a58-b250-3362d0cfdf26", + "name": "fb92de60-eb87-4a58-b250-3362d0cfdf26" + }, + { + "properties": { + "partnerServer": "targetsvr", + "partnerDatabase": "tetha-db", + "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/targetsvr/databases/tetha-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:11:34.423Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/6ad1eefc-18a2-4fcb-94f3-4b654ba788d7", + "name": "6ad1eefc-18a2-4fcb-94f3-4b654ba788d7" + }, + { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "gamma-db", + "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/testsvr/databases/gamma-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:12:43.783Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "GEO" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb", + "name": "4891ca10-ebd0-47d7-9182-c722651780fb" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkUpdate.json new file mode 100644 index 000000000000..979d575a4442 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkUpdate.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "sourcesvr", + "databaseName": "gamma-db", + "linkId": "00000000-1111-2222-3333-666666666666", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "linkType": "STANDBY" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "partnerServer": "testsvr", + "partnerDatabase": "gamma-db", + "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/testsvr/databases/gamma-db", + "partnerLocation": "Japan East", + "role": "Primary", + "partnerRole": "Secondary", + "replicationMode": "ASYNC", + "startTime": "2018-06-21T08:12:43.783Z", + "percentComplete": 100, + "replicationState": "CATCH_UP", + "isTerminationAllowed": true, + "linkType": "STANDBY" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb", + "name": "00000000-1111-2222-3333-666666666666" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/replicationLinksOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedChangeLongTermRetentionBackupAccessTier.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedChangeLongTermRetentionBackupAccessTier.json new file mode 100644 index 000000000000..b52afc46b8ad --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedChangeLongTermRetentionBackupAccessTier.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroupName", + "locationName": "japaneast", + "longTermRetentionServerName": "serverName", + "longTermRetentionDatabaseName": "databaseName", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "api-version": "2023-05-01-preview", + "parameters": { + "backupStorageAccessTier": "Hot", + "operationMode": "Copy" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroupName/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/serverName/longTermRetentionDatabases/databaseName/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "serverName", + "serverCreateTime": "2017-09-06T08:00:00Z", + "databaseName": "databaseName", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupExpirationTime": null, + "backupStorageRedundancy": "Geo" + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroupName/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/serverName/longTermRetentionDatabases/databaseName/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive/operations/55555555-6666-7777-8888-999999999999?api-version=2023-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json new file mode 100644 index 000000000000..fe3af69cec91 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "targetServerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2", + "targetDatabaseName": "testDatabase2", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "name": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "type": "Microsoft.Sql/locations/longTermRetentionBackupOperationResults", + "properties": { + "requestId": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "fromBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "operationType": "CopyBackup", + "status": "Succeeded", + "toBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver2/longterRetentionDatabases/testDatabase2/longTermRetentionBackups/55555555-6666-7777-8888-111111111111;131637960820000000", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706?api-version=2021-05-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json new file mode 100644 index 000000000000..f892b5eb2fc7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706?api-version=2021-05-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json new file mode 100644 index 000000000000..7de389f0a086 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json new file mode 100644 index 000000000000..586489621820 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131657960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131657960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json new file mode 100644 index 000000000000..45d01942052a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver1", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver1", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver2/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000;Archive", + "name": "12341234-1234-1234-1234-123123123123;131657960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver2", + "serverCreateTime": "2017-04-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json new file mode 100644 index 000000000000..a6aabcde6f2d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000;Archive", + "name": "12341234-1234-1234-1234-123123123123;131657960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups", + "properties": { + "serverName": "testserver", + "serverCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "isBackupImmutable": false, + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json new file mode 100644 index 000000000000..e8d74a094b8f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "longTermRetentionServerName": "testserver", + "longTermRetentionDatabaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "requestedBackupStorageRedundancy": "Geo" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "name": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "type": "Microsoft.Sql/locations/longTermRetentionBackupOperationResults", + "properties": { + "requestId": "a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706", + "fromBackupResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000", + "operationType": "UpdateBackup", + "status": "Succeeded", + "targetBackupStorageRedundancy": "Geo" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706?api-version=2021-05-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json new file mode 100644 index 000000000000..538c781fe752 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/longTermRetentionManagedInstanceBackupOperationResults/00000000-1111-2222-3333-444444444444?api-version=2023-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json new file mode 100644 index 000000000000..6504e7b3ab91 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "backupName": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json new file mode 100644 index 000000000000..2d730d6fc8ac --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "databaseName": "testDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z;Archive", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2018-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z;Hot", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": null, + "backupTime": "2018-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z;Archive", + "name": "2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2018-03-10T08:00:00Z", + "databaseName": "testDatabase", + "databaseDeletionTime": "2018-09-07T08:00:00Z", + "backupTime": "2018-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json new file mode 100644 index 000000000000..09dff78a06a9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "managedInstanceName": "testInstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000;Hot", + "name": "12341234-1234-1234-1234-123123123123;131657960820000000;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000;Archive", + "name": "43214321-4321-4321-4321-321321321321;131667960820000000;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json new file mode 100644 index 000000000000..215725b127d5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance1/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance1", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance2/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000;Hot", + "name": "12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance2", + "managedInstanceCreateTime": "2017-04-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Hot" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance3/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000;Archive", + "name": "43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance3", + "managedInstanceCreateTime": "2017-05-10T08:00:00Z", + "databaseName": "testDatabase3", + "databaseDeletionTime": null, + "backupTime": "2017-09-06T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocationMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocationMax.json new file mode 100644 index 000000000000..8fabcd78362a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocationMax.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testResourceGroup", + "locationName": "japaneast", + "api-version": "2023-05-01-preview", + "$skip": "0", + "$top": "2", + "$filter": "Properties/ManagedInstanceName eq 'testInstance1'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance1/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive", + "name": "55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z;Archive", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance1", + "managedInstanceCreateTime": "2017-03-10T08:00:00Z", + "databaseName": "testDatabase1", + "databaseDeletionTime": null, + "backupTime": "2017-08-23T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Archive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance1/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000;Hot", + "name": "12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z;Hot", + "type": "Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups", + "properties": { + "managedInstanceName": "testInstance1", + "managedInstanceCreateTime": "2017-04-10T08:00:00Z", + "databaseName": "testDatabase2", + "databaseDeletionTime": null, + "backupTime": "2017-08-30T08:00:00Z", + "backupStorageRedundancy": "Geo", + "backupStorageAccessTier": "Hot" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json new file mode 100644 index 000000000000..12f72c1fc227 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Test1", + "managedInstanceName": "managedInstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseName": "testdb", + "creationDate": "2017-05-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000", + "name": "testdb,131403269876900000", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases" + }, + { + "properties": { + "databaseName": "testdb2", + "creationDate": "2017-05-07T04:41:33.937Z", + "deletionDate": "2017-05-27T02:49:47.69Z" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb2,131403269876900000", + "name": "testdb2,131403269876900000", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResumeDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResumeDatabase.json new file mode 100644 index 000000000000..489bce5658c8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResumeDatabase.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdwdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "DataWarehouse" + }, + "kind": "v12.0,user,datawarehouse", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 10995116277760, + "status": "Online", + "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3", + "creationDate": "2017-07-13T02:04:26.187Z", + "currentServiceObjectiveName": "D1", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS" + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdwdb", + "name": "testdwdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/japaneast/databaseOperationResults/00000000-0000-0000-0000-000000000000" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsCurrentUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsCurrentUpdate.json new file mode 100644 index 000000000000..930691bbfa0e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsCurrentUpdate.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "operations": [ + { + "properties": { + "op": "set", + "schema": "dbo", + "table": "table1", + "column": "column1", + "sensitivityLabel": { + "properties": { + "labelName": "Highly Confidential", + "labelId": "3A477B16-9423-432B-AA97-6069B481CEC3", + "informationType": "Financial", + "informationTypeId": "1D3652D6-422C-4115-82F1-65DAEBC665C8", + "rank": "Low" + } + } + } + }, + { + "properties": { + "op": "set", + "schema": "dbo", + "table": "table2", + "column": "column2", + "sensitivityLabel": { + "properties": { + "informationType": "PhoneNumber", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "Critical" + } + } + } + }, + { + "properties": { + "op": "remove", + "schema": "dbo", + "table": "Table1", + "column": "Column3" + } + } + ] + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsListByDatabase.json new file mode 100644 index 000000000000..24862f8aa53b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsListByDatabase.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "Financial", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "labelName": "Sensitive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended", + "name": "recommended", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn2", + "informationType": "Email", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json new file mode 100644 index 000000000000..5e8789782b60 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn3/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn3", + "informationType": "Financial", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "labelName": "Sensitive", + "rank": "Low" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn4/sensitivityLabels/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn4", + "informationType": "Email", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII", + "rank": "None" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json new file mode 100644 index 000000000000..096711be32d6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/recommended", + "name": "recommended", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "informationType": "Financial", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "labelName": "Sensitive" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended", + "name": "recommended", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels", + "properties": { + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn2", + "informationType": "Email", + "informationTypeId": "d22fa6e9-5ee4-3bde-4c2b-a409604c4646", + "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "labelName": "PII" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsRecommendedUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsRecommendedUpdate.json new file mode 100644 index 000000000000..55b4b56f6c50 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SensitivityLabelsRecommendedUpdate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "api-version": "2023-05-01-preview", + "parameters": { + "operations": [ + { + "properties": { + "op": "enable", + "schema": "dbo", + "table": "table1", + "column": "column1" + } + }, + { + "properties": { + "op": "enable", + "schema": "dbo", + "table": "table2", + "column": "column2" + } + }, + { + "properties": { + "op": "disable", + "schema": "dbo", + "table": "table1", + "column": "column3" + } + } + ] + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMax.json new file mode 100644 index 000000000000..dbfa0bddd897 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMax.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "serverName": "threatprotection-6440", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMin.json new file mode 100644 index 000000000000..80e08472b3e2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMin.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "serverName": "threatprotection-6440", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Disabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsGet.json new file mode 100644 index 000000000000..2618afa5769e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "serverName": "threatprotection-6440", + "advancedThreatProtectionName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsListByServer.json new file mode 100644 index 000000000000..55506b8ebd91 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsListByServer.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "threatprotection-4799", + "serverName": "threatprotection-6440", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings", + "name": "Default", + "type": "Microsoft.Sql/servers/advancedThreatProtectionSettings", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2022-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Disabled", + "creationTime": "2022-04-03T04:41:33.937Z" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvisorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvisorGet.json new file mode 100644 index 000000000000..b766b809644c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvisorGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "advisorName": "CreateIndex", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvisorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvisorList.json new file mode 100644 index 000000000000..b96a9985a271 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvisorList.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex", + "name": "DropIndex", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DbParameterization", + "name": "DbParameterization", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/SchemaIssue", + "name": "SchemaIssue", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PublicPreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/ForceLastGoodPlan", + "name": "ForceLastGoodPlan", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PrivatePreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default" + } + } + ] + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvisorUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvisorUpdate.json new file mode 100644 index 000000000000..5db9999520c5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAdvisorUpdate.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "advisorName": "CreateIndex", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "autoExecuteStatus": "Disabled" + } + } + }, + "responses": { + "200": { + "body": { + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Server" + }, + "location": "East Asia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/advisors" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAuditingSettingsList.json new file mode 100644 index 000000000000..057541ba88c3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAuditingSettingsList.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAutomaticTuningGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAutomaticTuningGet.json new file mode 100644 index 000000000000..fb4a490e52f4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAutomaticTuningGet.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "createIndex": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "dropIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAutomaticTuningUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAutomaticTuningUpdateMax.json new file mode 100644 index 000000000000..618adf600296 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAutomaticTuningUpdateMax.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "desiredState": "Auto", + "options": { + "createIndex": { + "desiredState": "Off" + }, + "dropIndex": { + "desiredState": "On" + }, + "forceLastGoodPlan": { + "desiredState": "Default" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "createIndex": { + "desiredState": "Off", + "actualState": "Off" + }, + "dropIndex": { + "desiredState": "On", + "actualState": "On" + }, + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAutomaticTuningUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAutomaticTuningUpdateMin.json new file mode 100644 index 000000000000..d55d948a6ff7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerAutomaticTuningUpdateMin.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "c3aa9078-0000-0000-0000-e36f151182d7", + "resourceGroupName": "default-sql-onebox", + "serverName": "testsvr11", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "desiredState": "Auto" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/automaticTuning/current", + "name": "current", + "type": "Microsoft.Sql/servers/automaticTuning", + "properties": { + "desiredState": "Auto", + "actualState": "Auto", + "options": { + "createIndex": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "dropIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "forceLastGoodPlan": { + "desiredState": "Default", + "actualState": "On", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + }, + "maintainIndex": { + "desiredState": "Default", + "actualState": "Off", + "reasonCode": 2, + "reasonDesc": "AutoConfigured" + } + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerBlobAuditingCreateMax.json new file mode 100644 index 000000000000..45a51b80bd53 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerBlobAuditingCreateMax.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "queueDelayMs": 4000, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ], + "isAzureMonitorTargetEnabled": true + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerBlobAuditingCreateMin.json new file mode 100644 index 000000000000..17bbfaca2de3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerBlobAuditingCreateMin.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP" + ] + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerBlobAuditingGet.json new file mode 100644 index 000000000000..fecfbbe240bc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerBlobAuditingGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConfigurationOptionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConfigurationOptionGet.json new file mode 100644 index 000000000000..84c51d6c896b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConfigurationOptionGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "serverConfigurationOptionName": "allowPolybaseExport", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "serverConfigurationOptionValue": 1, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/serverConfigurationOptions/allowPolybaseExport", + "name": "allowPolybaseExport", + "type": "Microsoft.Sql/managedInstances/serverConfigurationOptions" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConfigurationOptionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConfigurationOptionList.json new file mode 100644 index 000000000000..5f78b26dc09f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConfigurationOptionList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "serverConfigurationOptionValue": 1, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/serverConfigurationOptions/allowPolybaseExport", + "name": "allowPolybaseExport", + "type": "Microsoft.Sql/managedInstances/serverConfigurationOptions" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConfigurationOptionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConfigurationOptionUpdate.json new file mode 100644 index 000000000000..bfc436b0ab93 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConfigurationOptionUpdate.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "managedInstanceName": "testinstance", + "serverConfigurationOptionName": "allowPolybaseExport", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "serverConfigurationOptionValue": 1 + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "serverConfigurationOptionValue": 1, + "provisioningState": "Updating" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/serverConfigurationOptions/allowPolybaseExport", + "name": "allowPolybaseExport", + "type": "Microsoft.Sql/managedInstances/serverConfigurationOptions" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConnectionPoliciesGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConnectionPoliciesGet.json new file mode 100644 index 000000000000..f69ed99123b4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConnectionPoliciesGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "rgtest-12", + "serverName": "servertest-6285", + "connectionPolicyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgtest-12/providers/Microsoft.Sql/servers/servertest-6285/connectionPolicies/default", + "name": "default", + "kind": null, + "location": "eastus", + "type": "Microsoft.Sql/servers/connectionPolicies", + "properties": { + "connectionType": "Redirect" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConnectionPoliciesList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConnectionPoliciesList.json new file mode 100644 index 000000000000..4a200a6fd52d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConnectionPoliciesList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "rgtest-12", + "serverName": "servertest-6285", + "connectionPolicyName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgtest-12/providers/Microsoft.Sql/servers/servertest-6285/connectionPolicies/default", + "name": "default", + "kind": null, + "location": "eastus", + "type": "Microsoft.Sql/servers/connectionPolicies", + "properties": { + "connectionType": "Redirect" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConnectionPoliciesUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConnectionPoliciesUpdate.json new file mode 100644 index 000000000000..b186e72b7958 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerConnectionPoliciesUpdate.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "testrg", + "serverName": "testserver", + "connectionPolicyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "connectionType": "Redirect" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/servers/testserver/connectionPolicies/default", + "name": "default", + "kind": null, + "location": "eastus", + "type": "Microsoft.Sql/servers/connectionPolicies", + "properties": { + "connectionType": "Redirect" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerCreate.json new file mode 100644 index 000000000000..ffbff0d9b98d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerCreate.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "PLACEHOLDER", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled" + }, + "location": "Japan East" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "version": "12.0", + "state": "Ready", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDelete.json new file mode 100644 index 000000000000..d7bd53c79fb5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDelete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-6661", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-02-01" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditCreateMax.json new file mode 100644 index 000000000000..6c4fb7f936a5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditCreateMax.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "devAuditTestRG", + "serverName": "devOpsAuditTestSvr", + "devOpsAuditingSettingsName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isAzureMonitorTargetEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default", + "name": "Default", + "type": "Microsoft.Sql/servers/devOpsAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isAzureMonitorTargetEnabled": true + } + } + }, + "202": { + "startTime": "2022-04-22T09:34:54.72Z", + "operation": "UpsertServerDevOpsAuditingSettings" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditCreateMin.json new file mode 100644 index 000000000000..5374c178239a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditCreateMin.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "devAuditTestRG", + "serverName": "devOpsAuditTestSvr", + "devOpsAuditingSettingsName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default", + "name": "Default", + "type": "Microsoft.Sql/servers/devOpsAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000" + } + } + }, + "202": { + "startTime": "2022-04-09T09:34:54.72Z", + "operation": "UpsertServerDevOpsAuditingSettings" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditGet.json new file mode 100644 index 000000000000..c1ed43519801 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "devAuditTestRG", + "serverName": "devOpsAuditTestSvr", + "devOpsAuditingSettingsName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default", + "name": "Default", + "type": "Microsoft.Sql/servers/devOpsAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditList.json new file mode 100644 index 000000000000..f8b70c335d17 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDevOpsAuditList.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "devAuditTestRG", + "serverName": "devOpsAuditTestSvr", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default", + "name": "Default", + "type": "Microsoft.Sql/servers/devOpsAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasAcquire.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasAcquire.json new file mode 100644 index 000000000000..2d39011505af --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasAcquire.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "dns-alias-new-server", + "dnsAliasName": "dns-alias-name-1", + "api-version": "2023-05-01-preview", + "parameters": { + "oldServerDnsAliasId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-new-server/dnsAliases/dns-alias-name-1", + "name": "server-dns-alias-name-1", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-name-1.database.windows.net" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/serverDnsAliasOperationResults/00000000-1111-2222-3333-444444444444?api-version=2017-03-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasCreateOrUpdate.json new file mode 100644 index 000000000000..48ef48b747a4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasCreateOrUpdate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "dns-alias-server", + "dnsAliasName": "dns-alias-name-1", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-name-1", + "name": "dns-alias-name-1", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-name-1.database.windows.net" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-name-1", + "name": "dns-alias-name-1", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-name-1.database.windows.net" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasDelete.json new file mode 100644 index 000000000000..59c178b9eeeb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "dns-alias-server", + "dnsAliasName": "dns-alias-name-1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Network/locations/westus/serverDnsAliasOperationResults/00000000-1111-2222-3333-444444444444?api-version=2017-03-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasGet.json new file mode 100644 index 000000000000..0b8b10397ebe --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "dns-alias-server", + "dnsAliasName": "dns-alias-name-1", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-name-1", + "name": "dns-alias-name-1", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-name-1.database.windows.net" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasList.json new file mode 100644 index 000000000000..cdd780e89ed0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDnsAliasList.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "dns-alias-server", + "api-version": "2023-05-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-1", + "name": "server-dns-alias-1", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-1.database.windows.net" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-2", + "name": "server-dns-alias-2", + "type": "Microsoft.Sql/servers/dnsAliases", + "properties": { + "azureDnsRecord": "dns-alias-2.database.windows.net" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerExtendedAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerExtendedAuditingSettingsList.json new file mode 100644 index 000000000000..2675e76658cc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerExtendedAuditingSettingsList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGet.json new file mode 100644 index 000000000000..4c654e393fc2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGet.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..2e0a24426613 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "externalGovernanceStatus": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyCreateOrUpdate.json new file mode 100644 index 000000000000..d001e65a9466 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyCreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyDelete.json new file mode 100644 index 000000000000..cfd1767cf351 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/serverKeyOperationResults/00000000-1111-2222-3333-444444444444?api-version=2020-11-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyGet.json new file mode 100644 index 000000000000..2c8224153271 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyList.json new file mode 100644 index 000000000000..cdf69dd2b62e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerKeyList.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901", + "name": "someVault_someKey_01234567890123456789012345678901", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/myVault_myKey_11111111111111111111111111111111", + "name": "myVault_myKey_11111111111111111111111111111111", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "azurekeyvault", + "properties": { + "thumbprint": "AAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBB", + "creationDate": "2020-11-15T00:00:00Z", + "autoRotationEnabled": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/ServiceManaged", + "name": "ServiceManaged", + "type": "Microsoft.Sql/servers/keys", + "location": "Japan East", + "kind": "servicemanaged", + "properties": {} + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerList.json new file mode 100644 index 000000000000..edb3b8bc2665 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerList.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "externalGovernanceStatus": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661", + "name": "sqlcrudtest-6661", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-6661.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "externalGovernanceStatus": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListByResourceGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListByResourceGroup.json new file mode 100644 index 000000000000..dd87d2aa4752 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListByResourceGroup.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "externalGovernanceStatus": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661", + "name": "sqlcrudtest-6661", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-6661.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "externalGovernanceStatus": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..c694a0e24ef9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "externalGovernanceStatus": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661", + "name": "sqlcrudtest-6661", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-6661.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "externalGovernanceStatus": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListWithExpandEqualsAdministrators.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListWithExpandEqualsAdministrators.json new file mode 100644 index 000000000000..7e16b88e9827 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListWithExpandEqualsAdministrators.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "externalGovernanceStatus": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661", + "name": "sqlcrudtest-6661", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-6661.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "workspaceFeature": "Connected", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "externalGovernanceStatus": "Enabled", + "administrators": { + "principalType": "User", + "login": "bob@contoso.com", + "sid": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "azureADOnlyAuthentication": true + }, + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerRecommendedActionListExpand.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerRecommendedActionListExpand.json new file mode 100644 index 000000000000..674e8d8282c5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerRecommendedActionListExpand.json @@ -0,0 +1,626 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "workloadinsight-demos", + "serverName": "misosisvr", + "api-version": "2023-05-01-preview", + "$expand": "recommendedActions" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex", + "name": "CreateIndex", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Server", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:04Z", + "lastRefresh": "2017-03-01T14:38:04Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-06-20T15:15:40Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 1440.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 209.3125 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money],[Power]", + "includedColumns": "[Hour], [System], [LastChanged]", + "databaseName": "IndexAdvisor_test_3" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex/recommendedActions/IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "name": "IR_[dbo]_[Employees]_560E15A98D14CA09BDFB", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE] ON [dbo].[Employees] ([City], [State]) INCLUDE ([Postal]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 17.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 128.0 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[Employees]", + "indexColumns": "[City], [State]", + "includedColumns": "[Postal]", + "databaseName": "IndexAdvisor_test_3" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex/recommendedActions/IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "name": "IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "User", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC] ON [dbo].[DataPoints]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 5040.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 120.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.9 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": -12.7, + "changeValueRelative": -0.3175 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 12.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 1.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 130.742187 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[DataPoints]", + "indexColumns": "[Name],[Money]", + "includedColumns": "[Power],[Pineapple]", + "indexActionStartTime": "2017-03-01T14:38:05.337", + "indexActionDuration": "00:01:00", + "databaseName": "IndexAdvisor_test_3" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex", + "name": "DropIndex", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A", + "name": "IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [MyIndex123] ON [CRM].[DataPoints1]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 803.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 144.6875 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "MyIndex123", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints1]", + "indexColumns": "[Cookies],[SessionId]", + "includedColumns": "[Apple]", + "databaseName": "IndexAdvisor_test_3" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints2]_E4B21F229379807E531A", + "name": "IR_[CRM]_[DataPoints2]_E4B21F229379807E531A", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "User", + "lastModified": "2017-03-01T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "User", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [MyIndex321] ON [CRM].[DataPoints2] ([Cookies],[SessionId],[Protocol]) INCLUDE ([Apple]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 705.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": -342.0 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "MyIndex321", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints2]", + "indexColumns": "[Cookies],[SessionId],[Protocol]", + "includedColumns": "[Apple]", + "indexActionStartTime": "2017-03-01T14:38:05.697", + "indexActionDuration": "00:01:00", + "databaseName": "IndexAdvisor_test_3" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B", + "name": "IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Duplicate", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Success", + "actionInitiatedBy": "System", + "lastModified": "2017-02-28T14:38:05Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionStartTime": "2017-03-01T14:38:05Z", + "executeActionDuration": "PT1M", + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-01T14:38:05Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "CREATE NONCLUSTERED INDEX [IX_FF] ON [dbo].[FactFinance] ([FinanceKey],[DateKey]) INCLUDE ([OrganizationKey]) WITH (ONLINE = ON)" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 705.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [ + { + "dimensionName": "AffectedQueriesCpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "CpuUtilization", + "unit": "CpuCores", + "changeValueAbsolute": 0.0, + "changeValueRelative": 0.0 + }, + { + "dimensionName": "QueriesWithImprovedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "QueriesWithRegressedPerformance", + "unit": "Count", + "absoluteValue": 0.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": -342.0 + }, + { + "dimensionName": "VerificationProgress", + "unit": "Percent", + "absoluteValue": 0.0 + } + ], + "timeSeries": [], + "details": { + "indexName": "IX_FF", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[dbo]", + "table": "[FactFinance]", + "indexColumns": "[FinanceKey],[DateKey]", + "includedColumns": "[OrganizationKey]", + "indexActionStartTime": "2017-03-01T14:38:05.837", + "indexActionDuration": "00:01:00", + "databaseName": "IndexAdvisor_test_3" + } + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B", + "name": "IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "Unused", + "validSince": "2017-03-01T14:38:05Z", + "lastRefresh": "2017-03-01T14:38:05Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-03-23T14:14:35Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-03-23T14:14:35Z", + "score": 1, + "implementationDetails": { + "method": "TSql", + "script": "DROP INDEX [IX_FF] ON [CRM].[DataPoints1]" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "ActionDuration", + "unit": "Seconds", + "absoluteValue": 645.0 + }, + { + "dimensionName": "SpaceChange", + "unit": "Megabytes", + "absoluteValue": 342.0 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "indexName": "IX_FF", + "originalIndexName": "IX_COM_SKU_SKUDepartmentID", + "indexType": "NONCLUSTERED", + "schema": "[CRM]", + "table": "[DataPoints1]", + "indexColumns": "[Protocol],[SessionId]", + "includedColumns": "[Apple]", + "databaseName": "IndexAdvisor_test_3" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DbParameterization", + "name": "DbParameterization", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "GA", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DbParameterization/recommendedActions/ForceDbParameterization", + "name": "ForceDbParameterization", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "", + "validSince": "2017-03-01T14:37:44Z", + "lastRefresh": "2017-03-01T14:37:44Z", + "state": { + "currentValue": "Pending", + "actionInitiatedBy": "System", + "lastModified": "2017-05-11T15:08:31Z" + }, + "isExecutableAction": true, + "isRevertableAction": true, + "isArchivedAction": false, + "executeActionInitiatedBy": "System", + "executeActionInitiatedTime": "2017-05-11T15:08:31Z", + "score": 3, + "implementationDetails": { + "method": "TSql", + "script": "ALTER DATABASE [IndexAdvisor_test_3] SET PARAMETERIZATION FORCED" + }, + "errorDetails": {}, + "estimatedImpact": [ + { + "dimensionName": "CpuSavings", + "unit": "Percent", + "changeValueAbsolute": 22.5613696939135 + }, + { + "dimensionName": "QueryDurationDecrease", + "unit": "secs", + "changeValueAbsolute": 0.701823681806341 + } + ], + "observedImpact": [], + "timeSeries": [], + "details": { + "databaseName": "IndexAdvisor_test_3" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/SchemaIssue", + "name": "SchemaIssue", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PublicPreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendedActions": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/SchemaIssue/recommendedActions/SchemaProblem_1A258C5714A7410C9D23", + "name": "SchemaProblem_1A258C5714A7410C9D23", + "type": "Microsoft.Sql/servers/advisors/recommendedActions", + "location": "East Asia", + "kind": "", + "properties": { + "recommendationReason": "SchemaProblem", + "validSince": "2017-03-01T14:37:48Z", + "lastRefresh": "2017-06-07T22:19:53Z", + "state": { + "currentValue": "Active", + "lastModified": "2017-03-01T14:37:48Z" + }, + "isExecutableAction": false, + "isRevertableAction": false, + "isArchivedAction": false, + "score": 3, + "implementationDetails": {}, + "errorDetails": {}, + "estimatedImpact": [], + "observedImpact": [], + "timeSeries": [], + "details": { + "sqlErrorNumber": 208, + "sqlErrorMessage": "Invalid object name 'dbo.Companies'.", + "sqlErrorCount": 342482, + "databaseName": "IndexAdvisor_test_3" + } + } + } + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/ForceLastGoodPlan", + "name": "ForceLastGoodPlan", + "type": "Microsoft.Sql/servers/advisors", + "location": "East Asia", + "kind": "", + "properties": { + "advisorStatus": "PrivatePreview", + "autoExecuteStatus": "Disabled", + "autoExecuteStatusInheritedFrom": "Default", + "recommendedActions": [] + } + } + ] + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsCreateMax.json new file mode 100644 index 000000000000..9118a709d981 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsCreateMax.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "testSecurityAlert@microsoft.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 5, + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default", + "name": "Default", + "type": "Microsoft.Sql/servers/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": true, + "emailAddresses": [ + "testSecurityAlert@microsoft.com" + ], + "disabledAlerts": [ + "Access_Anomaly", + "Usage_Anomaly" + ], + "retentionDays": 5, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsCreateMin.json new file mode 100644 index 000000000000..adc08d65a50f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsCreateMin.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default", + "name": "Default", + "type": "Microsoft.Sql/servers/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "emailAccountAdmins": false, + "emailAddresses": [ + "" + ], + "disabledAlerts": [ + "" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsGet.json new file mode 100644 index 000000000000..44dc90516103 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsGet.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "securityAlertPolicyName": "Default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default", + "name": "Default", + "type": "Microsoft.Sql/servers/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2020-04-03T04:41:33.937Z", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com;user@consoto.com" + ], + "disabledAlerts": [ + "Access_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsListByServer.json new file mode 100644 index 000000000000..707e258b72b0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerSecurityAlertsListByServer.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securityalert-4799", + "serverName": "securityalert-6440", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies", + "name": "Default", + "type": "Microsoft.Sql/servers/securityAlertPolicies", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-04-03T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-04-03T04:41:33.937Z" + }, + "properties": { + "state": "Enabled", + "creationTime": "2020-04-03T04:41:33.937Z", + "emailAccountAdmins": true, + "emailAddresses": [ + "test@consoto.com;user@consoto.com" + ], + "disabledAlerts": [ + "Access_Anomaly" + ], + "retentionDays": 0, + "storageAccountAccessKey": "", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesCreate.json new file mode 100644 index 000000000000..30e20fc5296b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesCreate.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "0574222d-5c7f-489c-a172-b3013eafab53", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "certificateName": "customerCertificateName", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "publicBlob": "308203AE30820296A0030201020210" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "publicBlob": "308203AE30820296A0030201020210", + "thumbprint": "33702D20EC86119985283", + "certificateName": "customerCertificateName" + }, + "id": "/subscriptions/0574222d-5c7f-489c-a172-b3013eafab53/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/serverTrustCertificates/customerCertificateName", + "name": "customerCertificateName", + "type": "Microsoft.Sql/managedInstances/serverTrustCertificates" + } + }, + "201": { + "body": { + "properties": { + "publicBlob": "308203AE30820296A0030201020210", + "thumbprint": "33702D20EC86119985283", + "certificateName": "customerCertificateName" + }, + "id": "/subscriptions/0574222d-5c7f-489c-a172-b3013eafab53/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/serverTrustCertificates/customerCertificateName", + "name": "customerCertificateName", + "type": "Microsoft.Sql/managedInstances/serverTrustCertificates" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesDelete.json new file mode 100644 index 000000000000..adf4e1d400c6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "38e0dc56-907f-45ba-a97c-74233baad471", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "certificateName": "customerCertificateName", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/providers/Microsoft.Sql/locations/westus/serverTrustCertificatesOperationResults/1f1b0b0f-1b0f-1b0f-1b0f-1b0f1b0f1b0f?api-version=2021-05-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesGet.json new file mode 100644 index 000000000000..15e15a537d7a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "38e0dc56-907f-45ba-a97c-74233baad471", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "certificateName": "customerCertificateName", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "publicBlob": "308203B23082021AA003020102021034C597BA", + "thumbprint": "57CFA9CF16F2FB2775AF059A95C6D5B897DA2C05", + "certificateName": "customerCertificateName" + }, + "id": "/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/serverTrustCertificates/customerCertificateName", + "name": "customerCertificateName", + "type": "Microsoft.Sql/managedInstances/serverTrustCertificates" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesListByInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesListByInstance.json new file mode 100644 index 000000000000..abe6c8bdb1e2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustCertificatesListByInstance.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "38e0dc56-907f-45ba-a97c-74233baad471", + "resourceGroupName": "testrg", + "managedInstanceName": "testcl", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "publicBlob": "0x308203B23082021AA0030201020210722ACCD26F4C1F854D9E254E5DE05B4B300D06092A864886F70D01010B05003015311330110603550403130A48796272696443657274301E170D3231303431393133313031365A170D3330313231323030303030305A3015311330110603550403130A48796272696443657274308201A2300D06092A864886F70D01010105000382018F003082018A0282018100A4115F8D7B854A4086FE474DC659ACB77423788AF70769AAB609EB6222B1AB96E04D9E563882994F8C838B5BC3D0EA84F7748420B91D95AB557BFB7E454FA2AAB7BCE9A38C8CB58CB90F55C256600239C8037CC4F52F584EF78B6BB5EF5474B6FB4BFC7BF369030D0F3ECCBD2606F935D03D822B4913D8811AFBB1E2DE84F90DC806CD385183EA2E954C0B7C8687464BA036F3A1A7BD3BD51129A76EB49EBD177B8A3FF800E4C717BD73735294EB210E09E7CE3FFEE6364F026C720D092A8CABF7610E8BE7FBE515E866C284247DC10FBBE93C11D06704F0D4FC79AE929AA29A78A32B71C089FF1245BDEBD76E1442AD5B673F80CA801E03D35B7F1BF840A2975992E38864EFA8657D8DFE83E483D2409EA052AAA78C1A5FFE4DC79DA5590E0A4C061BB8C1952EC3F0BD43ADCBBE65DA6060103502CF8FC31E2D3315A923D6FB294E13892636C9EB1D7BA81827DE2814AC469296491B713111004E79303FC3EA3679968276DCD3301928AD5663ECEA8CADF911EDB105FF55B920199D351BC6C50203010001300D06092A864886F70D01010B0500038201810069986610B912D3D459F23A22CD6734F1E75EE6B94030666B3F6F32FC9D7258A9E5D46B12997B6878B26B251408F5198D25F0A44AA68F69D979621BF82C665C3685F665C89976B4CAB26960E2C990E2207B19FF67E3B09977724F713B59A5CE58656C36138E7F14311F7B7390C4A551D8B282122766AC51C7E8AD06C7460D0BF9432EC076162A6A0A90260399B715973E12300513C85374F3E07C31D235E2CD7B2BC0F6AED29D670C3600FC1E36DB843F8B36BCAC0FD78B924B3F76EB01B5C5708BCBFF32FB5EC62AB93DC7A674F3EF94D2B5F8F25BFE8AF63EC8260B8029BA6915836E305BEC623426C863D358118C51AE34932BAC2E3F5A179744F931B2DB911B6EFF04180576311B35DD44D3600163CD29678A30F043254CC1596D56C729A2CF83A60AD1FF22CC4879E855AE4F08E26B9EA6CD303D75866348516E848A2A6B7BDDA3468824B25C5D9E07BC3D3EFD6B89DED8D45DD8E7EDBB36A695C7052459073834A1D8788DBA599B32BDF5540331676D6AF94D067A5D5ACB411778E4C43D", + "thumbprint": "33702D20EC861199852837AE6BD1A71544B681E2", + "certificateName": "customerCertificate1" + }, + "id": "/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/serverTrustCertificates/customerCertificate1", + "name": "customerCertificate1", + "type": "Microsoft.Sql/managedInstances/serverTrustCertificates" + }, + { + "properties": { + "publicBlob": "0x308203B23082021AA003020102021034C597BA79AD71844EE734A3546871BC300D06092A864886F70D01010B05003015311330110603550403130A48796272696443657274301E170D3231303630313130333430335A170D3330313231323030303030305A3015311330110603550403130A48796272696443657274308201A2300D06092A864886F70D01010105000382018F003082018A0282018100A75300A5CDC265F24C78DCB58389079D16878BBA3CF75D33987AE775BDB43810B2A925CD936F3068CD0EC59B7FE62D099D9ADCA8BC1C3A5076EAA46DBF3519830FB068876680558A5B827E2E661F24DB7912DB5DD971C60E2DFBC085F460027A803B37AD031CE851D06C53514F12E7F05FFA3833928F577D115A1DBDFECB7B6F7B03674458CBDB4DDC536FE19E2D52B167D63210EBEBF249396451D80CFCA23C188369E2D383A7EEBD3D5AC6EEA13571E471726068DB3912FE0124B578E1806E183985EA0A03BBCC6AE502ED01D85DA3D9C39638D95F398F034954CEA44BB0C7616FC176FAF5EAD87E7AD64A47A39EAB0010BB157C8FF8D4175ABE5DB5130D4E761D96613D0797B756D5D945B797062D23ABD2436E9C1CC1163AB8163B068B783DBF171823D1229BBCC1F287403874FDE00A266B7D105370B8247B4C0A48CCB4756E5DA543BEAE01A30FC5198763A529CCEE385987E7056493E37C15A356C4D87EF44AF2A7DA4181369DF36765180D2D7603AD163C6C9D4543A696ED4D1FB1C90203010001300D06092A864886F70D01010B0500038201810044EAF256ACEB3B455FC1E01168DCB8E1682D4643D1DA97F297D6A74C9EE68407EEBD333821836941A6728A2582BF6D4C68DEF5811A1A405991A6436B69AF62898E7EF7273E0570CB15768EA6B5339C92BF6875E68137CD93B8D37D298220E7CADEEAAE64CCD9B8AC1FFCBEDF5D7ECE5106B9173A06FBA2842607CDF38E143E78755897F05EF316D5C40D4D207410ECFB0DE24C6637AB5BF9FA94F0DDE065E465AA09B4F6B143371880A0BAC410CFB3AD220EC9FC4788AF3599175C62B85A44B80679F66EF6872CA024DA111720818FDAF387B60AB5ED3A41ADD2254770AF36F1974DAEB8A166E69225A4B795E8BECA977F0FCF3612E1C18B18DE6EE5D1213DD4A0D4F8C1BFD6A7EC53A1B838886483918E2537B33A7721222B4A0250D51E728AE7C861698E7D95A0CE4A1C32F04198476C4AE347C90F46514A62D82C38DA4ABD9B5D7A9ACCD98D74443865052AA7E5675D0BF994E95002D6990AA0A8D4797B8252A0387B5B3011790D28E3EA2E0034A034194AA72C649FB24F9800B1F9FCA83B", + "thumbprint": "57CFA9CF16F2FB2775AF059A95C6D5B897DA2C05", + "certificateName": "customerCertificate2" + }, + "id": "/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/serverTrustCertificates/customerCertificate2", + "name": "customerCertificate2", + "type": "Microsoft.Sql/managedInstances/serverTrustCertificates" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupCreate.json new file mode 100644 index 000000000000..f8683697054a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupCreate.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "serverTrustGroupName": "server-trust-group-test", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupDelete.json new file mode 100644 index 000000000000..01fa4b9c538f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "serverTrustGroupName": "server-trust-group-test", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/serverTrustGroupOperationResults/00000000-1111-2222-3333-444444444444?api-version=2020-11-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupGet.json new file mode 100644 index 000000000000..bd87f84e5658 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "serverTrustGroupName": "server-trust-group-test", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupList.json new file mode 100644 index 000000000000..5216399ac4e5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupList.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "locationName": "Japan East", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test-2", + "name": "server-trust-group-test-2", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-3" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupListByManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupListByManagedInstance.json new file mode 100644 index 000000000000..810f1e9d2554 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerTrustGroupListByManagedInstance.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "managedInstanceName": "managedInstance-1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test", + "name": "server-trust-group-test", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test-2", + "name": "server-trust-group-test-2", + "properties": { + "groupMembers": [ + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1" + }, + { + "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-3" + } + ], + "trustScopes": [ + "GlobalTransactions", + "ServiceBroker" + ] + }, + "type": "Microsoft.Sql/locations/serverTrustGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerUpdate.json new file mode 100644 index 000000000000..bd6f35ae5fcb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerUpdate.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "serverName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "administratorLogin": "dummylogin", + "administratorLoginPassword": "placeholder", + "publicNetworkAccess": "Disabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "tags": { + "tagKey1": "TagValue1" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645", + "name": "sqlcrudtest-4645", + "type": "Microsoft.Sql/servers", + "location": "japaneast", + "kind": "v12.0", + "properties": { + "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net", + "administratorLogin": "dummylogin", + "version": "12.0", + "state": "Ready", + "publicNetworkAccess": "Disabled", + "restrictOutboundNetworkAccess": "Enabled", + "isIPv6Enabled": "Enabled", + "privateEndpointConnections": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444", + "properties": { + "provisioningState": "Ready", + "privateEndpoint": { + "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-approved", + "actionsRequired": "None" + } + } + } + ] + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-02-01" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerUsageList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerUsageList.json new file mode 100644 index 000000000000..13e8f40128da --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerUsageList.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-6730", + "serverName": "sqlcrudtest-9007", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "displayName": "Database Throughput Unit Quota", + "currentValue": 0, + "limit": 45000, + "unit": "DTUs" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/sqlcrudtest-9007/usages/server_dtu_quota", + "name": "server_dtu_quota", + "type": "Microsoft.Sql/servers/usages" + }, + { + "properties": { + "displayName": "Database Throughput Unit Quota", + "currentValue": 0, + "limit": 45000, + "unit": "DTUs" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/sqlcrudtest-9007/usages/server_dtu_quota_current", + "name": "server_dtu_quota_current", + "type": "Microsoft.Sql/servers/usages" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json new file mode 100644 index 000000000000..ae9bd0d3fcb5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json new file mode 100644 index 000000000000..1fffa44afd30 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json new file mode 100644 index 000000000000..d271030d6586 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..9c9eb3a913e4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentDelete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..96560f916839 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json new file mode 100644 index 000000000000..9e92ac6bf73b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/", + "name": "default", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments", + "properties": { + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ + "email1@mail.com", + "email2@mail.com" + ] + } + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlAgentConfigurationGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlAgentConfigurationGet.json new file mode 100644 index 000000000000..1e07bb76a35c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlAgentConfigurationGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/sqlAgent/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/sqlAgent", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlAgentConfigurationPut.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlAgentConfigurationPut.json new file mode 100644 index 000000000000..71e63b2996d1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlAgentConfigurationPut.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/sqlAgent/current", + "name": "current", + "type": "Microsoft.Sql/managedInstances/sqlAgent", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlTdeCertificateCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlTdeCertificateCreate.json new file mode 100644 index 000000000000..9d73789e6048 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlTdeCertificateCreate.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000001", + "resourceGroupName": "testtdecert", + "serverName": "testtdecert", + "tdeCertName": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "privateBlob": "MIIXXXXXXXX" + } + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000001/providers/Microsoft.Sql/locations/westus/tdeCertOperationResults/00000000-0000-0000-0000-000000000001?api-version=2017-10-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json new file mode 100644 index 000000000000..af4c3c79eb68 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "latestScan": false, + "results": { + "VA2063": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ], + "VA2065": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "results": { + "VA2063": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ], + "VA2065": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/Default/baselines/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json new file mode 100644 index 000000000000..29c86d74b7bb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "latestScan": true, + "results": {} + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "results": { + "VA1223": [], + "VA2060": [ + [ + "False" + ] + ], + "VA2061": [ + [ + "True" + ] + ], + "VA2062": [], + "VA2063": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ], + "VA2064": [], + "VA2065": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ], + "VA2107": [], + "VA2130": [ + [ + "Value1", + "Value2" + ] + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/Default/baselines/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json new file mode 100644 index 000000000000..63c3a3023a47 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "results": { + "VA1223": [], + "VA2060": [ + [ + "False" + ] + ], + "VA2061": [ + [ + "True" + ] + ], + "VA2062": [], + "VA2063": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ], + "VA2064": [], + "VA2065": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ], + "VA2107": [], + "VA2130": [ + [ + "Value1", + "Value2" + ] + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/Default/baselines/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json new file mode 100644 index 000000000000..4ac3772dc08e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "results": { + "VA1223": [], + "VA2060": [ + [ + "False" + ] + ], + "VA2061": [ + [ + "True" + ] + ], + "VA2062": [], + "VA2063": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ], + "VA2064": [], + "VA2065": [ + [ + "AllowAll", + "0.0.0.0", + "255.255.255.255" + ] + ], + "VA2107": [], + "VA2130": [ + [ + "Value1", + "Value2" + ] + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/Default/baselines/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentCreate.json new file mode 100644 index 000000000000..675f33a3a2ad --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentCreate.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..16be9b138001 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..4e3aeef0e3e7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json new file mode 100644 index 000000000000..5563030cd921 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/", + "name": "default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json new file mode 100644 index 000000000000..ac1678916f1e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json @@ -0,0 +1,133 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "testsvr", + "vulnerabilityAssessmentName": "default", + "scanId": "scanId1", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "ruleId": "VA1234", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/testsvr/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults" + }, + { + "properties": { + "ruleId": "VA2341", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/testsvr/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA2341", + "name": "VA2341", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json new file mode 100644 index 000000000000..a3d211187a46 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "ruleId": "VA1001", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "latestScan": false, + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/rules/VA1001", + "name": "Scan123", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments/rules/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json new file mode 100644 index 000000000000..d97557227cfe --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "ruleId": "VA1001", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json new file mode 100644 index 000000000000..7a9cb0e3fe23 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "ruleId": "VA1001", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json new file mode 100644 index 000000000000..42d75c4bcf9e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "baselineName": "default", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1002", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScan.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScan.json new file mode 100644 index 000000000000..e1e16fc5ba2f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScan.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-22T23:49:00.6455136-07:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false, + "lastScanTime": "2020-06-22T23:49:00.6455136-07:00" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json new file mode 100644 index 000000000000..6187edbbf1c7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-22T23:49:00.6455136-07:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false, + "lastScanTime": "2020-06-22T23:49:00.6455136-07:00" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan002", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-22T23:49:00.6455136-07:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false, + "lastScanTime": "2020-06-22T23:49:00.6455136-07:00" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan003", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-22T23:49:00.6455136-07:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 0, + "mediumSeverityFailedRulesCount": 0, + "lowSeverityFailedRulesCount": 0, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": true, + "lastScanTime": "2020-06-22T23:49:00.6455136-07:00" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json new file mode 100644 index 000000000000..bcc071a737bf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/SqlVulnerabilityAssessmentScansExecute/00000000-1111-2222-3333-444444444444?api-version=2022-02-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json new file mode 100644 index 000000000000..8459e8772d7b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "scanId": "scanId1", + "scanResultId": "VA1234", + "systemDatabaseName": "master", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "ruleId": "VA1234", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartManagedInstance.json new file mode 100644 index 000000000000..7312b980dc14 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartManagedInstance.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "startrg", + "managedInstanceName": "mitostart", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "mitostart.1234567891234.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/startrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Ready", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1234567891234", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/startrg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "servicePrincipal": { + "principalId": "00000011-1111-2222-2222-123456789111", + "clientId": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "type": "SystemAssigned" + }, + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "databaseFormat": "SQLServer2022" + }, + "location": "japaneast", + "tags": { + "key": "value" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/startrg/providers/Microsoft.Sql/managedInstances/mitostart", + "name": "mitostart", + "type": "Microsoft.Sql/managedInstances" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/startrg/providers/Microsoft.Sql/locations/westeurope/startManagedInstanceOperationResults/11111111-1111-1111-1111-111111111111", + "Azure-AsyncOperation": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/startrg/providers/Microsoft.Sql/locations/westeurope/startManagedInstanceAzureAsyncOperation/11111111-1111-1111-1111-111111111111" + }, + "operation": "StartManagedServer", + "startTime": "2021-08-11T13:01:06.013Z" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMax.json new file mode 100644 index 000000000000..336870b4d123 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMax.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "schedulerg", + "managedInstanceName": "schedulemi", + "startStopScheduleName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "timeZoneId": "Central European Standard Time", + "description": "This is a schedule for our Dev/Test environment.", + "scheduleList": [ + { + "startDay": "Thursday", + "startTime": "18:00", + "stopDay": "Thursday", + "stopTime": "17:00" + }, + { + "startDay": "Thursday", + "startTime": "15:00", + "stopDay": "Thursday", + "stopTime": "14:00" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default", + "name": "default", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2021-08-26T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-27T04:41:33.937Z" + }, + "properties": { + "description": "This is a schedule for our Dev/Test environment.", + "nextExecutionTime": "2021-08-26T14:00:00", + "nextRunAction": "Stop", + "scheduleList": [ + { + "startDay": "Thursday", + "startTime": "06:00 PM", + "stopDay": "Thursday", + "stopTime": "05:00 PM" + }, + { + "startDay": "Thursday", + "startTime": "03:00 PM", + "stopDay": "Thursday", + "stopTime": "02:00 PM" + } + ], + "timeZoneId": "Central European Standard Time" + }, + "type": "Microsoft.Sql/managedInstances/startStopSchedules" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default", + "name": "default", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2021-08-26T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-26T04:41:33.937Z" + }, + "properties": { + "description": "This is a schedule for our Dev/Test environment.", + "nextExecutionTime": "2021-08-26T14:00:00", + "nextRunAction": "Stop", + "scheduleList": [ + { + "startDay": "Thursday", + "startTime": "06:00 PM", + "stopDay": "Thursday", + "stopTime": "05:00 PM" + }, + { + "startDay": "Thursday", + "startTime": "03:00 PM", + "stopDay": "Thursday", + "stopTime": "02:00 PM" + } + ], + "timeZoneId": "Central European Standard Time" + }, + "type": "Microsoft.Sql/managedInstances/startStopSchedules" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMin.json new file mode 100644 index 000000000000..9188e9adf23f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMin.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "schedulerg", + "managedInstanceName": "schedulemi", + "startStopScheduleName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "scheduleList": [ + { + "startDay": "Thursday", + "startTime": "18:00", + "stopDay": "Thursday", + "stopTime": "17:00" + }, + { + "startDay": "Thursday", + "startTime": "15:00", + "stopDay": "Thursday", + "stopTime": "14:00" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default", + "name": "default", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2021-08-26T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-27T04:41:33.937Z" + }, + "properties": { + "description": "", + "nextExecutionTime": "2021-08-26T14:00:00", + "nextRunAction": "Stop", + "scheduleList": [ + { + "startDay": "Thursday", + "startTime": "06:00 PM", + "stopDay": "Thursday", + "stopTime": "05:00 PM" + }, + { + "startDay": "Thursday", + "startTime": "03:00 PM", + "stopDay": "Thursday", + "stopTime": "02:00 PM" + } + ], + "timeZoneId": "UTC" + }, + "type": "Microsoft.Sql/managedInstances/startStopSchedules" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default", + "name": "default", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2021-08-26T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-26T04:41:33.937Z" + }, + "properties": { + "description": "", + "nextExecutionTime": "2021-08-26T14:00:00", + "nextRunAction": "Stop", + "scheduleList": [ + { + "startDay": "Thursday", + "startTime": "06:00 PM", + "stopDay": "Thursday", + "stopTime": "05:00 PM" + }, + { + "startDay": "Thursday", + "startTime": "03:00 PM", + "stopDay": "Thursday", + "stopTime": "02:00 PM" + } + ], + "timeZoneId": "UTC" + }, + "type": "Microsoft.Sql/managedInstances/startStopSchedules" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleDelete.json new file mode 100644 index 000000000000..23b39490fbf9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "schedulerg", + "managedInstanceName": "schedulemi", + "startStopScheduleName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleGet.json new file mode 100644 index 000000000000..8d38a23c9b06 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleGet.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "schedulerg", + "managedInstanceName": "schedulemi", + "startStopScheduleName": "default", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default", + "name": "default", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2021-08-26T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-27T04:41:33.937Z" + }, + "properties": { + "description": "This is a schedule for our Dev/Test environment.", + "nextExecutionTime": "2021-08-26T14:00:00", + "nextRunAction": "Stop", + "scheduleList": [ + { + "startDay": "Thursday", + "startTime": "06:00 PM", + "stopDay": "Thursday", + "stopTime": "05:00 PM" + }, + { + "startDay": "Thursday", + "startTime": "03:00 PM", + "stopDay": "Thursday", + "stopTime": "02:00 PM" + } + ], + "timeZoneId": "Central European Standard Time" + }, + "type": "Microsoft.Sql/managedInstances/startStopSchedules" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleList.json new file mode 100644 index 000000000000..4d16fa52f11a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StartStopManagedInstanceScheduleList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "schedulerg", + "managedInstanceName": "schedulemi", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules", + "name": "default", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2021-08-26T04:41:33.937Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-27T04:41:33.937Z" + }, + "properties": { + "description": "This is a schedule for our Dev/Test environment.", + "nextExecutionTime": "2021-08-26T14:00:00", + "nextRunAction": "Stop", + "scheduleList": [ + { + "startDay": "Thursday", + "startTime": "06:00 PM", + "stopDay": "Thursday", + "stopTime": "05:00 PM" + }, + { + "startDay": "Thursday", + "startTime": "03:00 PM", + "stopDay": "Thursday", + "stopTime": "02:00 PM" + } + ], + "timeZoneId": "Central European Standard Time" + }, + "type": "Microsoft.Sql/managedInstances/startStopSchedules" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StopManagedInstance.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StopManagedInstance.json new file mode 100644 index 000000000000..db5286fd1cf6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/StopManagedInstance.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "stoprg", + "managedInstanceName": "mitostop", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "capacity": 8, + "family": "Gen5" + }, + "properties": { + "fullyQualifiedDomainName": "mitostop.1234567891234.database.windows.net", + "administratorLogin": "dummylogin", + "subnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", + "state": "Stopped", + "provisioningState": "Succeeded", + "vCores": 8, + "storageSizeInGB": 1024, + "licenseType": "LicenseIncluded", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "publicDataEndpointEnabled": false, + "proxyOverride": "Default", + "minimalTlsVersion": "1.2", + "dnsZone": "1234567891234", + "instancePoolId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Sql/instancePools/instancePool1", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1", + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "servicePrincipal": { + "principalId": "00000011-1111-2222-2222-123456789111", + "clientId": "00000011-1111-2222-2222-123456789111", + "tenantId": "00000011-1111-2222-2222-123456789111", + "type": "SystemAssigned" + }, + "externalGovernanceStatus": "Enabled", + "hybridSecondaryUsage": "Passive", + "authenticationMetadata": "Windows", + "databaseFormat": "SQLServer2022" + }, + "location": "japaneast", + "tags": { + "key": "value" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Sql/managedInstances/mitostop", + "name": "mitostop", + "type": "Microsoft.Sql/managedInstances" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Sql/locations/westeurope/stopManagedInstanceOperationResults/11111111-1111-1111-1111-111111111111", + "Azure-AsyncOperation": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/stoprg/providers/Microsoft.Sql/locations/westeurope/stopManagedInstanceAzureAsyncOperation/11111111-1111-1111-1111-111111111111" + }, + "operation": "StopManagedServer", + "startTime": "2021-08-11T12:59:50.45Z" + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SubscriptionUsageGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SubscriptionUsageGet.json new file mode 100644 index 000000000000..5318de7d09af --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SubscriptionUsageGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "WestUS", + "usageName": "ServerQuota", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "displayName": "Regional Server Quota for West US", + "currentValue": 1.0, + "limit": 20.0, + "unit": "Count" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/ServerQuota", + "name": "ServerQuota", + "type": "Microsoft.Sql/locations/usages" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SubscriptionUsageListByLocation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SubscriptionUsageListByLocation.json new file mode 100644 index 000000000000..d262fa7dd12a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SubscriptionUsageListByLocation.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "WestUS", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "displayName": "Regional Server Quota for West US", + "currentValue": 1.0, + "limit": 20.0, + "unit": "Count" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/ServerQuota", + "name": "ServerQuota", + "type": "Microsoft.Sql/locations/usages" + }, + { + "properties": { + "displayName": "Free Database Count per Subscription for West US", + "currentValue": 0.0, + "limit": 1.0, + "unit": "Count" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/SubscriptionFreeDatabaseCount", + "name": "SubscriptionFreeDatabaseCount", + "type": "Microsoft.Sql/locations/usages" + }, + { + "properties": { + "displayName": "Free to Basic Database Upgrade count-down in West US", + "currentValue": 365.0, + "limit": 365.0, + "unit": "Count" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/SubscriptionFreeDatabaseDaysLeft", + "name": "SubscriptionFreeDatabaseDaysLeft", + "type": "Microsoft.Sql/locations/usages" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SynapseLinkWorkspaceListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SynapseLinkWorkspaceListByDatabase.json new file mode 100644 index 000000000000..1dcf6a3aabb2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SynapseLinkWorkspaceListByDatabase.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-05-01-preview", + "databaseName": "dbSynapse", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "workspaces": [ + { + "workspaceId": "/subcriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Synapse/workspaces/workspace1", + "linkConnectionName": "buildlink-cloud1" + }, + { + "workspaceId": "/subcriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Synapse/workspaces/workspace2", + "linkConnectionName": "buildlink-cloud2" + } + ] + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbSynapse/linkWorkspaces/current", + "name": "current", + "type": "Microsoft.Sql/servers/databases/linkWorkspaces" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentCreate.json new file mode 100644 index 000000000000..8c0aed0dc39c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentCreate.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + }, + "201": { + "body": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentDelete.json new file mode 100644 index 000000000000..4d59d50cab8f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/operation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentGenerateKey.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentGenerateKey.json new file mode 100644 index 000000000000..600b71234d2e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentGenerateKey.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "syncAgentKey": "865f9998-6dae-4214-bbb1-4796b7c76ca0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentGet.json new file mode 100644 index 000000000000..76807cacdfc3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentGetLinkedDatabases.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentGetLinkedDatabases.json new file mode 100644 index 000000000000..26e0fe06f53c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentGetLinkedDatabases.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseType": "SqlServerDatabase", + "databaseId": "55555555-6666-7777-8888-999999999999", + "description": "", + "serverName": "DummySqlServer", + "databaseName": "DummySqlServerDb", + "userName": "DummyUser" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187/linkedDatabases/55555555-6666-7777-8888-999999999999" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentListByServer.json new file mode 100644 index 000000000000..535d0f5de535 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentListByServer.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentUpdate.json new file mode 100644 index 000000000000..e32fc6c09498 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncAgentUpdate.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncagentcrud-65440", + "serverName": "syncagentcrud-8475", + "syncAgentName": "syncagentcrud-3187", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + }, + "201": { + "body": { + "properties": { + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync", + "state": "NeverConnected", + "isUpToDate": true, + "expiryTime": "9999-12-31T23:59:59.9999999Z", + "version": "4.2.0.0" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187", + "name": "syncagent", + "type": "Microsoft.Sql/servers/syncAgents" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/operation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupCancelSync.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupCancelSync.json new file mode 100644 index 000000000000..8175b5ec826e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupCancelSync.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupCreate.json new file mode 100644 index 000000000000..bdf35b4c5040 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupCreate.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "interval": -1, + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "usePrivateLinkConnection": true + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-8475" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + }, + "201": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-8475" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupDelete.json new file mode 100644 index 000000000000..2f003f256f07 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupDelete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/operation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGet.json new file mode 100644 index 000000000000..7c6b1b3a51ee --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGetHubSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGetHubSchema.json new file mode 100644 index 000000000000..39fbb44f0eaf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGetHubSchema.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "tables": [ + { + "columns": [ + { + "dataSize": "4", + "dataType": "int", + "hasError": false, + "isPrimaryKey": false, + "name": "intField", + "quotedName": "[intField]" + }, + { + "dataSize": "100", + "dataType": "nvarchar", + "hasError": false, + "isPrimaryKey": false, + "name": "charField", + "quotedName": "[charField]" + } + ], + "errorId": "Schema_TableHasNoPrimaryKey", + "hasError": true, + "name": "dbo.myTable", + "quotedName": "[dbo].[myTable]" + } + ], + "lastUpdateTime": "2017-05-30T07:16:08.21Z" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGetLog.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGetLog.json new file mode 100644 index 000000000000..f7bef34aba93 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGetLog.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "startTime": "2017-01-01T00:00:00", + "endTime": "2017-12-31T00:00:00", + "type": "All", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "timestamp": "2017-05-30T07:16:08.25Z", + "type": "Success", + "source": "syncgroupcrud-8475.database.windows.net/hub", + "details": "Schema information obtained successfully.", + "tracingId": "c0480c8e-6269-424e-9404-b00efce0ebae", + "operationStatus": "SchemaRefreshSuccess" + }, + { + "timestamp": "2017-05-30T07:03:37.5733333Z", + "type": "Error", + "source": "syncgroupcrud-8475.database.windows.net/member", + "details": "Getting schema information for the database failed with the exception \"Failed to connect to server .\nInner exception: SqlException Error Code: -2146232060 - SqlError Number:53, Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) \nInner exception: The network path was not found\n For more information, provide tracing ID ‘cd3aa28c-0c31-471f-8a77-f1b21c908cbd’ to customer support.\"", + "tracingId": "cd3aa28c-0c31-471f-8a77-f1b21c908cbd", + "operationStatus": "SchemaRefreshFailure" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGetSyncDatabaseId.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGetSyncDatabaseId.json new file mode 100644 index 000000000000..0964839abeec --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupGetSyncDatabaseId.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "locationName": "westus", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupListByDatabase.json new file mode 100644 index 000000000000..a7128cf72100 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupListByDatabase.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + }, + { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-5374" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-5374", + "name": "syncgroupcrud-5374", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupPatch.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupPatch.json new file mode 100644 index 000000000000..5327e87c746f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupPatch.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "interval": -1, + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "hubDatabasePassword": "hubPassword", + "usePrivateLinkConnection": true + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroup", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/operation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupRefreshHubSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupRefreshHubSchema.json new file mode 100644 index 000000000000..c0dccd5ff50d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupRefreshHubSchema.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/operation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupTriggerSync.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupTriggerSync.json new file mode 100644 index 000000000000..8175b5ec826e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupTriggerSync.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupUpdate.json new file mode 100644 index 000000000000..5e2e3356c8a3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncGroupUpdate.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "interval": -1, + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "usePrivateLinkConnection": true + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + }, + "201": { + "body": { + "properties": { + "interval": -1, + "lastSyncTime": "0001-01-01T08:00:00Z", + "conflictResolutionPolicy": "HubWin", + "syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328", + "hubDatabaseUserName": "hubUser", + "syncState": "NotReady", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187", + "name": "syncgroupcrud-3187", + "type": "Microsoft.Sql/servers/databases/syncGroups" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberCreate.json new file mode 100644 index 000000000000..9ddfba2ade7f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberCreate.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncmembercrud-4879", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "usePrivateLinkConnection": true, + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + }, + "201": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberDelete.json new file mode 100644 index 000000000000..35791a46f068 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberDelete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncgroupcrud-4879", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/operation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberGet.json new file mode 100644 index 000000000000..9429ce96ec25 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberGet.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncmembercrud-4879", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberGetSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberGetSchema.json new file mode 100644 index 000000000000..53e4fd63a302 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberGetSchema.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncgroupcrud-4879", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "tables": [ + { + "columns": [ + { + "dataSize": "4", + "dataType": "int", + "hasError": false, + "isPrimaryKey": false, + "name": "intField", + "quotedName": "[intField]" + }, + { + "dataSize": "100", + "dataType": "nvarchar", + "hasError": false, + "isPrimaryKey": false, + "name": "charField", + "quotedName": "[charField]" + } + ], + "errorId": "Schema_TableHasNoPrimaryKey", + "hasError": true, + "name": "dbo.myTable", + "quotedName": "[dbo].[myTable]" + } + ], + "lastUpdateTime": "2017-05-30T07:16:08.21Z" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberListBySyncGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberListBySyncGroup.json new file mode 100644 index 000000000000..56c1b577b03b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberListBySyncGroup.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberPatch.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberPatch.json new file mode 100644 index 000000000000..10c2b9f3fb64 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberPatch.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncmembercrud-4879", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "usePrivateLinkConnection": true, + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/operation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberRefreshSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberRefreshSchema.json new file mode 100644 index 000000000000..89694d212cb5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberRefreshSchema.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncgroupcrud-4879", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/operation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberUpdate.json new file mode 100644 index 000000000000..9ddfba2ade7f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/SyncMemberUpdate.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "syncgroupcrud-65440", + "serverName": "syncgroupcrud-8475", + "databaseName": "syncgroupcrud-4328", + "syncGroupName": "syncgroupcrud-3187", + "syncMemberName": "syncmembercrud-4879", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "usePrivateLinkConnection": true, + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + }, + "201": { + "body": { + "properties": { + "databaseType": "AzureSqlDatabase", + "serverName": "syncgroupcrud-3379.database.windows.net", + "databaseName": "syncgroupcrud-7421", + "userName": "myUser", + "syncDirection": "Bidirectional", + "syncState": "UnProvisioned", + "usePrivateLinkConnection": true, + "privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879", + "syncMemberAzureDatabaseResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879", + "name": "syncmembercrud-4879", + "type": "Microsoft.Sql/servers/databases/syncGroups/syncMembers" + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/TransparentDataEncryptionGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/TransparentDataEncryptionGet.json new file mode 100644 index 000000000000..281e98211e0e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/TransparentDataEncryptionGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "security-tde-resourcegroup", + "serverName": "securitytde", + "databaseName": "testdb", + "tdeName": "current", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/servers/securitytde/databases/testdb", + "name": "current", + "type": "Microsoft.Sql/servers/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/TransparentDataEncryptionList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/TransparentDataEncryptionList.json new file mode 100644 index 000000000000..29104919337a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/TransparentDataEncryptionList.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "security-tde-resourcegroup", + "serverName": "securitytde", + "databaseName": "testdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/servers/securitytde/databases/testdb", + "name": "current", + "type": "Microsoft.Sql/servers/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/TransparentDataEncryptionUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/TransparentDataEncryptionUpdate.json new file mode 100644 index 000000000000..425eaf7d8eb6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/TransparentDataEncryptionUpdate.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "securitytde-42-rg", + "serverName": "securitytde-42", + "databaseName": "testdb", + "tdeName": "current", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/servers/securitytde-42/databases/testdb/transparentDataEncryption", + "name": "current", + "type": "Microsoft.Sql/servers/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/servers/securitytde-42/databases/testdb/transparentDataEncryption", + "name": "current", + "type": "Microsoft.Sql/servers/databases/transparentDataEncryption", + "properties": { + "state": "Enabled" + } + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/locations/southeastasia/transparentDataEncryptionOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateDatabaseHyperscaleMigrationPerformCutover.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateDatabaseHyperscaleMigrationPerformCutover.json new file mode 100644 index 000000000000..3781453e966a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateDatabaseHyperscaleMigrationPerformCutover.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "identity": { + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umi": {}, + "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umiToDelete": null + }, + "type": "UserAssigned" + }, + "location": "southeastasia", + "properties": { + "performCutover": true + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 34359738368, + "status": "Online", + "databaseId": "dad50ee1-9fbb-4fb9-bd2b-5786d175ce3c", + "creationDate": "2022-12-08T12:41:23.953Z", + "currentServiceObjectiveName": "GP_Gen5_2", + "requestedServiceObjectiveName": "HS_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 193273528320, + "earliestRestoreDate": "2022-12-08T12:42:00Z", + "readScale": "Enabled", + "currentSku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 34359738368, + "status": "Online", + "databaseId": "dad50ee1-9fbb-4fb9-bd2b-5786d175ce3c", + "creationDate": "2022-12-08T12:41:23.953Z", + "currentServiceObjectiveName": "GP_Gen5_2", + "requestedServiceObjectiveName": "HS_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 193273528320, + "earliestRestoreDate": "2022-12-08T12:42:00Z", + "readScale": "Enabled", + "currentSku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateDatabaseHyperscaleMigrationWithManualCutover.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateDatabaseHyperscaleMigrationWithManualCutover.json new file mode 100644 index 000000000000..bafd6ae0041c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateDatabaseHyperscaleMigrationWithManualCutover.json @@ -0,0 +1,117 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2023-05-01-preview", + "parameters": { + "identity": { + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umi": {}, + "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umiToDelete": null + }, + "type": "UserAssigned" + }, + "location": "southeastasia", + "sku": { + "name": "HS_Gen5_2", + "tier": "Hyperscale" + }, + "properties": { + "manualCutover": true + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 34359738368, + "status": "Online", + "databaseId": "dad50ee1-9fbb-4fb9-bd2b-5786d175ce3c", + "creationDate": "2022-12-08T12:41:23.953Z", + "currentServiceObjectiveName": "GP_Gen5_2", + "requestedServiceObjectiveName": "HS_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 193273528320, + "earliestRestoreDate": "2022-12-08T12:42:00Z", + "readScale": "Enabled", + "currentSku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "201": { + "body": { + "sku": { + "name": "HS_Gen5", + "tier": "Hyperscale", + "family": "Gen5", + "capacity": 2 + }, + "kind": "v12.0,user,vcore", + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS", + "maxSizeBytes": 34359738368, + "status": "Online", + "databaseId": "dad50ee1-9fbb-4fb9-bd2b-5786d175ce3c", + "creationDate": "2022-12-08T12:41:23.953Z", + "currentServiceObjectiveName": "GP_Gen5_2", + "requestedServiceObjectiveName": "HS_Gen5_2", + "defaultSecondaryLocation": "North Europe", + "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", + "zoneRedundant": false, + "licenseType": "LicenseIncluded", + "maxLogSizeBytes": 193273528320, + "earliestRestoreDate": "2022-12-08T12:42:00Z", + "readScale": "Enabled", + "currentSku": { + "name": "GP_Gen5", + "tier": "GeneralPurpose", + "family": "Gen5", + "capacity": 2 + }, + "currentBackupStorageRedundancy": "Geo", + "requestedBackupStorageRedundancy": "Geo", + "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", + "isLedgerOn": false, + "isInfraEncryptionEnabled": false + }, + "location": "southeastasia", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb", + "name": "testdb", + "type": "Microsoft.Sql/servers/databases" + } + }, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateJobAgent.json new file mode 100644 index 000000000000..2d4c3665ccbc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateJobAgent.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview", + "parameters": { + "tags": { + "mytag1": "myvalue1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + }, + "tags": { + "mytag1": "myvalue1" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/southeastasia/jobAgentOperationResults/00000000-1111-2222-3333-444444444444?api-version=2017-03-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateJobAgentWithIdentity.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateJobAgentWithIdentity.json new file mode 100644 index 000000000000..ec23cbaac38c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateJobAgentWithIdentity.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi": {} + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi": { + "clientId": "e09c8507-0000-0000-97e2-18c5beec59dc", + "principalId": "0c29d9b7-0ae2-4014-96ea-faf8e0cf2bc7" + } + } + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/southeastasia/jobAgentOperationResults/00000000-1111-2222-3333-444444444444?api-version=2017-03-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateJobAgentWithSku.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateJobAgentWithSku.json new file mode 100644 index 000000000000..35f9311e3fdd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateJobAgentWithSku.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview", + "parameters": { + "sku": { + "name": "JA200" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name": "agent1", + "type": "Microsoft.Sql/servers/jobAgents", + "location": "southeastasia", + "properties": { + "databaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + }, + "sku": { + "name": "JA200", + "capacity": 200 + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/southeastasia/jobAgentOperationResults/00000000-1111-2222-3333-444444444444?api-version=2017-03-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json new file mode 100644 index 000000000000..dae60910e6a2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "managedInstanceName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "retentionDays": 14 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/managedShortTermRetentionPolicyOperationResults/00000000-1111-2222-3333-444444444444?api-version=2017-03-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json new file mode 100644 index 000000000000..c16249b8a645 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "managedInstanceName": "testsvr", + "restorableDroppedDatabaseId": "testdb,131403269876900000", + "policyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "retentionDays": 14 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 14 + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/managedShortTermRetentionPolicyOperationResults/00000000-1111-2222-3333-444444444444?api-version=2017-03-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateShortTermRetentionPolicy.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateShortTermRetentionPolicy.json new file mode 100644 index 000000000000..6aa38c9c9565 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateShortTermRetentionPolicy.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "resourceGroup", + "serverName": "testsvr", + "databaseName": "testdb", + "policyName": "default", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "retentionDays": 7, + "diffBackupIntervalInHours": 24 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies", + "properties": { + "retentionDays": 7, + "diffBackupIntervalInHours": 24 + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/shortTermRetentionPolicyOperationResults/00000000-1111-2222-3333-444444444444?api-version=2021-02-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateVirtualClusterDnsServers.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateVirtualClusterDnsServers.json new file mode 100644 index 000000000000..3a7933771910 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpdateVirtualClusterDnsServers.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "virtualClusterName": "VirtualCluster2b9a846b-2e37-43ef-a8e9-f2c6d645c1d7", + "api-version": "2023-05-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/virtualclusterazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + }, + "200": { + "body": { + "properties": { + "status": "Succeeded" + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/virtualClusters/VirtualCluster2b9a846b-2e37-43ef-a8e9-f2c6d645c1d7/updateManagedInstanceDnsServers" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpgradeDataWarehouse.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpgradeDataWarehouse.json new file mode 100644 index 000000000000..e3469615c6f0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/UpgradeDataWarehouse.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdwdb", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/japaneast/databaseOperationResults/00000000-0000-0000-0000-000000000000" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterDelete.json new file mode 100644 index 000000000000..51cf5a27cfa4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterDelete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "testrg", + "virtualClusterName": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/virtualclusterazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterGet.json new file mode 100644 index 000000000000..78d339f49673 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "testrg", + "virtualClusterName": "vc-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "subnetId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest", + "version": "2.0", + "childResources": [ + "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl", + "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/mi" + ] + }, + "location": "japaneast", + "tags": { + "key": "value" + }, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "name": "vc-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "type": "Microsoft.Sql/virtualClusters" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterList.json new file mode 100644 index 000000000000..dd8a8ec55dcc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterList.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "subnetId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest", + "version": "1.0", + "childResources": [ + "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl" + ] + }, + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/VirtualClustercltest", + "name": "VirtualClustercltest", + "type": "Microsoft.Sql/virtualClusters" + }, + { + "properties": { + "subnetId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest2", + "version": "2.0", + "childResources": [] + }, + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc2", + "name": "vc2", + "type": "Microsoft.Sql/virtualClusters" + }, + { + "properties": { + "subnetId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest", + "version": "2.0", + "childResources": [ + "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl", + "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/mi" + ] + }, + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc1", + "name": "vc1", + "type": "Microsoft.Sql/virtualClusters" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterListByResourceGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterListByResourceGroup.json new file mode 100644 index 000000000000..ac7177d37f7d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterListByResourceGroup.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "testrg", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "subnetId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest", + "version": "1.0", + "childResources": [ + "/subscriptions/65dc2520-d3b9-4d11-b638-f3c41f962550/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl" + ] + }, + "location": "japaneast", + "id": "/subscriptions/65dc2520-d3b9-4d11-b638-f3c41f962550/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/VirtualClustercltest", + "name": "VirtualClustercltest", + "type": "Microsoft.Sql/virtualClusters" + }, + { + "properties": { + "subnetId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest2", + "version": "2.0", + "childResources": [] + }, + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc2", + "name": "vc2", + "type": "Microsoft.Sql/virtualClusters" + }, + { + "properties": { + "subnetId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest", + "version": "2.0", + "childResources": [ + "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl", + "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/mi" + ] + }, + "location": "japaneast", + "tags": { + "tkey": "tvalue3" + }, + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc1", + "name": "vc1", + "type": "Microsoft.Sql/virtualClusters" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterUpdate.json new file mode 100644 index 000000000000..bd42587a21c7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualClusterUpdate.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "20d7082a-0fc7-4468-82bd-542694d5042b", + "resourceGroupName": "testrg", + "virtualClusterName": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "api-version": "2023-05-01-preview", + "parameters": { + "tags": { + "tkey": "tvalue1" + } + } + }, + "responses": { + "200": { + "body": { + "properties": {}, + "tags": { + "tkey": "tvalue3" + }, + "location": "japaneast", + "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "name": "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + "type": "Microsoft.Sql/virtualClusters" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/virtualclusterazureasyncoperation/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json new file mode 100644 index 000000000000..5895169a6b9b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "vnet-test-svr", + "virtualNetworkRuleName": "vnet-firewall-rule", + "api-version": "2023-05-01-preview", + "parameters": { + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule", + "name": "vnet-firewall-rule", + "type": "Microsoft.Sql/servers/virtualNetworkRules", + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule", + "name": "vnet-firewall-rule", + "type": "Microsoft.Sql/servers/virtualNetworkRules", + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + } + }, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesDelete.json new file mode 100644 index 000000000000..1ef4bdcb6d2f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "vnet-test-svr", + "virtualNetworkRuleName": "vnet-firewall-rule", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/virtualNetworkRulesOperationResults/00000000-1111-2222-3333-444444444444?api-version=2015-05-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesGet.json new file mode 100644 index 000000000000..42a447d97e22 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "vnet-test-svr", + "virtualNetworkRuleName": "vnet-firewall-rule", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule", + "name": "vnet-firewall-rule", + "type": "Microsoft.Sql/servers/virtualNetworkRules", + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "state": "Ready", + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesList.json new file mode 100644 index 000000000000..6a128c1ed0d1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/VirtualNetworkRulesList.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default", + "serverName": "vnet-test-svr", + "virtualNetworkRuleName": "vnet-firewall-rule", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule", + "name": "vnet-firewall-rule", + "type": "Microsoft.Sql/servers/virtualNetworkRules", + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "state": "Ready", + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule", + "name": "vnet-firewall-rule", + "type": "Microsoft.Sql/servers/virtualNetworkRules", + "properties": { + "ignoreMissingVnetServiceEndpoint": false, + "state": "Ready", + "virtualNetworkSubnetId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 40136e217ed0..3a38b8774a55 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -24,7 +24,7 @@ These are the global settings for the Sql API. title: SqlManagementClient description: 'The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete databases.' openapi-type: arm -tag: package-preview-2023-02 +tag: package-preview-2023-05 ``` ### Composite packages @@ -32,11 +32,158 @@ tag: package-preview-2023-02 The following packages may be composed from multiple api-versions. +### Tag: package-preview-2023-05 + +These settings apply only when `--tag=package-preview-2023-05` is specified on the command line. + +```yaml $(tag) == 'package-preview-2023-05' +input-file: + - Microsoft.Sql/preview/2023-05-01-preview/BackupShortTermRetentionPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/BlobAuditing.json + - Microsoft.Sql/preview/2023-05-01-preview/DataMaskingPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/DataMaskingRules.json + - Microsoft.Sql/preview/2023-05-01-preview/DataWarehouseUserActivities.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseAdvancedThreatProtectionSettings.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseAdvisors.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseAutomaticTuning.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseColumns.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseEncryptionProtectorRevalidate.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseEncryptionProtectorRevert.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseExtensions.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseOperations.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseRecommendedActions.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseSchemas.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseSecurityAlertPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentBaselines.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseTables.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseUsages.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessmentRuleBaselines.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessmentScans.json + - Microsoft.Sql/preview/2023-05-01-preview/DatabaseVulnerabilityAssessments.json + - Microsoft.Sql/preview/2023-05-01-preview/Databases.json + - Microsoft.Sql/preview/2023-05-01-preview/DeletedServers.json + - Microsoft.Sql/preview/2023-05-01-preview/DistributedAvailabilityGroups.json + - Microsoft.Sql/preview/2023-05-01-preview/ElasticPoolOperations.json + - Microsoft.Sql/preview/2023-05-01-preview/ElasticPools.json + - Microsoft.Sql/preview/2023-05-01-preview/EncryptionProtectors.json + - Microsoft.Sql/preview/2023-05-01-preview/EndpointCertificates.json + - Microsoft.Sql/preview/2023-05-01-preview/FailoverGroups.json + - Microsoft.Sql/preview/2023-05-01-preview/FirewallRules.json + - Microsoft.Sql/preview/2023-05-01-preview/GeoBackupPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/IPv6FirewallRules.json + - Microsoft.Sql/preview/2023-05-01-preview/InstanceFailoverGroups.json + - Microsoft.Sql/preview/2023-05-01-preview/InstancePools.json + - Microsoft.Sql/preview/2023-05-01-preview/JobAgents.json + - Microsoft.Sql/preview/2023-05-01-preview/JobCredentials.json + - Microsoft.Sql/preview/2023-05-01-preview/JobExecutions.json + - Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json + - Microsoft.Sql/preview/2023-05-01-preview/JobStepExecutions.json + - Microsoft.Sql/preview/2023-05-01-preview/JobSteps.json + - Microsoft.Sql/preview/2023-05-01-preview/JobTargetExecutions.json + - Microsoft.Sql/preview/2023-05-01-preview/JobTargetGroups.json + - Microsoft.Sql/preview/2023-05-01-preview/JobVersions.json + - Microsoft.Sql/preview/2023-05-01-preview/Jobs.json + - Microsoft.Sql/preview/2023-05-01-preview/LedgerDigestUploads.json + - Microsoft.Sql/preview/2023-05-01-preview/LocationCapabilities.json + - Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionBackups.json + - Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionManagedInstanceBackups.json + - Microsoft.Sql/preview/2023-05-01-preview/LongTermRetentionPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/MaintenanceWindowOptions.json + - Microsoft.Sql/preview/2023-05-01-preview/MaintenanceWindows.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedBackupShortTermRetentionPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseAdvancedThreatProtectionSettings.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseColumns.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseMoveOperations.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseQueries.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseRestoreDetails.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSchemas.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSecurityAlertPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSecurityEvents.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseSensitivityLabels.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseTables.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseTransparentDataEncryption.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessmentScans.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabaseVulnerabilityAssessments.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedDatabases.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAdministrators.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAdvancedThreatProtectionSettings.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceAzureADOnlyAuthentications.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceDtcs.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceEncryptionProtectors.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceKeys.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceLongTermRetentionPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceOperations.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstancePrivateEndpointConnections.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstancePrivateLinkResources.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceTdeCertificates.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstanceVulnerabilityAssessments.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedInstances.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedLedgerDigestUploads.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedServerDnsAliases.json + - Microsoft.Sql/preview/2023-05-01-preview/ManagedServerSecurityAlertPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/NetworkSecurityPerimeterConfigurations.json + - Microsoft.Sql/preview/2023-05-01-preview/Operations.json + - Microsoft.Sql/preview/2023-05-01-preview/OutboundFirewallRules.json + - Microsoft.Sql/preview/2023-05-01-preview/PrivateEndpointConnections.json + - Microsoft.Sql/preview/2023-05-01-preview/PrivateLinkResources.json + - Microsoft.Sql/preview/2023-05-01-preview/RecoverableDatabases.json + - Microsoft.Sql/preview/2023-05-01-preview/RecoverableManagedDatabases.json + - Microsoft.Sql/preview/2023-05-01-preview/ReplicationLinks.json + - Microsoft.Sql/preview/2023-05-01-preview/RestorableDroppedDatabases.json + - Microsoft.Sql/preview/2023-05-01-preview/RestorableDroppedManagedDatabases.json + - Microsoft.Sql/preview/2023-05-01-preview/RestorePoints.json + - Microsoft.Sql/preview/2023-05-01-preview/SensitivityLabels.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerAdvancedThreatProtectionSettings.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerAdvisors.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerAutomaticTuning.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerAzureADAdministrators.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerAzureADOnlyAuthentications.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerConfigurationOptions.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerConnectionPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerDevOpsAudit.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerDnsAliases.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerKeys.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerOperations.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerSecurityAlertPolicies.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerTrustCertificates.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerTrustGroups.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerUsages.json + - Microsoft.Sql/preview/2023-05-01-preview/ServerVulnerabilityAssessments.json + - Microsoft.Sql/preview/2023-05-01-preview/Servers.json + - Microsoft.Sql/preview/2023-05-01-preview/SqlAgent.json + - Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentBaseline.json + - Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentExecuteScan.json + - Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json + - Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentScanResult.json + - Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentScans.json + - Microsoft.Sql/preview/2023-05-01-preview/SqlVulnerabilityAssessmentsSettings.json + - Microsoft.Sql/preview/2023-05-01-preview/StartStopManagedInstanceSchedules.json + - Microsoft.Sql/preview/2023-05-01-preview/SubscriptionUsages.json + - Microsoft.Sql/preview/2023-05-01-preview/SynapseLinkWorkspaces.json + - Microsoft.Sql/preview/2023-05-01-preview/SyncAgents.json + - Microsoft.Sql/preview/2023-05-01-preview/SyncGroups.json + - Microsoft.Sql/preview/2023-05-01-preview/SyncMembers.json + - Microsoft.Sql/preview/2023-05-01-preview/TdeCertificates.json + - Microsoft.Sql/preview/2023-05-01-preview/TimeZones.json + - Microsoft.Sql/preview/2023-05-01-preview/TransparentDataEncryptions.json + - Microsoft.Sql/preview/2023-05-01-preview/Usages.json + - Microsoft.Sql/preview/2023-05-01-preview/VirtualClusters.json + - Microsoft.Sql/preview/2023-05-01-preview/VirtualNetworkRules.json + - Microsoft.Sql/preview/2023-05-01-preview/WorkloadClassifiers.json + - Microsoft.Sql/preview/2023-05-01-preview/WorkloadGroups.json +``` ### Tag: package-preview-2023-02 These settings apply only when `--tag=package-preview-2023-02` is specified on the command line. -```yaml $(tag) == 'package-preview-2023-02' +``` yaml $(tag) == 'package-preview-2023-02' input-file: - Microsoft.Sql/preview/2023-02-01-preview/BackupShortTermRetentionPolicies.json - Microsoft.Sql/preview/2023-02-01-preview/BlobAuditing.json @@ -178,6 +325,7 @@ input-file: - Microsoft.Sql/preview/2023-02-01-preview/WorkloadClassifiers.json - Microsoft.Sql/preview/2023-02-01-preview/WorkloadGroups.json ``` + ### Tag: package-preview-2022-11 These settings apply only when `--tag=package-preview-2022-11` is specified on the command line. @@ -1030,6 +1178,7 @@ input-file: - ./Microsoft.Sql/preview/2020-11-01-preview/JobAgents.json - ./Microsoft.Sql/preview/2020-11-01-preview/JobCredentials.json - ./Microsoft.Sql/preview/2020-11-01-preview/JobExecutions.json +- ./Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json - ./Microsoft.Sql/preview/2020-11-01-preview/Jobs.json - ./Microsoft.Sql/preview/2020-11-01-preview/JobStepExecutions.json - ./Microsoft.Sql/preview/2020-11-01-preview/JobSteps.json