From 6319c1d9367929f23d8d4a9f6f7188042c12471e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 31 Aug 2021 03:50:37 +0000 Subject: [PATCH] CodeGen from PR 15289 in Azure/azure-rest-api-specs Add MySQL swagger files for GA stable version 2021-05-01 (#15289) * Copy the existing version 2021-05-01-preview into stable directory 2021-05-01 * Update api-version * Update readme * Fix go readme * Correct the api-version in examples * Remove server.identity as is was currently not supported * Update readme to support multi API * change the default package to single server in readme --- schemas/2017-12-01/Microsoft.DBforMySQL.json | 2 +- schemas/2021-05-01/Microsoft.DBforMySQL.json | 616 +++++++++++++++++++ schemas/common/autogeneratedResources.json | 9 + 3 files changed, 626 insertions(+), 1 deletion(-) create mode 100644 schemas/2021-05-01/Microsoft.DBforMySQL.json diff --git a/schemas/2017-12-01/Microsoft.DBforMySQL.json b/schemas/2017-12-01/Microsoft.DBforMySQL.json index 29b9ad11c7..f8c189e0cf 100644 --- a/schemas/2017-12-01/Microsoft.DBforMySQL.json +++ b/schemas/2017-12-01/Microsoft.DBforMySQL.json @@ -693,7 +693,7 @@ "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)." + "description": "The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). The login name is required when updating password." }, "administratorLoginPassword": { "type": "string", diff --git a/schemas/2021-05-01/Microsoft.DBforMySQL.json b/schemas/2021-05-01/Microsoft.DBforMySQL.json new file mode 100644 index 0000000000..9447555855 --- /dev/null +++ b/schemas/2021-05-01/Microsoft.DBforMySQL.json @@ -0,0 +1,616 @@ +{ + "id": "https://schema.management.azure.com/schemas/2021-05-01/Microsoft.DBforMySQL.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.DBforMySQL", + "description": "Microsoft DBforMySQL Resource Types", + "resourceDefinitions": { + "flexibleServers": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01" + ] + }, + "location": { + "type": "string", + "description": "The geo-location where the resource lives" + }, + "name": { + "type": "string", + "description": "The name of the server." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ServerProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a server." + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/flexibleServers_firewallRules_childResource" + }, + { + "$ref": "#/definitions/flexibleServers_databases_childResource" + } + ] + } + }, + "sku": { + "oneOf": [ + { + "$ref": "#/definitions/Sku" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Billing information related properties of a server." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource tags." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.DBforMySQL/flexibleServers" + ] + } + }, + "required": [ + "apiVersion", + "location", + "name", + "properties", + "type" + ], + "description": "Microsoft.DBforMySQL/flexibleServers" + }, + "flexibleServers_databases": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the database." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/DatabaseProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a database." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.DBforMySQL/flexibleServers/databases" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.DBforMySQL/flexibleServers/databases" + }, + "flexibleServers_firewallRules": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the server firewall rule." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/FirewallRuleProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a server firewall rule." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.DBforMySQL/flexibleServers/firewallRules" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.DBforMySQL/flexibleServers/firewallRules" + } + }, + "definitions": { + "Backup": { + "type": "object", + "properties": { + "backupRetentionDays": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Backup retention days for the server." + }, + "geoRedundantBackup": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Whether or not geo redundant backup is enabled." + } + }, + "description": "Storage Profile properties of a server" + }, + "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." + }, + "FirewallRuleProperties": { + "type": "object", + "properties": { + "endIpAddress": { + "oneOf": [ + { + "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])$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The end IP address of the server firewall rule. Must be IPv4 format." + }, + "startIpAddress": { + "oneOf": [ + { + "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])$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The start IP address of the server firewall rule. Must be IPv4 format." + } + }, + "required": [ + "endIpAddress", + "startIpAddress" + ], + "description": "The properties of a server firewall rule." + }, + "flexibleServers_databases_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the database." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/DatabaseProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a database." + }, + "type": { + "type": "string", + "enum": [ + "databases" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.DBforMySQL/flexibleServers/databases" + }, + "flexibleServers_firewallRules_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01" + ] + }, + "name": { + "type": "string", + "description": "The name of the server firewall rule." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/FirewallRuleProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a server firewall rule." + }, + "type": { + "type": "string", + "enum": [ + "firewallRules" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.DBforMySQL/flexibleServers/firewallRules" + }, + "HighAvailability": { + "type": "object", + "properties": { + "mode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Disabled", + "ZoneRedundant", + "SameZone" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "High availability mode for a server." + }, + "standbyAvailabilityZone": { + "type": "string", + "description": "Availability zone of the standby server." + } + }, + "description": "Network related properties of a server" + }, + "MaintenanceWindow": { + "type": "object", + "properties": { + "customWindow": { + "type": "string", + "description": "indicates whether custom window is enabled or disabled" + }, + "dayOfWeek": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "day of week for maintenance window" + }, + "startHour": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "start hour for maintenance window" + }, + "startMinute": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "start minute for maintenance window" + } + }, + "description": "Maintenance window of a server." + }, + "Network": { + "type": "object", + "properties": { + "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" + }, + "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)." + }, + "administratorLoginPassword": { + "type": "string", + "format": "password", + "description": "The password of the administrator login (required for server creation)." + }, + "availabilityZone": { + "type": "string", + "description": "availability Zone information of the server." + }, + "backup": { + "oneOf": [ + { + "$ref": "#/definitions/Backup" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Storage Profile properties of a server" + }, + "createMode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Default", + "PointInTimeRestore", + "Replica", + "GeoRestore" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The mode to create a new MySQL server." + }, + "highAvailability": { + "oneOf": [ + { + "$ref": "#/definitions/HighAvailability" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Network related properties of a server" + }, + "maintenanceWindow": { + "oneOf": [ + { + "$ref": "#/definitions/MaintenanceWindow" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Maintenance window of a server." + }, + "network": { + "oneOf": [ + { + "$ref": "#/definitions/Network" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Network related properties of a server" + }, + "replicationRole": { + "oneOf": [ + { + "type": "string", + "enum": [ + "None", + "Source", + "Replica" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The replication role." + }, + "restorePointInTime": { + "type": "string", + "format": "date-time", + "description": "Restore point creation time (ISO8601 format), specifying the time to restore from." + }, + "sourceServerResourceId": { + "type": "string", + "description": "The source MySQL server id." + }, + "storage": { + "oneOf": [ + { + "$ref": "#/definitions/Storage" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Storage Profile properties of a server" + }, + "version": { + "oneOf": [ + { + "type": "string", + "enum": [ + "5.7", + "8.0.21" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Server version." + } + }, + "description": "The properties of a server." + }, + "Sku": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the sku, e.g. Standard_D32s_v3." + }, + "tier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Burstable", + "GeneralPurpose", + "MemoryOptimized" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The tier of the particular SKU, e.g. GeneralPurpose." + } + }, + "required": [ + "name", + "tier" + ], + "description": "Billing information related properties of a server." + }, + "Storage": { + "type": "object", + "properties": { + "autoGrow": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Enable Storage Auto Grow or not." + }, + "iops": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Storage IOPS for a server." + }, + "storageSizeGB": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Max storage size allowed for a server." + } + }, + "description": "Storage Profile properties of a server" + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index 0566369d0f..e03d69433f 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -3721,6 +3721,15 @@ { "$ref": "https://schema.management.azure.com/schemas/2020-07-01-preview/Microsoft.DBforMySQL.json#/resourceDefinitions/flexibleServers_keys" }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-05-01/Microsoft.DBforMySQL.json#/resourceDefinitions/flexibleServers" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-05-01/Microsoft.DBforMySQL.json#/resourceDefinitions/flexibleServers_databases" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-05-01/Microsoft.DBforMySQL.json#/resourceDefinitions/flexibleServers_firewallRules" + }, { "$ref": "https://schema.management.azure.com/schemas/2021-05-01-preview/Microsoft.DBforMySQL.json#/resourceDefinitions/flexibleServers" },