diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json new file mode 100644 index 000000000000..fd615a5f68ac --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json @@ -0,0 +1,355 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-10-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": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/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 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 type keys are managed by Azure SQL. This key type does not 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" + } + }, + "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": "#/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": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance encryption protector.", + "schema": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtector" + } + }, + "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 type keys are managed by Azure SQL. This key type does not 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 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": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "name": "encryptionProtectorName", + "in": "path", + "description": "The name of the encryption protector to be created or 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": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the encryption protector.", + "schema": { + "$ref": "#/definitions/ManagedInstanceEncryptionProtector" + } + }, + "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 type keys are managed by Azure SQL. This key type does not 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 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 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\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 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 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 and Key Type is RSA.\n\n * 401 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 401 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 401 AzureKeyVaultMissingPermissions - The server is mising required permissions on the Azure Key Vault. \n\n * 401 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 401 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Serivce Principal not found error was encountered.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\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 * 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 * 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 ." + }, + "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" + } + } + } + } + }, + "definitions": { + "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 + } + } + }, + "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 + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription ID that identifies an Azure subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "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" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "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" + }, + "BlobAuditingPolicyNameParameter": { + "name": "blobAuditingPolicyName", + "in": "path", + "description": "The name of the blob auditing policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineInstanceNameParameter": { + "name": "sqlVirtualMachineInstanceName", + "in": "path", + "description": "The name of the SqlVirtualMachineInstance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineContainerNameParameter": { + "name": "sqlVirtualMachineContainerName", + "in": "path", + "description": "The name of the SqlVirtualMachineContainer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json new file mode 100644 index 000000000000..05308e3da9e0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json @@ -0,0 +1,406 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-10-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": "#/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": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of managed instance keys.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKeyListResult" + } + }, + "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 type keys are managed by Azure SQL. This key type does not 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" + } + }, + "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": "#/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": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified managed instance key.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKey" + } + }, + "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 type keys are managed by Azure SQL. This key type does not 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 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": "#/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": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the managed instance key.", + "schema": { + "$ref": "#/definitions/ManagedInstanceKey" + } + }, + "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 type keys are managed by Azure SQL. This key type does not 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 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 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\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 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 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 and Key Type is RSA.\n\n * 401 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 401 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 401 AzureKeyVaultMissingPermissions - The server is mising required permissions on the Azure Key Vault. \n\n * 401 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 401 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Serivce Principal not found error was encountered.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\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 * 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 ." + }, + "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": "#/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": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the managed instance key." + }, + "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 type keys are managed by Azure SQL. This key type does not 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 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 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.\n\n * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.\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 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 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.\n\n * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 and Key Type is RSA.\n\n * 401 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.\n\n * 401 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.\n\n * 401 AzureKeyVaultMissingPermissions - The server is mising required permissions on the Azure Key Vault. \n\n * 401 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.\n\n * 401 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Serivce Principal not found error was encountered.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\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 * 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 ." + }, + "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": { + "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 + } + } + }, + "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 + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription ID that identifies an Azure subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "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" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "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" + }, + "BlobAuditingPolicyNameParameter": { + "name": "blobAuditingPolicyName", + "in": "path", + "description": "The name of the blob auditing policy.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineInstanceNameParameter": { + "name": "sqlVirtualMachineInstanceName", + "in": "path", + "description": "The name of the SqlVirtualMachineInstance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineContainerNameParameter": { + "name": "sqlVirtualMachineContainerName", + "in": "path", + "description": "The name of the SqlVirtualMachineContainer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json new file mode 100644 index 000000000000..984155d7fb1b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2017-10-01-preview", + "parameters": { + "properties": { + "serverKeyType": "AzureKeyVault", + "serverKeyName": "someVault_someKey_01234567890123456789012345678901" + } + } + }, + "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" + } + } + }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json new file mode 100644 index 000000000000..3dd36645faeb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-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": "2017-10-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": { } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json new file mode 100644 index 000000000000..a3aa8fa45591 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "encryptionProtectorName": "current", + "api-version": "2017-10-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" + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorList.json new file mode 100644 index 000000000000..ddb7e0ea4e69 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceEncryptionProtectorList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2017-10-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" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json new file mode 100644 index 000000000000..e7e6d7ee2db9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2017-10-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": { + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901", + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2017-05-01T00:00:00.0Z" + } + } + }, + "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": { + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901", + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2017-05-01T00:00:00.0Z" + } + } + }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyDelete.json new file mode 100644 index 000000000000..89f371d55ebf --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-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": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": "" + }, + "202": {}, + "204": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyGet.json new file mode 100644 index 000000000000..10180e4dae9d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "keyName": "someVault_someKey_01234567890123456789012345678901", + "api-version": "2017-10-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": { + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901", + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2017-05-01T00:00:00.0Z" + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyList.json new file mode 100644 index 000000000000..eec51cfeb0d6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedInstanceKeyList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-7398", + "managedInstanceName": "sqlcrudtest-4645", + "api-version": "2017-10-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": { + "serverKeyType": "AzureKeyVault", + "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901", + "thumbprint": "00112233445566778899AABBCCDDEEFFAABBCCDD", + "creationDate": "2017-05-01T00:00:00.0Z" + } + }, + { + "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": { + "serverKeyType": "AzureKeyVault", + "uri": "https://myVault.vault.azure.net/keys/myKey/11111111111111111111111111111111", + "thumbprint": "AAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBB", + "creationDate": "2017-05-01T00:00:00.0Z" + } + }, + { + "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": { + "serverKeyType": "ServiceManaged" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 16a08ea194ac..5aa99322dbe1 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -103,6 +103,8 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json - Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json - Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json # Needed when there is more than one input file @@ -177,6 +179,8 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json - Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json - Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json # Needed when there is more than one input file override-info: @@ -244,6 +248,8 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json - Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json - Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json +- Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json # Needed when there is more than one input file override-info: @@ -409,6 +415,8 @@ input-file: - ./Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json - ./Microsoft.Sql/preview/2017-10-01-preview/TdeCertificates.json - ./Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceTdeCertificates.json + - ./Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceKeys.json + - ./Microsoft.Sql/preview/2017-10-01-preview/ManagedInstanceEncryptionProtectors.json # Needed when there is more than one input file override-info: