diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/AzureADAdministrator.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/AzureADAdministrator.json new file mode 100644 index 000000000000..211e61dbbbe5 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/AzureADAdministrator.json @@ -0,0 +1,325 @@ +{ + "swagger": "2.0", + "info": { + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", + "version": "2023-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators/{administratorName}": { + "put": { + "tags": [ + "AzureADAdministrators" + ], + "operationId": "AzureADAdministrators_CreateOrUpdate", + "x-ms-examples": { + "Create an azure ad administrator": { + "$ref": "./examples/AzureADAdministratorCreate.json" + } + }, + "description": "Creates or updates an existing Azure Active Directory administrator.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/AdministratorNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AzureADAdministrator" + }, + "description": "The required parameters for creating or updating an aad administrator." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AzureADAdministrator" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/AzureADAdministrator" + } + }, + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "AzureADAdministrators" + ], + "operationId": "AzureADAdministrators_Delete", + "x-ms-examples": { + "Delete an azure ad administrator": { + "$ref": "./examples/AzureADAdministratorDelete.json" + } + }, + "description": "Deletes an Azure AD Administrator.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/AdministratorNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "get": { + "tags": [ + "AzureADAdministrators" + ], + "operationId": "AzureADAdministrators_Get", + "x-ms-examples": { + "Get an azure ad administrator": { + "$ref": "./examples/AzureADAdministratorGet.json" + } + }, + "description": "Gets information about an azure ad administrator.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/AdministratorNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AzureADAdministrator" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators": { + "get": { + "tags": [ + "AzureADAdministrators" + ], + "operationId": "AzureADAdministrators_ListByServer", + "x-ms-examples": { + "List Azure AD administrators in a server": { + "$ref": "./examples/AzureADAdministratorsListByServer.json" + } + }, + "description": "List all the AAD administrators in a given server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AdministratorListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "AdministratorProperties": { + "type": "object", + "properties": { + "administratorType": { + "type": "string", + "description": "Type of the sever administrator.", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorType", + "modelAsString": true + } + }, + "login": { + "type": "string", + "description": "Login name of the server administrator." + }, + "sid": { + "type": "string", + "description": "SID (object ID) of the server administrator." + }, + "tenantId": { + "type": "string", + "description": "Tenant ID of the administrator." + }, + "identityResourceId": { + "type": "string", + "description": "The resource id of the identity used for AAD Authentication." + } + }, + "description": "The properties of an administrator." + }, + "AzureADAdministrator": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/AdministratorProperties", + "x-ms-client-flatten": true, + "description": "The properties of an administrator." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Administrator." + }, + "AdministratorListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/AzureADAdministrator" + }, + "description": "The list of azure ad administrator of a server" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A List of azure ad administrators." + } + }, + "parameters": { + "AdministratorNameParameter": { + "name": "administratorName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "ActiveDirectory" + ], + "x-ms-enum": { + "name": "AdministratorName", + "modelAsString": true + }, + "description": "The name of the Azure AD Administrator.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorCreate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorCreate.json new file mode 100644 index 000000000000..5e80be8b46b0 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorCreate.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "ActiveDirectory", + "api-version": "2023-06-01-preview", + "parameters": { + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c12b7025-bfe2-46c1-b463-993b5e4cd467", + "identityResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestsvc4/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.DBforMySQL/flexibleServers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c12b7025-bfe2-46c1-b463-993b5e4cd467", + "identityResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestsvc4/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.DBforMySQL/flexibleServers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c12b7025-bfe2-46c1-b463-993b5e4cd467", + "identityResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi" + } + } + }, + "202": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorDelete.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorDelete.json new file mode 100644 index 000000000000..f4e925aba5d7 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorDelete.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "ActiveDirectory", + "api-version": "2023-06-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + }, + "204": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorGet.json new file mode 100644 index 000000000000..b942fc4d5933 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "ActiveDirectory", + "api-version": "2023-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestsvc4/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.DBforMySQL/flexibleServers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c12b7025-bfe2-46c1-b463-993b5e4cd467", + "identityResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi" + } + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorsListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorsListByServer.json new file mode 100644 index 000000000000..f31a70a0ede7 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorsListByServer.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "api-version": "2023-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestsvc4/administrators/ActiveDirectory", + "name": "ActiveDirectory", + "type": "Microsoft.DBforMySQL/flexibleServers/administrators", + "properties": { + "administratorType": "ActiveDirectory", + "login": "bob@contoso.com", + "sid": "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", + "tenantId": "c12b7025-bfe2-46c1-b463-993b5e4cd467", + "identityResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi" + } + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/BackupAndExport.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/BackupAndExport.json new file mode 100644 index 000000000000..b2638ecdb3e0 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/BackupAndExport.json @@ -0,0 +1,361 @@ +{ + "swagger": "2.0", + "consumes": [ + "application/json" + ], + "host": "management.azure.com", + "info": { + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", + "version": "2023-06-01-preview" + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backupAndExport": { + "post": { + "tags": [ + "BackupAndExport" + ], + "operationId": "BackupAndExport_Create", + "x-ms-examples": { + "Create and Export Backup": { + "$ref": "./examples/BackupAndExport.json" + } + }, + "description": "Exports the backup of the given server by creating a backup if not existing.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BackupAndExportRequest" + }, + "description": "The required parameters for creating and exporting backup of the given server." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/BackupAndExportResponse" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "description": "URL to retrieve the final result after operation completes.", + "type": "string" + }, + "Azure-AsyncOperation": { + "description": "URL to query for status of the operation.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateBackup": { + "post": { + "tags": [ + "BackupAndExport" + ], + "operationId": "BackupAndExport_ValidateBackup", + "x-ms-examples": { + "Validate Backup": { + "$ref": "./examples/ValidateBackup.json" + } + }, + "description": "Validates if backup can be performed for given server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ValidateBackupResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "BackupRequestBase": { + "description": "BackupRequestBase is the base for all backup request.", + "required": [ + "backupSettings" + ], + "type": "object", + "properties": { + "backupSettings": { + "$ref": "#/definitions/BackupSettings", + "description": "Backup Settings" + } + } + }, + "BackupAndExportRequest": { + "description": "BackupAndExport API Request", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BackupRequestBase" + } + ], + "required": [ + "backupSettings", + "targetDetails" + ], + "properties": { + "targetDetails": { + "$ref": "#/definitions/BackupStoreDetails", + "description": "Backup Target Store Details" + } + } + }, + "BackupStoreDetails": { + "description": "Details about the target where the backup content will be stored.", + "required": [ + "objectType" + ], + "type": "object", + "properties": { + "objectType": { + "description": "Type of the specific object - used for deserializing", + "type": "string" + } + }, + "discriminator": "objectType" + }, + "FullBackupStoreDetails": { + "description": "FullBackupStoreDetails is used for scenarios where backup data is streamed/copied over to a storage destination.", + "type": "object", + "required": [ + "sasUriList" + ], + "allOf": [ + { + "$ref": "#/definitions/BackupStoreDetails" + } + ], + "properties": { + "sasUriList": { + "description": "SASUriList of storage containers where backup data is to be streamed/copied.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "BackupSettings": { + "description": "Backup Settings", + "type": "object", + "required": [ + "backupName" + ], + "properties": { + "backupName": { + "$ref": "../../../common-types/v1/common-types.json#/definitions/BackupName" + }, + "backupFormat": { + "description": "Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE)", + "enum": [ + "CollatedFormat", + "Raw" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupFormat", + "modelAsString": true + } + } + } + }, + "ValidateBackupResponseProperties": { + "description": "ValidateBackup Response Properties", + "type": "object", + "properties": { + "numberOfContainers": { + "format": "int32", + "description": "Estimated no of storage containers required for resource data to be backed up.", + "type": "integer" + } + } + }, + "BackupAndExportResponseProperties": { + "description": "BackupAndExport Response Properties", + "type": "object", + "properties": { + "datasourceSizeInBytes": { + "format": "int64", + "description": "Size of datasource in bytes", + "type": "integer" + }, + "dataTransferredInBytes": { + "format": "int64", + "description": "Data transferred in bytes", + "type": "integer" + }, + "backupMetadata": { + "description": "Metadata related to backup to be stored for restoring resource in key-value pairs.", + "type": "string" + } + } + }, + "BackupAndExportResponse": { + "type": "object", + "properties": { + "status": { + "description": "The operation status", + "type": "string", + "enum": [ + "Pending", + "InProgress", + "Succeeded", + "Failed", + "CancelInProgress", + "Canceled" + ], + "x-ms-enum": { + "name": "OperationStatus", + "modelAsString": false, + "values": [ + { + "value": "Pending", + "description": "The operation has been accepted but hasn't started." + }, + { + "value": "InProgress", + "description": "The operation is running" + }, + { + "value": "Succeeded", + "description": "The operation Succeeded" + }, + { + "value": "Failed", + "description": "The operation Failed" + }, + { + "value": "CancelInProgress", + "description": "The cancellation in progress" + }, + { + "value": "Canceled", + "description": "The operation has been Canceled" + } + ] + } + }, + "startTime": { + "description": "Start time", + "type": "string", + "format": "date-time" + }, + "endTime": { + "description": "End time", + "type": "string", + "format": "date-time" + }, + "percentComplete": { + "description": "Operation progress (0-100).", + "type": "number", + "format": "double", + "minimum": 0, + "maximum": 100 + }, + "properties": { + "$ref": "#/definitions/BackupAndExportResponseProperties", + "x-ms-client-flatten": true, + "description": "The response properties of a backup and export operation." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + ], + "description": "Represents BackupAndExport API Response" + }, + "ValidateBackupResponse": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ValidateBackupResponseProperties", + "x-ms-client-flatten": true, + "description": "The response properties of a pre backup operation." + } + }, + "description": "Represents ValidateBackup API Response" + } + }, + "produces": [ + "application/json" + ], + "schemes": [ + "https" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/Backups.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/Backups.json new file mode 100644 index 000000000000..051f605147f5 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/Backups.json @@ -0,0 +1,236 @@ +{ + "swagger": "2.0", + "info": { + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", + "version": "2023-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backups/{backupName}": { + "put": { + "tags": [ + "Backups" + ], + "operationId": "Backups_Put", + "x-ms-examples": { + "Create backup for a server": { + "$ref": "./examples/BackupPut.json" + } + }, + "description": "Create backup for a given server with specified backup name.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BackupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerBackup" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Backups" + ], + "operationId": "Backups_Get", + "x-ms-examples": { + "Get a backup for a server": { + "$ref": "./examples/BackupGet.json" + } + }, + "description": "List all the backups for a given server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/BackupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerBackup" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backups": { + "get": { + "tags": [ + "Backups" + ], + "operationId": "Backups_ListByServer", + "x-ms-examples": { + "List backups for a server": { + "$ref": "./examples/BackupsListByServer.json" + } + }, + "description": "List all the backups for a given server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerBackupListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ServerBackupProperties": { + "type": "object", + "properties": { + "backupType": { + "type": "string", + "description": "Backup type." + }, + "completedTime": { + "type": "string", + "format": "date-time", + "description": "Backup completed time (ISO8601 format)." + }, + "source": { + "type": "string", + "description": "Backup source" + } + }, + "description": "The properties of a server backup." + }, + "ServerBackup": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ServerBackupProperties", + "x-ms-client-flatten": true, + "description": "The properties of a server backup." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Server backup properties" + }, + "ServerBackupListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ServerBackup" + }, + "description": "The list of backups of a server." + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of server backups." + } + }, + "parameters": { + "BackupNameParameter": { + "name": "backupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the backup.", + "x-ms-parameter-location": "method", + "pattern": "^[-\\w\\._]+$" + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupAndExport.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupAndExport.json new file mode 100644 index 000000000000..0171dfb47d8b --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupAndExport.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "serverName": "mysqltestserver", + "resourceGroupName": "TestGroup", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "targetDetails": { + "objectType": "FullBackupStoreDetails", + "sasUriList": [ + "sasuri1", + "sasuri2" + ] + }, + "backupSettings": { + "backupName": "customer-backup-name" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/cb9d743d-2140-4e73-b871-cd31abab1d2f/resourceGroups/mrgsumitkumatest1/providers/Microsoft.DBforMySQL/flexibleServers/servermysql-01/backupAndExport/custom-backup101", + "name": "custom-backup101", + "type": "Microsoft.DBforMySQL/flexibleServers/backupAndExport", + "status": "Failed", + "startTime": "2022-12-29T07:34:02.328326Z", + "endTime": "2022-12-29T07:37:05.6406008Z", + "percentComplete": 100, + "properties": { + "datasourceSizeInBytes": 1024, + "dataTransferredInBytes": 1024, + "backupMetadata": "{\"key1\":\"value1\",\"key2\":\"value2\"}" + }, + "error": { + "code": "AggregateException", + "message": "System.AggregateException: One or more errors occurred. (Mismatch in count of number of Commited-Blocks from service.)" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationStatus/00000000-0000-0000-0000-000000000000?api-version=2023-06-01-preview", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/00000000-0000-0000-0000-000000000000?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupGet.json new file mode 100644 index 000000000000..7859ec5add84 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "backupName": "daily_20210615T160516", + "serverName": "mysqltestserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-15T16:05:19.902522+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210615T160516", + "name": "daily_20210615T160516", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupPut.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupPut.json new file mode 100644 index 000000000000..a57726033f92 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupPut.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "backupName": "mybackup", + "serverName": "mysqltestserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2022-05-07T07:38:01.1498043+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/customer_20220507t073755_bb392c3b-17c6-4d3f-9742-8479ca87b3ac_mybackup", + "name": "customer_20220507t073755_bb392c3b-17c6-4d3f-9742-8479ca87b3ac_mybackup", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupsListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupsListByServer.json new file mode 100644 index 000000000000..037e975a655c --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/BackupsListByServer.json @@ -0,0 +1,126 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-15T16:05:19.902522+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210615T160516", + "name": "daily_20210615T160516", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + }, + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-16T16:05:23.9243453+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210616T160520", + "name": "daily_20210616T160520", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + }, + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-17T16:05:28.1247488+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210617T160525", + "name": "daily_20210617T160525", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + }, + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-18T16:05:32.2736701+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210618T160529", + "name": "daily_20210618T160529", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + }, + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-19T16:05:36.8603354+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210619T160533", + "name": "daily_20210619T160533", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + }, + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-20T16:05:41.9200138+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210620T160538", + "name": "daily_20210620T160538", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + }, + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-21T16:05:48.8528447+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210621T160543", + "name": "daily_20210621T160543", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + }, + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-22T16:08:06.3121688+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210622T160803", + "name": "daily_20210622T160803", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + }, + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-22T21:08:10.5057354+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210622T210807", + "name": "daily_20210622T210807", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + }, + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-23T21:24:16.9401531+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210623T212413", + "name": "daily_20210623T212413", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + }, + { + "properties": { + "backupType": "FULL", + "source": "Automatic", + "completedTime": "2021-06-24T06:13:31.4962137+00:00" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/backups/daily_20210624T061328", + "name": "daily_20210624T061328", + "type": "Microsoft.DBforMySQL/flexibleServers/backups" + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/ValidateBackup.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/ValidateBackup.json new file mode 100644 index 000000000000..a03796c2645f --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-06-01-preview/examples/ValidateBackup.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "serverName": "mysqltestserver", + "resourceGroupName": "TestGroup", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "properties": { + "numberOfContainers": 1 + } + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/Configurations.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/Configurations.json new file mode 100644 index 000000000000..432c94e8b625 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/Configurations.json @@ -0,0 +1,535 @@ +{ + "swagger": "2.0", + "info": { + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", + "version": "2023-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/configurations/{configurationName}": { + "put": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_CreateOrUpdate", + "x-ms-examples": { + "ConfigurationCreateOrUpdate": { + "$ref": "./examples/ConfigurationCreateOrUpdate.json" + } + }, + "description": "Updates a configuration of a server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Configuration" + }, + "description": "The required parameters for updating a server configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_Update", + "x-ms-examples": { + "Update a user configuration": { + "$ref": "./examples/ConfigurationUpdate.json" + } + }, + "description": "Updates a configuration of a server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Configuration" + }, + "description": "The required parameters for updating a server configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_Get", + "x-ms-examples": { + "Get a configuration": { + "$ref": "./examples/ConfigurationGet.json" + } + }, + "description": "Gets information about a configuration of server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations": { + "post": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_BatchUpdate", + "x-ms-examples": { + "ConfigurationList": { + "$ref": "./examples/ConfigurationsBatchUpdate.json" + } + }, + "description": "Update a list of configurations in a given server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ConfigurationListForBatchUpdate" + }, + "description": "The parameters for updating a list of server configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ConfigurationListResult" + } + }, + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/configurations": { + "get": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_ListByServer", + "x-ms-examples": { + "List all configurations for a server": { + "$ref": "./examples/ConfigurationsListByServer.json" + } + }, + "description": "List all the configurations in a given server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationTagsParameter" + }, + { + "$ref": "#/parameters/ConfigurationKeywordParameter" + }, + { + "$ref": "#/parameters/ConfigurationPageParameter" + }, + { + "$ref": "#/parameters/ConfigurationPageSizeParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ConfigurationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ConfigurationProperties": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Value of the configuration." + }, + "currentValue": { + "type": "string", + "description": "Current value of the configuration." + }, + "description": { + "type": "string", + "readOnly": true, + "description": "Description of the configuration." + }, + "documentationLink": { + "type": "string", + "readOnly": true, + "description": "The link used to get the document from community or Azure site." + }, + "defaultValue": { + "type": "string", + "readOnly": true, + "description": "Default value of the configuration." + }, + "dataType": { + "type": "string", + "readOnly": true, + "description": "Data type of the configuration." + }, + "allowedValues": { + "type": "string", + "readOnly": true, + "description": "Allowed values of the configuration." + }, + "source": { + "type": "string", + "description": "Source of the configuration.", + "enum": [ + "system-default", + "user-override" + ], + "x-ms-enum": { + "name": "ConfigurationSource", + "modelAsString": true + } + }, + "isReadOnly": { + "type": "string", + "readOnly": true, + "description": "If is the configuration read only.", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "IsReadOnly", + "modelAsString": true + } + }, + "isConfigPendingRestart": { + "type": "string", + "readOnly": true, + "description": "If is the configuration pending restart or not.", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "IsConfigPendingRestart", + "modelAsString": true + } + }, + "isDynamicConfig": { + "type": "string", + "readOnly": true, + "description": "If is the configuration dynamic.", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "IsDynamicConfig", + "modelAsString": true + } + } + }, + "description": "The properties of a configuration." + }, + "Configuration": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ConfigurationProperties", + "x-ms-client-flatten": true, + "description": "The properties of a configuration." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Configuration." + }, + "ConfigurationListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Configuration" + }, + "description": "The list of server configurations." + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of server configurations." + }, + "ConfigurationForBatchUpdate": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the configuration." + }, + "properties": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Value of the configuration." + }, + "source": { + "type": "string", + "description": "Source of the configuration." + } + }, + "x-ms-client-flatten": true, + "description": "The properties can be updated for a configuration." + } + }, + "description": "Represents a Configuration." + }, + "ConfigurationListForBatchUpdate": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigurationForBatchUpdate" + }, + "x-ms-identifiers": [], + "description": "The list of server configurations." + }, + "resetAllToDefault": { + "type": "string", + "description": "Whether to reset all server parameters to default.", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "ResetAllToDefault", + "modelAsString": true + } + } + }, + "description": "A list of server configurations to update." + } + }, + "parameters": { + "ConfigurationNameParameter": { + "name": "configurationName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the server configuration.", + "x-ms-parameter-location": "method" + }, + "ConfigurationTagsParameter": { + "name": "tags", + "in": "query", + "required": false, + "type": "string", + "description": "The tags of the server configuration.", + "x-ms-parameter-location": "method" + }, + "ConfigurationKeywordParameter": { + "name": "keyword", + "in": "query", + "required": false, + "type": "string", + "description": "The keyword of the server configuration.", + "x-ms-parameter-location": "method" + }, + "ConfigurationPageParameter": { + "name": "page", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The page of the server configuration.", + "x-ms-parameter-location": "method" + }, + "ConfigurationPageSizeParameter": { + "name": "pageSize", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "description": "The pageSize of the server configuration.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationCreateOrUpdate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationCreateOrUpdate.json new file mode 100644 index 000000000000..9cf70d7832d1 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationCreateOrUpdate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "configurationName": "event_scheduler", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "properties": { + "value": "off", + "source": "user-override" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "value": "ON", + "description": "Indicates the status of the Event Scheduler.", + "defaultValue": "OFF", + "dataType": "Enumeration", + "allowedValues": "ON,OFF,DISABLED", + "source": "user-override" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/event_scheduler", + "name": "event_scheduler", + "type": "Microsoft.DBforMySQL/servers/configurations" + } + }, + "202": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json new file mode 100644 index 000000000000..fe9487f31245 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "configurationName": "event_scheduler", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "properties": { + "value": "OFF", + "description": "Indicates the status of the Event Scheduler. It is always OFF for a replica server to keep the replication consistency.", + "defaultValue": "OFF", + "dataType": "Enumeration", + "allowedValues": "ON,OFF", + "source": "system-default", + "isConfigPendingRestart": "False", + "isDynamicConfig": "True", + "isReadOnly": "False" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/configurations/event_scheduler", + "name": "event_scheduler", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationUpdate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationUpdate.json new file mode 100644 index 000000000000..50d4a6bbc3ea --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationUpdate.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "serverName": "testserver", + "configurationName": "event_scheduler", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "properties": { + "value": "on", + "source": "user-override" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "value": "ON", + "description": "Indicates the status of the Event Scheduler. It is always OFF for a replica server to keep the replication consistency.", + "defaultValue": "OFF", + "dataType": "Enumeration", + "allowedValues": "ON,OFF", + "source": "user-override", + "isConfigPendingRestart": "False", + "isDynamicConfig": "True", + "isReadOnly": "False" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/configurations/event_scheduler", + "name": "event_scheduler", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsBatchUpdate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsBatchUpdate.json new file mode 100644 index 000000000000..33814b36b085 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsBatchUpdate.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "value": [ + { + "name": "event_scheduler", + "properties": { + "value": "OFF" + } + }, + { + "name": "div_precision_increment", + "properties": { + "value": "8" + } + } + ], + "resetAllToDefault": "False" + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "value": "ON", + "description": "Indicates the status of the Event Scheduler. It is always OFF for a replica server to keep the replication consistency.", + "defaultValue": "OFF", + "dataType": "Enumeration", + "allowedValues": "ON,OFF", + "source": "user-override", + "isConfigPendingRestart": "False", + "isDynamicConfig": "True", + "isReadOnly": "False" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/event_scheduler", + "name": "event_scheduler", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + }, + { + "properties": { + "value": "8", + "description": "Number of digits by which to increase the scale of the result of division operations.", + "defaultValue": "4", + "dataType": "Integer", + "allowedValues": "0-30", + "source": "user-override", + "isConfigPendingRestart": "False", + "isDynamicConfig": "True", + "isReadOnly": "False" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/div_precision_increment", + "name": "div_precision_increment", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + } + ] + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsListByServer.json new file mode 100644 index 000000000000..ea3dab043ffe --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsListByServer.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "page": 1, + "pageSize": 8 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "value": "OFF", + "description": "Tell the server to enable or disable archive engine.", + "defaultValue": "OFF", + "dataType": "Enumeration", + "allowedValues": "ON,OFF", + "source": "system-default", + "isConfigPendingRestart": "False", + "isDynamicConfig": "False", + "isReadOnly": "True" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/archive", + "name": "archive", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + }, + { + "properties": { + "value": "OFF", + "description": "Allow to audit the log.", + "defaultValue": "OFF", + "dataType": "Enumeration", + "allowedValues": "ON,OFF", + "source": "system-default", + "isConfigPendingRestart": "False", + "isDynamicConfig": "True", + "isReadOnly": "False" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/audit_log_enabled", + "name": "audit_log_enabled", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + }, + { + "properties": { + "value": "CONNECTION", + "description": "Select the events to audit logs.", + "defaultValue": "CONNECTION", + "dataType": "Set", + "allowedValues": "DDL,DML_SELECT,DML_NONSELECT,DCL,ADMIN,DML,GENERAL,CONNECTION,TABLE_ACCESS", + "source": "system-default", + "isConfigPendingRestart": "False", + "isDynamicConfig": "True", + "isReadOnly": "False" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/audit_log_events", + "name": "audit_log_events", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + }, + { + "properties": { + "value": "azure_superuser", + "description": "The comma-separated user list whose commands will not be in the audit logs.", + "defaultValue": "azure_superuser", + "dataType": "String", + "allowedValues": "", + "source": "system-default", + "isConfigPendingRestart": "False", + "isDynamicConfig": "True", + "isReadOnly": "False" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/audit_log_exclude_users", + "name": "audit_log_exclude_users", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + }, + { + "properties": { + "value": "", + "description": "The comma-separated user list whose commands will be in the audit logs. It takes higher priority if the same user name is found in audit_log_exclude_users.", + "defaultValue": "", + "dataType": "String", + "allowedValues": "", + "source": "system-default", + "isConfigPendingRestart": "False", + "isDynamicConfig": "True", + "isReadOnly": "False" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/audit_log_include_users", + "name": "audit_log_include_users", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + }, + { + "properties": { + "value": "ON", + "description": "Allow to audit the slow log.", + "defaultValue": "ON", + "dataType": "Enumeration", + "allowedValues": "ON,OFF", + "source": "system-default", + "isConfigPendingRestart": "False", + "isDynamicConfig": "True", + "isReadOnly": "True" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/audit_slow_log_enabled", + "name": "audit_slow_log_enabled", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + }, + { + "properties": { + "value": "OFF", + "description": "Controls whether the server autogenerates SSL key and certificate files in the data directory, if they do not already exist.", + "defaultValue": "OFF", + "dataType": "Enumeration", + "allowedValues": "ON,OFF", + "source": "system-default", + "isConfigPendingRestart": "False", + "isDynamicConfig": "False", + "isReadOnly": "True" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/auto_generate_certs", + "name": "auto_generate_certs", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + }, + { + "properties": { + "value": "1", + "description": "The auto_increment_increment is intended for use with source-to-source replication, and can be used to control the operation of AUTO_INCREMENT columns.", + "defaultValue": "1", + "dataType": "Integer", + "allowedValues": "1-65535", + "source": "system-default", + "isConfigPendingRestart": "False", + "isDynamicConfig": "True", + "isReadOnly": "False" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver/configurations/auto_increment_increment", + "name": "auto_increment_increment", + "type": "Microsoft.DBforMySQL/flexibleServers/configurations" + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/Databases.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/Databases.json new file mode 100644 index 000000000000..386711dc1e16 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/Databases.json @@ -0,0 +1,296 @@ +{ + "swagger": "2.0", + "info": { + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", + "version": "2023-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/databases/{databaseName}": { + "put": { + "tags": [ + "Databases" + ], + "operationId": "Databases_CreateOrUpdate", + "x-ms-examples": { + "Create a database": { + "$ref": "./examples/DatabaseCreate.json" + } + }, + "description": "Creates a new database or updates an existing database.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Database" + }, + "description": "The required parameters for creating or updating a database." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "Databases" + ], + "operationId": "Databases_Delete", + "x-ms-examples": { + "Delete a database": { + "$ref": "./examples/DatabaseDelete.json" + } + }, + "description": "Deletes a database.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "Databases" + ], + "operationId": "Databases_Get", + "x-ms-examples": { + "Get a database": { + "$ref": "./examples/DatabaseGet.json" + } + }, + "description": "Gets information about a database.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/databases": { + "get": { + "tags": [ + "Databases" + ], + "operationId": "Databases_ListByServer", + "x-ms-examples": { + "List databases in a server": { + "$ref": "./examples/DatabasesListByServer.json" + } + }, + "description": "List all the databases in a given server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DatabaseListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "DatabaseProperties": { + "type": "object", + "properties": { + "charset": { + "type": "string", + "description": "The charset of the database." + }, + "collation": { + "type": "string", + "description": "The collation of the database." + } + }, + "description": "The properties of a database." + }, + "Database": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseProperties", + "x-ms-client-flatten": true, + "description": "The properties of a database." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Database." + }, + "DatabaseListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Database" + }, + "description": "The list of databases housed in a server" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A List of databases." + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the database.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseCreate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseCreate.json new file mode 100644 index 000000000000..3b4dd1523d6d --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseCreate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "databaseName": "db1", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "properties": { + "charset": "utf8", + "collation": "utf8_general_ci" + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/databases/db1", + "name": "db1", + "type": "Microsoft.DBforMySQL/flexibleServers/databases", + "properties": { + "charset": "utf8", + "collation": "utf8_general_ci" + } + } + }, + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/databases/db1", + "name": "db1", + "type": "Microsoft.DBforMySQL/flexibleServers/databases", + "properties": { + "charset": "utf8", + "collation": "utf8_general_ci" + } + } + }, + "202": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseDelete.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseDelete.json new file mode 100644 index 000000000000..660859137184 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseDelete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "databaseName": "db1", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseGet.json new file mode 100644 index 000000000000..9b14e21451f5 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "databaseName": "db1", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/databases/db1", + "name": "db1", + "type": "Microsoft.DBforMySQL/flexibleServers/databases", + "properties": { + "charset": "utf8", + "collation": "utf8_general_ci" + } + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabasesListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabasesListByServer.json new file mode 100644 index 000000000000..3f92d57c79db --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabasesListByServer.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/databases/db1", + "name": "db1", + "type": "Microsoft.DBforMySQL/flexibleServers/databases", + "properties": { + "charset": "utf8", + "collation": "utf8_general_ci" + } + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/databases/db2", + "name": "db2", + "type": "Microsoft.DBforMySQL/flexibleServers/databases", + "properties": { + "charset": "utf8", + "collation": "utf8_general_ci" + } + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/FirewallRules.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/FirewallRules.json new file mode 100644 index 000000000000..fa56e4be5ec3 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/FirewallRules.json @@ -0,0 +1,305 @@ +{ + "swagger": "2.0", + "info": { + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", + "version": "2023-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}": { + "put": { + "tags": [ + "FirewallRules" + ], + "operationId": "FirewallRules_CreateOrUpdate", + "x-ms-examples": { + "Create a firewall rule": { + "$ref": "./examples/FirewallRuleCreate.json" + } + }, + "description": "Creates a new firewall rule or updates an existing firewall rule.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/FirewallRuleNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/FirewallRule" + }, + "description": "The required parameters for creating or updating a firewall rule." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "FirewallRules" + ], + "operationId": "FirewallRules_Delete", + "x-ms-examples": { + "Delete a firewall rule": { + "$ref": "./examples/FirewallRuleDelete.json" + } + }, + "description": "Deletes a firewall rule.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/FirewallRuleNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "FirewallRules" + ], + "operationId": "FirewallRules_Get", + "x-ms-examples": { + "Get a firewall rule": { + "$ref": "./examples/FirewallRuleGet.json" + } + }, + "description": "Gets information about a server firewall rule.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/FirewallRuleNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/firewallRules": { + "get": { + "tags": [ + "FirewallRules" + ], + "operationId": "FirewallRules_ListByServer", + "x-ms-examples": { + "List all firewall rules in a server": { + "$ref": "./examples/FirewallRulesListByServer.json" + } + }, + "description": "List all the firewall rules in a given server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/FirewallRuleListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "FirewallRuleProperties": { + "type": "object", + "properties": { + "startIpAddress": { + "type": "string", + "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$", + "description": "The start IP address of the server firewall rule. Must be IPv4 format." + }, + "endIpAddress": { + "type": "string", + "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$", + "description": "The end IP address of the server firewall rule. Must be IPv4 format." + } + }, + "required": [ + "startIpAddress", + "endIpAddress" + ], + "description": "The properties of a server firewall rule." + }, + "FirewallRule": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/FirewallRuleProperties", + "x-ms-client-flatten": true, + "description": "The properties of a firewall rule." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "required": [ + "properties" + ], + "description": "Represents a server firewall rule." + }, + "FirewallRuleListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + }, + "description": "The list of firewall rules in a server." + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of firewall rules." + } + }, + "parameters": { + "FirewallRuleNameParameter": { + "name": "firewallRuleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the server firewall rule.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleCreate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleCreate.json new file mode 100644 index 000000000000..6c5efeaea5d3 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleCreate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "firewallRuleName": "rule1", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/firewallRules/rule1", + "name": "rule1", + "type": "Microsoft.DBforMySQL/flexibleServers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + }, + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/firewallRules/rule1", + "name": "rule1", + "type": "Microsoft.DBforMySQL/flexibleServers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + }, + "202": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleDelete.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleDelete.json new file mode 100644 index 000000000000..f9ec2b6c1529 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleDelete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "firewallRuleName": "rule1", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleGet.json new file mode 100644 index 000000000000..f6bf1248bbb4 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "firewallRuleName": "rule1", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/firewallRules/rule1", + "name": "rule1", + "type": "Microsoft.DBforMySQL/flexibleServers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRulesListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRulesListByServer.json new file mode 100644 index 000000000000..82127e1681ff --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRulesListByServer.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/firewallRules/rule1", + "name": "rule1", + "type": "Microsoft.DBforMySQL/flexibleServers/firewallRules", + "properties": { + "startIpAddress": "0.0.0.0", + "endIpAddress": "255.255.255.255" + } + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/testserver/firewallRules/rule2", + "name": "rule2", + "type": "Microsoft.DBforMySQL/flexibleServers/firewallRules", + "properties": { + "startIpAddress": "1.0.0.0", + "endIpAddress": "255.0.0.0" + } + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/FlexibleServers.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/FlexibleServers.json index 5b2b54d9edfc..e9d58eb403f3 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/FlexibleServers.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/FlexibleServers.json @@ -1166,10 +1166,10 @@ "properties": { "gtidSet": { "type": "string", - "description": "The gtid set of server." + "description": "The Gtid set of server." } }, - "description": "Server gtid set parameters." + "description": "Server Gtid set parameters." }, "Identity": { "x-ms-client-flatten": true, diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdate.json index 72b5fbecd3a7..af076956e98f 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdate.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2022-09-30-preview/examples/ServerUpdate.json @@ -11,6 +11,9 @@ "iops": 200, "autoGrow": "Disabled", "autoIoScaling": "Disabled" + }, + "network": { + "publicNetworkAccess": "Disabled" } } } @@ -44,7 +47,7 @@ "replicationRole": "None", "replicaCapacity": 10, "network": { - "publicNetworkAccess": "Enabled" + "publicNetworkAccess": "Disabled" }, "backup": { "backupRetentionDays": 7, diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/FlexibleServers.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/FlexibleServers.json new file mode 100644 index 000000000000..3fa260b3b979 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/FlexibleServers.json @@ -0,0 +1,1347 @@ +{ + "swagger": "2.0", + "info": { + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", + "version": "2023-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}": { + "put": { + "tags": [ + "Servers" + ], + "operationId": "Servers_Create", + "x-ms-examples": { + "Create a new server": { + "$ref": "./examples/ServerCreate.json" + }, + "Create a server as a point in time restore": { + "$ref": "./examples/ServerCreateWithPointInTimeRestore.json" + }, + "Create a replica server": { + "$ref": "./examples/ServerCreateReplica.json" + }, + "Create a server with byok": { + "$ref": "./examples/ServerCreateWithBYOK.json" + } + }, + "description": "Creates a new server or updates an existing server. The update action will overwrite the existing server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Server" + }, + "description": "The required parameters for creating or updating a server." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "Servers" + ], + "operationId": "Servers_Update", + "x-ms-examples": { + "Update a server": { + "$ref": "./examples/ServerUpdate.json" + }, + "Update server customer maintenance window": { + "$ref": "./examples/ServerUpdateWithCustomerMaintenanceWindow.json" + }, + "Update server with byok": { + "$ref": "./examples/ServerUpdateWithBYOK.json" + } + }, + "description": "Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServerForUpdate" + }, + "description": "The required parameters for updating a server." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "Servers" + ], + "operationId": "Servers_Delete", + "x-ms-examples": { + "Delete a server": { + "$ref": "./examples/ServerDelete.json" + } + }, + "description": "Deletes a server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "get": { + "tags": [ + "Servers" + ], + "operationId": "Servers_Get", + "x-ms-examples": { + "Get a server": { + "$ref": "./examples/ServerGet.json" + }, + "Get a server with vnet": { + "$ref": "./examples/ServerGetWithVnet.json" + } + }, + "description": "Gets information about a server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers": { + "get": { + "tags": [ + "Servers" + ], + "operationId": "Servers_ListByResourceGroup", + "x-ms-examples": { + "List servers in a resource group": { + "$ref": "./examples/ServersListByResourceGroup.json" + } + }, + "description": "List all the servers in a given resource group.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/flexibleServers": { + "get": { + "tags": [ + "Servers" + ], + "operationId": "Servers_List", + "x-ms-examples": { + "List servers in a subscription": { + "$ref": "./examples/ServersList.json" + } + }, + "description": "List all the servers in a given subscription.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/failover": { + "post": { + "tags": [ + "ServerFailover" + ], + "operationId": "Servers_Failover", + "x-ms-examples": { + "Restart a server": { + "$ref": "./examples/ServerFailover.json" + } + }, + "description": "Manual failover a server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/restart": { + "post": { + "tags": [ + "ServerRestart" + ], + "operationId": "Servers_Restart", + "x-ms-examples": { + "Restart a server": { + "$ref": "./examples/ServerRestart.json" + } + }, + "description": "Restarts a server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServerRestartParameter" + }, + "description": "The required parameters for restarting a server." + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/start": { + "post": { + "tags": [ + "ServerStart" + ], + "operationId": "Servers_Start", + "x-ms-examples": { + "Start a server": { + "$ref": "./examples/ServerStart.json" + } + }, + "description": "Starts a server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/stop": { + "post": { + "tags": [ + "ServerStop" + ], + "operationId": "Servers_Stop", + "x-ms-examples": { + "Stop a server": { + "$ref": "./examples/ServerStop.json" + } + }, + "description": "Stops a server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/resetGtid": { + "post": { + "tags": [ + "ServerResetGtid" + ], + "operationId": "Servers_ResetGtid", + "x-ms-examples": { + "Reset GTID on a server": { + "$ref": "./examples/ServerResetGtid.json" + } + }, + "description": "Resets GTID on a server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServerGtidSetParameter" + }, + "description": "The required parameters for resetting GTID on a server." + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/replicas": { + "get": { + "tags": [ + "Servers" + ], + "operationId": "Replicas_ListByServer", + "x-ms-examples": { + "List replicas for a server": { + "$ref": "./examples/ReplicasListByServer.json" + } + }, + "description": "List all the replicas for a given server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/cutoverMigration": { + "post": { + "tags": [ + "ServerMigration" + ], + "operationId": "ServersMigration_CutoverMigration", + "x-ms-examples": { + "Cutover migration for MySQL import": { + "$ref": "./examples/CutoverMigration.json" + } + }, + "description": "Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "description": "URL to retrieve the final result after operation completes.", + "type": "string" + }, + "Azure-AsyncOperation": { + "description": "URL to query for status of the operation.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + } + } + }, + "definitions": { + "ServerVersion": { + "type": "string", + "description": "The version of a server.", + "enum": [ + "5.7", + "8.0.21" + ], + "x-ms-enum": { + "name": "ServerVersion", + "modelAsString": true + } + }, + "EnableStatusEnum": { + "type": "string", + "description": "Enum to indicate whether value is 'Enabled' or 'Disabled'", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "EnableStatusEnum", + "modelAsString": true + } + }, + "ReplicationRole": { + "type": "string", + "enum": [ + "None", + "Source", + "Replica" + ], + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": true + }, + "description": "The replication role." + }, + "DataEncryption": { + "type": "object", + "description": "The date encryption for cmk.", + "properties": { + "primaryUserAssignedIdentityId": { + "type": "string", + "description": "Primary user identity resource id" + }, + "primaryKeyURI": { + "type": "string", + "description": "Primary key uri" + }, + "geoBackupUserAssignedIdentityId": { + "type": "string", + "description": "Geo backup user identity resource id as identity can't cross region, need identity in same region as geo backup" + }, + "geoBackupKeyURI": { + "type": "string", + "description": "Geo backup key uri as key vault can't cross region, need cmk in same region as geo backup" + }, + "type": { + "type": "string", + "description": "The key type, AzureKeyVault for enable cmk, SystemManaged for disable cmk.", + "enum": [ + "AzureKeyVault", + "SystemManaged" + ], + "x-ms-enum": { + "name": "DataEncryptionType", + "modelAsString": false + } + } + } + }, + "MaintenanceWindow": { + "type": "object", + "description": "Maintenance window of a server.", + "properties": { + "customWindow": { + "type": "string", + "description": "indicates whether custom window is enabled or disabled" + }, + "startHour": { + "type": "integer", + "format": "int32", + "description": "start hour for maintenance window" + }, + "startMinute": { + "type": "integer", + "format": "int32", + "description": "start minute for maintenance window" + }, + "dayOfWeek": { + "type": "integer", + "format": "int32", + "description": "day of week for maintenance window" + } + } + }, + "Backup": { + "type": "object", + "properties": { + "backupRetentionDays": { + "type": "integer", + "format": "int32", + "description": "Backup retention days for the server." + }, + "geoRedundantBackup": { + "$ref": "#/definitions/EnableStatusEnum", + "description": "Whether or not geo redundant backup is enabled.", + "default": "Disabled" + }, + "earliestRestoreDate": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Earliest restore point creation time (ISO8601 format)" + } + }, + "description": "Storage Profile properties of a server" + }, + "Storage": { + "type": "object", + "properties": { + "storageSizeGB": { + "type": "integer", + "format": "int32", + "description": "Max storage size allowed for a server." + }, + "iops": { + "type": "integer", + "format": "int32", + "description": "Storage IOPS for a server." + }, + "autoGrow": { + "description": "Enable Storage Auto Grow or not.", + "$ref": "#/definitions/EnableStatusEnum", + "default": "Disabled" + }, + "logOnDisk": { + "description": "Enable Log On Disk or not.", + "$ref": "#/definitions/EnableStatusEnum", + "default": "Disabled" + }, + "storageSku": { + "type": "string", + "readOnly": true, + "description": "The sku name of the server storage." + }, + "autoIoScaling": { + "description": "Enable IO Auto Scaling or not.", + "$ref": "#/definitions/EnableStatusEnum", + "default": "Disabled" + } + }, + "description": "Storage Profile properties of a server" + }, + "MySQLServerSku": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the sku, e.g. Standard_D32s_v3." + }, + "tier": { + "type": "string", + "description": "The tier of the particular SKU, e.g. GeneralPurpose.", + "enum": [ + "Burstable", + "GeneralPurpose", + "MemoryOptimized" + ], + "x-ms-enum": { + "name": "ServerSkuTier", + "modelAsString": true + } + } + }, + "required": [ + "name", + "tier" + ], + "description": "Billing information related properties of a server." + }, + "Network": { + "type": "object", + "properties": { + "publicNetworkAccess": { + "$ref": "#/definitions/EnableStatusEnum", + "description": "Whether or not public network access is allowed for this server. Value is 'Disabled' when server has VNet integration." + }, + "delegatedSubnetResourceId": { + "type": "string", + "description": "Delegated subnet resource id used to setup vnet for a server." + }, + "privateDnsZoneResourceId": { + "type": "string", + "description": "Private DNS zone resource id." + } + }, + "description": "Network related properties of a server" + }, + "HighAvailability": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "Disabled", + "ZoneRedundant", + "SameZone" + ], + "x-ms-enum": { + "name": "HighAvailabilityMode", + "modelAsString": true + }, + "description": "High availability mode for a server." + }, + "state": { + "type": "string", + "readOnly": true, + "description": "The state of server high availability.", + "enum": [ + "NotEnabled", + "CreatingStandby", + "Healthy", + "FailingOver", + "RemovingStandby" + ], + "x-ms-enum": { + "name": "HighAvailabilityState", + "modelAsString": true + } + }, + "standbyAvailabilityZone": { + "type": "string", + "description": "Availability zone of the standby server." + } + }, + "description": "Network related properties of a server" + }, + "ImportSourceProperties": { + "type": "object", + "properties": { + "storageType": { + "type": "string", + "enum": [ + "AzureBlob" + ], + "x-ms-enum": { + "name": "ImportSourceStorageType", + "modelAsString": true + }, + "description": "Storage type of import source.", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "storageUrl": { + "type": "string", + "description": "Uri of the import source storage.", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "sasToken": { + "type": "string", + "x-ms-secret": true, + "description": "Sas token for accessing source storage. Read and list permissions are required for sas token.", + "x-ms-mutability": [ + "create" + ] + }, + "dataDirPath": { + "type": "string", + "description": "Relative path of data directory in storage.", + "x-ms-mutability": [ + "create", + "read" + ] + } + }, + "description": "Import source related properties." + }, + "ServerProperties": { + "type": "object", + "properties": { + "administratorLogin": { + "type": "string", + "description": "The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "administratorLoginPassword": { + "type": "string", + "x-ms-secret": true, + "format": "password", + "description": "The password of the administrator login (required for server creation).", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "version": { + "$ref": "#/definitions/ServerVersion", + "description": "Server version." + }, + "availabilityZone": { + "type": "string", + "description": "availability Zone information of the server.", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "createMode": { + "type": "string", + "description": "The mode to create a new MySQL server.", + "enum": [ + "Default", + "PointInTimeRestore", + "Replica", + "GeoRestore" + ], + "x-ms-enum": { + "name": "CreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create" + ] + }, + "sourceServerResourceId": { + "type": "string", + "description": "The source MySQL server id.", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "restorePointInTime": { + "type": "string", + "format": "date-time", + "description": "Restore point creation time (ISO8601 format), specifying the time to restore from.", + "x-ms-mutability": [ + "create" + ] + }, + "replicationRole": { + "$ref": "#/definitions/ReplicationRole", + "description": "The replication role." + }, + "replicaCapacity": { + "type": "integer", + "format": "int32", + "minimum": 0, + "readOnly": true, + "description": "The maximum number of replicas that a primary server can have." + }, + "dataEncryption": { + "$ref": "#/definitions/DataEncryption", + "description": "The Data Encryption for CMK." + }, + "state": { + "type": "string", + "readOnly": true, + "description": "The state of a server.", + "enum": [ + "Ready", + "Dropping", + "Disabled", + "Starting", + "Stopping", + "Stopped", + "Updating" + ], + "x-ms-enum": { + "name": "ServerState", + "modelAsString": true + } + }, + "fullyQualifiedDomainName": { + "type": "string", + "description": "The fully qualified domain name of a server.", + "readOnly": true + }, + "storage": { + "$ref": "#/definitions/Storage", + "description": "Storage related properties of a server." + }, + "backup": { + "$ref": "#/definitions/Backup", + "description": "Backup related properties of a server." + }, + "highAvailability": { + "$ref": "#/definitions/HighAvailability", + "description": "High availability related properties of a server." + }, + "network": { + "$ref": "#/definitions/Network", + "description": "Network related properties of a server.", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "privateEndpointConnections": { + "type": "array", + "items": { + "$ref": "../../../../../../common-types/resource-management/v4/privatelinks.json#/definitions/PrivateEndpointConnection" + }, + "description": "PrivateEndpointConnections related properties of a server.", + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "maintenanceWindow": { + "$ref": "#/definitions/MaintenanceWindow", + "description": "Maintenance window of a server.", + "x-ms-mutability": [ + "update", + "read" + ] + }, + "importSourceProperties": { + "$ref": "#/definitions/ImportSourceProperties", + "description": "Source properties for import from storage." + } + }, + "description": "The properties of a server." + }, + "Server": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/definitions/MySQLServerIdentity", + "description": "The cmk identity for the server." + }, + "sku": { + "$ref": "#/definitions/MySQLServerSku", + "description": "The SKU (pricing tier) of the server." + }, + "properties": { + "$ref": "#/definitions/ServerProperties", + "x-ms-client-flatten": true, + "description": "Properties of the server." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + } + ], + "description": "Represents a server." + }, + "ServerPropertiesForUpdate": { + "type": "object", + "properties": { + "administratorLoginPassword": { + "type": "string", + "x-ms-secret": true, + "format": "password", + "description": "The password of the administrator login." + }, + "version": { + "$ref": "#/definitions/ServerVersion", + "description": "Server version." + }, + "storage": { + "$ref": "#/definitions/Storage", + "description": "Storage related properties of a server." + }, + "backup": { + "$ref": "#/definitions/Backup", + "description": "Backup related properties of a server." + }, + "highAvailability": { + "$ref": "#/definitions/HighAvailability", + "description": "High availability related properties of a server." + }, + "maintenanceWindow": { + "$ref": "#/definitions/MaintenanceWindow", + "description": "Maintenance window of a server." + }, + "replicationRole": { + "$ref": "#/definitions/ReplicationRole", + "description": "The replication role of the server." + }, + "dataEncryption": { + "$ref": "#/definitions/DataEncryption", + "description": "The Data Encryption for CMK." + }, + "network": { + "$ref": "#/definitions/Network", + "description": "Network related properties of a server" + } + }, + "description": "The properties that can be updated for a server." + }, + "ServerForUpdate": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/definitions/MySQLServerIdentity", + "description": "The cmk identity for the server." + }, + "sku": { + "$ref": "#/definitions/MySQLServerSku", + "description": "The SKU (pricing tier) of the server." + }, + "properties": { + "$ref": "#/definitions/ServerPropertiesForUpdate", + "x-ms-client-flatten": true, + "description": "The properties that can be updated for a server." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Application-specific metadata in the form of key-value pairs." + } + }, + "description": "Parameters allowed to update for a server." + }, + "ServerListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + }, + "description": "The list of servers" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of servers." + }, + "ServerRestartParameter": { + "type": "object", + "properties": { + "restartWithFailover": { + "$ref": "#/definitions/EnableStatusEnum", + "description": "Whether or not failover to standby server when restarting a server with high availability enabled." + }, + "maxFailoverSeconds": { + "type": "integer", + "format": "int32", + "description": "The maximum allowed failover time in seconds." + } + }, + "description": "Server restart parameters." + }, + "ServerGtidSetParameter": { + "type": "object", + "properties": { + "gtidSet": { + "type": "string", + "description": "The Gtid set of server." + } + }, + "description": "Server Gtid set parameters." + }, + "MySQLServerIdentity": { + "x-ms-client-flatten": true, + "type": "object", + "properties": { + "principalId": { + "type": "string", + "description": "ObjectId from the KeyVault", + "readOnly": true + }, + "tenantId": { + "type": "string", + "description": "TenantId from the KeyVault", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Type of managed service identity.", + "enum": [ + "UserAssigned" + ], + "x-ms-enum": { + "name": "ManagedServiceIdentityType", + "modelAsString": true + } + }, + "userAssignedIdentities": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "", + "items": { + "$ref": "#/definitions/UserAssignedIdentity" + } + }, + "description": "Metadata of user assigned identity." + } + }, + "description": "Properties to configure Identity for Bring your Own Keys" + }, + "UserAssignedIdentity": { + "type": "object", + "properties": { + "principalId": { + "description": "Principal Id of user assigned identity", + "type": "string", + "x-ms-client-name": "PrincipalId", + "readOnly": true + }, + "clientId": { + "description": "Client Id of user assigned identity", + "type": "string", + "x-ms-client-name": "ClientId", + "readOnly": true + } + }, + "description": "Metadata of user assigned identity." + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/CutoverMigration.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/CutoverMigration.json new file mode 100644 index 000000000000..abc10f61c9ee --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/CutoverMigration.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 30, + "iops": 200, + "autoGrow": "Disabled", + "storageSku": "Premium_LRS", + "autoIoScaling": "Disabled" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com", + "availabilityZone": "3", + "maintenanceWindow": { + "customWindow": "Enabled", + "dayOfWeek": 1, + "startHour": 1, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Disabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "name": "mysqltestserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ReplicasListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ReplicasListByServer.json new file mode 100644 index 000000000000..bafb49161d14 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ReplicasListByServer.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 20, + "iops": 360, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver-repl.orcabrci-seas1-a.mscds.com", + "sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "availabilityZone": "1", + "replicationRole": "Replica", + "replicaCapacity": 0, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-24T08:19:18.00+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver-repl", + "name": "mysqltestserver-repl", + "type": "Microsoft.DBforMySQL/flexibleServers" + }, + { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 20, + "iops": 360, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver-repl2.orcabrci-seas1-a.mscds.com", + "sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "availabilityZone": "1", + "replicationRole": "Replica", + "replicaCapacity": 0, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-23T08:19:18.00+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver-repl2", + "name": "mysqltestserver-repl", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreate.json new file mode 100644 index 000000000000..7e6f69551eb6 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreate.json @@ -0,0 +1,139 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "administratorLoginPassword": "your_password", + "availabilityZone": "1", + "version": "5.7", + "createMode": "Default", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Disabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled" + }, + "highAvailability": { + "mode": "ZoneRedundant", + "standbyAvailabilityZone": "3" + } + }, + "location": "southeastasia", + "tags": { + "num": "1" + } + } + }, + "responses": { + "201": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00" + }, + "highAvailability": { + "mode": "ZoneRedundant", + "state": "Healthy", + "standbyAvailabilityZone": "3" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "name": "mysqltestserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "200": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00" + }, + "highAvailability": { + "mode": "ZoneRedundant", + "state": "Healthy", + "standbyAvailabilityZone": "3" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "name": "mysqltestserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "202": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreateReplica.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreateReplica.json new file mode 100644 index 000000000000..d404aef782fd --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreateReplica.json @@ -0,0 +1,116 @@ +{ + "parameters": { + "serverName": "replica-server", + "resourceGroupName": "testgr", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "location": "SoutheastAsia", + "properties": { + "createMode": "Replica", + "sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server" + } + } + }, + "responses": { + "201": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 20, + "iops": 360, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "replica-server.database.mysql.azure.com", + "sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server", + "availabilityZone": "3", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "Replica", + "replicaCapacity": 0, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-24T08:19:18.5729164+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "ElasticServer": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/replica-server", + "name": "replica-server", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "200": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 20, + "iops": 360, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "replica-server.database.mysql.azure.com", + "sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server", + "availabilityZone": "3", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "Replica", + "replicaCapacity": 0, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-24T08:19:18.5729164+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "ElasticServer": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/replica-server", + "name": "replica-server", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "202": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreateWithBYOK.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreateWithBYOK.json new file mode 100644 index 000000000000..d256777a63fe --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreateWithBYOK.json @@ -0,0 +1,152 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {} + } + }, + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "administratorLoginPassword": "your_password", + "availabilityZone": "1", + "version": "5.7", + "createMode": "Default", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Disabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled" + }, + "highAvailability": { + "mode": "ZoneRedundant", + "standbyAvailabilityZone": "3" + }, + "dataEncryption": { + "type": "AzureKeyVault", + "primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity", + "primaryKeyURI": "https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a", + "geoBackupUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity", + "geoBackupKeyURI": "https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a" + } + }, + "location": "southeastasia", + "tags": { + "num": "1" + } + } + }, + "responses": { + "201": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00" + }, + "highAvailability": { + "mode": "ZoneRedundant", + "state": "Healthy", + "standbyAvailabilityZone": "3" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "name": "mysqltestserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "200": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00" + }, + "highAvailability": { + "mode": "ZoneRedundant", + "state": "Healthy", + "standbyAvailabilityZone": "3" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "name": "mysqltestserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "202": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreateWithPointInTimeRestore.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreateWithPointInTimeRestore.json new file mode 100644 index 000000000000..89491936bb5f --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerCreateWithPointInTimeRestore.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "serverName": "targetserver", + "resourceGroupName": "TargetResourceGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "location": "SoutheastAsia", + "properties": { + "restorePointInTime": "2021-06-24T00:00:37.467Z", + "createMode": "PointInTimeRestore", + "sourceServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/sourceserver" + }, + "sku": { + "name": "Standard_D14_v2", + "tier": "GeneralPurpose" + }, + "tags": { + "num": "1" + } + } + }, + "responses": { + "201": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "adminuser", + "storage": { + "storageSizeGB": 20, + "iops": 360, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "targetserver.database.mysql.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-24T00:15:24.00+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/targetserver", + "name": "targetserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "200": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "adminuser", + "storage": { + "storageSizeGB": 20, + "iops": 360, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "targetserver.database.mysql.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-24T00:15:24.00+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/targetserver", + "name": "targetserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "202": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerDelete.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerDelete.json new file mode 100644 index 000000000000..c5d6f2a992d9 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + }, + "204": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerFailover.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerFailover.json new file mode 100644 index 000000000000..bf9d12610f3e --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerFailover.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerGet.json new file mode 100644 index 000000000000..d60789394b3e --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerGet.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Enabled", + "autoIoScaling": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com", + "availabilityZone": "3", + "maintenanceWindow": { + "customWindow": "Enabled", + "dayOfWeek": 1, + "startHour": 1, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "name": "mysqltestserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerGetWithVnet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerGetWithVnet.json new file mode 100644 index 000000000000..eeb65d558ca1 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerGetWithVnet.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com", + "availabilityZone": "3", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Disabled", + "delegatedSubnetResourceId": "/subscriptions/2941a09d-7bcf-42fe-91ca-1765f521c829/resourceGroups/OrcabrCI-Vnet-Resource-Group/providers/Microsoft.Network/virtualNetworks/OrcabrCI-Vnet/subnets/mysql-subnet" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "name": "mysqltestserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerResetGtid.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerResetGtid.json new file mode 100644 index 000000000000..cd9c5a8f5bd0 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerResetGtid.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "gtidSet": "4aff5b51-97ba-11ed-a955-002248036acc:1-16" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerRestart.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerRestart.json new file mode 100644 index 000000000000..c666023b0f9b --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerRestart.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "restartWithFailover": "Enabled", + "maxFailoverSeconds": 60 + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerStart.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerStart.json new file mode 100644 index 000000000000..bf9d12610f3e --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerStart.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerStop.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerStop.json new file mode 100644 index 000000000000..bf9d12610f3e --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerStop.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerUpdate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerUpdate.json new file mode 100644 index 000000000000..c7ed598ba322 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerUpdate.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "properties": { + "storage": { + "storageSizeGB": 30, + "iops": 200, + "autoGrow": "Disabled", + "autoIoScaling": "Disabled" + }, + "network": { + "publicNetworkAccess": "Disabled" + } + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 30, + "iops": 200, + "autoGrow": "Disabled", + "storageSku": "Premium_LRS", + "autoIoScaling": "Disabled" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com", + "availabilityZone": "3", + "maintenanceWindow": { + "customWindow": "Enabled", + "dayOfWeek": 1, + "startHour": 1, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Disabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "name": "mysqltestserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerUpdateWithBYOK.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerUpdateWithBYOK.json new file mode 100644 index 000000000000..2a5fc990e512 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerUpdateWithBYOK.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity": {} + } + }, + "properties": { + "dataEncryption": { + "type": "AzureKeyVault", + "primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity", + "primaryKeyURI": "https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a", + "geoBackupUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity", + "geoBackupKeyURI": "https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a" + } + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00" + }, + "highAvailability": { + "mode": "ZoneRedundant", + "state": "Healthy", + "standbyAvailabilityZone": "3" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "name": "mysqltestserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json new file mode 100644 index 000000000000..1116657e7795 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "parameters": { + "properties": { + "maintenanceWindow": { + "customWindow": "Enabled", + "dayOfWeek": 1, + "startHour": 8, + "startMinute": 0 + } + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard_D2ds_v4", + "tier": "GeneralPurpose" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver.database.mysql.azure.com", + "availabilityZone": "3", + "maintenanceWindow": { + "customWindow": "Enabled", + "dayOfWeek": 1, + "startHour": 8, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T06:11:38.4150019+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver", + "name": "mysqltestserver", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-06-01-preview" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServersList.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServersList.json new file mode 100644 index 000000000000..b7345d2dae2e --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServersList.json @@ -0,0 +1,152 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "Standard_B1ms", + "tier": "Burstable" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 23, + "iops": 369, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver1.database.mysql.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T07:08:17.4259886+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver1", + "name": "mysqltestserver1", + "type": "Microsoft.DBforMySQL/flexibleServers" + }, + { + "sku": { + "name": "Standard_B1ms", + "tier": "Burstable" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 23, + "iops": 369, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver2.mysql.database.azure.com", + "availabilityZone": "2", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T07:08:17.4259886+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup2/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver2", + "name": "mysqltestserver2", + "type": "Microsoft.DBforMySQL/flexibleServers" + }, + { + "sku": { + "name": "Standard_E2ds_v4", + "tier": "MemoryOptimized" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver3.mysql.database.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-24T06:28:19.0611667+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup3/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver3", + "name": "mysqltestserver3", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServersListByResourceGroup.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServersListByResourceGroup.json new file mode 100644 index 000000000000..f6f4be6f9813 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-06-01-preview/examples/ServersListByResourceGroup.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "resourceGroupName": "TestGroup", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "Standard_B1ms", + "tier": "Burstable" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 23, + "iops": 369, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver1.database.mysql.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T07:08:17.4259886+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver1", + "name": "mysqltestserver1", + "type": "Microsoft.DBforMySQL/flexibleServers" + }, + { + "sku": { + "name": "Standard_B1ms", + "tier": "Burstable" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 23, + "iops": 369, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver2.mysql.database.azure.com", + "availabilityZone": "2", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-17T07:08:17.4259886+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver2", + "name": "mysqltestserver2", + "type": "Microsoft.DBforMySQL/flexibleServers" + }, + { + "sku": { + "name": "Standard_E2ds_v4", + "tier": "MemoryOptimized" + }, + "properties": { + "administratorLogin": "cloudsa", + "storage": { + "storageSizeGB": 100, + "iops": 600, + "autoGrow": "Enabled", + "storageSku": "Premium_LRS" + }, + "version": "5.7", + "state": "Ready", + "fullyQualifiedDomainName": "mysqltestserver3.mysql.database.azure.com", + "availabilityZone": "1", + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "None", + "replicaCapacity": 10, + "network": { + "publicNetworkAccess": "Enabled" + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-06-24T06:28:19.0611667+00:00" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + } + }, + "location": "Southeast Asia", + "tags": { + "num": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestserver3", + "name": "mysqltestserver3", + "type": "Microsoft.DBforMySQL/flexibleServers" + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-01-preview/LogFiles.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-01-preview/LogFiles.json new file mode 100644 index 000000000000..b6a90580dcfa --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-01-preview/LogFiles.json @@ -0,0 +1,147 @@ +{ + "swagger": "2.0", + "info": { + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", + "version": "2023-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/logFiles": { + "get": { + "tags": [ + "LogFiles" + ], + "operationId": "LogFiles_ListByServer", + "x-ms-examples": { + "List all server log files for a server": { + "$ref": "./examples/LogFilesListByServer.json" + } + }, + "description": "List all the server log files in a given server.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/LogFileListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "LogFileProperties": { + "type": "object", + "properties": { + "sizeInKB": { + "type": "integer", + "format": "int64", + "description": "The size in kb of the logFile." + }, + "createdTime": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp of the log file." + }, + "type": { + "type": "string", + "description": "Type of the log file." + }, + "lastModifiedTime": { + "type": "string", + "format": "date-time", + "description": "Last modified timestamp of the log file." + }, + "url": { + "type": "string", + "description": "The url to download the log file from." + } + }, + "description": "The properties of a logFile." + }, + "LogFile": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/LogFileProperties", + "x-ms-client-flatten": true, + "description": "The properties of a logFile." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a logFile." + }, + "LogFileListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/LogFile" + }, + "description": "The list of logFiles in a server" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A List of logFiles." + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-01-preview/examples/LogFilesListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-01-preview/examples/LogFilesListByServer.json new file mode 100644 index 000000000000..21168b95331f --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-01-preview/examples/LogFilesListByServer.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "serverName": "mysqltestsvc1", + "resourceGroupName": "testrg", + "api-version": "2023-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "sizeInKB": 1, + "createdTime": "0001-01-01T00:00:00+00:00", + "lastModifiedTime": "2018-03-01T06:09:20+00:00", + "type": "slowlog", + "url": "https://wasd2prodwus1afse42.file.core.windows.net/833c99b2f36c47349e5554b903fe0440/serverlogs/mysql-slow-mysqltestsvc1-2018022823.log?sv=2015-04-05&sr=f&sig=XXXXXXX&se=X&sp=r" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/flexibleServers/mysqltestsvc1/logFiles/mysql-slow-mysqltestsvc1-2018022823.log", + "name": "mysql-slow-mysqltestsvc1-2018022823.log", + "type": "Microsoft.DBforMySQL/flexibleServers/logFiles" + } + ] + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-06-01-preview/ServiceOperations.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-06-01-preview/ServiceOperations.json new file mode 100644 index 000000000000..1ad271012762 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-06-01-preview/ServiceOperations.json @@ -0,0 +1,924 @@ +{ + "swagger": "2.0", + "info": { + "title": "MySQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", + "version": "2023-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities": { + "get": { + "tags": [ + "LocationBasedCapabilities" + ], + "operationId": "LocationBasedCapabilities_List", + "x-ms-examples": { + "CapabilitiesList": { + "$ref": "./examples/CapabilitiesByLocationList.json" + } + }, + "description": "Get capabilities at specified location in a given subscription.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/LocationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CapabilitiesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilitySets": { + "get": { + "tags": [ + "LocationBasedCapability" + ], + "operationId": "LocationBasedCapabilitySet_List", + "x-ms-examples": { + "CapabilitySetsResult": { + "$ref": "./examples/CapabilitySetListByLocation.json" + } + }, + "description": "Get capabilities at specified location in a given subscription.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/LocationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CapabilitySetsList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilitySets/{capabilitySetName}": { + "get": { + "tags": [ + "LocationBasedCapability" + ], + "operationId": "LocationBasedCapabilitySet_Get", + "x-ms-examples": { + "CapabilityResult": { + "$ref": "./examples/CapabilitySetByLocation.json" + } + }, + "description": "Get capabilities at specified location in a given subscription.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common-types/v1/common-types.json#/parameters/LocationNameParameter" + }, + { + "name": "capabilitySetName", + "in": "path", + "required": true, + "description": "Name of capability set", + "type": "string", + "default": "default", + "pattern": "^[a-z0-9][-a-z0-9]*(?`. + +``` yaml $(tag) == 'package-flexibleserver-2023-06-01-preview' && $(python) +namespace: azure.mgmt.rdbms.mysql_flexibleservers +output-folder: $(python-sdks-folder)/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers +``` + ### Tag: package-flexibleserver-2022-09-30-preview and python These settings apply only when `--tag=package-flexibleserver-2022-09-30-preview --python` is specified on the command line. diff --git a/specification/mysql/resource-manager/readme.typescript.md b/specification/mysql/resource-manager/readme.typescript.md index ea1a9cdecd02..00af052d891b 100644 --- a/specification/mysql/resource-manager/readme.typescript.md +++ b/specification/mysql/resource-manager/readme.typescript.md @@ -9,12 +9,12 @@ typescript: generate-metadata: true ``` -### Tag: package-flexibleserver-2022-09-30-preview and TypeScript +### Tag: package-flexibleserver-2021-05-01 and TypeScript -These settings apply only when `--tag=package-flexibleserver-2022-09-30-preview --typescript` is specified on the command line. +These settings apply only when `--tag=package-flexibleserver-2021-05-01 --typescript` is specified on the command line. Please also specify `--typescript-sdks-folder=`. -``` yaml $(tag) == 'package-flexibleserver-2022-09-30-preview' && $(typescript) +``` yaml $(tag) == 'package-flexibleserver-2021-05-01' && $(typescript) title: MySQLManagementFlexibleServerClient package-name: "@azure/arm-mysql-flexible" output-folder: "$(typescript-sdks-folder)/sdk/mysql/arm-mysql-flexible/"