Skip to content

Commit 4c074b8

Browse files
author
SDKAuto
committed
CodeGen from PR 16431 in Azure/azure-rest-api-specs
Merge 55237cfe8ea393799b30c95c029cfee68aa09574 into 62ec79080af0d0d609650d67155ef4a93ae11482
1 parent 1b70966 commit 4c074b8

File tree

163 files changed

+11937
-5680
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+11937
-5680
lines changed

sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.3 (Unreleased)
3+
## 1.0.0-beta.1 (2021-10-18)
44

5+
- Azure Resource Manager Consumption client library for Java. This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2021-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
56

67
## 1.0.0-beta.2 (2021-07-09)
78

sdk/consumption/azure-resourcemanager-consumption/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager Consumption client library for Java.
44

5-
This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2019-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2021-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-consumption</artifactId>
35-
<version>1.0.0-beta.2</version>
35+
<version>1.0.0-beta.3</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md

Lines changed: 1866 additions & 45 deletions
Large diffs are not rendered by default.

sdk/consumption/azure-resourcemanager-consumption/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<packaging>jar</packaging>
1414

1515
<name>Microsoft Azure SDK for Consumption Management</name>
16-
<description>This package contains Microsoft Azure SDK for Consumption Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2019-10.</description>
16+
<description>This package contains Microsoft Azure SDK for Consumption Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2021-10.</description>
1717
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

1919
<licenses>

sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import com.azure.resourcemanager.consumption.implementation.ConsumptionManagementClientBuilder;
2929
import com.azure.resourcemanager.consumption.implementation.CreditsImpl;
3030
import com.azure.resourcemanager.consumption.implementation.EventsOperationsImpl;
31-
import com.azure.resourcemanager.consumption.implementation.ForecastsImpl;
3231
import com.azure.resourcemanager.consumption.implementation.LotsOperationsImpl;
3332
import com.azure.resourcemanager.consumption.implementation.MarketplacesImpl;
3433
import com.azure.resourcemanager.consumption.implementation.OperationsImpl;
@@ -46,7 +45,6 @@
4645
import com.azure.resourcemanager.consumption.models.Charges;
4746
import com.azure.resourcemanager.consumption.models.Credits;
4847
import com.azure.resourcemanager.consumption.models.EventsOperations;
49-
import com.azure.resourcemanager.consumption.models.Forecasts;
5048
import com.azure.resourcemanager.consumption.models.LotsOperations;
5149
import com.azure.resourcemanager.consumption.models.Marketplaces;
5250
import com.azure.resourcemanager.consumption.models.Operations;
@@ -93,8 +91,6 @@ public final class ConsumptionManager {
9391

9492
private PriceSheets priceSheets;
9593

96-
private Forecasts forecasts;
97-
9894
private Operations operations;
9995

10096
private AggregatedCosts aggregatedCosts;
@@ -241,7 +237,7 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
241237
.append("-")
242238
.append("com.azure.resourcemanager.consumption")
243239
.append("/")
244-
.append("1.0.0-beta.2");
240+
.append("1.0.0-beta.1");
245241
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
246242
userAgentBuilder
247243
.append(" (")
@@ -379,14 +375,6 @@ public PriceSheets priceSheets() {
379375
return priceSheets;
380376
}
381377

382-
/** @return Resource collection API of Forecasts. */
383-
public Forecasts forecasts() {
384-
if (this.forecasts == null) {
385-
this.forecasts = new ForecastsImpl(clientObject.getForecasts(), this);
386-
}
387-
return forecasts;
388-
}
389-
390378
/** @return Resource collection API of Operations. */
391379
public Operations operations() {
392380
if (this.operations == null) {

sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,6 @@ public interface ConsumptionManagementClient {
128128
*/
129129
PriceSheetsClient getPriceSheets();
130130

131-
/**
132-
* Gets the ForecastsClient object to access its operations.
133-
*
134-
* @return the ForecastsClient object.
135-
*/
136-
ForecastsClient getForecasts();
137-
138131
/**
139132
* Gets the OperationsClient object to access its operations.
140133
*

sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,27 @@ public interface CreditsClient {
1515
/**
1616
* The credit summary by billingAccountId and billingProfileId.
1717
*
18-
* @param scope The scope associated with credits operations. This includes
19-
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
20-
* Billing Profile scope, and
21-
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
22-
* partners.
18+
* @param billingAccountId BillingAccount ID.
19+
* @param billingProfileId Azure Billing Profile ID.
2320
* @throws IllegalArgumentException thrown if parameters fail the validation.
2421
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2522
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
2623
* @return a credit summary resource.
2724
*/
2825
@ServiceMethod(returns = ReturnType.SINGLE)
29-
CreditSummaryInner get(String scope);
26+
CreditSummaryInner get(String billingAccountId, String billingProfileId);
3027

3128
/**
3229
* The credit summary by billingAccountId and billingProfileId.
3330
*
34-
* @param scope The scope associated with credits operations. This includes
35-
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
36-
* Billing Profile scope, and
37-
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
38-
* partners.
31+
* @param billingAccountId BillingAccount ID.
32+
* @param billingProfileId Azure Billing Profile ID.
3933
* @param context The context to associate with this operation.
4034
* @throws IllegalArgumentException thrown if parameters fail the validation.
4135
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4236
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
4337
* @return a credit summary resource.
4438
*/
4539
@ServiceMethod(returns = ReturnType.SINGLE)
46-
Response<CreditSummaryInner> getWithResponse(String scope, Context context);
40+
Response<CreditSummaryInner> getWithResponse(String billingAccountId, String billingProfileId, Context context);
4741
}

sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,67 @@
1313
/** An instance of this class provides access to all the operations defined in EventsOperationsClient. */
1414
public interface EventsOperationsClient {
1515
/**
16-
* Lists the events by billingAccountId and billingProfileId for given start and end date.
16+
* Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or
17+
* a billing profile for a given start and end date.
1718
*
19+
* @param billingAccountId BillingAccount ID.
20+
* @param billingProfileId Azure Billing Profile ID.
1821
* @param startDate Start date.
1922
* @param endDate End date.
20-
* @param scope The scope associated with events operations. This includes
21-
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
22-
* Billing Profile scope, and
23-
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
24-
* partners.
2523
* @throws IllegalArgumentException thrown if parameters fail the validation.
2624
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2725
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
2826
* @return result of listing event summary.
2927
*/
3028
@ServiceMethod(returns = ReturnType.COLLECTION)
31-
PagedIterable<EventSummaryInner> list(String startDate, String endDate, String scope);
29+
PagedIterable<EventSummaryInner> listByBillingProfile(
30+
String billingAccountId, String billingProfileId, String startDate, String endDate);
3231

3332
/**
34-
* Lists the events by billingAccountId and billingProfileId for given start and end date.
33+
* Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or
34+
* a billing profile for a given start and end date.
3535
*
36+
* @param billingAccountId BillingAccount ID.
37+
* @param billingProfileId Azure Billing Profile ID.
3638
* @param startDate Start date.
3739
* @param endDate End date.
38-
* @param scope The scope associated with events operations. This includes
39-
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
40-
* Billing Profile scope, and
41-
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
42-
* partners.
4340
* @param context The context to associate with this operation.
4441
* @throws IllegalArgumentException thrown if parameters fail the validation.
4542
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4643
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
4744
* @return result of listing event summary.
4845
*/
4946
@ServiceMethod(returns = ReturnType.COLLECTION)
50-
PagedIterable<EventSummaryInner> list(String startDate, String endDate, String scope, Context context);
47+
PagedIterable<EventSummaryInner> listByBillingProfile(
48+
String billingAccountId, String billingProfileId, String startDate, String endDate, Context context);
49+
50+
/**
51+
* Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or
52+
* a billing profile for a given start and end date.
53+
*
54+
* @param billingAccountId BillingAccount ID.
55+
* @throws IllegalArgumentException thrown if parameters fail the validation.
56+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
57+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
58+
* @return result of listing event summary.
59+
*/
60+
@ServiceMethod(returns = ReturnType.COLLECTION)
61+
PagedIterable<EventSummaryInner> listByBillingAccount(String billingAccountId);
62+
63+
/**
64+
* Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or
65+
* a billing profile for a given start and end date.
66+
*
67+
* @param billingAccountId BillingAccount ID.
68+
* @param filter May be used to filter the events by lotId, lotSource etc. The filter supports 'eq', 'lt', 'gt',
69+
* 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
70+
* string where key and value is separated by a colon (:).
71+
* @param context The context to associate with this operation.
72+
* @throws IllegalArgumentException thrown if parameters fail the validation.
73+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
74+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
75+
* @return result of listing event summary.
76+
*/
77+
@ServiceMethod(returns = ReturnType.COLLECTION)
78+
PagedIterable<EventSummaryInner> listByBillingAccount(String billingAccountId, String filter, Context context);
5179
}

sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ForecastsClient.java

Lines changed: 0 additions & 43 deletions
This file was deleted.

sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,62 @@
1313
/** An instance of this class provides access to all the operations defined in LotsOperationsClient. */
1414
public interface LotsOperationsClient {
1515
/**
16-
* Lists the lots by billingAccountId and billingProfileId.
16+
* Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
17+
* Microsoft Azure consumption commitments are only supported for the billing account scope.
1718
*
18-
* @param scope The scope associated with Lots operations. This includes
19-
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
20-
* Billing Profile scope, and
21-
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
22-
* partners.
19+
* @param billingAccountId BillingAccount ID.
20+
* @param billingProfileId Azure Billing Profile ID.
2321
* @throws IllegalArgumentException thrown if parameters fail the validation.
2422
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
2523
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
2624
* @return result of listing lot summary.
2725
*/
2826
@ServiceMethod(returns = ReturnType.COLLECTION)
29-
PagedIterable<LotSummaryInner> list(String scope);
27+
PagedIterable<LotSummaryInner> listByBillingProfile(String billingAccountId, String billingProfileId);
3028

3129
/**
32-
* Lists the lots by billingAccountId and billingProfileId.
30+
* Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
31+
* Microsoft Azure consumption commitments are only supported for the billing account scope.
3332
*
34-
* @param scope The scope associated with Lots operations. This includes
35-
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for
36-
* Billing Profile scope, and
37-
* 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
38-
* partners.
33+
* @param billingAccountId BillingAccount ID.
34+
* @param billingProfileId Azure Billing Profile ID.
3935
* @param context The context to associate with this operation.
4036
* @throws IllegalArgumentException thrown if parameters fail the validation.
4137
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4238
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
4339
* @return result of listing lot summary.
4440
*/
4541
@ServiceMethod(returns = ReturnType.COLLECTION)
46-
PagedIterable<LotSummaryInner> list(String scope, Context context);
42+
PagedIterable<LotSummaryInner> listByBillingProfile(
43+
String billingAccountId, String billingProfileId, Context context);
44+
45+
/**
46+
* Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
47+
* Microsoft Azure consumption commitments are only supported for the billing account scope.
48+
*
49+
* @param billingAccountId BillingAccount ID.
50+
* @throws IllegalArgumentException thrown if parameters fail the validation.
51+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
52+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
53+
* @return result of listing lot summary.
54+
*/
55+
@ServiceMethod(returns = ReturnType.COLLECTION)
56+
PagedIterable<LotSummaryInner> listByBillingAccount(String billingAccountId);
57+
58+
/**
59+
* Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a billing profile.
60+
* Microsoft Azure consumption commitments are only supported for the billing account scope.
61+
*
62+
* @param billingAccountId BillingAccount ID.
63+
* @param filter May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le',
64+
* 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
65+
* where key and value is separated by a colon (:).
66+
* @param context The context to associate with this operation.
67+
* @throws IllegalArgumentException thrown if parameters fail the validation.
68+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
69+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
70+
* @return result of listing lot summary.
71+
*/
72+
@ServiceMethod(returns = ReturnType.COLLECTION)
73+
PagedIterable<LotSummaryInner> listByBillingAccount(String billingAccountId, String filter, Context context);
4774
}

0 commit comments

Comments
 (0)