diff --git a/sdk/storage/arm-storage/README.md b/sdk/storage/arm-storage/README.md index 072c94cfdb88..0534de1486e2 100644 --- a/sdk/storage/arm-storage/README.md +++ b/sdk/storage/arm-storage/README.md @@ -94,5 +94,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/storage/arm-storage/README.png) diff --git a/sdk/storage/arm-storage/package.json b/sdk/storage/arm-storage/package.json index 7f4b2389557c..4908575bcd5d 100644 --- a/sdk/storage/arm-storage/package.json +++ b/sdk/storage/arm-storage/package.json @@ -26,13 +26,13 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/arm-storage", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" + "url": "https://github.com/azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" + "url": "https://github.com/azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/storage/arm-storage/src/models/index.ts b/sdk/storage/arm-storage/src/models/index.ts index f3fc95e79e2e..965040feb82d 100644 --- a/sdk/storage/arm-storage/src/models/index.ts +++ b/sdk/storage/arm-storage/src/models/index.ts @@ -1430,24 +1430,6 @@ export interface ListContainerItem extends AzureEntityResource { readonly hasImmutabilityPolicy?: boolean; } -/** - * Response schema. Contains list of blobs returned, and if paging is requested or required, a URL - * to next page of containers. - */ -export interface ListContainerItems { - /** - * List of blobs containers returned. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: ListContainerItem[]; - /** - * Request URL that can be used to query next page of containers. Returned when total number of - * requested containers exceed maximum page size. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} - /** * Specifies a CORS rule for the Blob service. */ @@ -1767,6 +1749,21 @@ export interface StorageAccountListResult extends Array { export interface UsageListResult extends Array { } +/** + * @interface + * Response schema. Contains list of blobs returned, and if paging is requested or required, a URL + * to next page of containers. + * @extends Array + */ +export interface ListContainerItems extends Array { + /** + * Request URL that can be used to query next page of containers. Returned when total number of + * requested containers exceed maximum page size. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + /** * Defines values for ReasonCode. * Possible values include: 'QuotaId', 'NotAvailableForSubscription' @@ -2635,3 +2632,23 @@ export type BlobContainersLeaseResponse = LeaseContainerResponse & { parsedBody: LeaseContainerResponse; }; }; + +/** + * Contains response data for the listNext operation. + */ +export type BlobContainersListNextResponse = ListContainerItems & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListContainerItems; + }; +}; diff --git a/sdk/storage/arm-storage/src/models/mappers.ts b/sdk/storage/arm-storage/src/models/mappers.ts index 9bf7621fd975..ab321c841e84 100644 --- a/sdk/storage/arm-storage/src/models/mappers.ts +++ b/sdk/storage/arm-storage/src/models/mappers.ts @@ -2285,36 +2285,6 @@ export const ListContainerItem: msRest.CompositeMapper = { } }; -export const ListContainerItems: msRest.CompositeMapper = { - serializedName: "ListContainerItems", - type: { - name: "Composite", - className: "ListContainerItems", - modelProperties: { - value: { - readOnly: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ListContainerItem" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - export const CorsRule: msRest.CompositeMapper = { serializedName: "CorsRule", type: { @@ -2697,3 +2667,33 @@ export const UsageListResult: msRest.CompositeMapper = { } } }; + +export const ListContainerItems: msRest.CompositeMapper = { + serializedName: "ListContainerItems", + type: { + name: "Composite", + className: "ListContainerItems", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ListContainerItem" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/storage/arm-storage/src/models/parameters.ts b/sdk/storage/arm-storage/src/models/parameters.ts index 269151541846..c641608687e8 100644 --- a/sdk/storage/arm-storage/src/models/parameters.ts +++ b/sdk/storage/arm-storage/src/models/parameters.ts @@ -168,6 +168,17 @@ export const maxpagesize: msRest.OperationQueryParameter = { } } }; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/storage/arm-storage/src/operations/blobContainers.ts b/sdk/storage/arm-storage/src/operations/blobContainers.ts index c64edd7c61f9..45cbf54a8955 100644 --- a/sdk/storage/arm-storage/src/operations/blobContainers.ts +++ b/sdk/storage/arm-storage/src/operations/blobContainers.ts @@ -788,6 +788,35 @@ export class BlobContainers { leaseOperationSpec, callback) as Promise; } + + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not + * return continuation token. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -1215,3 +1244,24 @@ const leaseOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListContainerItems + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +};