Skip to content

Commit

Permalink
Add mysql and postgresql swagger specs (#1338)
Browse files Browse the repository at this point in the history
* Add mysql and postgresql swagger specs

* Address comment: define global params for duplicate parameter names
  • Loading branch information
Suna-MS authored and balajikris committed Jul 7, 2017
1 parent dc56101 commit 485ded7
Show file tree
Hide file tree
Showing 40 changed files with 5,859 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"configurationName": "event_scheduler",
"serverName": "testserver",
"resourceGroupName": "TestGroup",
"api-version": "2017-04-30-preview",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"parameters": {
"properties":{
"value": "ON",
"source": "user-override"
}
}
},
"responses": {
"200": {
"body": {
"properties": {
"value": "ON",
"description": "Indicates the status of the Event Scheduler.",
"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": {}
}
}
26 changes: 26 additions & 0 deletions arm-mysql/2017-04-30-preview/examples/ConfigurationGet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"configurationName": "event_scheduler",
"serverName": "testserver",
"resourceGroupName": "TestGroup",
"api-version": "2017-04-30-preview",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
},
"responses": {
"200": {
"body": {
"properties": {
"value": "OFF",
"description": "Indicates the status of the Event Scheduler.",
"defaultValue": "OFF",
"dataType": "Enumeration",
"allowedValues": "ON,OFF,DISABLED",
"source": "system-default"
},
"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"
}
}
}
}
276 changes: 276 additions & 0 deletions arm-mysql/2017-04-30-preview/examples/ConfigurationListByServer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
{
"parameters": {
"serverName": "testserver",
"resourceGroupName": "TestGroup",
"api-version": "2017-04-30-preview",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"value": "OFF",
"description": "Indicates the status of the Event Scheduler.",
"defaultValue": "OFF",
"dataType": "Enumeration",
"allowedValues": "ON,OFF,DISABLED",
"source": "system-default"
},
"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"
},
{
"properties": {
"value": "4",
"description": "Number of digits by which to increase the scale of the result of division operations.",
"defaultValue": "4",
"dataType": "Integer",
"allowedValues": "0-30",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/div_precision_increment",
"name": "div_precision_increment",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "1024",
"description": "Maximum allowed result length in bytes for the GROUP_CONCAT().",
"defaultValue": "1024",
"dataType": "Integer",
"allowedValues": "4-16777216",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/group_concat_max_len",
"name": "group_concat_max_len",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "ON",
"description": "Whether innodb adaptive hash indexes are enabled or disabled.",
"defaultValue": "ON",
"dataType": "Enumeration",
"allowedValues": "ON,OFF",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/innodb_adaptive_hash_index",
"name": "innodb_adaptive_hash_index",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "50",
"description": "The length of time in seconds an InnoDB transaction waits for a row lock before giving up.",
"defaultValue": "50",
"dataType": "Integer",
"allowedValues": "1-3600",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/innodb_lock_wait_timeout",
"name": "innodb_lock_wait_timeout",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "1800",
"description": "Number of seconds the server waits for activity on an interactive connection before closing it.",
"defaultValue": "1800",
"dataType": "Integer",
"allowedValues": "10-1800",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/interactive_timeout",
"name": "interactive_timeout",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "OFF",
"description": "Logs queries that are expected to retrieve all rows to slow query log.",
"defaultValue": "OFF",
"dataType": "Enumeration",
"allowedValues": "ON,OFF",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/log_queries_not_using_indexes",
"name": "log_queries_not_using_indexes",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "0",
"description": "Limits the number of such queries per minute that can be written to the slow query log.",
"defaultValue": "0",
"dataType": "Integer",
"allowedValues": "0-4294967295",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/log_throttle_queries_not_using_indexes",
"name": "log_throttle_queries_not_using_indexes",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "OFF",
"description": "Include slow administrative statements in the statements written to the slow query log.",
"defaultValue": "OFF",
"dataType": "Enumeration",
"allowedValues": "ON,OFF",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/log_slow_admin_statements",
"name": "log_slow_admin_statements",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "OFF",
"description": "This variable applies when binary logging is enabled. It controls whether stored function creators can be trusted not to create stored functions that will cause unsafe events to be written to the binary log.",
"defaultValue": "OFF",
"dataType": "Enumeration",
"allowedValues": "ON,OFF,FALSE",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/log_bin_trust_function_creators",
"name": "log_bin_trust_function_creators",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "10",
"description": "If a query takes longer than this many seconds, the server increments the Slow_queries status variable.",
"defaultValue": "10",
"dataType": "Numeric",
"allowedValues": "1-1E+100",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/long_query_time",
"name": "long_query_time",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "0",
"description": "Can be used to cause queries which examine fewer than the stated number of rows not to be logged.",
"defaultValue": "0",
"dataType": "Integer",
"allowedValues": "0-18446744073709551615",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/min_examined_row_limit",
"name": "min_examined_row_limit",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "OFF",
"description": "Enable or disable the slow query log",
"defaultValue": "OFF",
"dataType": "Enumeration",
"allowedValues": "ON,OFF",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/slow_query_log",
"name": "slow_query_log",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "",
"description": "The current server SQL mode.",
"defaultValue": "",
"dataType": "Set",
"allowedValues": ",ALLOW_INVALID_DATES,ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE,IGNORE_SPACE,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION,NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_UNSIGNED_SUBTRACTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY,PAD_CHAR_TO_FULL_LENGTH,PIPES_AS_CONCAT,REAL_AS_FLOAT,STRICT_ALL_TABLES,STRICT_TRANS_TABLES",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/sql_mode",
"name": "sql_mode",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "120",
"description": "The number of seconds the server waits for activity on a noninteractive connection before closing it.",
"defaultValue": "120",
"dataType": "Integer",
"allowedValues": "60-240",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/wait_timeout",
"name": "wait_timeout",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "1129667931",
"description": "The server ID, used in replication to give each master and slave a unique identity.",
"defaultValue": "1000",
"dataType": "Integer",
"allowedValues": "1000-4294967295",
"source": "user-override"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/server_id",
"name": "server_id",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "536870912",
"description": "The maximum size of one packet or any generated/intermediate string, or any parameter sent by the mysql_stmt_send_long_data() C API function.",
"defaultValue": "536870912",
"dataType": "Integer",
"allowedValues": "1024-1073741824",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/max_allowed_packet",
"name": "max_allowed_packet",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "60",
"description": "The number of seconds to wait for more data from the master before the slave considers the connection broken, aborts the read, and tries to reconnect.",
"defaultValue": "60",
"dataType": "Integer",
"allowedValues": "30-3600",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/slave_net_timeout",
"name": "slave_net_timeout",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "SYSTEM",
"description": "The server time zone",
"defaultValue": "SYSTEM",
"dataType": "String",
"allowedValues": "[+|-][0]{0,1}[0-9]:[0-5][0-9]|[+|-][1][0-2]:[0-5][0-9]|SYSTEM",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/time_zone",
"name": "time_zone",
"type": "Microsoft.DBforMySQL/servers/configurations"
},
{
"properties": {
"value": "latin1",
"description": "Use charset_name as the default server character set.",
"defaultValue": "latin1",
"dataType": "Enumeration",
"allowedValues": "BIG5,DEC8,CP850,HP8,KOI8R,LATIN1,LATIN2,SWE7,ASCII,UJIS,SJIS,HEBREW,TIS620,EUCKR,KOI8U,GB2312,GREEK,CP1250,GBK,LATIN5,ARMSCII8,UTF8,UCS2,CP866,KEYBCS2,MACCE,MACROMAN,CP852,LATIN7,UTF8MB4,CP1251,UTF16,CP1256,CP1257,UTF32,BINARY,GEOSTD8,CP932,EUCJPMS",
"source": "system-default"
},
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/configurations/character_set_server",
"name": "character_set_server",
"type": "Microsoft.DBforMySQL/servers/configurations"
}
]
}
}
}
}
40 changes: 40 additions & 0 deletions arm-mysql/2017-04-30-preview/examples/DatabaseCreate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"parameters": {
"databaseName": "db1",
"serverName": "testserver",
"resourceGroupName": "TestGroup",
"api-version": "2017-04-30-preview",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"parameters": {
"properties":{
"charset":"utf8",
"collation":"utf8_general_ci"
}
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/databases/db1",
"name": "db1",
"type": "Microsoft.DBforMySQL/servers/databases",
"properties": {
"charset": "utf8",
"collation": "utf8_general_ci"
}
}
},
"200": {
"body": {
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver/databases/db1",
"name": "db1",
"type": "Microsoft.DBforMySQL/servers/databases",
"properties": {
"charset": "utf8",
"collation": "utf8_general_ci"
}
}
},
"202": {}
}
}
14 changes: 14 additions & 0 deletions arm-mysql/2017-04-30-preview/examples/DatabaseDelete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters": {
"databaseName": "db1",
"serverName": "testserver",
"resourceGroupName": "TestGroup",
"api-version": "2017-04-30-preview",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}

0 comments on commit 485ded7

Please sign in to comment.