Skip to content

Commit

Permalink
Add resource group based LTR API (Azure#6571)
Browse files Browse the repository at this point in the history
* Fix set LTR policy example

* Add resource group based LTR APIs

* fix examples
  • Loading branch information
pixia authored and celikcigdem committed Jul 17, 2019
1 parent 0bc947b commit 26134e3
Show file tree
Hide file tree
Showing 7 changed files with 523 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
},
"responses": {
"200": {},
"202": {
"body": ""
}
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testResourceGroup",
"locationName": "japaneast",
"longTermRetentionServerName": "testserver",
"longTermRetentionDatabaseName": "testDatabase",
"backupName": "55555555-6666-7777-8888-999999999999;131637960820000000",
"api-version": "2017-03-01-preview"
},
"responses": {
"200": {},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testResourceGroup",
"locationName": "japaneast",
"longTermRetentionServerName": "testserver",
"longTermRetentionDatabaseName": "testDatabase",
"backupName": "55555555-6666-7777-8888-999999999999;131637960820000000",
"api-version": "2017-03-01"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/2017-03-10T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2017-09-06T08:00:00.000Z",
"name": "2017-03-10T08:00:00.000Z;55555555-6666-7777-8888-999999999999;131637960820000000",
"type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups",
"properties" : {
"serverName": "testserver",
"serverCreateTime": "2017-03-10T08:00:00.000Z",
"databaseName": "testDatabase",
"databaseDeletionTime": null,
"backupTime": "2017-09-06T08:00:00.000Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testResourceGroup",
"locationName": "japaneast",
"longTermRetentionServerName": "testserver",
"longTermRetentionDatabaseName": "testDatabase",
"api-version": "2017-03-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000",
"name": "55555555-6666-7777-8888-999999999999;131637960820000000",
"type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups",
"properties": {
"serverName": "testserver",
"serverCreateTime": "2017-03-10T08:00:00.000Z",
"databaseName": "testDatabase",
"databaseDeletionTime": null,
"backupTime": "2017-08-23T08:00:00.000Z"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131657960820000000",
"name": "55555555-6666-7777-8888-999999999999;131657960820000000",
"type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups",
"properties": {
"serverName": "testserver",
"serverCreateTime": "2017-03-10T08:00:00.000Z",
"databaseName": "testDatabase",
"databaseDeletionTime": null,
"backupTime": "2017-08-30T08:00:00.000Z"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131677960820000000",
"name": "55555555-6666-7777-8888-999999999999;131677960820000000",
"type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups",
"properties": {
"serverName": "testserver",
"serverCreateTime": "2017-03-10T08:00:00.000Z",
"databaseName": "testDatabase",
"databaseDeletionTime": "2017-09-07T08:00:00.000Z",
"backupTime": "2017-09-06T08:00:00.000Z"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testResourceGroup",
"locationName": "japaneast",
"api-version": "2017-03-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000",
"name": "55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z",
"type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups",
"properties": {
"serverName": "testserver1",
"serverCreateTime": "2017-03-10T08:00:00.000Z",
"databaseName": "testDatabase1",
"databaseDeletionTime": null,
"backupTime": "2017-08-23T08:00:00.000Z"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver2/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000",
"name": "12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z",
"type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups",
"properties": {
"serverName": "testserver2",
"serverCreateTime": "2017-04-10T08:00:00.000Z",
"databaseName": "testDatabase2",
"databaseDeletionTime": null,
"backupTime": "2017-08-30T08:00:00.000Z"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver3/longTermRetentionDatabases/testDatabase3/longTermRetentionBackups/43214321-4321-4321-4321-321321321321;131677960820000000",
"name": "43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z",
"type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups",
"properties": {
"serverName": "testserver3",
"serverCreateTime": "2017-05-10T08:00:00.000Z",
"databaseName": "testDatabase3",
"databaseDeletionTime": null,
"backupTime": "2017-09-06T08:00:00.000Z"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "testResourceGroup",
"locationName": "japaneast",
"longTermRetentionServerName": "testserver",
"api-version": "2017-03-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000",
"name": "55555555-6666-7777-8888-999999999999;131637960820000000",
"type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups",
"properties": {
"serverName": "testserver",
"serverCreateTime": "2017-03-10T08:00:00.000Z",
"databaseName": "testDatabase1",
"databaseDeletionTime": null,
"backupTime": "2017-08-23T08:00:00.000Z"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000",
"name": "12341234-1234-1234-1234-123123123123;131657960820000000",
"type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups",
"properties": {
"serverName": "testserver",
"serverCreateTime": "2017-03-10T08:00:00.000Z",
"databaseName": "testDatabase2",
"databaseDeletionTime": null,
"backupTime": "2017-08-30T08:00:00.000Z"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase3/longTermRetentionBackups/43214321-4321-4321-4321-321321321321;131677960820000000",
"name": "43214321-4321-4321-4321-321321321321;131667960820000000",
"type": "Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups",
"properties": {
"serverName": "testserver",
"serverCreateTime": "2017-03-10T08:00:00.000Z",
"databaseName": "testDatabase3",
"databaseDeletionTime": null,
"backupTime": "2017-09-06T08:00:00.000Z"
}
}
]
}
}
}
}
Loading

0 comments on commit 26134e3

Please sign in to comment.