Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 2 additions & 52 deletions sdk/quota/arm-quota/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,5 @@
# Release History

## 1.0.0-beta.6 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 1.0.0-beta.5 (2022-12-05)

**Features**

- Added Interface LimitObject

## 1.0.0-beta.4 (2022-04-28)

**Features**

- Bug fix

## 1.0.0-beta.3 (2021-12-22)

**Features**

- Class AzureQuotaExtensionAPI has a new parameter $host
- Class AzureQuotaExtensionAPI has a new parameter apiVersion

**Breaking Changes**

- Deleted Class AzureQuotaExtensionAPIContext

## 1.0.0-beta.2 (2021-11-01)

**Features**

- Added operation group QuotaOperation
- Added Interface QuotaOperationListNextOptionalParams
- Added Interface QuotaOperationListOptionalParams
- Added Type Alias LimitObject
- Added Type Alias QuotaOperationListNextResponse
- Added Type Alias QuotaOperationListResponse
- Class AzureQuotaExtensionAPI has a new parameter quotaOperation

**Breaking Changes**

- Removed operation group Operation
- Class AzureQuotaExtensionAPI no longer has parameter operation

## 1.0.0-beta.1 (2021-09-28)
## 1.0.0 (2023-11-07)

- Initial Release
The package of @azure/arm-quota is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
2 changes: 1 addition & 1 deletion sdk/quota/arm-quota/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022 Microsoft
Copyright (c) 2023 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion sdk/quota/arm-quota/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Microsoft Azure Quota Resource Provider

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/quota/arm-quota) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-quota) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-quota?view=azure-node-preview) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-quota) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started
Expand Down
10 changes: 5 additions & 5 deletions sdk/quota/arm-quota/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf",
"readme": "specification\\quota\\resource-manager\\readme.md",
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\quota\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true",
"commit": "a231973a4fd49f699621dd74cb1b47d9d6fdcd13",
"readme": "specification/quota/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/quota/resource-manager/readme.md --use=@autorest/typescript@^6.0.12",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
"use": "@autorest/typescript@6.0.0-rc.3.20221108.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.4",
"use": "@autorest/typescript@^6.0.12"
}
31 changes: 13 additions & 18 deletions sdk/quota/arm-quota/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for AzureQuotaExtensionAPI.",
"version": "1.0.0-beta.6",
"version": "1.0.0",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.6.1",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-rest-pipeline": "^1.12.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand All @@ -29,22 +29,24 @@
"types": "./types/arm-quota.d.ts",
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"mkdirp": "^1.0.4",
"mkdirp": "^2.1.2",
"typescript": "~5.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"rimraf": "^5.0.0",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^3.3.0",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^10.0.0",
"@types/mocha": "^10.0.0",
"esm": "^3.2.18",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"@azure/dev-tool": "^1.0.0",
"ts-node": "^10.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/quota/arm-quota",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down Expand Up @@ -77,7 +79,7 @@
"extract-api": "api-extractor run --local",
"lint": "echo skipped",
"audit": "echo skipped",
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
"build:test": "echo skipped",
Expand Down Expand Up @@ -105,12 +107,5 @@
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-quota?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/quota/arm-quota"
}
11 changes: 4 additions & 7 deletions sdk/quota/arm-quota/review/arm-quota.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import * as coreAuth from '@azure/core-auth';
import * as coreClient from '@azure/core-client';
import { OperationState } from '@azure/core-lro';
import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';
import { SimplePollerLike } from '@azure/core-lro';

// @public (undocumented)
export class AzureQuotaExtensionAPI extends coreClient.ServiceClient {
Expand Down Expand Up @@ -141,9 +141,9 @@ export interface OperationResponse {

// @public
export interface Quota {
beginCreateOrUpdate(resourceName: string, scope: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<QuotaCreateOrUpdateResponse>, QuotaCreateOrUpdateResponse>>;
beginCreateOrUpdate(resourceName: string, scope: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<QuotaCreateOrUpdateResponse>, QuotaCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceName: string, scope: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaCreateOrUpdateOptionalParams): Promise<QuotaCreateOrUpdateResponse>;
beginUpdate(resourceName: string, scope: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaUpdateOptionalParams): Promise<PollerLike<PollOperationState<QuotaUpdateResponse>, QuotaUpdateResponse>>;
beginUpdate(resourceName: string, scope: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaUpdateOptionalParams): Promise<SimplePollerLike<OperationState<QuotaUpdateResponse>, QuotaUpdateResponse>>;
beginUpdateAndWait(resourceName: string, scope: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaUpdateOptionalParams): Promise<QuotaUpdateResponse>;
get(resourceName: string, scope: string, options?: QuotaGetOptionalParams): Promise<QuotaGetResponse>;
list(scope: string, options?: QuotaListOptionalParams): PagedAsyncIterableIterator<CurrentQuotaLimitBase>;
Expand Down Expand Up @@ -303,9 +303,6 @@ export type QuotaRequestStatusGetResponse = QuotaRequestDetails;

// @public
export interface QuotaRequestStatusListNextOptionalParams extends coreClient.OperationOptions {
filter?: string;
skiptoken?: string;
top?: number;
}

// @public
Expand Down
4 changes: 2 additions & 2 deletions sdk/quota/arm-quota/src/azureQuotaExtensionAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class AzureQuotaExtensionAPI extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-quota/1.0.0-beta.6`;
const packageDetails = `azsdk-js-arm-quota/1.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down Expand Up @@ -105,7 +105,7 @@ export class AzureQuotaExtensionAPI extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2021-03-15-preview";
this.apiVersion = options.apiVersion || "2023-02-01";
this.usages = new UsagesImpl(this);
this.quota = new QuotaImpl(this);
this.quotaRequestStatus = new QuotaRequestStatusImpl(this);
Expand Down
54 changes: 31 additions & 23 deletions sdk/quota/arm-quota/src/lroImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,37 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { AbortSignalLike } from "@azure/abort-controller";
import { LongRunningOperation, LroResponse } from "@azure/core-lro";

export class LroImpl<T> implements LongRunningOperation<T> {
constructor(
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
private args: Record<string, unknown>,
private spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>,
public requestPath: string = spec.path!,
public requestMethod: string = spec.httpMethod
) {}
public async sendInitialRequest(): Promise<LroResponse<T>> {
return this.sendOperationFn(this.args, this.spec);
}
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
const { requestBody, ...restSpec } = this.spec;
return this.sendOperationFn(this.args, {
...restSpec,
path,
httpMethod: "GET"
});
}
export function createLroSpec<T>(inputs: {
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
args: Record<string, unknown>;
spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>;
}): LongRunningOperation<T> {
const { args, spec, sendOperationFn } = inputs;
return {
requestMethod: spec.httpMethod,
requestPath: spec.path!,
sendInitialRequest: () => sendOperationFn(args, spec),
sendPollRequest: (
path: string,
options?: { abortSignal?: AbortSignalLike }
) => {
const { requestBody, ...restSpec } = spec;
return sendOperationFn(args, {
...restSpec,
httpMethod: "GET",
path,
abortSignal: options?.abortSignal
});
}
};
}
25 changes: 5 additions & 20 deletions sdk/quota/arm-quota/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface UsagesProperties {
readonly unit?: string;
/** Resource name provided by the resource provider. Use this property name when requesting quota. */
name?: ResourceName;
/** The name of the resource type. */
/** The name of the resource type. Optional field. */
resourceType?: string;
/**
* The time period for the summary of the quota usage values. For example:
Expand Down Expand Up @@ -154,7 +154,7 @@ export interface QuotaProperties {
readonly unit?: string;
/** Resource name provided by the resource provider. Use this property name when requesting quota. */
name?: ResourceName;
/** Resource type name. */
/** The name of the resource type. Optional field. */
resourceType?: string;
/**
* The time period over which the quota usage values are summarized. For example:
Expand Down Expand Up @@ -386,7 +386,7 @@ export interface QuotaRequestOneResourceSubmitResponse {
unit?: string;
/** Resource name provided by the resource provider. Use this property name when requesting quota. */
namePropertiesName?: ResourceName;
/** Resource type name. */
/** The name of the resource type. Optional field. */
resourceType?: string;
/**
* The time period over which the quota usage values are summarized. For example:
Expand Down Expand Up @@ -462,7 +462,7 @@ export interface QuotaRequestSubmitResponse202 {
unit?: string;
/** Resource name provided by the resource provider. Use this property name when requesting quota. */
namePropertiesName?: ResourceName;
/** Resource type name. */
/** The name of the resource type. Optional field. */
resourceType?: string;
/**
* The time period over which the quota usage values are summarized. For example:
Expand Down Expand Up @@ -693,22 +693,7 @@ export type QuotaRequestStatusListResponse = QuotaRequestDetailsList;

/** Optional parameters. */
export interface QuotaRequestStatusListNextOptionalParams
extends coreClient.OperationOptions {
/**
* | Field | Supported operators
* |---------------------|------------------------
*
* |requestSubmitTime | ge, le, eq, gt, lt
* |provisioningState eq {QuotaRequestState}
* |resourceName eq {resourceName}
*
*/
filter?: string;
/** Number of records to return. */
top?: number;
/** The **Skiptoken** parameter is used only if a previous operation returned a partial result. If a previous response contains a **nextLink** element, its value includes a **skiptoken** parameter that specifies a starting point to use for subsequent calls. */
skiptoken?: string;
}
extends coreClient.OperationOptions {}

/** Contains response data for the listNext operation. */
export type QuotaRequestStatusListNextResponse = QuotaRequestDetailsList;
Expand Down
2 changes: 1 addition & 1 deletion sdk/quota/arm-quota/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const resourceName: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2021-03-15-preview",
defaultValue: "2023-02-01",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
Loading