diff --git a/sdk/reservations/arm-reservations/CHANGELOG.md b/sdk/reservations/arm-reservations/CHANGELOG.md index c2b1b167d394..3177e56c089c 100644 --- a/sdk/reservations/arm-reservations/CHANGELOG.md +++ b/sdk/reservations/arm-reservations/CHANGELOG.md @@ -1,5 +1,22 @@ # Release History +## 8.0.0 (2022-03-15) + +**Features** + + - Interface AzureReservationAPIOptionalParams has a new optional parameter apiVersion + - Class AzureReservationAPI has a new parameter apiVersion + +**Breaking Changes** + + - Removed operation group Quota + - Removed operation group QuotaRequestStatus + - Class AzureReservationAPI no longer has parameter quota + - Class AzureReservationAPI no longer has parameter quotaRequestStatus + - Removed Enum KnownQuotaRequestState + - Removed Enum KnownResourceType + + ## 7.0.0 (2022-01-21) The package of @azure/arm-reservations is using our next generation design principles since version 7.0.0, which contains breaking changes. diff --git a/sdk/reservations/arm-reservations/README.md b/sdk/reservations/arm-reservations/README.md index c829de0fd94c..d93dec6fc892 100644 --- a/sdk/reservations/arm-reservations/README.md +++ b/sdk/reservations/arm-reservations/README.md @@ -49,7 +49,8 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { AzureReservationAPI } = require("@azure/arm-reservations"); const { DefaultAzureCredential } = require("@azure/identity"); -const client = new AzureReservationAPI(new DefaultAzureCredential()); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new AzureReservationAPI(new DefaultAzureCredential(), subscriptionId); ``` diff --git a/sdk/reservations/arm-reservations/_meta.json b/sdk/reservations/arm-reservations/_meta.json index d5a3fef24022..4090d18a5a72 100644 --- a/sdk/reservations/arm-reservations/_meta.json +++ b/sdk/reservations/arm-reservations/_meta.json @@ -1,7 +1,8 @@ { - "commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb", + "commit": "957bd43aa221e695d0646d4f3645d77d69fd5dd6", "readme": "specification/reservations/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/reservations/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/reservations/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20220114.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.1.1", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/reservations/arm-reservations/api-extractor.json b/sdk/reservations/arm-reservations/api-extractor.json index 4e853dfd7c0e..f58ddad8a978 100644 --- a/sdk/reservations/arm-reservations/api-extractor.json +++ b/sdk/reservations/arm-reservations/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-reservations.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/reservations/arm-reservations/package.json b/sdk/reservations/arm-reservations/package.json index b33764a7a20f..3703213b736a 100644 --- a/sdk/reservations/arm-reservations/package.json +++ b/sdk/reservations/arm-reservations/package.json @@ -3,8 +3,10 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureReservationAPI.", - "version": "7.0.0", - "engines": { "node": ">=12.0.0" }, + "version": "8.0.0", + "engines": { + "node": ">=12.0.0" + }, "dependencies": { "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", @@ -14,7 +16,13 @@ "@azure/core-rest-pipeline": "^1.1.0", "tslib": "^2.2.0" }, - "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], "license": "MIT", "main": "./dist/index.js", "module": "./dist-esm/src/index.js", @@ -41,7 +49,9 @@ "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" }, - "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, "files": [ "dist/**/*.js", "dist/**/*.js.map", @@ -88,16 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { "path": "src/AzureReservationAPI.ts", "prefix": "packageDetails" } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": ["azure"], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-reservations?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/reservations/arm-reservations/review/arm-reservations.api.md b/sdk/reservations/arm-reservations/review/arm-reservations.api.md index 4e74f67b6a0a..0690a4d41c14 100644 --- a/sdk/reservations/arm-reservations/review/arm-reservations.api.md +++ b/sdk/reservations/arm-reservations/review/arm-reservations.api.md @@ -52,6 +52,8 @@ export class AzureReservationAPI extends coreClient.ServiceClient { $host: string; constructor(credentials: coreAuth.TokenCredential, options?: AzureReservationAPIOptionalParams); // (undocumented) + apiVersion: string; + // (undocumented) calculateExchange: CalculateExchange; // (undocumented) exchange: Exchange; @@ -60,10 +62,6 @@ export class AzureReservationAPI extends coreClient.ServiceClient { // (undocumented) operation: Operation; // (undocumented) - quota: Quota; - // (undocumented) - quotaRequestStatus: QuotaRequestStatus; - // (undocumented) reservation: Reservation; // (undocumented) reservationOrder: ReservationOrder; @@ -72,6 +70,7 @@ export class AzureReservationAPI extends coreClient.ServiceClient { // @public export interface AzureReservationAPIOptionalParams extends coreClient.ServiceClientOptions { $host?: string; + apiVersion?: string; endpoint?: string; } @@ -224,23 +223,6 @@ export interface ChangeDirectoryResult { // @public export type CreatedByType = string; -// @public -export interface CreateGenericQuotaRequestParameters { - value?: CurrentQuotaLimitBase[]; -} - -// @public -export interface CurrentQuotaLimit { - readonly message?: string; - properties?: QuotaProperties; - readonly provisioningState?: QuotaRequestState; -} - -// @public -export interface CurrentQuotaLimitBase { - properties?: QuotaProperties; -} - // @public export type DisplayProvisioningState = string; @@ -265,11 +247,6 @@ export interface ErrorResponse { // @public export type ErrorResponseCode = string; -// @public -export interface ExceptionResponse { - error?: ServiceError; -} - // @public export interface Exchange { beginPost(body: ExchangeRequest, options?: ExchangePostOptionalParams): Promise, ExchangePostResponse>>; @@ -667,20 +644,6 @@ export enum KnownProvisioningState { Succeeded = "Succeeded" } -// @public -export enum KnownQuotaRequestState { - // (undocumented) - Accepted = "Accepted", - // (undocumented) - Failed = "Failed", - // (undocumented) - InProgress = "InProgress", - // (undocumented) - Invalid = "Invalid", - // (undocumented) - Succeeded = "Succeeded" -} - // @public export enum KnownReservationBillingPlan { // (undocumented) @@ -775,20 +738,6 @@ export enum KnownReservedResourceType { VMwareCloudSimple = "VMwareCloudSimple" } -// @public -export enum KnownResourceType { - // (undocumented) - Dedicated = "dedicated", - // (undocumented) - LowPriority = "lowPriority", - // (undocumented) - ServiceSpecific = "serviceSpecific", - // (undocumented) - Shared = "shared", - // (undocumented) - Standard = "standard" -} - // @public export enum KnownUserFriendlyAppliedScopeType { // (undocumented) @@ -946,182 +895,6 @@ export interface PurchaseRequestPropertiesReservedResourceProperties { instanceFlexibility?: InstanceFlexibility; } -// @public -export interface Quota { - beginCreateOrUpdate(subscriptionId: string, providerId: string, location: string, resourceName: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaCreateOrUpdateOptionalParams): Promise, QuotaCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(subscriptionId: string, providerId: string, location: string, resourceName: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaCreateOrUpdateOptionalParams): Promise; - beginUpdate(subscriptionId: string, providerId: string, location: string, resourceName: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaUpdateOptionalParams): Promise, QuotaUpdateResponse>>; - beginUpdateAndWait(subscriptionId: string, providerId: string, location: string, resourceName: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaUpdateOptionalParams): Promise; - get(subscriptionId: string, providerId: string, location: string, resourceName: string, options?: QuotaGetOptionalParams): Promise; - list(subscriptionId: string, providerId: string, location: string, options?: QuotaListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface QuotaCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type QuotaCreateOrUpdateResponse = QuotaRequestOneResourceSubmitResponse; - -// @public -export interface QuotaGetHeaders { - eTag?: string; -} - -// @public -export interface QuotaGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type QuotaGetResponse = QuotaGetHeaders & CurrentQuotaLimitBase; - -// @public -export interface QuotaLimits { - nextLink?: string; - value?: CurrentQuotaLimitBase[]; -} - -// @public -export interface QuotaLimitsResponse { - nextLink?: string; - value?: CurrentQuotaLimit[]; -} - -// @public -export interface QuotaListHeaders { - eTag?: string; -} - -// @public -export interface QuotaListNextHeaders { - eTag?: string; -} - -// @public -export interface QuotaListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type QuotaListNextResponse = QuotaListNextHeaders & QuotaLimits; - -// @public -export interface QuotaListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type QuotaListResponse = QuotaListHeaders & QuotaLimits; - -// @public -export interface QuotaProperties { - readonly currentValue?: number; - limit?: number; - name?: ResourceName; - properties?: Record; - readonly quotaPeriod?: string; - resourceType?: ResourceType; - unit?: string; -} - -// @public -export interface QuotaRequestDetails { - readonly id?: string; - readonly message?: string; - readonly name?: string; - provisioningState?: QuotaRequestState; - readonly requestSubmitTime?: Date; - readonly type?: string; - value?: SubRequest[]; -} - -// @public -export interface QuotaRequestDetailsList { - nextLink?: string; - value?: QuotaRequestDetails[]; -} - -// @public -export interface QuotaRequestOneResourceSubmitResponse { - readonly id?: string; - readonly message?: string; - readonly name?: string; - properties?: QuotaProperties; - readonly provisioningState?: QuotaRequestState; - readonly requestSubmitTime?: Date; - readonly type?: string; -} - -// @public -export interface QuotaRequestProperties { - readonly message?: string; - provisioningState?: QuotaRequestState; - readonly requestSubmitTime?: Date; - value?: SubRequest[]; -} - -// @public -export type QuotaRequestState = string; - -// @public -export interface QuotaRequestStatus { - get(subscriptionId: string, providerId: string, location: string, id: string, options?: QuotaRequestStatusGetOptionalParams): Promise; - list(subscriptionId: string, providerId: string, location: string, options?: QuotaRequestStatusListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface QuotaRequestStatusGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type QuotaRequestStatusGetResponse = QuotaRequestDetails; - -// @public -export interface QuotaRequestStatusListNextOptionalParams extends coreClient.OperationOptions { - filter?: string; - skiptoken?: string; - top?: number; -} - -// @public -export type QuotaRequestStatusListNextResponse = QuotaRequestDetailsList; - -// @public -export interface QuotaRequestStatusListOptionalParams extends coreClient.OperationOptions { - filter?: string; - skiptoken?: string; - top?: number; -} - -// @public -export type QuotaRequestStatusListResponse = QuotaRequestDetailsList; - -// @public -export interface QuotaRequestSubmitResponse { - readonly id?: string; - readonly name?: string; - properties?: QuotaRequestProperties; - readonly type?: string; -} - -// @public -export interface QuotaRequestSubmitResponse201 { - readonly id?: string; - readonly message?: string; - readonly name?: string; - readonly provisioningState?: QuotaRequestState; - readonly type?: string; -} - -// @public -export interface QuotaUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type QuotaUpdateResponse = QuotaRequestOneResourceSubmitResponse; - // @public (undocumented) export interface RenewPropertiesResponse { billingCurrencyTotal?: RenewPropertiesResponseBillingCurrencyTotal; @@ -1506,15 +1279,6 @@ export interface ReservationUtilizationAggregates { // @public export type ReservedResourceType = string; -// @public -export interface ResourceName { - readonly localizedValue?: string; - value?: string; -} - -// @public -export type ResourceType = string; - // @public (undocumented) export interface ScopeProperties { // (undocumented) @@ -1523,19 +1287,6 @@ export interface ScopeProperties { valid?: boolean; } -// @public -export interface ServiceError { - code?: string; - readonly details?: ServiceErrorDetail[]; - message?: string; -} - -// @public -export interface ServiceErrorDetail { - readonly code?: string; - readonly message?: string; -} - // @public (undocumented) export interface SkuCapability { name?: string; @@ -1567,17 +1318,6 @@ export interface SplitRequest { reservationId?: string; } -// @public -export interface SubRequest { - readonly limit?: number; - readonly message?: string; - name?: ResourceName; - provisioningState?: QuotaRequestState; - readonly resourceType?: string; - readonly subRequestId?: string; - unit?: string; -} - // @public (undocumented) export interface SubscriptionScopeProperties { // (undocumented) diff --git a/sdk/reservations/arm-reservations/src/azureReservationAPI.ts b/sdk/reservations/arm-reservations/src/azureReservationAPI.ts index 37d3da80f33d..c8376b880505 100644 --- a/sdk/reservations/arm-reservations/src/azureReservationAPI.ts +++ b/sdk/reservations/arm-reservations/src/azureReservationAPI.ts @@ -13,18 +13,14 @@ import { ReservationOrderImpl, OperationImpl, CalculateExchangeImpl, - ExchangeImpl, - QuotaImpl, - QuotaRequestStatusImpl + ExchangeImpl } from "./operations"; import { Reservation, ReservationOrder, Operation, CalculateExchange, - Exchange, - Quota, - QuotaRequestStatus + Exchange } from "./operationsInterfaces"; import * as Parameters from "./models/parameters"; import * as Mappers from "./models/mappers"; @@ -38,6 +34,7 @@ import { export class AzureReservationAPI extends coreClient.ServiceClient { $host: string; + apiVersion: string; /** * Initializes a new instance of the AzureReservationAPI class. @@ -61,7 +58,7 @@ export class AzureReservationAPI extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-reservations/7.0.0`; + const packageDetails = `azsdk-js-arm-reservations/8.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -82,13 +79,12 @@ export class AzureReservationAPI extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2022-03-01"; this.reservation = new ReservationImpl(this); this.reservationOrder = new ReservationOrderImpl(this); this.operation = new OperationImpl(this); this.calculateExchange = new CalculateExchangeImpl(this); this.exchange = new ExchangeImpl(this); - this.quota = new QuotaImpl(this); - this.quotaRequestStatus = new QuotaRequestStatusImpl(this); } /** @@ -127,8 +123,6 @@ export class AzureReservationAPI extends coreClient.ServiceClient { operation: Operation; calculateExchange: CalculateExchange; exchange: Exchange; - quota: Quota; - quotaRequestStatus: QuotaRequestStatus; } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); diff --git a/sdk/reservations/arm-reservations/src/models/index.ts b/sdk/reservations/arm-reservations/src/models/index.ts index 46cce6a15a26..1b19c115302a 100644 --- a/sdk/reservations/arm-reservations/src/models/index.ts +++ b/sdk/reservations/arm-reservations/src/models/index.ts @@ -825,293 +825,6 @@ export interface ChangeDirectoryResult { error?: string; } -/** Quota properties. */ -export interface CurrentQuotaLimitBase { - /** Quota properties for the resource. */ - properties?: QuotaProperties; -} - -/** Quota properties for the resource. */ -export interface QuotaProperties { - /** Quota properties. */ - limit?: number; - /** - * Current usage value for the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly currentValue?: number; - /** The limit units, such as **count** and **bytes**. Use the unit field provided in the response of the GET quota operation. */ - unit?: string; - /** Name of the resource provide by the resource provider. Use this property for quotaRequests resource operations. */ - name?: ResourceName; - /** The name of the resource type. */ - resourceType?: ResourceType; - /** - * The time period over which the quota usage values are summarized. For example, P1D (per one day), PT1M (per one minute), and PT1S (per one second). This parameter is optional because, for some resources such as compute, the time period is irrelevant. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly quotaPeriod?: string; - /** Additional properties for the specified resource provider. */ - properties?: Record; -} - -/** Resource name provided by the resource provider. Use this property for quotaRequest parameter. */ -export interface ResourceName { - /** Resource name. */ - value?: string; - /** - * Resource display localized name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly localizedValue?: string; -} - -/** The API error. */ -export interface ExceptionResponse { - /** The API error details. */ - error?: ServiceError; -} - -/** The API error details. */ -export interface ServiceError { - /** The error code. */ - code?: string; - /** The error message text. */ - message?: string; - /** - * The list of error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ServiceErrorDetail[]; -} - -/** The error details. */ -export interface ServiceErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; -} - -/** Response for the quota submission request. */ -export interface QuotaRequestOneResourceSubmitResponse { - /** - * The quota request ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the quota request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Type of resource. "Microsoft.Capacity/ServiceLimits" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The quota request status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: QuotaRequestState; - /** - * User friendly status message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The time when the quota request was submitted using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requestSubmitTime?: Date; - /** Quota properties for the resource. */ - properties?: QuotaProperties; -} - -/** Response with request ID that the quota request was accepted. */ -export interface QuotaRequestSubmitResponse201 { - /** - * The quota request ID. Use the requestId parameter to check the request status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Operation ID - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The details of the quota request status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: QuotaRequestState; - /** - * A user friendly message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; -} - -/** Quota limits. */ -export interface QuotaLimits { - /** List of quotas (service limits). */ - value?: CurrentQuotaLimitBase[]; - /** The URI for fetching the next page of quotas (service limits). When no more pages exist, the value is null. */ - nextLink?: string; -} - -/** Quota request details. */ -export interface QuotaRequestDetails { - /** - * Quota request ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Quota request name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The quota request status. */ - provisioningState?: QuotaRequestState; - /** - * User friendly status message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The time when the quota request was submitted using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requestSubmitTime?: Date; - /** The quotaRequests. */ - value?: SubRequest[]; -} - -/** The details of quota request. */ -export interface QuotaRequestProperties { - /** The quota request status. */ - provisioningState?: QuotaRequestState; - /** - * User friendly status message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The time when the quota request was submitted using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requestSubmitTime?: Date; - /** The quotaRequests. */ - value?: SubRequest[]; -} - -/** The sub-request submitted with the quota request. */ -export interface SubRequest { - /** - * Quota (resource limit). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly limit?: number; - /** The resource name. */ - name?: ResourceName; - /** - * Resource type for which the quota check was made. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** The limit units, such as **count** and **bytes**. Use the unit field provided in the response of the GET quota operation. */ - unit?: string; - /** The quota request status. */ - provisioningState?: QuotaRequestState; - /** - * User-friendly status message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * Sub request ID for individual request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subRequestId?: string; -} - -/** Quota request details. */ -export interface QuotaRequestDetailsList { - /** The quota requests. */ - value?: QuotaRequestDetails[]; - /** The URI to fetch the next page of quota limits. When there are no more pages, this is null. */ - nextLink?: string; -} - -/** Current quota limits. */ -export interface CurrentQuotaLimit { - /** - * The details of the quota request status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: QuotaRequestState; - /** - * A user friendly message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** Quota properties for the resource. */ - properties?: QuotaProperties; -} - -/** Quotas (service limits) in the request response. */ -export interface QuotaLimitsResponse { - /** List of quotas with the quota request status. */ - value?: CurrentQuotaLimit[]; - /** The URI for fetching the next page of quota limits. When no more pages exist, the value is null. */ - nextLink?: string; -} - -/** Quota change requests information. */ -export interface CreateGenericQuotaRequestParameters { - /** Quota change requests. */ - value?: CurrentQuotaLimitBase[]; -} - -/** Response for the quota submission request. */ -export interface QuotaRequestSubmitResponse { - /** - * The quota request ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the quota request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** The quota request details. */ - properties?: QuotaRequestProperties; - /** - * Type of resource. "Microsoft.Capacity/serviceLimits" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; -} - /** Defines headers for CalculateExchange_post operation. */ export interface CalculateExchangePostHeaders { /** URL for checking the ongoing status of the operation. */ @@ -1132,24 +845,6 @@ export interface ExchangePostHeaders { retryAfter?: number; } -/** Defines headers for Quota_get operation. */ -export interface QuotaGetHeaders { - /** Current entity state version. It should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Quota_list operation. */ -export interface QuotaListHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Quota_listNext operation. */ -export interface QuotaListNextHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - /** Known values of {@link ErrorResponseCode} that the service accepts. */ export enum KnownErrorResponseCode { NotSpecified = "NotSpecified", @@ -1572,50 +1267,6 @@ export enum KnownOperationStatus { */ export type OperationStatus = string; -/** Known values of {@link ResourceType} that the service accepts. */ -export enum KnownResourceType { - Standard = "standard", - Dedicated = "dedicated", - LowPriority = "lowPriority", - Shared = "shared", - ServiceSpecific = "serviceSpecific" -} - -/** - * Defines values for ResourceType. \ - * {@link KnownResourceType} can be used interchangeably with ResourceType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **standard** \ - * **dedicated** \ - * **lowPriority** \ - * **shared** \ - * **serviceSpecific** - */ -export type ResourceType = string; - -/** Known values of {@link QuotaRequestState} that the service accepts. */ -export enum KnownQuotaRequestState { - Accepted = "Accepted", - Invalid = "Invalid", - Succeeded = "Succeeded", - Failed = "Failed", - InProgress = "InProgress" -} - -/** - * Defines values for QuotaRequestState. \ - * {@link KnownQuotaRequestState} can be used interchangeably with QuotaRequestState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Accepted** \ - * **Invalid** \ - * **Succeeded** \ - * **Failed** \ - * **InProgress** - */ -export type QuotaRequestState = string; - /** Known values of {@link Location} that the service accepts. */ export enum KnownLocation { Westus = "westus", @@ -1976,100 +1627,13 @@ export interface ExchangePostOptionalParams /** Contains response data for the post operation. */ export type ExchangePostResponse = ExchangeOperationResultResponse; -/** Optional parameters. */ -export interface QuotaGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type QuotaGetResponse = QuotaGetHeaders & CurrentQuotaLimitBase; - -/** Optional parameters. */ -export interface QuotaCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type QuotaCreateOrUpdateResponse = QuotaRequestOneResourceSubmitResponse; - -/** Optional parameters. */ -export interface QuotaUpdateOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type QuotaUpdateResponse = QuotaRequestOneResourceSubmitResponse; - -/** Optional parameters. */ -export interface QuotaListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type QuotaListResponse = QuotaListHeaders & QuotaLimits; - -/** Optional parameters. */ -export interface QuotaListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type QuotaListNextResponse = QuotaListNextHeaders & QuotaLimits; - -/** Optional parameters. */ -export interface QuotaRequestStatusGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type QuotaRequestStatusGetResponse = QuotaRequestDetails; - -/** Optional parameters. */ -export interface QuotaRequestStatusListOptionalParams - extends coreClient.OperationOptions { - /** - * | Field | Supported operators - * |---------------------|------------------------ - * - * |requestSubmitTime | ge, le, eq, gt, lt - * - */ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element includes a skiptoken parameter that specifies a starting point to use for subsequent calls. */ - skiptoken?: string; -} - -/** Contains response data for the list operation. */ -export type QuotaRequestStatusListResponse = QuotaRequestDetailsList; - -/** Optional parameters. */ -export interface QuotaRequestStatusListNextOptionalParams - extends coreClient.OperationOptions { - /** - * | Field | Supported operators - * |---------------------|------------------------ - * - * |requestSubmitTime | ge, le, eq, gt, lt - * - */ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element includes a skiptoken parameter that specifies a starting point to use for subsequent calls. */ - skiptoken?: string; -} - -/** Contains response data for the listNext operation. */ -export type QuotaRequestStatusListNextResponse = QuotaRequestDetailsList; - /** Optional parameters. */ export interface AzureReservationAPIOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; + /** Api Version */ + apiVersion?: string; /** Overrides client endpoint. */ endpoint?: string; } diff --git a/sdk/reservations/arm-reservations/src/models/mappers.ts b/sdk/reservations/arm-reservations/src/models/mappers.ts index 81339b6fe638..981d8431ad9d 100644 --- a/sdk/reservations/arm-reservations/src/models/mappers.ts +++ b/sdk/reservations/arm-reservations/src/models/mappers.ts @@ -2446,602 +2446,6 @@ export const ChangeDirectoryResult: coreClient.CompositeMapper = { } }; -export const CurrentQuotaLimitBase: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CurrentQuotaLimitBase", - modelProperties: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "QuotaProperties" - } - } - } - } -}; - -export const QuotaProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaProperties", - modelProperties: { - limit: { - serializedName: "limit", - type: { - name: "Number" - } - }, - currentValue: { - serializedName: "currentValue", - readOnly: true, - type: { - name: "Number" - } - }, - unit: { - serializedName: "unit", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "Composite", - className: "ResourceName" - } - }, - resourceType: { - serializedName: "resourceType", - type: { - name: "String" - } - }, - quotaPeriod: { - serializedName: "quotaPeriod", - readOnly: true, - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } -}; - -export const ResourceName: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceName", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "String" - } - }, - localizedValue: { - serializedName: "localizedValue", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ExceptionResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExceptionResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ServiceError" - } - } - } - } -}; - -export const ServiceError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceError", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceErrorDetail" - } - } - } - } - } - } -}; - -export const ServiceErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const QuotaRequestOneResourceSubmitResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaRequestOneResourceSubmitResponse", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "properties.message", - readOnly: true, - type: { - name: "String" - } - }, - requestSubmitTime: { - serializedName: "properties.requestSubmitTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - properties: { - serializedName: "properties.properties.properties", - type: { - name: "Composite", - className: "QuotaProperties" - } - } - } - } -}; - -export const QuotaRequestSubmitResponse201: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaRequestSubmitResponse201", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "properties.message", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const QuotaLimits: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaLimits", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CurrentQuotaLimitBase" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const QuotaRequestDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaRequestDetails", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - message: { - serializedName: "properties.message", - readOnly: true, - type: { - name: "String" - } - }, - requestSubmitTime: { - serializedName: "properties.requestSubmitTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - value: { - serializedName: "properties.value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubRequest" - } - } - } - } - } - } -}; - -export const QuotaRequestProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaRequestProperties", - modelProperties: { - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - }, - requestSubmitTime: { - serializedName: "requestSubmitTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubRequest" - } - } - } - } - } - } -}; - -export const SubRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SubRequest", - modelProperties: { - limit: { - serializedName: "limit", - readOnly: true, - type: { - name: "Number" - } - }, - name: { - serializedName: "name", - type: { - name: "Composite", - className: "ResourceName" - } - }, - resourceType: { - serializedName: "resourceType", - readOnly: true, - type: { - name: "String" - } - }, - unit: { - serializedName: "unit", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - }, - subRequestId: { - serializedName: "subRequestId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const QuotaRequestDetailsList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaRequestDetailsList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QuotaRequestDetails" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const CurrentQuotaLimit: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CurrentQuotaLimit", - modelProperties: { - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "properties.message", - readOnly: true, - type: { - name: "String" - } - }, - properties: { - serializedName: "quotaInformation.properties", - type: { - name: "Composite", - className: "QuotaProperties" - } - } - } - } -}; - -export const QuotaLimitsResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaLimitsResponse", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CurrentQuotaLimit" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const CreateGenericQuotaRequestParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CreateGenericQuotaRequestParameters", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CurrentQuotaLimitBase" - } - } - } - } - } - } -}; - -export const QuotaRequestSubmitResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaRequestSubmitResponse", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "QuotaRequestProperties" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const CalculateExchangePostHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3095,48 +2499,3 @@ export const ExchangePostHeaders: coreClient.CompositeMapper = { } } }; - -export const QuotaGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - type: { - name: "String" - } - } - } - } -}; - -export const QuotaListHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaListHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - type: { - name: "String" - } - } - } - } -}; - -export const QuotaListNextHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaListNextHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - type: { - name: "String" - } - } - } - } -}; diff --git a/sdk/reservations/arm-reservations/src/models/parameters.ts b/sdk/reservations/arm-reservations/src/models/parameters.ts index 011b341129a9..e07eb651b50f 100644 --- a/sdk/reservations/arm-reservations/src/models/parameters.ts +++ b/sdk/reservations/arm-reservations/src/models/parameters.ts @@ -19,8 +19,7 @@ import { PurchaseRequest as PurchaseRequestMapper, ChangeDirectoryRequest as ChangeDirectoryRequestMapper, CalculateExchangeRequest as CalculateExchangeRequestMapper, - ExchangeRequest as ExchangeRequestMapper, - CurrentQuotaLimitBase as CurrentQuotaLimitBaseMapper + ExchangeRequest as ExchangeRequestMapper } from "../models/mappers"; export const contentType: OperationParameter = { @@ -89,7 +88,7 @@ export const reservationId: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-07-01", + defaultValue: "2022-03-01", isConstant: true, serializedName: "api-version", type: { @@ -255,87 +254,3 @@ export const body6: OperationParameter = { parameterPath: "body", mapper: ExchangeRequestMapper }; - -export const providerId: OperationURLParameter = { - parameterPath: "providerId", - mapper: { - serializedName: "providerId", - required: true, - type: { - name: "String" - } - } -}; - -export const location1: OperationURLParameter = { - parameterPath: "location", - mapper: { - serializedName: "location", - required: true, - type: { - name: "String" - } - } -}; - -export const apiVersion1: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2020-10-25", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const resourceName: OperationURLParameter = { - parameterPath: "resourceName", - mapper: { - serializedName: "resourceName", - required: true, - type: { - name: "String" - } - } -}; - -export const createQuotaRequest: OperationParameter = { - parameterPath: "createQuotaRequest", - mapper: CurrentQuotaLimitBaseMapper -}; - -export const id: OperationURLParameter = { - parameterPath: "id", - mapper: { - serializedName: "id", - required: true, - type: { - name: "String" - } - } -}; - -export const top: OperationQueryParameter = { - parameterPath: ["options", "top"], - mapper: { - constraints: { - InclusiveMinimum: 1 - }, - serializedName: "$top", - type: { - name: "Number" - } - } -}; - -export const skiptoken1: OperationQueryParameter = { - parameterPath: ["options", "skiptoken"], - mapper: { - serializedName: "$skiptoken", - type: { - name: "String" - } - } -}; diff --git a/sdk/reservations/arm-reservations/src/operations/index.ts b/sdk/reservations/arm-reservations/src/operations/index.ts index 425138628c9e..3783dc139ed6 100644 --- a/sdk/reservations/arm-reservations/src/operations/index.ts +++ b/sdk/reservations/arm-reservations/src/operations/index.ts @@ -11,5 +11,3 @@ export * from "./reservationOrder"; export * from "./operation"; export * from "./calculateExchange"; export * from "./exchange"; -export * from "./quota"; -export * from "./quotaRequestStatus"; diff --git a/sdk/reservations/arm-reservations/src/operations/quota.ts b/sdk/reservations/arm-reservations/src/operations/quota.ts deleted file mode 100644 index fd7cf412c2f9..000000000000 --- a/sdk/reservations/arm-reservations/src/operations/quota.ts +++ /dev/null @@ -1,580 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Quota } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureReservationAPI } from "../azureReservationAPI"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - CurrentQuotaLimitBase, - QuotaListNextOptionalParams, - QuotaListOptionalParams, - QuotaGetOptionalParams, - QuotaGetResponse, - QuotaCreateOrUpdateOptionalParams, - QuotaCreateOrUpdateResponse, - QuotaUpdateOptionalParams, - QuotaUpdateResponse, - QuotaListResponse, - QuotaListNextResponse -} from "../models"; - -/// -/** Class containing Quota operations. */ -export class QuotaImpl implements Quota { - private readonly client: AzureReservationAPI; - - /** - * Initialize a new instance of the class Quota class. - * @param client Reference to the service client - */ - constructor(client: AzureReservationAPI) { - this.client = client; - } - - /** - * Gets a list of current quotas (service limits) and usage for all resources. The response from the - * list quota operation can be leveraged to request quota updates. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param options The options parameters. - */ - public list( - subscriptionId: string, - providerId: string, - location: string, - options?: QuotaListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - subscriptionId, - providerId, - location, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage( - subscriptionId, - providerId, - location, - options - ); - } - }; - } - - private async *listPagingPage( - subscriptionId: string, - providerId: string, - location: string, - options?: QuotaListOptionalParams - ): AsyncIterableIterator { - let result = await this._list( - subscriptionId, - providerId, - location, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext( - subscriptionId, - providerId, - location, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - subscriptionId: string, - providerId: string, - location: string, - options?: QuotaListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - subscriptionId, - providerId, - location, - options - )) { - yield* page; - } - } - - /** - * Get the current quota (service limit) and usage of a resource. You can use the response from the GET - * operation to submit quota update request. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param resourceName The resource name for a resource provider, such as SKU name for - * Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices - * @param options The options parameters. - */ - get( - subscriptionId: string, - providerId: string, - location: string, - resourceName: string, - options?: QuotaGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { subscriptionId, providerId, location, resourceName, options }, - getOperationSpec - ); - } - - /** - * Create or update the quota (service limits) of a resource to the requested value. - * Steps: - * - 1. Make the Get request to get the quota information for specific resource. - * - 2. To increase the quota, update the limit field in the response from Get request to new value. - * - 3. Submit the JSON to the quota request API to update the quota. - * The Create quota request may be constructed as follows. The PUT operation can be used to update - * the quota. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param resourceName The resource name for a resource provider, such as SKU name for - * Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices - * @param createQuotaRequest Quota requests payload. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - subscriptionId: string, - providerId: string, - location: string, - resourceName: string, - createQuotaRequest: CurrentQuotaLimitBase, - options?: QuotaCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - QuotaCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { - subscriptionId, - providerId, - location, - resourceName, - createQuotaRequest, - options - }, - createOrUpdateOperationSpec - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - } - - /** - * Create or update the quota (service limits) of a resource to the requested value. - * Steps: - * - 1. Make the Get request to get the quota information for specific resource. - * - 2. To increase the quota, update the limit field in the response from Get request to new value. - * - 3. Submit the JSON to the quota request API to update the quota. - * The Create quota request may be constructed as follows. The PUT operation can be used to update - * the quota. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param resourceName The resource name for a resource provider, such as SKU name for - * Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices - * @param createQuotaRequest Quota requests payload. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - subscriptionId: string, - providerId: string, - location: string, - resourceName: string, - createQuotaRequest: CurrentQuotaLimitBase, - options?: QuotaCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - subscriptionId, - providerId, - location, - resourceName, - createQuotaRequest, - options - ); - return poller.pollUntilDone(); - } - - /** - * Update the quota (service limits) of this resource to the requested value. - * - • To get the quota information for specific resource, send a GET request. - * - • To increase the quota, update the limit field from the GET response to a new value. - * - • To update the quota value, submit the JSON response to the quota request API to update the - * quota. - * • To update the quota. use the PATCH operation. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param resourceName The resource name for a resource provider, such as SKU name for - * Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices - * @param createQuotaRequest Payload for the quota request. - * @param options The options parameters. - */ - async beginUpdate( - subscriptionId: string, - providerId: string, - location: string, - resourceName: string, - createQuotaRequest: CurrentQuotaLimitBase, - options?: QuotaUpdateOptionalParams - ): Promise< - PollerLike, QuotaUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { - subscriptionId, - providerId, - location, - resourceName, - createQuotaRequest, - options - }, - updateOperationSpec - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" - }); - } - - /** - * Update the quota (service limits) of this resource to the requested value. - * - • To get the quota information for specific resource, send a GET request. - * - • To increase the quota, update the limit field from the GET response to a new value. - * - • To update the quota value, submit the JSON response to the quota request API to update the - * quota. - * • To update the quota. use the PATCH operation. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param resourceName The resource name for a resource provider, such as SKU name for - * Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices - * @param createQuotaRequest Payload for the quota request. - * @param options The options parameters. - */ - async beginUpdateAndWait( - subscriptionId: string, - providerId: string, - location: string, - resourceName: string, - createQuotaRequest: CurrentQuotaLimitBase, - options?: QuotaUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - subscriptionId, - providerId, - location, - resourceName, - createQuotaRequest, - options - ); - return poller.pollUntilDone(); - } - - /** - * Gets a list of current quotas (service limits) and usage for all resources. The response from the - * list quota operation can be leveraged to request quota updates. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param options The options parameters. - */ - private _list( - subscriptionId: string, - providerId: string, - location: string, - options?: QuotaListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { subscriptionId, providerId, location, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - subscriptionId: string, - providerId: string, - location: string, - nextLink: string, - options?: QuotaListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { subscriptionId, providerId, location, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CurrentQuotaLimitBase, - headersMapper: Mappers.QuotaGetHeaders - }, - default: { - bodyMapper: Mappers.ExceptionResponse - } - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.providerId, - Parameters.location1, - Parameters.resourceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse - }, - 201: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse - }, - 202: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse - }, - 204: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse - }, - default: { - bodyMapper: Mappers.ExceptionResponse - } - }, - requestBody: Parameters.createQuotaRequest, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.providerId, - Parameters.location1, - Parameters.resourceName - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse - }, - 201: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse - }, - 202: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse - }, - 204: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse - }, - default: { - bodyMapper: Mappers.ExceptionResponse - } - }, - requestBody: Parameters.createQuotaRequest, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.providerId, - Parameters.location1, - Parameters.resourceName - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaLimits, - headersMapper: Mappers.QuotaListHeaders - }, - default: { - bodyMapper: Mappers.ExceptionResponse - } - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.providerId, - Parameters.location1 - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaLimits, - headersMapper: Mappers.QuotaListNextHeaders - }, - default: { - bodyMapper: Mappers.ExceptionResponse - } - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.providerId, - Parameters.location1 - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/reservations/arm-reservations/src/operations/quotaRequestStatus.ts b/sdk/reservations/arm-reservations/src/operations/quotaRequestStatus.ts deleted file mode 100644 index 24ed7688d736..000000000000 --- a/sdk/reservations/arm-reservations/src/operations/quotaRequestStatus.ts +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { QuotaRequestStatus } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { AzureReservationAPI } from "../azureReservationAPI"; -import { - QuotaRequestDetails, - QuotaRequestStatusListNextOptionalParams, - QuotaRequestStatusListOptionalParams, - QuotaRequestStatusGetOptionalParams, - QuotaRequestStatusGetResponse, - QuotaRequestStatusListResponse, - QuotaRequestStatusListNextResponse -} from "../models"; - -/// -/** Class containing QuotaRequestStatus operations. */ -export class QuotaRequestStatusImpl implements QuotaRequestStatus { - private readonly client: AzureReservationAPI; - - /** - * Initialize a new instance of the class QuotaRequestStatus class. - * @param client Reference to the service client - */ - constructor(client: AzureReservationAPI) { - this.client = client; - } - - /** - * For the specified Azure region (location), subscription, and resource provider, get the history of - * the quota requests for the past year. To select specific quota requests, use the oData filter. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param options The options parameters. - */ - public list( - subscriptionId: string, - providerId: string, - location: string, - options?: QuotaRequestStatusListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - subscriptionId, - providerId, - location, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage( - subscriptionId, - providerId, - location, - options - ); - } - }; - } - - private async *listPagingPage( - subscriptionId: string, - providerId: string, - location: string, - options?: QuotaRequestStatusListOptionalParams - ): AsyncIterableIterator { - let result = await this._list( - subscriptionId, - providerId, - location, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext( - subscriptionId, - providerId, - location, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - subscriptionId: string, - providerId: string, - location: string, - options?: QuotaRequestStatusListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - subscriptionId, - providerId, - location, - options - )) { - yield* page; - } - } - - /** - * For the specified Azure region (location), get the details and status of the quota request by the - * quota request ID for the resources of the resource provider. The PUT request for the quota (service - * limit) returns a response with the requestId parameter. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param id Quota Request ID. - * @param options The options parameters. - */ - get( - subscriptionId: string, - providerId: string, - location: string, - id: string, - options?: QuotaRequestStatusGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { subscriptionId, providerId, location, id, options }, - getOperationSpec - ); - } - - /** - * For the specified Azure region (location), subscription, and resource provider, get the history of - * the quota requests for the past year. To select specific quota requests, use the oData filter. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param options The options parameters. - */ - private _list( - subscriptionId: string, - providerId: string, - location: string, - options?: QuotaRequestStatusListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { subscriptionId, providerId, location, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - subscriptionId: string, - providerId: string, - location: string, - nextLink: string, - options?: QuotaRequestStatusListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { subscriptionId, providerId, location, nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests/{id}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaRequestDetails - }, - default: { - bodyMapper: Mappers.ExceptionResponse - } - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.providerId, - Parameters.location1, - Parameters.id - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaRequestDetailsList - }, - default: { - bodyMapper: Mappers.ExceptionResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.apiVersion1, - Parameters.top, - Parameters.skiptoken1 - ], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.providerId, - Parameters.location1 - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaRequestDetailsList - }, - default: { - bodyMapper: Mappers.ExceptionResponse - } - }, - queryParameters: [ - Parameters.filter, - Parameters.apiVersion1, - Parameters.top, - Parameters.skiptoken1 - ], - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.subscriptionId, - Parameters.providerId, - Parameters.location1 - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/reservations/arm-reservations/src/operationsInterfaces/index.ts b/sdk/reservations/arm-reservations/src/operationsInterfaces/index.ts index 425138628c9e..3783dc139ed6 100644 --- a/sdk/reservations/arm-reservations/src/operationsInterfaces/index.ts +++ b/sdk/reservations/arm-reservations/src/operationsInterfaces/index.ts @@ -11,5 +11,3 @@ export * from "./reservationOrder"; export * from "./operation"; export * from "./calculateExchange"; export * from "./exchange"; -export * from "./quota"; -export * from "./quotaRequestStatus"; diff --git a/sdk/reservations/arm-reservations/src/operationsInterfaces/quota.ts b/sdk/reservations/arm-reservations/src/operationsInterfaces/quota.ts deleted file mode 100644 index 350994eb4e36..000000000000 --- a/sdk/reservations/arm-reservations/src/operationsInterfaces/quota.ts +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - CurrentQuotaLimitBase, - QuotaListOptionalParams, - QuotaGetOptionalParams, - QuotaGetResponse, - QuotaCreateOrUpdateOptionalParams, - QuotaCreateOrUpdateResponse, - QuotaUpdateOptionalParams, - QuotaUpdateResponse -} from "../models"; - -/// -/** Interface representing a Quota. */ -export interface Quota { - /** - * Gets a list of current quotas (service limits) and usage for all resources. The response from the - * list quota operation can be leveraged to request quota updates. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param options The options parameters. - */ - list( - subscriptionId: string, - providerId: string, - location: string, - options?: QuotaListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get the current quota (service limit) and usage of a resource. You can use the response from the GET - * operation to submit quota update request. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param resourceName The resource name for a resource provider, such as SKU name for - * Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices - * @param options The options parameters. - */ - get( - subscriptionId: string, - providerId: string, - location: string, - resourceName: string, - options?: QuotaGetOptionalParams - ): Promise; - /** - * Create or update the quota (service limits) of a resource to the requested value. - * Steps: - * - 1. Make the Get request to get the quota information for specific resource. - * - 2. To increase the quota, update the limit field in the response from Get request to new value. - * - 3. Submit the JSON to the quota request API to update the quota. - * The Create quota request may be constructed as follows. The PUT operation can be used to update - * the quota. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param resourceName The resource name for a resource provider, such as SKU name for - * Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices - * @param createQuotaRequest Quota requests payload. - * @param options The options parameters. - */ - beginCreateOrUpdate( - subscriptionId: string, - providerId: string, - location: string, - resourceName: string, - createQuotaRequest: CurrentQuotaLimitBase, - options?: QuotaCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - QuotaCreateOrUpdateResponse - > - >; - /** - * Create or update the quota (service limits) of a resource to the requested value. - * Steps: - * - 1. Make the Get request to get the quota information for specific resource. - * - 2. To increase the quota, update the limit field in the response from Get request to new value. - * - 3. Submit the JSON to the quota request API to update the quota. - * The Create quota request may be constructed as follows. The PUT operation can be used to update - * the quota. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param resourceName The resource name for a resource provider, such as SKU name for - * Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices - * @param createQuotaRequest Quota requests payload. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - subscriptionId: string, - providerId: string, - location: string, - resourceName: string, - createQuotaRequest: CurrentQuotaLimitBase, - options?: QuotaCreateOrUpdateOptionalParams - ): Promise; - /** - * Update the quota (service limits) of this resource to the requested value. - * - • To get the quota information for specific resource, send a GET request. - * - • To increase the quota, update the limit field from the GET response to a new value. - * - • To update the quota value, submit the JSON response to the quota request API to update the - * quota. - * • To update the quota. use the PATCH operation. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param resourceName The resource name for a resource provider, such as SKU name for - * Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices - * @param createQuotaRequest Payload for the quota request. - * @param options The options parameters. - */ - beginUpdate( - subscriptionId: string, - providerId: string, - location: string, - resourceName: string, - createQuotaRequest: CurrentQuotaLimitBase, - options?: QuotaUpdateOptionalParams - ): Promise< - PollerLike, QuotaUpdateResponse> - >; - /** - * Update the quota (service limits) of this resource to the requested value. - * - • To get the quota information for specific resource, send a GET request. - * - • To increase the quota, update the limit field from the GET response to a new value. - * - • To update the quota value, submit the JSON response to the quota request API to update the - * quota. - * • To update the quota. use the PATCH operation. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param resourceName The resource name for a resource provider, such as SKU name for - * Microsoft.Compute, Sku or TotalLowPriorityCores for Microsoft.MachineLearningServices - * @param createQuotaRequest Payload for the quota request. - * @param options The options parameters. - */ - beginUpdateAndWait( - subscriptionId: string, - providerId: string, - location: string, - resourceName: string, - createQuotaRequest: CurrentQuotaLimitBase, - options?: QuotaUpdateOptionalParams - ): Promise; -} diff --git a/sdk/reservations/arm-reservations/src/operationsInterfaces/quotaRequestStatus.ts b/sdk/reservations/arm-reservations/src/operationsInterfaces/quotaRequestStatus.ts deleted file mode 100644 index 26590a2a71f7..000000000000 --- a/sdk/reservations/arm-reservations/src/operationsInterfaces/quotaRequestStatus.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - QuotaRequestDetails, - QuotaRequestStatusListOptionalParams, - QuotaRequestStatusGetOptionalParams, - QuotaRequestStatusGetResponse -} from "../models"; - -/// -/** Interface representing a QuotaRequestStatus. */ -export interface QuotaRequestStatus { - /** - * For the specified Azure region (location), subscription, and resource provider, get the history of - * the quota requests for the past year. To select specific quota requests, use the oData filter. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param options The options parameters. - */ - list( - subscriptionId: string, - providerId: string, - location: string, - options?: QuotaRequestStatusListOptionalParams - ): PagedAsyncIterableIterator; - /** - * For the specified Azure region (location), get the details and status of the quota request by the - * quota request ID for the resources of the resource provider. The PUT request for the quota (service - * limit) returns a response with the requestId parameter. - * @param subscriptionId Azure subscription ID. - * @param providerId Azure resource provider ID. - * @param location Azure region. - * @param id Quota Request ID. - * @param options The options parameters. - */ - get( - subscriptionId: string, - providerId: string, - location: string, - id: string, - options?: QuotaRequestStatusGetOptionalParams - ): Promise; -} diff --git a/sdk/reservations/arm-reservations/tsconfig.json b/sdk/reservations/arm-reservations/tsconfig.json index c743e7574f63..3e6ae96443f3 100644 --- a/sdk/reservations/arm-reservations/tsconfig.json +++ b/sdk/reservations/arm-reservations/tsconfig.json @@ -9,12 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { "@azure/arm-reservations": ["./src/index"] } + "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/reservations/ci.mgmt.yml b/sdk/reservations/ci.mgmt.yml index 38db12873fb0..9e047fa0e68d 100644 --- a/sdk/reservations/ci.mgmt.yml +++ b/sdk/reservations/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -10,6 +10,7 @@ trigger: include: - sdk/reservations/ci.mgmt.yml - sdk/reservations/arm-reservations/ + - sdk/reservations/arm-reservations pr: branches: include: @@ -23,11 +24,11 @@ pr: include: - sdk/reservations/ci.mgmt.yml - sdk/reservations/arm-reservations/ - + - sdk/reservations/arm-reservations extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: reservations Artifacts: - name: azure-arm-reservations - safeName: azurearmreservations \ No newline at end of file + safeName: azurearmreservations