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
8 changes: 4 additions & 4 deletions sdk/reservations/arm-reservations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-reservations

### How to use

#### nodejs - Authentication, client creation and listStatus quota as an example written in TypeScript.
#### nodejs - Authentication, client creation and get quota as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -39,7 +39,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
const providerId = "testproviderId";
const location = "westus";
const resourceName = "testresourceName";
client.quota.listStatus(subscriptionId, providerId, location, resourceName).then((result) => {
client.quota.get(subscriptionId, providerId, location, resourceName).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -48,7 +48,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and listStatus quota as an example written in JavaScript.
#### browser - Authentication, client creation and get quota as an example written in JavaScript.

##### Install @azure/ms-rest-browserauth

Expand Down Expand Up @@ -86,7 +86,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
const providerId = "testproviderId";
const location = "westus";
const resourceName = "testresourceName";
client.quota.listStatus(subscriptionId, providerId, location, resourceName).then((result) => {
client.quota.get(subscriptionId, providerId, location, resourceName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down
8 changes: 2 additions & 6 deletions sdk/reservations/arm-reservations/src/azureReservationAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ import { AzureReservationAPIContext } from "./azureReservationAPIContext";
class AzureReservationAPI extends AzureReservationAPIContext {
// Operation groups
quota: operations.Quota;
quotaRequest: operations.QuotaRequest;
quotas: operations.Quotas;
quotaRequests: operations.QuotaRequests;
quotaRequestStatus: operations.QuotaRequestStatus;
autoQuotaIncrease: operations.AutoQuotaIncrease;
reservation: operations.Reservation;
reservationOrder: operations.ReservationOrder;
Expand All @@ -35,9 +33,7 @@ class AzureReservationAPI extends AzureReservationAPIContext {
constructor(credentials: msRest.ServiceClientCredentials, options?: Models.AzureReservationAPIOptions) {
super(credentials, options);
this.quota = new operations.Quota(this);
this.quotaRequest = new operations.QuotaRequest(this);
this.quotas = new operations.Quotas(this);
this.quotaRequests = new operations.QuotaRequests(this);
this.quotaRequestStatus = new operations.QuotaRequestStatus(this);
this.autoQuotaIncrease = new operations.AutoQuotaIncrease(this);
this.reservation = new operations.Reservation(this);
this.reservationOrder = new operations.ReservationOrder(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@
*/

export {
Actions,
AqiSettings,
AutoQuotaIncreaseDetail,
BaseResource,
CurrentQuotaLimit,
CurrentQuotaLimitBase,
EmailAction,
EmailActions,
ExceptionResponse,
ExtendedStatusInfo,
OnFailure,
OnFailureEmailActions,
OnFailurePhoneActions,
PaymentDetail,
PhoneAction,
Price,
PurchaseRequest,
PurchaseRequestPropertiesReservedResourceProperties,
Expand Down
124 changes: 50 additions & 74 deletions sdk/reservations/arm-reservations/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,51 +343,23 @@ export interface EmailAction {
}

/**
* The email actions for auto quota increase.
* The email actions.
*/
export interface OnFailureEmailActions {
export interface EmailActions {
/**
* The list of email actions.
*/
value?: EmailAction[];
}

/**
* Phone Action.
*/
export interface PhoneAction {
/**
* The phone number for the action.
*/
phoneNumber?: string;
/**
* The preferred communication channel.
*/
preferredChannel?: any;
}

/**
* The phone actions for auto quota increase.
*/
export interface OnFailurePhoneActions {
/**
* The list of phone actions.
*/
value?: PhoneAction[];
emailAddresses?: EmailAction[];
}

/**
* The actions for auto quota increase.
*/
export interface OnFailure {
export interface Actions {
/**
* The email actions for auto quota increase.
*/
emailActions?: OnFailureEmailActions;
/**
* The phone actions for auto quota increase.
*/
phoneActions?: OnFailurePhoneActions;
emailActions?: EmailActions;
}

/**
Expand Down Expand Up @@ -462,25 +434,29 @@ export interface AutoQuotaIncreaseDetail extends BaseResource {
/**
* The on failure Actions.
*/
onFailure?: OnFailure;
onFailure?: Actions;
/**
* The on success Actions.
*/
onSuccess?: OnFailure;
onSuccess?: Actions;
/**
* The support ticket action.
*/
supportTicketAction?: SupportRequestAction;
}

/**
* The email actions.
* Phone Action.
*/
export interface EmailActions {
export interface PhoneAction {
/**
* The phone number for the action.
*/
phoneNumber?: string;
/**
* The list of email actions based on the success or failure of automatic quota increase action.
* The preferred communication channel.
*/
value?: EmailAction[];
preferredChannel?: any;
}

/**
Expand Down Expand Up @@ -1179,7 +1155,7 @@ export interface Properties {
/**
* Optional Parameters.
*/
export interface QuotaRequestsListStatusOptionalParams extends msRest.RequestOptionsBase {
export interface QuotaRequestStatusListOptionalParams extends msRest.RequestOptionsBase {
/**
* | Field | Supported operators
* |---------------------|------------------------
Expand Down Expand Up @@ -1238,9 +1214,9 @@ export interface AzureReservationAPIOptions extends AzureServiceClientOptions {
}

/**
* Defines headers for listStatus operation.
* Defines headers for Get operation.
*/
export interface QuotaListStatusHeaders {
export interface QuotaGetHeaders {
/**
* Current entity state version. Should be treated as opaque and used to make conditional HTTP
* requests.
Expand All @@ -1249,9 +1225,9 @@ export interface QuotaListStatusHeaders {
}

/**
* Defines headers for listStatus operation.
* Defines headers for List operation.
*/
export interface QuotasListStatusHeaders {
export interface QuotaListHeaders {
/**
* Current entity state version. Should be treated as opaque and used to make conditional HTTP
* requests.
Expand Down Expand Up @@ -1404,17 +1380,17 @@ export type InstanceFlexibility = 'On' | 'Off';
export type AppliedScopeType = 'Single' | 'Shared';

/**
* Contains response data for the listStatus operation.
* Contains response data for the get operation.
*/
export type QuotaListStatusResponse = CurrentQuotaLimitBase & QuotaListStatusHeaders & {
export type QuotaGetResponse = CurrentQuotaLimitBase & QuotaGetHeaders & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The parsed HTTP response headers.
*/
parsedHeaders: QuotaListStatusHeaders;
parsedHeaders: QuotaGetHeaders;

/**
* The response body as text (string format)
Expand All @@ -1429,9 +1405,9 @@ export type QuotaListStatusResponse = CurrentQuotaLimitBase & QuotaListStatusHea
};

/**
* Contains response data for the create operation.
* Contains response data for the createOrUpdate operation.
*/
export type QuotaRequestCreateResponse = {
export type QuotaCreateOrUpdateResponse = {
/**
* The parsed response body.
*/
Expand All @@ -1456,7 +1432,7 @@ export type QuotaRequestCreateResponse = {
/**
* Contains response data for the update operation.
*/
export type QuotaRequestUpdateResponse = {
export type QuotaUpdateResponse = {
/**
* The parsed response body.
*/
Expand All @@ -1479,18 +1455,18 @@ export type QuotaRequestUpdateResponse = {
};

/**
* Contains response data for the beginCreate operation.
* Contains response data for the list operation.
*/
export type QuotaRequestBeginCreateResponse = {
/**
* The parsed response body.
*/
body: any;

export type QuotaListResponse = QuotaLimits & QuotaListHeaders & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The parsed HTTP response headers.
*/
parsedHeaders: QuotaListHeaders;

/**
* The response body as text (string format)
*/
Expand All @@ -1499,14 +1475,14 @@ export type QuotaRequestBeginCreateResponse = {
/**
* The response body as parsed JSON or XML
*/
parsedBody: any;
parsedBody: QuotaLimits;
};
};

/**
* Contains response data for the beginUpdate operation.
* Contains response data for the beginCreateOrUpdate operation.
*/
export type QuotaRequestBeginUpdateResponse = {
export type QuotaBeginCreateOrUpdateResponse = {
/**
* The parsed response body.
*/
Expand All @@ -1529,18 +1505,18 @@ export type QuotaRequestBeginUpdateResponse = {
};

/**
* Contains response data for the listStatus operation.
* Contains response data for the beginUpdate operation.
*/
export type QuotasListStatusResponse = QuotaLimits & QuotasListStatusHeaders & {
export type QuotaBeginUpdateResponse = {
/**
* The parsed response body.
*/
body: any;

/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The parsed HTTP response headers.
*/
parsedHeaders: QuotasListStatusHeaders;

/**
* The response body as text (string format)
*/
Expand All @@ -1549,14 +1525,14 @@ export type QuotasListStatusResponse = QuotaLimits & QuotasListStatusHeaders & {
/**
* The response body as parsed JSON or XML
*/
parsedBody: QuotaLimits;
parsedBody: any;
};
};

/**
* Contains response data for the getStatus operation.
* Contains response data for the get operation.
*/
export type QuotaRequestsGetStatusResponse = QuotaRequestDetails & {
export type QuotaRequestStatusGetResponse = QuotaRequestDetails & {
/**
* The underlying HTTP response.
*/
Expand All @@ -1574,9 +1550,9 @@ export type QuotaRequestsGetStatusResponse = QuotaRequestDetails & {
};

/**
* Contains response data for the listStatus operation.
* Contains response data for the list operation.
*/
export type QuotaRequestsListStatusResponse = QuotaRequestDetailsList & {
export type QuotaRequestStatusListResponse = QuotaRequestDetailsList & {
/**
* The underlying HTTP response.
*/
Expand All @@ -1594,9 +1570,9 @@ export type QuotaRequestsListStatusResponse = QuotaRequestDetailsList & {
};

/**
* Contains response data for the listStatusNext operation.
* Contains response data for the listNext operation.
*/
export type QuotaRequestsListStatusNextResponse = QuotaRequestDetailsList & {
export type QuotaRequestStatusListNextResponse = QuotaRequestDetailsList & {
/**
* The underlying HTTP response.
*/
Expand Down
Loading