-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mysql replica APIs into spec #3216
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
109 changes: 109 additions & 0 deletions
109
...esource-manager/Microsoft.DBforMySQL/stable/2017-12-01/examples/ReplicasListByServer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"parameters": { | ||
"serverName": "testmaster", | ||
"resourceGroupName": "TestGroup", | ||
"api-version": "2017-12-01", | ||
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver", | ||
"name": "testserver", | ||
"type": "Microsoft.DBforMySQL/servers", | ||
"location": "northeurope", | ||
"tags": { | ||
"elasticServer": "1" | ||
}, | ||
"sku": { | ||
"name": "GP_Gen4_2", | ||
"tier": "GeneralPurpose", | ||
"family": "Gen4", | ||
"capacity": 2 | ||
}, | ||
"properties": { | ||
"storageProfile": { | ||
"storageMB": 256000, | ||
"backupRetentionDays": 35, | ||
"geoRedundantBackup": "Enabled" | ||
}, | ||
"administratorLogin": "cloudsa", | ||
"sslEnforcement":"Enabled", | ||
"userVisibleState": "Ready", | ||
"fullyQualifiedDomainName": "testserver.mysql.database.azure.com", | ||
"version": "5.6", | ||
"earliestRestoreDate": "2018-06-11T23:56:54.3+00:00", | ||
"replicationRole": "Replica", | ||
"masterServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testmaster", | ||
"replicaCapacity": 0 | ||
} | ||
}, | ||
{ | ||
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver1", | ||
"name": "testserver1", | ||
"type": "Microsoft.DBforMySQL/servers", | ||
"location": "northeurope", | ||
"tags": { | ||
"elasticServer": "1" | ||
}, | ||
"sku": { | ||
"name": "GP_Gen4_2", | ||
"tier": "GeneralPurpose", | ||
"family": "Gen4", | ||
"capacity": 2 | ||
}, | ||
"properties": { | ||
"storageProfile": { | ||
"storageMB": 256000, | ||
"backupRetentionDays": 35, | ||
"geoRedundantBackup": "Enabled" | ||
}, | ||
"administratorLogin": "cloudsa", | ||
"sslEnforcement":"Enabled", | ||
"userVisibleState": "Ready", | ||
"fullyQualifiedDomainName": "testserver1.mysql.database.azure.com", | ||
"version": "5.6", | ||
"earliestRestoreDate": "2018-06-11T23:56:54.3+00:00", | ||
"replicationRole": "Replica", | ||
"masterServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testmaster", | ||
"replicaCapacity": 0 | ||
} | ||
}, | ||
{ | ||
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testserver2", | ||
"name": "testserver2", | ||
"type": "Microsoft.DBforMySQL/servers", | ||
"location": "northeurope", | ||
"tags": { | ||
"elasticServer": "1" | ||
}, | ||
"sku": { | ||
"name": "GP_Gen4_2", | ||
"tier": "GeneralPurpose", | ||
"family": "Gen4", | ||
"capacity": 2 | ||
}, | ||
"properties": { | ||
"storageProfile": { | ||
"storageMB": 256000, | ||
"backupRetentionDays": 35, | ||
"geoRedundantBackup": "Enabled" | ||
}, | ||
"administratorLogin": "cloudsa", | ||
"sslEnforcement":"Enabled", | ||
"userVisibleState": "Ready", | ||
"fullyQualifiedDomainName": "testserver2.mysql.database.azure.com", | ||
"version": "5.6", | ||
"earliestRestoreDate": "2018-06-11T23:56:54.3+00:00", | ||
"replicationRole": "Replica", | ||
"masterServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMySQL/servers/testmaster", | ||
"replicaCapacity": 0 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
84 changes: 84 additions & 0 deletions
84
...urce-manager/Microsoft.DBforMySQL/stable/2017-12-01/examples/ServerCreateReplicaMode.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"parameters": { | ||
"serverName": "targetserver", | ||
"resourceGroupName": "TargetResourceGroup", | ||
"api-version": "2017-12-01", | ||
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", | ||
"parameters": { | ||
"location": "westus", | ||
"properties": { | ||
"createMode": "Replica", | ||
"sourceServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMySQL/servers/masterserver" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"body": { | ||
"sku": { | ||
"name": "GP_Gen4_2", | ||
"tier": "GeneralPurpose", | ||
"family": "Gen4", | ||
"capacity": 2 | ||
}, | ||
"properties": { | ||
"administratorLogin": "cloudsa", | ||
"storageProfile": { | ||
"storageMB": 128000, | ||
"backupRetentionDays": 14, | ||
"geoRedundantBackup": "Enabled" | ||
}, | ||
"version": "5.7", | ||
"sslEnforcement": "Enabled", | ||
"userVisibleState": "Ready", | ||
"fullyQualifiedDomainName": "targetserver.mysql.database.azure.com", | ||
"earliestRestoreDate": "2018-03-14T18:02:41.577+00:00", | ||
"replicationRole": "Replica", | ||
"masterServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMySQL/servers/masterserver", | ||
"replicaCapacity": 0 | ||
}, | ||
"location": "westus", | ||
"tags": { | ||
"ElasticServer": "1" | ||
}, | ||
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMySQL/servers/targetserver", | ||
"name": "targetserver", | ||
"type": "Microsoft.DBforMySQL/servers" | ||
} | ||
}, | ||
"200": { | ||
"body": { | ||
"sku": { | ||
"name": "GP_Gen4_2", | ||
"tier": "GeneralPurpose", | ||
"family": "Gen4", | ||
"capacity": 2 | ||
}, | ||
"properties": { | ||
"administratorLogin": "cloudsa", | ||
"storageProfile": { | ||
"storageMB": 128000, | ||
"backupRetentionDays": 14, | ||
"geoRedundantBackup": "Enabled" | ||
}, | ||
"version": "5.7", | ||
"sslEnforcement": "Enabled", | ||
"userVisibleState": "Ready", | ||
"fullyQualifiedDomainName": "targetserver.mysql.database.azure.com", | ||
"earliestRestoreDate": "2018-03-14T18:02:41.577+00:00", | ||
"replicationRole": "Replica", | ||
"masterServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMySQL/servers/masterserver", | ||
"replicaCapacity": 0 | ||
}, | ||
"location": "westus", | ||
"tags": { | ||
"ElasticServer": "1" | ||
}, | ||
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMySQL/servers/targetserver", | ||
"name": "targetserver", | ||
"type": "Microsoft.DBforMySQL/servers" | ||
} | ||
}, | ||
"202": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from the API it looks like replicas is a resource type and GET on this resource type is returning a resource of another type. Is there a way to expose this via the GET on /servers and using a filter query parameter to only show the replica servers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replica server is also a server, not a new resource type. Replica - Primary is a relation between two servers. This API is to get all replica servers that belongs to a specified (primary) server, not all replica servers in a resource group.