Skip to content
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

[SRP] Expose lease container in Apr19 API. #5733

Merged
merged 2 commits into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,17 @@
"api-version": "2018-03-01-preview",
"monitor": "true",
"parameters": {
"properties": {
"Action": 0,
"LeaseId": null,
"BreakPeriod": null,
"LeaseDuration": -1,
"ProposedLeaseId": null
}
"action": "Acquire",
"leaseId": null,
"breakPeriod": null,
"leaseDuration": -1,
"proposedLeaseId": null
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185",
"name": "container6185",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"properties": {
"LeaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d"
}
"leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,17 @@
"api-version": "2018-03-01-preview",
"monitor": "true",
"parameters": {
"properties": {
"Action": 4,
"LeaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d",
"BreakPeriod": null,
"LeaseDuration": null,
"ProposedLeaseId": null
}
"action": "Break",
"leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d",
"breakPeriod": null,
"leaseDuration": null,
"proposedLeaseId": null
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185",
"name": "container6185",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"properties": {
"LeaseTimeSeconds": "0"
}
"leaseTimeSeconds": "0"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,17 @@
"api-version": "2018-07-01",
"monitor": "true",
"parameters": {
"properties": {
"Action": 0,
"LeaseId": null,
"BreakPeriod": null,
"LeaseDuration": -1,
"ProposedLeaseId": null
}
"action": "Acquire",
"leaseId": null,
"breakPeriod": null,
"leaseDuration": -1,
"proposedLeaseId": null
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185",
"name": "container6185",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"properties": {
"LeaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d"
}
"leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,20 @@
"resourceGroupName": "res3376",
"accountName": "sto328",
"containerName": "container6185",
"api-version": "2018-03-01-preview",
"api-version": "2018-07-01",
"monitor": "true",
"parameters": {
"properties": {
"Action": 4,
"LeaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d",
"BreakPeriod": null,
"LeaseDuration": null,
"ProposedLeaseId": null
}
"action": "Break",
"leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d",
"breakPeriod": null,
"leaseDuration": null,
"proposedLeaseId": null
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185",
"name": "container6185",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"properties": {
"LeaseTimeSeconds": "0"
}
"leaseTimeSeconds": "0"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,17 @@
"api-version": "2018-11-01",
"monitor": "true",
"parameters": {
"properties": {
"Action": 0,
"LeaseId": null,
"BreakPeriod": null,
"LeaseDuration": -1,
"ProposedLeaseId": null
}
"action": "Acquire",
"leaseId": null,
"breakPeriod": null,
"leaseDuration": -1,
"proposedLeaseId": null
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185",
"name": "container6185",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"properties": {
"LeaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d"
}
"leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,20 @@
"resourceGroupName": "res3376",
"accountName": "sto328",
"containerName": "container6185",
"api-version": "2018-03-01-preview",
"api-version": "2018-11-01",
"monitor": "true",
"parameters": {
"properties": {
"Action": 4,
"LeaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d",
"BreakPeriod": null,
"LeaseDuration": null,
"ProposedLeaseId": null
}
"action": "Break",
"leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d",
"breakPeriod": null,
"leaseDuration": null,
"proposedLeaseId": null
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185",
"name": "container6185",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"properties": {
"LeaseTimeSeconds": "0"
}
"leaseTimeSeconds": "0"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,56 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease": {
"post": {
"tags": [
"BlobContainers"
],
"operationId": "BlobContainers_Lease",
"x-ms-examples": {
"Acquire a lease on a container": {
"$ref": "./examples/BlobContainersLease_Acquire.json"
},
"Break a lease on a container": {
"$ref": "./examples/BlobContainersLease_Break.json"
}
},
"description": "The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.",
"parameters": [
{
"$ref": "./storage.json#/parameters/ResourceGroupName"
},
{
"$ref": "./storage.json#/parameters/StorageAccountName"
},
{
"$ref": "#/parameters/ContainerName"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"name": "parameters",
"in": "body",
"schema": {
"$ref": "#/definitions/LeaseContainerRequest"
},
"description": "Lease Container request body."
}
],
"responses": {
"200": {
"description": "OK -- Lease Container operation completed successfully.",
"schema": {
"$ref": "#/definitions/LeaseContainerResponse"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -1114,6 +1164,54 @@
"allowedHeaders"
],
"description": "Specifies a CORS rule for the Blob service."
},
"LeaseContainerRequest": {
"properties": {
"action": {
"type": "string",
"enum": [
"Acquire",
"Renew",
"Change",
"Release",
"Break"
],
"description": "Specifies the lease action. Can be one of the available actions."
},
"leaseId": {
"type": "string",
"description": "Identifies the lease. Can be specified in any valid GUID string format."
},
"breakPeriod": {
"type": "integer",
"description": "Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60."
},
"leaseDuration": {
"type": "integer",
"description": "Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires."
},
"proposedLeaseId": {
"type": "string",
"description": "Optional for acquire, required for change. Proposed lease ID, in a GUID string format."
}
},
"required": [
"action"
],
"description": "Lease Container request schema."
},
"LeaseContainerResponse": {
"properties": {
"leaseId": {
"type": "string",
"description": "Returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease."
},
"leaseTimeSeconds": {
"type": "string",
"description": "Approximate time remaining in the lease period, in seconds."
}
},
"description": "Lease Container response schema."
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res3376",
"accountName": "sto328",
"containerName": "container6185",
"api-version": "2019-04-01",
"monitor": "true",
"parameters": {
"action": "Acquire",
"leaseId": null,
"breakPeriod": null,
"leaseDuration": -1,
"proposedLeaseId": null
}
},
"responses": {
"200": {
"body": {
"leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res3376",
"accountName": "sto328",
"containerName": "container6185",
"api-version": "2019-04-01",
"monitor": "true",
"parameters": {
"action": "Break",
"leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d",
"breakPeriod": null,
"leaseDuration": null,
"proposedLeaseId": null
}
},
"responses": {
"200": {
"body": {
"leaseTimeSeconds": "0"
}
}
}
}