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
22 changes: 11 additions & 11 deletions sdk/billing/arm-billing/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Release History

## 4.0.2 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 4.1.0-beta.1 (2022-06-16)
**Features**

- Added Interface BillingProfileInfo
- Added Interface OperationsErrorDetails
- Added Interface OperationsErrorResponse
- Interface BillingProfileListResult has a new optional parameter totalCount
- Type Alias Agreement has a new parameter billingProfileInfo
## 4.0.1 (2022-04-11)

- Bug fix
Expand Down
2 changes: 1 addition & 1 deletion sdk/billing/arm-billing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Billing client provides access to billing resources for Azure subscriptions.

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

## Getting started
Expand Down
12 changes: 6 additions & 6 deletions sdk/billing/arm-billing/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "d29e6eb4894005c52e67cb4b5ac3faf031113e7d",
"readme": "specification\\billing\\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:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\commerce\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.18.20220329.1 --generate-sample=true",
"commit": "bf10d887eb00e0cd9b1e108d036c4092db07b4bb",
"readme": "specification/billing/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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/billing/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.1",
"use": "@autorest/typescript@6.0.0-alpha.18.20220329.1"
}
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.2",
"use": "@autorest/typescript@6.0.0-alpha.19.20220425.1"
}
16 changes: 9 additions & 7 deletions sdk/billing/arm-billing/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 BillingManagementClient.",
"version": "4.0.2",
"version": "4.1.0-beta.1",
"engines": {
"node": ">=12.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.0.0",
"@azure/core-client": "^1.5.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.1.0",
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand All @@ -40,9 +40,11 @@
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^1.0.0",
"@azure-tools/test-recorder": "^2.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^7.1.1",
"cross-env": "^7.0.2"
"cross-env": "^7.0.2",
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/billing/arm-billing",
"repository": {
Expand Down Expand Up @@ -93,7 +95,7 @@
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
"unit-test:browser": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"integration-test:browser": "echo skipped",
"docs": "echo skipped"
},
Expand All @@ -107,4 +109,4 @@
]
},
"autoPublish": true
}
}
21 changes: 21 additions & 0 deletions sdk/billing/arm-billing/review/arm-billing.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export type Agreement = Resource & {
readonly agreementLink?: string;
readonly category?: Category;
readonly acceptanceMode?: AcceptanceMode;
readonly billingProfileInfo?: BillingProfileInfo;
readonly effectiveDate?: Date;
readonly expirationDate?: Date;
participants?: Participants[];
Expand Down Expand Up @@ -440,9 +441,17 @@ export interface BillingProfileCreationRequest {
poNumber?: string;
}

// @public
export interface BillingProfileInfo {
billingProfileDisplayName?: string;
billingProfileId?: string;
indirectRelationshipOrganizationName?: string;
}

// @public
export interface BillingProfileListResult {
readonly nextLink?: string;
readonly totalCount?: number;
readonly value?: BillingProfile[];
}

Expand Down Expand Up @@ -1857,6 +1866,18 @@ export interface Operations {
list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
}

// @public
export interface OperationsErrorDetails {
readonly code?: string;
readonly message?: string;
readonly target?: string;
}

// @public
export interface OperationsErrorResponse {
error?: OperationsErrorDetails;
}

// @public
export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {
}
Expand Down
38 changes: 31 additions & 7 deletions sdk/billing/arm-billing/src/billingManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

import * as coreClient from "@azure/core-client";
import * as coreRestPipeline from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth";
import {
BillingAccountsImpl,
Expand All @@ -23,13 +24,13 @@ import {
TransactionsImpl,
PoliciesImpl,
BillingPropertyOperationsImpl,
OperationsImpl,
BillingRoleDefinitionsImpl,
BillingRoleAssignmentsImpl,
AgreementsImpl,
ReservationsImpl,
EnrollmentAccountsImpl,
BillingPeriodsImpl
BillingPeriodsImpl,
OperationsImpl
} from "./operations";
import {
BillingAccounts,
Expand All @@ -46,13 +47,13 @@ import {
Transactions,
Policies,
BillingPropertyOperations,
Operations,
BillingRoleDefinitions,
BillingRoleAssignments,
Agreements,
Reservations,
EnrollmentAccounts,
BillingPeriods
BillingPeriods,
Operations
} from "./operationsInterfaces";
import { BillingManagementClientOptionalParams } from "./models";

Expand Down Expand Up @@ -87,7 +88,7 @@ export class BillingManagementClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-billing/4.0.2`;
const packageDetails = `azsdk-js-arm-billing/4.1.0-beta.1`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand All @@ -106,6 +107,29 @@ export class BillingManagementClient extends coreClient.ServiceClient {
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
};
super(optionsWithDefaults);

if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
);
if (!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
scopes: `${optionsWithDefaults.baseUri}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
}
}
// Parameter assignments
this.subscriptionId = subscriptionId;

Expand All @@ -125,13 +149,13 @@ export class BillingManagementClient extends coreClient.ServiceClient {
this.transactions = new TransactionsImpl(this);
this.policies = new PoliciesImpl(this);
this.billingPropertyOperations = new BillingPropertyOperationsImpl(this);
this.operations = new OperationsImpl(this);
this.billingRoleDefinitions = new BillingRoleDefinitionsImpl(this);
this.billingRoleAssignments = new BillingRoleAssignmentsImpl(this);
this.agreements = new AgreementsImpl(this);
this.reservations = new ReservationsImpl(this);
this.enrollmentAccounts = new EnrollmentAccountsImpl(this);
this.billingPeriods = new BillingPeriodsImpl(this);
this.operations = new OperationsImpl(this);
}

billingAccounts: BillingAccounts;
Expand All @@ -148,11 +172,11 @@ export class BillingManagementClient extends coreClient.ServiceClient {
transactions: Transactions;
policies: Policies;
billingPropertyOperations: BillingPropertyOperations;
operations: Operations;
billingRoleDefinitions: BillingRoleDefinitions;
billingRoleAssignments: BillingRoleAssignments;
agreements: Agreements;
reservations: Reservations;
enrollmentAccounts: EnrollmentAccounts;
billingPeriods: BillingPeriods;
operations: Operations;
}
Loading