diff --git a/sdk/storage/storage-queue/review/storage-queue-browser.api.diff.md b/sdk/storage/storage-queue/review/storage-queue-browser.api.diff.md index 07d6c65adea8..01ae0659e20e 100644 --- a/sdk/storage/storage-queue/review/storage-queue-browser.api.diff.md +++ b/sdk/storage/storage-queue/review/storage-queue-browser.api.diff.md @@ -182,7 +182,7 @@ For the complete API surface, see the corresponding -node.api.md file. generateSasStringToSign(expiresOn?: Date, permissions?: AccountSASPermissions, resourceTypes?: string, options?: ServiceGenerateAccountSasUrlOptions): string; getProperties(options?: ServiceGetPropertiesOptions): Promise; getQueueClient(queueName: string): QueueClient; -@@ -611,15 +532,8 @@ +@@ -612,15 +533,8 @@ // @public export type ReceivedMessageItem = DequeuedMessageItem; @@ -198,7 +198,7 @@ For the complete API surface, see the corresponding -node.api.md file. export interface ResponseLike { _response: HttpResponse; } -@@ -654,31 +568,8 @@ +@@ -655,31 +569,8 @@ start: string; } @@ -230,7 +230,7 @@ For the complete API surface, see the corresponding -node.api.md file. httpClient?: RequestPolicy; requestPolicyFactories?: RequestPolicyFactory[] | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]); } -@@ -777,11 +668,8 @@ +@@ -797,11 +688,8 @@ export { StorageBrowserPolicyFactory } @@ -242,7 +242,7 @@ For the complete API surface, see the corresponding -node.api.md file. audience?: string; httpClient?: RequestPolicy; keepAliveOptions?: KeepAliveOptions; -@@ -789,27 +677,10 @@ +@@ -809,25 +697,10 @@ retryOptions?: StorageRetryOptions; userAgentOptions?: UserAgentPolicyOptions; } @@ -264,6 +264,15 @@ For the complete API surface, see the corresponding -node.api.md file. - -export { StorageSharedKeyCredentialPolicy } - + // @public + export interface UserDelegationKey { + signedExpiresOn: Date; + signedObjectId: string; +@@ -848,10 +721,8 @@ + signedVersion: string; + value: string; + } + -export { WebResource } - // @public diff --git a/sdk/storage/storage-queue/review/storage-queue-node.api.md b/sdk/storage/storage-queue/review/storage-queue-node.api.md index c31562654c0f..86d9029e63a8 100644 --- a/sdk/storage/storage-queue/review/storage-queue-node.api.md +++ b/sdk/storage/storage-queue/review/storage-queue-node.api.md @@ -550,6 +550,7 @@ export class QueueServiceClient extends StorageClient { getProperties(options?: ServiceGetPropertiesOptions): Promise; getQueueClient(queueName: string): QueueClient; getStatistics(options?: ServiceGetStatisticsOptions): Promise; + getUserDelegationKey(startsOn: Date, expiresOn: Date, options?: ServiceGetUserDelegationKeyOptions): Promise; listQueues(options?: ServiceListQueuesOptions): PagedAsyncIterableIterator; setProperties(properties: QueueServiceProperties, options?: ServiceGetPropertiesOptions): Promise; } @@ -724,6 +725,25 @@ export interface ServiceGetStatisticsOptions extends CommonOptions { // @public export type ServiceGetStatisticsResponse = WithResponse; +// @public +export interface ServiceGetUserDelegationKeyHeaders { + clientRequestId?: string; + date?: Date; + requestId?: string; + version?: string; +} + +// @public +export interface ServiceGetUserDelegationKeyOptions extends CommonOptions { + abortSignal?: AbortSignalLike; +} + +// @public +export type ServiceGetUserDelegationKeyResponse = WithResponse; + +// @public +export type ServiceGetUserDelegationKeyResponseModel = ServiceGetUserDelegationKeyHeaders & UserDelegationKeyModel; + // @public export interface ServiceListQueuesOptions extends CommonOptions { abortSignal?: AbortSignalLike; @@ -807,6 +827,28 @@ export { StorageSharedKeyCredential } export { StorageSharedKeyCredentialPolicy } +// @public +export interface UserDelegationKey { + signedExpiresOn: Date; + signedObjectId: string; + signedService: string; + signedStartsOn: Date; + signedTenantId: string; + signedVersion: string; + value: string; +} + +// @public +export interface UserDelegationKeyModel { + signedExpiry: Date; + signedOid: string; + signedService: string; + signedStart: Date; + signedTid: string; + signedVersion: string; + value: string; +} + export { WebResource } // @public diff --git a/sdk/storage/storage-queue/src/QueueClient.ts b/sdk/storage/storage-queue/src/QueueClient.ts index bc775faf04d1..89c124893f62 100644 --- a/sdk/storage/storage-queue/src/QueueClient.ts +++ b/sdk/storage/storage-queue/src/QueueClient.ts @@ -29,6 +29,7 @@ import type { MessagesClearHeaders, MessageIdDeleteHeaders, MessageIdUpdateHeaders, + UserDelegationKey, } from "./generatedModels.js"; import type { AbortSignalLike } from "@azure/abort-controller"; import type { Messages, MessageId, Queue } from "./generated/src/operationsInterfaces/index.js"; @@ -1262,4 +1263,58 @@ export class QueueClient extends StorageClient { this.credential, ).stringToSign; } + + /** + * + * Generates a Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the user delegation key credential input. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - user delegation key used to sign the SAS URI + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + public generateUserDelegationSasUrl( + options: QueueGenerateSasUrlOptions, + userDelegationKey: UserDelegationKey, + ): string { + + const sas = generateQueueSASQueryParameters( + { + shareName: this.name, + ...options, + }, + userDelegationKey, + this.accountName + ).toString(); + + return appendToURLQuery(this.url, sas); + } + + /** + * + * Generates a Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the user delegation key credential input. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - user delegation key used to sign the SAS URI + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + public generateUserDelegationStringToSign( + options: ShareGenerateSasUrlOptions, + userDelegationKey: UserDelegationKey, + ): string { + + return generateFileSASQueryParametersInternal( + { + shareName: this.name, + ...options, + }, + userDelegationKey, + this.accountName + ).stringToSign; + } } diff --git a/sdk/storage/storage-queue/src/QueueSASSignatureValues.ts b/sdk/storage/storage-queue/src/QueueSASSignatureValues.ts index d7b91d2dd5c1..8c9e55848f1e 100644 --- a/sdk/storage/storage-queue/src/QueueSASSignatureValues.ts +++ b/sdk/storage/storage-queue/src/QueueSASSignatureValues.ts @@ -2,13 +2,14 @@ // Licensed under the MIT License. import { QueueSASPermissions } from "./QueueSASPermissions.js"; -import type { StorageSharedKeyCredential } from "@azure/storage-common"; +import { StorageSharedKeyCredential } from "@azure/storage-common"; import type { SasIPRange } from "./SasIPRange.js"; import { ipRangeToString } from "./SasIPRange.js"; import type { SASProtocol } from "./SASQueryParameters.js"; import { SASQueryParameters } from "./SASQueryParameters.js"; import { SERVICE_VERSION } from "./utils/constants.js"; import { truncatedISO8061Date } from "./utils/utils.common.js"; +import { UserDelegationKey } from "./generatedModels.js"; /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -77,9 +78,21 @@ export interface QueueSASSignatureValues { * @param queueSASSignatureValues - * @param sharedKeyCredential - */ +export function generateQueueSASQueryParameters( + queueSASSignatureValues: QueueSASSignatureValues, + userDelegationKey: UserDelegationKey, + accountName: string, +): SASQueryParameters; + export function generateQueueSASQueryParameters( queueSASSignatureValues: QueueSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential, +): SASQueryParameters; + +export function generateQueueSASQueryParameters( + queueSASSignatureValues: QueueSASSignatureValues, + sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey, + accountName?: string, ): SASQueryParameters { return generateQueueSASQueryParametersInternal(queueSASSignatureValues, sharedKeyCredential) .sasQueryParameters; @@ -87,8 +100,25 @@ export function generateQueueSASQueryParameters( export function generateQueueSASQueryParametersInternal( queueSASSignatureValues: QueueSASSignatureValues, - sharedKeyCredential: StorageSharedKeyCredential, + sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey, + accountName?: string, ): { sasQueryParameters: SASQueryParameters; stringToSign: string } { + + const version = queueSASSignatureValues.version ? queueSASSignatureValues.version : SERVICE_VERSION; + + const sharedKeyCredential = + sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential + ? sharedKeyCredentialOrUserDelegationKey + : undefined; + let userDelegationKeyCredential: UserDelegationKeyCredential | undefined; + + if (sharedKeyCredential === undefined && accountName !== undefined) { + userDelegationKeyCredential = new UserDelegationKeyCredential( + accountName, + sharedKeyCredentialOrUserDelegationKey as UserDelegationKey, + ); + } + if ( !queueSASSignatureValues.identifier && !(queueSASSignatureValues.permissions && queueSASSignatureValues.expiresOn) diff --git a/sdk/storage/storage-queue/src/QueueServiceClient.ts b/sdk/storage/storage-queue/src/QueueServiceClient.ts index dd8f0b59da6c..680ebd596d51 100644 --- a/sdk/storage/storage-queue/src/QueueServiceClient.ts +++ b/sdk/storage/storage-queue/src/QueueServiceClient.ts @@ -19,6 +19,10 @@ import type { ServiceSetPropertiesHeaders, ServiceGetStatisticsHeaders, QueueServiceStatistics, + ServiceGetUserDelegationKeyResponse, + ServiceGetUserDelegationKeyResponseModel, + ServiceGetUserDelegationKeyHeaders, + UserDelegationKeyModel, } from "./generatedModels.js"; import type { AbortSignalLike } from "@azure/abort-controller"; import type { Service } from "./generated/src/operationsInterfaces/index.js"; @@ -32,6 +36,7 @@ import { appendToURLQuery, extractConnectionStringParts, assertResponse, + truncatedISO8061Date, } from "./utils/utils.common.js"; import { StorageSharedKeyCredential } from "@azure/storage-common"; import { AnonymousCredential } from "@azure/storage-common"; @@ -164,6 +169,17 @@ export interface ServiceGenerateAccountSasUrlOptions { ipRange?: SasIPRange; } +/** + * Options to configure the Service - Get User Delegation Key. + */ +export interface ServiceGetUserDelegationKeyOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + */ + abortSignal?: AbortSignalLike; +} + /** * A QueueServiceClient represents a URL to the Azure Storage Queue service allowing you * to manipulate queues. @@ -773,5 +789,67 @@ export class QueueServiceClient extends StorageClient { }, this.credential, ).stringToSign; + } + + /** + * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). + * + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key + * + * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time + * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time + */ + public async getUserDelegationKey( + startsOn: Date, + expiresOn: Date, + options: ServiceGetUserDelegationKeyOptions = {}, + ): Promise { + return tracingClient.withSpan( + "ShareServiceClient-getUserDelegationKey", + options, + async (updatedOptions) => { + const response = assertResponse< + ServiceGetUserDelegationKeyResponseModel, + ServiceGetUserDelegationKeyHeaders, + UserDelegationKeyModel + >( + await this.serviceContext.getUserDelegationKey( + { + start: truncatedISO8061Date(startsOn, false), + expiry: truncatedISO8061Date(expiresOn, false), + }, + { + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + }, + ), + ); + + const userDelegationKey = { + signedObjectId: response.signedOid, + signedTenantId: response.signedOid, + signedStartsOn: new Date(response.signedStart), + signedExpiresOn: new Date(response.signedExpiry), + signedService: response.signedService, + signedVersion: response.signedVersion, + value: response.value, + }; + + const res: ServiceGetUserDelegationKeyResponse = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + //errorCode: response.errorCode, + ...userDelegationKey, + }; + + return res; + }, + ); } } diff --git a/sdk/storage/storage-queue/src/generated/src/models/index.ts b/sdk/storage/storage-queue/src/generated/src/models/index.ts index 45d4906fb528..6b656f728f48 100644 --- a/sdk/storage/storage-queue/src/generated/src/models/index.ts +++ b/sdk/storage/storage-queue/src/generated/src/models/index.ts @@ -89,6 +89,32 @@ export interface GeoReplication { lastSyncOn: Date; } +/** Key information */ +export interface KeyInfo { + /** The date-time the key is active in ISO 8601 UTC time */ + start?: string; + /** The date-time the key expires in ISO 8601 UTC time */ + expiry: string; +} + +/** A user delegation key */ +export interface UserDelegationKey { + /** The Azure Active Directory object ID in GUID format. */ + signedOid: string; + /** The Azure Active Directory tenant ID in GUID format */ + signedTid: string; + /** The date-time the key is active */ + signedStart: Date; + /** The date-time the key expires */ + signedExpiry: Date; + /** Abbreviation of the Azure Storage service that accepts the key */ + signedService: string; + /** The service version that created the key */ + signedVersion: string; + /** The key as a base64 string */ + value: string; +} + /** The object returned when calling List Queues on a Queue Service. */ export interface ListQueuesSegmentResponse { serviceEndpoint: string; @@ -236,6 +262,25 @@ export interface ServiceGetStatisticsExceptionHeaders { clientRequestId?: string; } +/** Defines headers for Service_getUserDelegationKey operation. */ +export interface ServiceGetUserDelegationKeyHeaders { + /** If a client request id header is sent in the request, this header will be present in the response with the same value. */ + clientRequestId?: string; + /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */ + requestId?: string; + /** 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. */ + version?: string; + /** UTC date/time value generated by the service that indicates the time at which the response was initiated */ + date?: Date; +} + +/** Defines headers for Service_getUserDelegationKey operation. */ +export interface ServiceGetUserDelegationKeyExceptionHeaders { + errorCode?: string; + /** If a client request id header is sent in the request, this header will be present in the response with the same value. */ + clientRequestId?: string; +} + /** Defines headers for Service_listQueuesSegment operation. */ export interface ServiceListQueuesSegmentHeaders { /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */ @@ -631,7 +676,7 @@ export enum KnownStorageErrorCode { /** AuthorizationResourceTypeMismatch */ AuthorizationResourceTypeMismatch = "AuthorizationResourceTypeMismatch", /** FeatureVersionMismatch */ - FeatureVersionMismatch = "FeatureVersionMismatch" + FeatureVersionMismatch = "FeatureVersionMismatch", } /** @@ -704,7 +749,7 @@ export type GeoReplicationStatusType = "live" | "bootstrap" | "unavailable"; /** Optional parameters. */ export interface ServiceSetPropertiesOptionalParams extends coreClient.OperationOptions { - /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ timeoutInSeconds?: number; /** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */ requestId?: string; @@ -716,7 +761,7 @@ export type ServiceSetPropertiesResponse = ServiceSetPropertiesHeaders; /** Optional parameters. */ export interface ServiceGetPropertiesOptionalParams extends coreClient.OperationOptions { - /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ timeoutInSeconds?: number; /** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */ requestId?: string; @@ -729,7 +774,7 @@ export type ServiceGetPropertiesResponse = ServiceGetPropertiesHeaders & /** Optional parameters. */ export interface ServiceGetStatisticsOptionalParams extends coreClient.OperationOptions { - /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ timeoutInSeconds?: number; /** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */ requestId?: string; @@ -739,10 +784,23 @@ export interface ServiceGetStatisticsOptionalParams export type ServiceGetStatisticsResponse = ServiceGetStatisticsHeaders & QueueServiceStatistics; +/** Optional parameters. */ +export interface ServiceGetUserDelegationKeyOptionalParams + extends coreClient.OperationOptions { + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Queue Service Operations. */ + /** The The timeout parameter is expressed in seconds. For more information, see { return this.client.sendOperationRequest( { popReceipt, visibilityTimeout, options }, - updateOperationSpec + updateOperationSpec, ); } @@ -63,11 +63,11 @@ export class MessageIdImpl implements MessageId { */ delete( popReceipt: string, - options?: MessageIdDeleteOptionalParams + options?: MessageIdDeleteOptionalParams, ): Promise { return this.client.sendOperationRequest( { popReceipt, options }, - deleteOperationSpec + deleteOperationSpec, ); } } @@ -79,50 +79,50 @@ const updateOperationSpec: coreClient.OperationSpec = { httpMethod: "PUT", responses: { 204: { - headersMapper: Mappers.MessageIdUpdateHeaders + headersMapper: Mappers.MessageIdUpdateHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.MessageIdUpdateExceptionHeaders - } + headersMapper: Mappers.MessageIdUpdateExceptionHeaders, + }, }, requestBody: Parameters.queueMessage1, queryParameters: [ Parameters.timeoutInSeconds, Parameters.popReceipt, - Parameters.visibilityTimeout1 + Parameters.visibilityTimeout1, ], urlParameters: [Parameters.url], headerParameters: [ Parameters.contentType, Parameters.accept, Parameters.version, - Parameters.requestId + Parameters.requestId, ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer + serializer: xmlSerializer, }; const deleteOperationSpec: coreClient.OperationSpec = { path: "/{queueName}/messages/{messageid}", httpMethod: "DELETE", responses: { 204: { - headersMapper: Mappers.MessageIdDeleteHeaders + headersMapper: Mappers.MessageIdDeleteHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.MessageIdDeleteExceptionHeaders - } + headersMapper: Mappers.MessageIdDeleteExceptionHeaders, + }, }, queryParameters: [Parameters.timeoutInSeconds, Parameters.popReceipt], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.accept1 + Parameters.accept1, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; diff --git a/sdk/storage/storage-queue/src/generated/src/operations/messages.ts b/sdk/storage/storage-queue/src/generated/src/operations/messages.ts index 8727167232d5..779c7ba5cec8 100644 --- a/sdk/storage/storage-queue/src/generated/src/operations/messages.ts +++ b/sdk/storage/storage-queue/src/generated/src/operations/messages.ts @@ -20,7 +20,7 @@ import { MessagesEnqueueOptionalParams, MessagesEnqueueResponse, MessagesPeekOptionalParams, - MessagesPeekResponse + MessagesPeekResponse, } from "../models/index.js"; /** Class containing Messages operations. */ @@ -40,7 +40,7 @@ export class MessagesImpl implements Messages { * @param options The options parameters. */ dequeue( - options?: MessagesDequeueOptionalParams + options?: MessagesDequeueOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, dequeueOperationSpec); } @@ -63,11 +63,11 @@ export class MessagesImpl implements Messages { */ enqueue( queueMessage: QueueMessage, - options?: MessagesEnqueueOptionalParams + options?: MessagesEnqueueOptionalParams, ): Promise { return this.client.sendOperationRequest( { queueMessage, options }, - enqueueOperationSpec + enqueueOperationSpec, ); } @@ -92,56 +92,56 @@ const dequeueOperationSpec: coreClient.OperationSpec = { type: { name: "Sequence", element: { - type: { name: "Composite", className: "DequeuedMessageItem" } - } + type: { name: "Composite", className: "DequeuedMessageItem" }, + }, }, serializedName: "DequeuedMessagesList", xmlName: "QueueMessagesList", xmlIsWrapped: true, - xmlElementName: "QueueMessage" + xmlElementName: "QueueMessage", }, - headersMapper: Mappers.MessagesDequeueHeaders + headersMapper: Mappers.MessagesDequeueHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.MessagesDequeueExceptionHeaders - } + headersMapper: Mappers.MessagesDequeueExceptionHeaders, + }, }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.numberOfMessages, - Parameters.visibilityTimeout + Parameters.visibilityTimeout, ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.accept1 + Parameters.accept1, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; const clearOperationSpec: coreClient.OperationSpec = { path: "/{queueName}/messages", httpMethod: "DELETE", responses: { 204: { - headersMapper: Mappers.MessagesClearHeaders + headersMapper: Mappers.MessagesClearHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.MessagesClearExceptionHeaders - } + headersMapper: Mappers.MessagesClearExceptionHeaders, + }, }, queryParameters: [Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.accept1 + Parameters.accept1, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; const enqueueOperationSpec: coreClient.OperationSpec = { path: "/{queueName}/messages", @@ -151,37 +151,39 @@ const enqueueOperationSpec: coreClient.OperationSpec = { bodyMapper: { type: { name: "Sequence", - element: { type: { name: "Composite", className: "EnqueuedMessage" } } + element: { + type: { name: "Composite", className: "EnqueuedMessage" }, + }, }, serializedName: "EnqueuedMessageList", xmlName: "QueueMessagesList", xmlIsWrapped: true, - xmlElementName: "QueueMessage" + xmlElementName: "QueueMessage", }, - headersMapper: Mappers.MessagesEnqueueHeaders + headersMapper: Mappers.MessagesEnqueueHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.MessagesEnqueueExceptionHeaders - } + headersMapper: Mappers.MessagesEnqueueExceptionHeaders, + }, }, requestBody: Parameters.queueMessage, queryParameters: [ Parameters.timeoutInSeconds, Parameters.visibilityTimeout, - Parameters.messageTimeToLive + Parameters.messageTimeToLive, ], urlParameters: [Parameters.url], headerParameters: [ Parameters.contentType, Parameters.accept, Parameters.version, - Parameters.requestId + Parameters.requestId, ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer + serializer: xmlSerializer, }; const peekOperationSpec: coreClient.OperationSpec = { path: "/{queueName}/messages", @@ -192,32 +194,32 @@ const peekOperationSpec: coreClient.OperationSpec = { type: { name: "Sequence", element: { - type: { name: "Composite", className: "PeekedMessageItem" } - } + type: { name: "Composite", className: "PeekedMessageItem" }, + }, }, serializedName: "PeekedMessagesList", xmlName: "QueueMessagesList", xmlIsWrapped: true, - xmlElementName: "QueueMessage" + xmlElementName: "QueueMessage", }, - headersMapper: Mappers.MessagesPeekHeaders + headersMapper: Mappers.MessagesPeekHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.MessagesPeekExceptionHeaders - } + headersMapper: Mappers.MessagesPeekExceptionHeaders, + }, }, queryParameters: [ Parameters.timeoutInSeconds, Parameters.numberOfMessages, - Parameters.peekonly + Parameters.peekonly, ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.accept1 + Parameters.accept1, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; diff --git a/sdk/storage/storage-queue/src/generated/src/operations/queue.ts b/sdk/storage/storage-queue/src/generated/src/operations/queue.ts index 8f5881e50fbc..5aa12ede6e7d 100644 --- a/sdk/storage/storage-queue/src/generated/src/operations/queue.ts +++ b/sdk/storage/storage-queue/src/generated/src/operations/queue.ts @@ -23,7 +23,7 @@ import { QueueGetAccessPolicyOptionalParams, QueueGetAccessPolicyResponse, QueueSetAccessPolicyOptionalParams, - QueueSetAccessPolicyResponse + QueueSetAccessPolicyResponse, } from "../models/index.js"; /** Class containing Queue operations. */ @@ -60,11 +60,11 @@ export class QueueImpl implements Queue { * @param options The options parameters. */ getProperties( - options?: QueueGetPropertiesOptionalParams + options?: QueueGetPropertiesOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - getPropertiesOperationSpec + getPropertiesOperationSpec, ); } @@ -74,11 +74,11 @@ export class QueueImpl implements Queue { * @param options The options parameters. */ setMetadata( - options?: QueueSetMetadataOptionalParams + options?: QueueSetMetadataOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - setMetadataOperationSpec + setMetadataOperationSpec, ); } @@ -88,11 +88,11 @@ export class QueueImpl implements Queue { * @param options The options parameters. */ getAccessPolicy( - options?: QueueGetAccessPolicyOptionalParams + options?: QueueGetAccessPolicyOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - getAccessPolicyOperationSpec + getAccessPolicyOperationSpec, ); } @@ -101,11 +101,11 @@ export class QueueImpl implements Queue { * @param options The options parameters. */ setAccessPolicy( - options?: QueueSetAccessPolicyOptionalParams + options?: QueueSetAccessPolicyOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - setAccessPolicyOperationSpec + setAccessPolicyOperationSpec, ); } } @@ -117,15 +117,15 @@ const createOperationSpec: coreClient.OperationSpec = { httpMethod: "PUT", responses: { 201: { - headersMapper: Mappers.QueueCreateHeaders + headersMapper: Mappers.QueueCreateHeaders, }, 204: { - headersMapper: Mappers.QueueCreateHeaders + headersMapper: Mappers.QueueCreateHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.QueueCreateExceptionHeaders - } + headersMapper: Mappers.QueueCreateExceptionHeaders, + }, }, queryParameters: [Parameters.timeoutInSeconds], urlParameters: [Parameters.url], @@ -133,77 +133,77 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.version, Parameters.requestId, Parameters.accept1, - Parameters.metadata + Parameters.metadata, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; const deleteOperationSpec: coreClient.OperationSpec = { path: "/{queueName}", httpMethod: "DELETE", responses: { 204: { - headersMapper: Mappers.QueueDeleteHeaders + headersMapper: Mappers.QueueDeleteHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.QueueDeleteExceptionHeaders - } + headersMapper: Mappers.QueueDeleteExceptionHeaders, + }, }, queryParameters: [Parameters.timeoutInSeconds], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.accept1 + Parameters.accept1, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; const getPropertiesOperationSpec: coreClient.OperationSpec = { path: "/{queueName}", httpMethod: "GET", responses: { 200: { - headersMapper: Mappers.QueueGetPropertiesHeaders + headersMapper: Mappers.QueueGetPropertiesHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.QueueGetPropertiesExceptionHeaders - } + headersMapper: Mappers.QueueGetPropertiesExceptionHeaders, + }, }, - queryParameters: [Parameters.timeoutInSeconds, Parameters.comp3], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.accept1 + Parameters.accept1, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; const setMetadataOperationSpec: coreClient.OperationSpec = { path: "/{queueName}", httpMethod: "PUT", responses: { 204: { - headersMapper: Mappers.QueueSetMetadataHeaders + headersMapper: Mappers.QueueSetMetadataHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.QueueSetMetadataExceptionHeaders - } + headersMapper: Mappers.QueueSetMetadataExceptionHeaders, + }, }, - queryParameters: [Parameters.timeoutInSeconds, Parameters.comp3], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, Parameters.accept1, - Parameters.metadata + Parameters.metadata, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; const getAccessPolicyOperationSpec: coreClient.OperationSpec = { path: "/{queueName}", @@ -214,54 +214,54 @@ const getAccessPolicyOperationSpec: coreClient.OperationSpec = { type: { name: "Sequence", element: { - type: { name: "Composite", className: "SignedIdentifier" } - } + type: { name: "Composite", className: "SignedIdentifier" }, + }, }, serializedName: "SignedIdentifiers", xmlName: "SignedIdentifiers", xmlIsWrapped: true, - xmlElementName: "SignedIdentifier" + xmlElementName: "SignedIdentifier", }, - headersMapper: Mappers.QueueGetAccessPolicyHeaders + headersMapper: Mappers.QueueGetAccessPolicyHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.QueueGetAccessPolicyExceptionHeaders - } + headersMapper: Mappers.QueueGetAccessPolicyExceptionHeaders, + }, }, - queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp5], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.accept1 + Parameters.accept1, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; const setAccessPolicyOperationSpec: coreClient.OperationSpec = { path: "/{queueName}", httpMethod: "PUT", responses: { 204: { - headersMapper: Mappers.QueueSetAccessPolicyHeaders + headersMapper: Mappers.QueueSetAccessPolicyHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.QueueSetAccessPolicyExceptionHeaders - } + headersMapper: Mappers.QueueSetAccessPolicyExceptionHeaders, + }, }, requestBody: Parameters.queueAcl, - queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp5], urlParameters: [Parameters.url], headerParameters: [ Parameters.contentType, Parameters.accept, Parameters.version, - Parameters.requestId + Parameters.requestId, ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer + serializer: xmlSerializer, }; diff --git a/sdk/storage/storage-queue/src/generated/src/operations/service.ts b/sdk/storage/storage-queue/src/generated/src/operations/service.ts index 9c7f63c4fe39..0f588cf5fd78 100644 --- a/sdk/storage/storage-queue/src/generated/src/operations/service.ts +++ b/sdk/storage/storage-queue/src/generated/src/operations/service.ts @@ -19,8 +19,11 @@ import { ServiceGetPropertiesResponse, ServiceGetStatisticsOptionalParams, ServiceGetStatisticsResponse, + KeyInfo, + ServiceGetUserDelegationKeyOptionalParams, + ServiceGetUserDelegationKeyResponse, ServiceListQueuesSegmentOptionalParams, - ServiceListQueuesSegmentResponse + ServiceListQueuesSegmentResponse, } from "../models/index.js"; /** Class containing Service operations. */ @@ -43,11 +46,11 @@ export class ServiceImpl implements Service { */ setProperties( properties: QueueServiceProperties, - options?: ServiceSetPropertiesOptionalParams + options?: ServiceSetPropertiesOptionalParams, ): Promise { return this.client.sendOperationRequest( { properties, options }, - setPropertiesOperationSpec + setPropertiesOperationSpec, ); } @@ -57,11 +60,11 @@ export class ServiceImpl implements Service { * @param options The options parameters. */ getProperties( - options?: ServiceGetPropertiesOptionalParams + options?: ServiceGetPropertiesOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - getPropertiesOperationSpec + getPropertiesOperationSpec, ); } @@ -72,11 +75,27 @@ export class ServiceImpl implements Service { * @param options The options parameters. */ getStatistics( - options?: ServiceGetStatisticsOptionalParams + options?: ServiceGetStatisticsOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - getStatisticsOperationSpec + getStatisticsOperationSpec, + ); + } + + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using + * bearer token authentication. + * @param keyInfo Key information + * @param options The options parameters. + */ + getUserDelegationKey( + keyInfo: KeyInfo, + options?: ServiceGetUserDelegationKeyOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { keyInfo, options }, + getUserDelegationKeyOperationSpec, ); } @@ -85,11 +104,11 @@ export class ServiceImpl implements Service { * @param options The options parameters. */ listQueuesSegment( - options?: ServiceListQueuesSegmentOptionalParams + options?: ServiceListQueuesSegmentOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - listQueuesSegmentOperationSpec + listQueuesSegmentOperationSpec, ); } } @@ -101,30 +120,30 @@ const setPropertiesOperationSpec: coreClient.OperationSpec = { httpMethod: "PUT", responses: { 202: { - headersMapper: Mappers.ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders - } + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders, + }, }, requestBody: Parameters.properties, queryParameters: [ Parameters.restype, Parameters.comp, - Parameters.timeoutInSeconds + Parameters.timeoutInSeconds, ], urlParameters: [Parameters.url], headerParameters: [ Parameters.contentType, Parameters.accept, Parameters.version, - Parameters.requestId + Parameters.requestId, ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer + serializer: xmlSerializer, }; const getPropertiesOperationSpec: coreClient.OperationSpec = { path: "/", @@ -132,26 +151,26 @@ const getPropertiesOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.QueueServiceProperties, - headersMapper: Mappers.ServiceGetPropertiesHeaders + headersMapper: Mappers.ServiceGetPropertiesHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders - } + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders, + }, }, queryParameters: [ Parameters.restype, Parameters.comp, - Parameters.timeoutInSeconds + Parameters.timeoutInSeconds, ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.accept1 + Parameters.accept1, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; const getStatisticsOperationSpec: coreClient.OperationSpec = { path: "/", @@ -159,26 +178,57 @@ const getStatisticsOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.QueueServiceStatistics, - headersMapper: Mappers.ServiceGetStatisticsHeaders + headersMapper: Mappers.ServiceGetStatisticsHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders - } + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders, + }, }, queryParameters: [ Parameters.restype, Parameters.timeoutInSeconds, - Parameters.comp1 + Parameters.comp1, ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.accept1 + Parameters.accept1, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, +}; +const getUserDelegationKeyOperationSpec: coreClient.OperationSpec = { + path: "/", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders, + }, + }, + requestBody: Parameters.keyInfo, + queryParameters: [ + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp2, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, }; const listQueuesSegmentOperationSpec: coreClient.OperationSpec = { path: "/", @@ -186,27 +236,27 @@ const listQueuesSegmentOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ListQueuesSegmentResponse, - headersMapper: Mappers.ServiceListQueuesSegmentHeaders + headersMapper: Mappers.ServiceListQueuesSegmentHeaders, }, default: { bodyMapper: Mappers.StorageError, - headersMapper: Mappers.ServiceListQueuesSegmentExceptionHeaders - } + headersMapper: Mappers.ServiceListQueuesSegmentExceptionHeaders, + }, }, queryParameters: [ Parameters.timeoutInSeconds, - Parameters.comp2, + Parameters.comp3, Parameters.prefix, Parameters.marker, Parameters.maxPageSize, - Parameters.include + Parameters.include, ], urlParameters: [Parameters.url], headerParameters: [ Parameters.version, Parameters.requestId, - Parameters.accept1 + Parameters.accept1, ], isXML: true, - serializer: xmlSerializer + serializer: xmlSerializer, }; diff --git a/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/messageId.ts b/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/messageId.ts index fcc0d9a6a7a8..86dd23866223 100644 --- a/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/messageId.ts +++ b/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/messageId.ts @@ -10,7 +10,7 @@ import { MessageIdUpdateOptionalParams, MessageIdUpdateResponse, MessageIdDeleteOptionalParams, - MessageIdDeleteResponse + MessageIdDeleteResponse, } from "../models/index.js"; /** Interface representing a MessageId. */ @@ -32,7 +32,7 @@ export interface MessageId { update( popReceipt: string, visibilityTimeout: number, - options?: MessageIdUpdateOptionalParams + options?: MessageIdUpdateOptionalParams, ): Promise; /** * The Delete operation deletes the specified message. @@ -42,6 +42,6 @@ export interface MessageId { */ delete( popReceipt: string, - options?: MessageIdDeleteOptionalParams + options?: MessageIdDeleteOptionalParams, ): Promise; } diff --git a/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/messages.ts b/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/messages.ts index 9c964ea755af..32618d95e622 100644 --- a/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/messages.ts +++ b/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/messages.ts @@ -15,7 +15,7 @@ import { MessagesEnqueueOptionalParams, MessagesEnqueueResponse, MessagesPeekOptionalParams, - MessagesPeekResponse + MessagesPeekResponse, } from "../models/index.js"; /** Interface representing a Messages. */ @@ -25,7 +25,7 @@ export interface Messages { * @param options The options parameters. */ dequeue( - options?: MessagesDequeueOptionalParams + options?: MessagesDequeueOptionalParams, ): Promise; /** * The Clear operation deletes all messages from the specified queue. @@ -42,7 +42,7 @@ export interface Messages { */ enqueue( queueMessage: QueueMessage, - options?: MessagesEnqueueOptionalParams + options?: MessagesEnqueueOptionalParams, ): Promise; /** * The Peek operation retrieves one or more messages from the front of the queue, but does not alter diff --git a/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/queue.ts b/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/queue.ts index 881574e12f18..c344ff0f2e80 100644 --- a/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/queue.ts +++ b/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/queue.ts @@ -18,7 +18,7 @@ import { QueueGetAccessPolicyOptionalParams, QueueGetAccessPolicyResponse, QueueSetAccessPolicyOptionalParams, - QueueSetAccessPolicyResponse + QueueSetAccessPolicyResponse, } from "../models/index.js"; /** Interface representing a Queue. */ @@ -39,7 +39,7 @@ export interface Queue { * @param options The options parameters. */ getProperties( - options?: QueueGetPropertiesOptionalParams + options?: QueueGetPropertiesOptionalParams, ): Promise; /** * sets user-defined metadata on the specified queue. Metadata is associated with the queue as @@ -47,7 +47,7 @@ export interface Queue { * @param options The options parameters. */ setMetadata( - options?: QueueSetMetadataOptionalParams + options?: QueueSetMetadataOptionalParams, ): Promise; /** * returns details about any stored access policies specified on the queue that may be used with Shared @@ -55,13 +55,13 @@ export interface Queue { * @param options The options parameters. */ getAccessPolicy( - options?: QueueGetAccessPolicyOptionalParams + options?: QueueGetAccessPolicyOptionalParams, ): Promise; /** * sets stored access policies for the queue that may be used with Shared Access Signatures * @param options The options parameters. */ setAccessPolicy( - options?: QueueSetAccessPolicyOptionalParams + options?: QueueSetAccessPolicyOptionalParams, ): Promise; } diff --git a/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/service.ts b/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/service.ts index 832995d308e1..5798774a4dd5 100644 --- a/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/service.ts +++ b/sdk/storage/storage-queue/src/generated/src/operationsInterfaces/service.ts @@ -14,8 +14,11 @@ import { ServiceGetPropertiesResponse, ServiceGetStatisticsOptionalParams, ServiceGetStatisticsResponse, + KeyInfo, + ServiceGetUserDelegationKeyOptionalParams, + ServiceGetUserDelegationKeyResponse, ServiceListQueuesSegmentOptionalParams, - ServiceListQueuesSegmentResponse + ServiceListQueuesSegmentResponse, } from "../models/index.js"; /** Interface representing a Service. */ @@ -28,7 +31,7 @@ export interface Service { */ setProperties( properties: QueueServiceProperties, - options?: ServiceSetPropertiesOptionalParams + options?: ServiceSetPropertiesOptionalParams, ): Promise; /** * gets the properties of a storage account's Queue service, including properties for Storage Analytics @@ -36,7 +39,7 @@ export interface Service { * @param options The options parameters. */ getProperties( - options?: ServiceGetPropertiesOptionalParams + options?: ServiceGetPropertiesOptionalParams, ): Promise; /** * Retrieves statistics related to replication for the Queue service. It is only available on the @@ -45,13 +48,23 @@ export interface Service { * @param options The options parameters. */ getStatistics( - options?: ServiceGetStatisticsOptionalParams + options?: ServiceGetStatisticsOptionalParams, ): Promise; + /** + * Retrieves a user delegation key for the Queue service. This is only a valid operation when using + * bearer token authentication. + * @param keyInfo Key information + * @param options The options parameters. + */ + getUserDelegationKey( + keyInfo: KeyInfo, + options?: ServiceGetUserDelegationKeyOptionalParams, + ): Promise; /** * The List Queues Segment operation returns a list of the queues under the specified account * @param options The options parameters. */ listQueuesSegment( - options?: ServiceListQueuesSegmentOptionalParams + options?: ServiceListQueuesSegmentOptionalParams, ): Promise; } diff --git a/sdk/storage/storage-queue/src/generated/src/storageClient.ts b/sdk/storage/storage-queue/src/generated/src/storageClient.ts index d7bdbbfa6027..37385ec77840 100644 --- a/sdk/storage/storage-queue/src/generated/src/storageClient.ts +++ b/sdk/storage/storage-queue/src/generated/src/storageClient.ts @@ -11,9 +11,14 @@ import { ServiceImpl, QueueImpl, MessagesImpl, - MessageIdImpl + MessageIdImpl, } from "./operations/index.js"; -import { Service, Queue, Messages, MessageId } from "./operationsInterfaces/index.js"; +import { + Service, + Queue, + Messages, + MessageId, +} from "./operationsInterfaces/index.js"; import { StorageClientOptionalParams } from "./models/index.js"; export class StorageClient extends coreHttpCompat.ExtendedServiceClient { @@ -36,7 +41,7 @@ export class StorageClient extends coreHttpCompat.ExtendedServiceClient { options = {}; } const defaults: StorageClientOptionalParams = { - requestContentType: "application/json; charset=utf-8" + requestContentType: "application/json; charset=utf-8", }; const packageDetails = `azsdk-js-azure-storage-queue/12.28.0`; @@ -49,9 +54,9 @@ export class StorageClient extends coreHttpCompat.ExtendedServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, - endpoint: options.endpoint ?? options.baseUri ?? "{url}" + endpoint: options.endpoint ?? options.baseUri ?? "{url}", }; super(optionsWithDefaults); // Parameter assignments diff --git a/sdk/storage/storage-queue/src/generatedModels.ts b/sdk/storage/storage-queue/src/generatedModels.ts index 2f36e9c0f668..583ef385bff0 100644 --- a/sdk/storage/storage-queue/src/generatedModels.ts +++ b/sdk/storage/storage-queue/src/generatedModels.ts @@ -16,8 +16,10 @@ import type { QueueSetMetadataHeaders, ServiceGetPropertiesHeaders, ServiceGetStatisticsHeaders, + ServiceGetUserDelegationKeyHeaders, ServiceListQueuesSegmentHeaders, ServiceSetPropertiesHeaders, + UserDelegationKey as UserDelegationKeyModel, } from "./generated/src/index.js"; export { @@ -49,9 +51,12 @@ export { RetentionPolicy, ServiceGetPropertiesHeaders, ServiceGetStatisticsHeaders, + ServiceGetUserDelegationKeyResponse as ServiceGetUserDelegationKeyResponseModel, + ServiceGetUserDelegationKeyHeaders, ServiceListQueuesSegmentHeaders, ServiceSetPropertiesHeaders, SignedIdentifier as SignedIdentifierModel, + UserDelegationKey as UserDelegationKeyModel, } from "./generated/src/models/index.js"; /** Contains response data for the getProperties operation. */ @@ -115,3 +120,46 @@ export type MessageIdUpdateResponse = WithResponse; + +/** + * A user delegation key. + */ +export interface UserDelegationKey { + /** + * The Azure Active Directory object ID in GUID format. + */ + signedObjectId: string; + /** + * The Azure Active Directory tenant ID in GUID format. + */ + signedTenantId: string; + /** + * The date-time the key is active. + */ + signedStartsOn: Date; + /** + * The date-time the key expires. + */ + signedExpiresOn: Date; + /** + * Abbreviation of the Azure Storage service that accepts the key. + */ + signedService: string; + /** + * The service version that created the key. + */ + signedVersion: string; + /** + * The key as a base64 string. + */ + value: string; +} + +/** + * Contains response data for the {@link getUserDelegationKey} operation. + */ +export declare type ServiceGetUserDelegationKeyResponse = WithResponse< + UserDelegationKey & ServiceGetUserDelegationKeyHeaders, + ServiceGetUserDelegationKeyHeaders, + UserDelegationKeyModel +>; diff --git a/sdk/storage/storage-queue/swagger/README.md b/sdk/storage/storage-queue/swagger/README.md index b6d27df3fe76..d08c3b3b193f 100644 --- a/sdk/storage/storage-queue/swagger/README.md +++ b/sdk/storage/storage-queue/swagger/README.md @@ -12,7 +12,7 @@ enable-xml: true generate-metadata: false license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../src/generated -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/aa4b90db8da0aa8017c6b80a6a68ab79cc09266b/specification/storage/data-plane/Microsoft.QueueStorage/preview/2018-03-28/queue.json +input-file: D:/repo/JS/another/2026_file_spec/queue.json model-date-time-as-string: true optional-response-headers: true v3: true @@ -20,7 +20,7 @@ disable-async-iterators: true add-credentials: false core-http-compat-mode: true use-extension: - "@autorest/typescript": "6.0.3" + "@autorest/typescript": "6.0.42" package-version: 12.28.0 ```