diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/AzureADAdministrator.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/AzureADAdministrator.json new file mode 100644 index 000000000000..a7c22b46126b --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/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-30" + }, + "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/stable/2023-06-30/examples/AzureADAdministratorCreate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/examples/AzureADAdministratorCreate.json new file mode 100644 index 000000000000..7b0a4edcf4f7 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/examples/AzureADAdministratorCreate.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "ActiveDirectory", + "api-version": "2023-06-30", + "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/stable/2023-06-30/examples/AzureADAdministratorDelete.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/examples/AzureADAdministratorDelete.json new file mode 100644 index 000000000000..1e9272b494f6 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/examples/AzureADAdministratorDelete.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "ActiveDirectory", + "api-version": "2023-06-30" + }, + "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-30", + "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-30" + } + }, + "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-30", + "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-30" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/examples/AzureADAdministratorGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/examples/AzureADAdministratorGet.json new file mode 100644 index 000000000000..7eca439bf703 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/examples/AzureADAdministratorGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "administratorName": "ActiveDirectory", + "api-version": "2023-06-30" + }, + "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/stable/2023-06-30/examples/AzureADAdministratorsListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/examples/AzureADAdministratorsListByServer.json new file mode 100644 index 000000000000..df5a6649019b --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-06-30/examples/AzureADAdministratorsListByServer.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "serverName": "mysqltestsvc4", + "api-version": "2023-06-30" + }, + "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/stable/2023-06-30/BackupAndExport.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/BackupAndExport.json new file mode 100644 index 000000000000..4ed9ee06f290 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/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-30" + }, + "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/stable/2023-06-30/Backups.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/Backups.json new file mode 100644 index 000000000000..3be00ba19384 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/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-30" + }, + "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/stable/2023-06-30/examples/BackupAndExport.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/BackupAndExport.json new file mode 100644 index 000000000000..0cf0c6919cd2 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/BackupAndExport.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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-30", + "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-30" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/BackupGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/BackupGet.json new file mode 100644 index 000000000000..07469650789f --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/BackupGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "backupName": "daily_20210615T160516", + "serverName": "mysqltestserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-30", + "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/stable/2023-06-30/examples/BackupPut.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/BackupPut.json new file mode 100644 index 000000000000..aa85d4920a6f --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/BackupPut.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "backupName": "mybackup", + "serverName": "mysqltestserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-30", + "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/stable/2023-06-30/examples/BackupsListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/BackupsListByServer.json new file mode 100644 index 000000000000..80c97697d6a5 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/BackupsListByServer.json @@ -0,0 +1,126 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-30", + "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/stable/2023-06-30/examples/ValidateBackup.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/ValidateBackup.json new file mode 100644 index 000000000000..497b80bf91db --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-06-30/examples/ValidateBackup.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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/stable/2023-06-30/Configurations.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/Configurations.json new file mode 100644 index 000000000000..a863bec5ccea --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/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-30" + }, + "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/stable/2023-06-30/examples/ConfigurationCreateOrUpdate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationCreateOrUpdate.json new file mode 100644 index 000000000000..0a56eb243fbc --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationCreateOrUpdate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "configurationName": "event_scheduler", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-30", + "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/stable/2023-06-30/examples/ConfigurationGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationGet.json new file mode 100644 index 000000000000..0bc049dd1630 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationGet.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "configurationName": "event_scheduler", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-30", + "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/stable/2023-06-30/examples/ConfigurationUpdate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationUpdate.json new file mode 100644 index 000000000000..13fd29c1dab0 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationUpdate.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "serverName": "testserver", + "configurationName": "event_scheduler", + "resourceGroupName": "testrg", + "api-version": "2023-06-30", + "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-30", + "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-30" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationsBatchUpdate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationsBatchUpdate.json new file mode 100644 index 000000000000..1ad766439f74 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationsBatchUpdate.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-30", + "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-30", + "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-30" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationsListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationsListByServer.json new file mode 100644 index 000000000000..577749986b69 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-06-30/examples/ConfigurationsListByServer.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "serverName": "mysqltestserver", + "resourceGroupName": "testrg", + "api-version": "2023-06-30", + "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/stable/2023-06-30/Databases.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/Databases.json new file mode 100644 index 000000000000..b14a77a882f9 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/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-30" + }, + "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/stable/2023-06-30/examples/DatabaseCreate.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/examples/DatabaseCreate.json new file mode 100644 index 000000000000..0e5364e22059 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/examples/DatabaseCreate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "databaseName": "db1", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-30", + "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/stable/2023-06-30/examples/DatabaseDelete.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/examples/DatabaseDelete.json new file mode 100644 index 000000000000..afc479490bd4 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/examples/DatabaseDelete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "databaseName": "db1", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-30", + "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-30", + "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-30" + } + }, + "204": {} + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/examples/DatabaseGet.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/examples/DatabaseGet.json new file mode 100644 index 000000000000..430866c2e784 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/examples/DatabaseGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "databaseName": "db1", + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-30", + "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/stable/2023-06-30/examples/DatabasesListByServer.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/examples/DatabasesListByServer.json new file mode 100644 index 000000000000..dd4f40f59e9a --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-06-30/examples/DatabasesListByServer.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "serverName": "testserver", + "resourceGroupName": "TestGroup", + "api-version": "2023-06-30", + "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/stable/2023-06-30/FirewallRules.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-06-30/FirewallRules.json new file mode 100644 index 000000000000..59ad433704d6 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-06-30/FirewallRules.json @@ -0,0 +1,306 @@ +{ + "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-30" + }, + "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", + "pattern": "^[a-zA-Z0-9][-_a-zA-Z0-9]{0,79}(?