From 86ca8723012c733606294fea4100fb64525aafca Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Sun, 12 Apr 2020 15:54:17 -0700 Subject: [PATCH 1/3] Added Set Expiry --- .../preview/2019-12-12/blob.json | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json b/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json index 64bad3db4ebe..cadb47ae37b8 100644 --- a/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json +++ b/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json @@ -3700,6 +3700,12 @@ "type": "integer", "format": "int64", "description": "The number of tags associated with the blob" + }, + "x-ms-expiry-time": { + "x-ms-client-name": "ExpiryTime", + "type": "string", + "format": "date-time-rfc1123", + "description": "The time this blob will expire." } } }, @@ -4775,6 +4781,82 @@ } ] }, + "/{containerName}/{blob}?comp=expiry": { + "put": { + "tags": [ + "blob" + ], + "operationId": "Blob_SetExpiry", + "description": "Sets the time a blob will expire and be deleted.", + "parameters": [ + { + "$ref": "#/parameters/Timeout" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ClientRequestId" + }, + { + "$ref": "#/parameters/BlobExpiryOptions" + }, + { + "$ref": "#/parameters/BlobExpiryTime" + } + ], + "responses": { + "200": { + "description": "The blob expiry was set successfully.", + "headers": { + "x-ms-client-request-id": { + "x-ms-client-name": "ClientRequestId", + "type": "string", + "description": "If a client request id header is sent in the request, this header will be present in the response with the same value." + }, + "x-ms-request-id": { + "x-ms-client-name": "RequestId", + "type": "string", + "description": "This header uniquely identifies the request that was made and can be used for troubleshooting the request." + }, + "x-ms-version": { + "x-ms-client-name": "Version", + "type": "string", + "description": "Indicates the version of the Blob service used to execute the request. This header is returned for requests made against version 2009-09-19 and above." + }, + "Date": { + "type": "string", + "format": "date-time-rfc1123", + "description": "UTC date/time value generated by the service that indicates the time at which the response was initiated." + } + } + }, + "default": { + "description": "Failure", + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/StorageError" + } + } + } + }, + "parameters": [ + { + "name": "comp", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "expiry" + ] + } + ] + }, "/{containerName}/{blob}?comp=properties&SetHTTPHeaders": { "put": { "tags": [ @@ -9297,6 +9379,10 @@ "AccessTierChangeTime": { "type": "string", "format": "date-time-rfc1123" + }, + "Expiry-Time": { + "type": "string", + "format": "date-time-rfc1123" } } }, @@ -10661,6 +10747,35 @@ }, "description": "Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request." }, + "BlobExpiryOptions": { + "name": "x-ms-expiry-option", + "x-ms-client-name": "ExpiryOptions", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "NeverExpire", + "RelativeToCreation", + "RelativeToNow", + "Absolute" + ], + "x-ms-enum": { + "name": "BlobExpiryOptions", + "modelAsString": true + }, + "x-ms-parameter-location": "method", + "description": "Required. Indicates mode of the expiry time" + }, + "BlobExpiryTime": { + "name": "x-ms-expiry-time", + "x-ms-client-name": "ExpiryTime", + "in": "header", + "required": false, + "type": "string", + "format": "date-time-rfc1123", + "x-ms-parameter-location": "method", + "description": "The time to set the blob to expiry" + }, "BlobSequenceNumber": { "name": "x-ms-blob-sequence-number", "x-ms-client-name": "blobSequenceNumber", From 9674d33b38787e6aafae24b06c33c588d6cb9b92 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Wed, 15 Apr 2020 09:23:37 -0700 Subject: [PATCH 2/3] Finished Set Expiry --- .../Microsoft.BlobStorage/preview/2019-12-12/blob.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json b/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json index cadb47ae37b8..1b931765498f 100644 --- a/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json +++ b/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json @@ -3702,7 +3702,7 @@ "description": "The number of tags associated with the blob" }, "x-ms-expiry-time": { - "x-ms-client-name": "ExpiryTime", + "x-ms-client-name": "ExpiresOn", "type": "string", "format": "date-time-rfc1123", "description": "The time this blob will expire." @@ -9381,6 +9381,7 @@ "format": "date-time-rfc1123" }, "Expiry-Time": { + "x-ms-client-name": "ExpiresOn", "type": "string", "format": "date-time-rfc1123" } @@ -10768,11 +10769,10 @@ }, "BlobExpiryTime": { "name": "x-ms-expiry-time", - "x-ms-client-name": "ExpiryTime", + "x-ms-client-name": "ExpiresOn", "in": "header", "required": false, "type": "string", - "format": "date-time-rfc1123", "x-ms-parameter-location": "method", "description": "The time to set the blob to expiry" }, From 5695fc068bb49bd144281fc7ba4880be5791e2ec Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Wed, 15 Apr 2020 09:34:53 -0700 Subject: [PATCH 3/3] minor update --- .../Microsoft.BlobStorage/preview/2019-12-12/blob.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json b/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json index d9560abb302d..16d408c4d96a 100644 --- a/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json +++ b/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json @@ -4824,6 +4824,16 @@ "200": { "description": "The blob expiry was set successfully.", "headers": { + "ETag": { + "type": "string", + "format": "etag", + "description": "The ETag contains a value that you can use to perform operations conditionally. If the request version is 2011-08-18 or newer, the ETag value will be in quotes." + }, + "Last-Modified": { + "type": "string", + "format": "date-time-rfc1123", + "description": "Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob." + }, "x-ms-client-request-id": { "x-ms-client-name": "ClientRequestId", "type": "string",