diff --git a/specification/storage/Microsoft.BlobStorage/client.tsp b/specification/storage/Microsoft.BlobStorage/client.tsp index aa7e5932c3af..164d711c26cd 100644 --- a/specification/storage/Microsoft.BlobStorage/client.tsp +++ b/specification/storage/Microsoft.BlobStorage/client.tsp @@ -256,6 +256,12 @@ interface PageBlobClient extends Storage.Blob.PageBlob {} uint64, "rust" ); +// Range/source-range string parameters → HttpRange for Rust +@@alternateType(Blob.download::parameters.range, HttpRange, "rust"); +@@alternateType(RangeParameter.range, HttpRange, "rust"); +@@alternateType(RangeParameterRequired.range, HttpRange, "rust"); +@@alternateType(SourceRangeParameter.sourceRange, HttpRange, "rust"); +@@alternateType(SourceRangeParameterRequired.sourceRange, HttpRange, "rust"); @@scope(Storage.Blob.Container.submitBatch, "!rust"); @@scope(Storage.Blob.Service.submitBatch, "!rust"); @@ -935,3 +941,12 @@ op setAccessPolicyRequiredContainerAcl is StorageOperationNoBody< setAccessPolicyRequiredContainerAcl, "rust" ); + +/** An HTTP byte range, e.g. "bytes=0-1023". */ +@alternateType( + { + identity: "crate::models::HttpRange", + }, + "rust" +) +scalar HttpRange extends string; diff --git a/specification/storage/Microsoft.BlobStorage/models.tsp b/specification/storage/Microsoft.BlobStorage/models.tsp index 32e9582480ba..9291492c1560 100644 --- a/specification/storage/Microsoft.BlobStorage/models.tsp +++ b/specification/storage/Microsoft.BlobStorage/models.tsp @@ -1790,6 +1790,13 @@ alias SourceRangeParameter = { sourceRange?: string; }; +/** The required source range parameter. */ +alias SourceRangeParameterRequired = { + /** Bytes of source data in the specified range. */ + @header("x-ms-source-range") + sourceRange: string; +}; + /** The source URL parameter. */ alias SourceUrlParameter = { /** Specify a URL to the copy source. */ @@ -2486,6 +2493,13 @@ alias RangeParameter = { range?: string; }; +/** The required range parameter. */ +alias RangeParameterRequired = { + /** Bytes of data in the specified range. */ + @header("Range") + range: string; +}; + /** The version ID parameter. */ alias VersionIdParameter = { /** The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer. */ diff --git a/specification/storage/Microsoft.BlobStorage/routes.tsp b/specification/storage/Microsoft.BlobStorage/routes.tsp index e434a7649863..770bfac9ad22 100644 --- a/specification/storage/Microsoft.BlobStorage/routes.tsp +++ b/specification/storage/Microsoft.BlobStorage/routes.tsp @@ -701,7 +701,10 @@ interface Blob { ...EncryptionKeySha256Parameter, ...EncryptionAlgorithmParameter, ...IfTagsParameter, - ...ConditionalRequestHeaders, + ...IfModifiedSinceParameter, + ...IfUnmodifiedSinceParameter, + ...IfNoneMatchParameter, + ...IfMatchParameter, ): (BodyParameter & { /** The media type of the body of the response. */ @header("Content-Type") @@ -1544,11 +1547,7 @@ interface PageBlob { ...ContentMd5Parameter; ...ContentCrc64Parameter; ...TimeoutParameter; - - /** Bytes of data in the specified range. */ - @header("Range") - range: string; - + ...RangeParameterRequired; ...LeaseIdOptionalParameter; ...EncryptionKeyParameter; ...EncryptionKeySha256Parameter; @@ -1595,11 +1594,7 @@ interface PageBlob { contentLength: 0; ...TimeoutParameter; - - /** Bytes of data in the specified range. */ - @header("Range") - range: string; - + ...RangeParameterRequired; ...LeaseIdOptionalParameter; ...EncryptionKeyParameter; ...EncryptionKeySha256Parameter; @@ -1635,20 +1630,12 @@ interface PageBlob { uploadPagesFromUrl is StorageOperationNoBody< { ...SourceUrlParameter; - - /** Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header. */ - @header("x-ms-source-range") - sourceRange: string; - + ...SourceRangeParameterRequired; ...SourceContentMd5Parameter; ...SourceContentCrc64Parameter; ...ContentLengthParameter; ...TimeoutParameter; - - /** Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header. */ - @header("Range") - range: string; - + ...RangeParameterRequired; ...EncryptionKeyParameter; ...EncryptionKeySha256Parameter; ...EncryptionAlgorithmParameter; diff --git a/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-11-05/generated_blob.json b/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-11-05/generated_blob.json index de81177507f8..99404fc4ea74 100644 --- a/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-11-05/generated_blob.json +++ b/specification/storage/data-plane/Microsoft.BlobStorage/stable/2025-11-05/generated_blob.json @@ -189,16 +189,38 @@ "x-ms-client-name": "ifTags" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifMatch" + "name": "If-Modified-Since", + "in": "header", + "description": "A date-time value. A request is made under the condition that the resource has been modified since the specified date-time.", + "required": false, + "type": "string", + "format": "date-time-rfc7231", + "x-ms-client-name": "ifModifiedSince" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifNoneMatch" + "name": "If-Unmodified-Since", + "in": "header", + "description": "A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time.", + "required": false, + "type": "string", + "format": "date-time-rfc7231", + "x-ms-client-name": "ifUnmodifiedSince" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince" + "name": "If-None-Match", + "in": "header", + "description": "A condition that must be met in order for the request to be processed.", + "required": false, + "type": "string", + "x-ms-client-name": "ifNoneMatch" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifModifiedSince" + "name": "If-Match", + "in": "header", + "description": "A condition that must be met in order for the request to be processed.", + "required": false, + "type": "string", + "x-ms-client-name": "ifMatch" } ], "responses": { @@ -7465,7 +7487,7 @@ { "name": "x-ms-source-range", "in": "header", - "description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.", + "description": "Bytes of source data in the specified range.", "required": true, "type": "string", "x-ms-client-name": "sourceRange" @@ -7509,7 +7531,7 @@ { "name": "Range", "in": "header", - "description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.", + "description": "Bytes of data in the specified range.", "required": true, "type": "string", "x-ms-client-name": "range" @@ -17951,44 +17973,5 @@ "format": "byte" } }, - "parameters": { - "Azure.Core.ConditionalRequestHeaders.ifMatch": { - "name": "If-Match", - "in": "header", - "description": "The request should only proceed if an entity matches this string.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifMatch" - }, - "Azure.Core.ConditionalRequestHeaders.ifModifiedSince": { - "name": "If-Modified-Since", - "in": "header", - "description": "The request should only proceed if the entity was modified after this time.", - "required": false, - "type": "string", - "format": "date-time", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifModifiedSince" - }, - "Azure.Core.ConditionalRequestHeaders.ifNoneMatch": { - "name": "If-None-Match", - "in": "header", - "description": "The request should only proceed if no entity matches this string.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifNoneMatch" - }, - "Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince": { - "name": "If-Unmodified-Since", - "in": "header", - "description": "The request should only proceed if the entity was not modified after this time.", - "required": false, - "type": "string", - "format": "date-time", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifUnmodifiedSince" - } - } + "parameters": {} } diff --git a/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-02-06/generated_blob.json b/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-02-06/generated_blob.json index c5e3f7d5ca7c..ddf381db7011 100644 --- a/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-02-06/generated_blob.json +++ b/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-02-06/generated_blob.json @@ -189,16 +189,38 @@ "x-ms-client-name": "ifTags" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifMatch" + "name": "If-Modified-Since", + "in": "header", + "description": "A date-time value. A request is made under the condition that the resource has been modified since the specified date-time.", + "required": false, + "type": "string", + "format": "date-time-rfc7231", + "x-ms-client-name": "ifModifiedSince" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifNoneMatch" + "name": "If-Unmodified-Since", + "in": "header", + "description": "A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time.", + "required": false, + "type": "string", + "format": "date-time-rfc7231", + "x-ms-client-name": "ifUnmodifiedSince" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince" + "name": "If-None-Match", + "in": "header", + "description": "A condition that must be met in order for the request to be processed.", + "required": false, + "type": "string", + "x-ms-client-name": "ifNoneMatch" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifModifiedSince" + "name": "If-Match", + "in": "header", + "description": "A condition that must be met in order for the request to be processed.", + "required": false, + "type": "string", + "x-ms-client-name": "ifMatch" } ], "responses": { @@ -7465,7 +7487,7 @@ { "name": "x-ms-source-range", "in": "header", - "description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.", + "description": "Bytes of source data in the specified range.", "required": true, "type": "string", "x-ms-client-name": "sourceRange" @@ -7509,7 +7531,7 @@ { "name": "Range", "in": "header", - "description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.", + "description": "Bytes of data in the specified range.", "required": true, "type": "string", "x-ms-client-name": "range" @@ -18033,44 +18055,5 @@ "format": "byte" } }, - "parameters": { - "Azure.Core.ConditionalRequestHeaders.ifMatch": { - "name": "If-Match", - "in": "header", - "description": "The request should only proceed if an entity matches this string.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifMatch" - }, - "Azure.Core.ConditionalRequestHeaders.ifModifiedSince": { - "name": "If-Modified-Since", - "in": "header", - "description": "The request should only proceed if the entity was modified after this time.", - "required": false, - "type": "string", - "format": "date-time", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifModifiedSince" - }, - "Azure.Core.ConditionalRequestHeaders.ifNoneMatch": { - "name": "If-None-Match", - "in": "header", - "description": "The request should only proceed if no entity matches this string.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifNoneMatch" - }, - "Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince": { - "name": "If-Unmodified-Since", - "in": "header", - "description": "The request should only proceed if the entity was not modified after this time.", - "required": false, - "type": "string", - "format": "date-time", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifUnmodifiedSince" - } - } + "parameters": {} } diff --git a/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-04-06/generated_blob.json b/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-04-06/generated_blob.json index ae12d99bc555..b88af805b9b7 100644 --- a/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-04-06/generated_blob.json +++ b/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-04-06/generated_blob.json @@ -189,16 +189,38 @@ "x-ms-client-name": "ifTags" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifMatch" + "name": "If-Modified-Since", + "in": "header", + "description": "A date-time value. A request is made under the condition that the resource has been modified since the specified date-time.", + "required": false, + "type": "string", + "format": "date-time-rfc7231", + "x-ms-client-name": "ifModifiedSince" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifNoneMatch" + "name": "If-Unmodified-Since", + "in": "header", + "description": "A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time.", + "required": false, + "type": "string", + "format": "date-time-rfc7231", + "x-ms-client-name": "ifUnmodifiedSince" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince" + "name": "If-None-Match", + "in": "header", + "description": "A condition that must be met in order for the request to be processed.", + "required": false, + "type": "string", + "x-ms-client-name": "ifNoneMatch" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifModifiedSince" + "name": "If-Match", + "in": "header", + "description": "A condition that must be met in order for the request to be processed.", + "required": false, + "type": "string", + "x-ms-client-name": "ifMatch" } ], "responses": { @@ -7559,7 +7581,7 @@ { "name": "x-ms-source-range", "in": "header", - "description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.", + "description": "Bytes of source data in the specified range.", "required": true, "type": "string", "x-ms-client-name": "sourceRange" @@ -7603,7 +7625,7 @@ { "name": "Range", "in": "header", - "description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.", + "description": "Bytes of data in the specified range.", "required": true, "type": "string", "x-ms-client-name": "range" @@ -18273,44 +18295,5 @@ "format": "byte" } }, - "parameters": { - "Azure.Core.ConditionalRequestHeaders.ifMatch": { - "name": "If-Match", - "in": "header", - "description": "The request should only proceed if an entity matches this string.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifMatch" - }, - "Azure.Core.ConditionalRequestHeaders.ifModifiedSince": { - "name": "If-Modified-Since", - "in": "header", - "description": "The request should only proceed if the entity was modified after this time.", - "required": false, - "type": "string", - "format": "date-time", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifModifiedSince" - }, - "Azure.Core.ConditionalRequestHeaders.ifNoneMatch": { - "name": "If-None-Match", - "in": "header", - "description": "The request should only proceed if no entity matches this string.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifNoneMatch" - }, - "Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince": { - "name": "If-Unmodified-Since", - "in": "header", - "description": "The request should only proceed if the entity was not modified after this time.", - "required": false, - "type": "string", - "format": "date-time", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifUnmodifiedSince" - } - } + "parameters": {} } diff --git a/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-06-06/generated_blob.json b/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-06-06/generated_blob.json index 8ae3dfae1dbf..934e5cd5f577 100644 --- a/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-06-06/generated_blob.json +++ b/specification/storage/data-plane/Microsoft.BlobStorage/stable/2026-06-06/generated_blob.json @@ -189,16 +189,38 @@ "x-ms-client-name": "ifTags" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifMatch" + "name": "If-Modified-Since", + "in": "header", + "description": "A date-time value. A request is made under the condition that the resource has been modified since the specified date-time.", + "required": false, + "type": "string", + "format": "date-time-rfc7231", + "x-ms-client-name": "ifModifiedSince" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifNoneMatch" + "name": "If-Unmodified-Since", + "in": "header", + "description": "A date-time value. A request is made under the condition that the resource has not been modified since the specified date-time.", + "required": false, + "type": "string", + "format": "date-time-rfc7231", + "x-ms-client-name": "ifUnmodifiedSince" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince" + "name": "If-None-Match", + "in": "header", + "description": "A condition that must be met in order for the request to be processed.", + "required": false, + "type": "string", + "x-ms-client-name": "ifNoneMatch" }, { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifModifiedSince" + "name": "If-Match", + "in": "header", + "description": "A condition that must be met in order for the request to be processed.", + "required": false, + "type": "string", + "x-ms-client-name": "ifMatch" } ], "responses": { @@ -7581,7 +7603,7 @@ { "name": "x-ms-source-range", "in": "header", - "description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.", + "description": "Bytes of source data in the specified range.", "required": true, "type": "string", "x-ms-client-name": "sourceRange" @@ -7625,7 +7647,7 @@ { "name": "Range", "in": "header", - "description": "Bytes of source data in the specified range. The length of this range should match the ContentLength header and x-ms-range/Range destination range header.", + "description": "Bytes of data in the specified range.", "required": true, "type": "string", "x-ms-client-name": "range" @@ -18336,44 +18358,5 @@ "format": "byte" } }, - "parameters": { - "Azure.Core.ConditionalRequestHeaders.ifMatch": { - "name": "If-Match", - "in": "header", - "description": "The request should only proceed if an entity matches this string.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifMatch" - }, - "Azure.Core.ConditionalRequestHeaders.ifModifiedSince": { - "name": "If-Modified-Since", - "in": "header", - "description": "The request should only proceed if the entity was modified after this time.", - "required": false, - "type": "string", - "format": "date-time", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifModifiedSince" - }, - "Azure.Core.ConditionalRequestHeaders.ifNoneMatch": { - "name": "If-None-Match", - "in": "header", - "description": "The request should only proceed if no entity matches this string.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifNoneMatch" - }, - "Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince": { - "name": "If-Unmodified-Since", - "in": "header", - "description": "The request should only proceed if the entity was not modified after this time.", - "required": false, - "type": "string", - "format": "date-time", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifUnmodifiedSince" - } - } + "parameters": {} }