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
4 changes: 3 additions & 1 deletion sdk/billing/azure-resourcemanager-billing/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2022-02-09)

- Azure Resource Manager Billing client library for Java. This package contains Microsoft Azure SDK for Billing Management SDK. Billing client provides access to billing resources for Azure subscriptions. Package tag package-2020-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/billing/azure-resourcemanager-billing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-billing</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
Expand Down Expand Up @@ -69,6 +70,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/** Entry point to BillingManager. Billing client provides access to billing resources for Azure subscriptions. */
public final class BillingManager {
Expand Down Expand Up @@ -250,7 +252,7 @@ public BillingManager authenticate(TokenCredential credential, AzureProfile prof
.append("-")
.append("com.azure.resourcemanager.billing")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -273,11 +275,24 @@ public BillingManager authenticate(TokenCredential credential, AzureProfile prof
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies);
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public interface AddressClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the address validation.
* @return result of the address validation along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ValidateAddressResponseInner> validateWithResponse(AddressDetails address, Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public interface AgreementsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return an agreement by ID.
* @return an agreement by ID along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<AgreementInner> getWithResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public interface AvailableBalancesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the latest Azure credit balance.
* @return the latest Azure credit balance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<AvailableBalanceInner> getWithResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.azure.resourcemanager.billing.fluent.models.BillingAccountInner;
import com.azure.resourcemanager.billing.fluent.models.InvoiceSectionWithCreateSubPermissionInner;
import com.azure.resourcemanager.billing.models.BillingAccountUpdateRequest;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in BillingAccountsClient. */
public interface BillingAccountsClient {
Expand Down Expand Up @@ -61,7 +62,7 @@ public interface BillingAccountsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a billing account by its ID.
* @return a billing account by its ID along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingAccountInner> getWithResponse(String billingAccountName, String expand, Context context);
Expand All @@ -75,7 +76,7 @@ public interface BillingAccountsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a billing account.
* @return a billing account along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<BillingAccountInner>, BillingAccountInner> beginUpdate(
Expand All @@ -91,7 +92,7 @@ SyncPoller<PollResult<BillingAccountInner>, BillingAccountInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a billing account.
* @return a billing account along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<BillingAccountInner>, BillingAccountInner> beginUpdate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public interface BillingPeriodsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a named billing period.
* @return a named billing period along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingPeriodInner> getWithResponse(String billingPeriodName, Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.billing.fluent.models.BillingProfileInner;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in BillingProfilesClient. */
public interface BillingProfilesClient {
Expand Down Expand Up @@ -68,7 +69,7 @@ public interface BillingProfilesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a billing profile by its ID.
* @return a billing profile by its ID along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingProfileInner> getWithResponse(
Expand All @@ -84,7 +85,7 @@ Response<BillingProfileInner> getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a billing profile.
* @return a billing profile along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<BillingProfileInner>, BillingProfileInner> beginCreateOrUpdate(
Expand All @@ -101,7 +102,7 @@ SyncPoller<PollResult<BillingProfileInner>, BillingProfileInner> beginCreateOrUp
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a billing profile.
* @return a billing profile along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<BillingProfileInner>, BillingProfileInner> beginCreateOrUpdate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public interface BillingPropertiesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the billing properties for a subscription.
* @return the billing properties for a subscription along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingPropertyInner> getWithResponse(Context context);
Expand All @@ -58,7 +58,7 @@ public interface BillingPropertiesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a billing property.
* @return a billing property along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingPropertyInner> updateWithResponse(BillingPropertyInner parameters, Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public interface BillingRoleAssignmentsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a role assignment for the caller on a billing account.
* @return a role assignment for the caller on a billing account along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingRoleAssignmentInner> getByBillingAccountWithResponse(
Expand Down Expand Up @@ -67,7 +67,7 @@ Response<BillingRoleAssignmentInner> getByBillingAccountWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the role assignment.
* @return the role assignment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingRoleAssignmentInner> deleteByBillingAccountWithResponse(
Expand Down Expand Up @@ -105,7 +105,7 @@ BillingRoleAssignmentInner getByInvoiceSection(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a role assignment for the caller on an invoice section.
* @return a role assignment for the caller on an invoice section along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingRoleAssignmentInner> getByInvoiceSectionWithResponse(
Expand Down Expand Up @@ -147,7 +147,7 @@ BillingRoleAssignmentInner deleteByInvoiceSection(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the role assignment.
* @return the role assignment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingRoleAssignmentInner> deleteByInvoiceSectionWithResponse(
Expand Down Expand Up @@ -184,7 +184,7 @@ BillingRoleAssignmentInner getByBillingProfile(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a role assignment for the caller on a billing profile.
* @return a role assignment for the caller on a billing profile along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingRoleAssignmentInner> getByBillingProfileWithResponse(
Expand Down Expand Up @@ -217,7 +217,7 @@ BillingRoleAssignmentInner deleteByBillingProfile(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the role assignment.
* @return the role assignment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingRoleAssignmentInner> deleteByBillingProfileWithResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public interface BillingRoleDefinitionsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the definition for a role on a billing account.
* @return the definition for a role on a billing account along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingRoleDefinitionInner> getByBillingAccountWithResponse(
Expand Down Expand Up @@ -75,7 +75,7 @@ BillingRoleDefinitionInner getByInvoiceSection(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the definition for a role on an invoice section.
* @return the definition for a role on an invoice section along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingRoleDefinitionInner> getByInvoiceSectionWithResponse(
Expand Down Expand Up @@ -112,7 +112,7 @@ BillingRoleDefinitionInner getByBillingProfile(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the definition for a role on a billing profile.
* @return the definition for a role on a billing profile along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<BillingRoleDefinitionInner> getByBillingProfileWithResponse(
Expand Down
Loading