Skip to content

Commit 37e208f

Browse files
author
SDKAuto
committed
CodeGen from PR 21231 in Azure/azure-rest-api-specs
Merge 3dd566350653fe98e754733e8b501b1c98b7e4a4 into fdd4e5c9b9225698c7f26c75c4b26be5c57e60f8
1 parent ff7e832 commit 37e208f

File tree

185 files changed

+2903
-2243
lines changed

Some content is hidden

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

185 files changed

+2903
-2243
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.4 (Unreleased)
3+
## 1.0.0-beta.1 (2022-10-25)
4+
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).
46

57
### Features Added
68

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -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.3</version>
35+
<version>1.0.0-beta.4</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

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

+96-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@
3535

3636
- [ListByBillingAccount](#lotsoperation_listbybillingaccount)
3737
- [ListByBillingProfile](#lotsoperation_listbybillingprofile)
38+
- [ListByCustomer](#lotsoperation_listbycustomer)
3839

3940
## Marketplaces
4041

4142
- [List](#marketplaces_list)
4243

44+
## Operations
45+
46+
- [List](#operations_list)
47+
4348
## PriceSheet
4449

4550
- [Get](#pricesheet_get)
@@ -302,7 +307,8 @@ public final class BudgetsDeleteSamples {
302307
public static void deleteBudget(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
303308
manager
304309
.budgets()
305-
.deleteWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", "TestBudget", Context.NONE);
310+
.deleteByResourceGroupWithResponse(
311+
"subscriptions/00000000-0000-0000-0000-000000000000", "TestBudget", Context.NONE);
306312
}
307313
}
308314
```
@@ -768,6 +774,42 @@ public final class LotsOperationListByBillingProfileSamples {
768774
}
769775
```
770776

777+
### LotsOperation_ListByCustomer
778+
779+
```java
780+
import com.azure.core.util.Context;
781+
782+
/** Samples for LotsOperation ListByCustomer. */
783+
public final class LotsOperationListByCustomerSamples {
784+
/*
785+
* x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByCustomer.json
786+
*/
787+
/**
788+
* Sample code: LotsListByCustomer.
789+
*
790+
* @param manager Entry point to ConsumptionManager.
791+
*/
792+
public static void lotsListByCustomer(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
793+
manager.lotsOperations().listByCustomer("1234:5678", "1234:5678", null, Context.NONE);
794+
}
795+
796+
/*
797+
* x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByCustomerWithFilters.json
798+
*/
799+
/**
800+
* Sample code: LotsListByCustomerWithFilter.
801+
*
802+
* @param manager Entry point to ConsumptionManager.
803+
*/
804+
public static void lotsListByCustomerWithFilter(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
805+
manager
806+
.lotsOperations()
807+
.listByCustomer(
808+
"1234:5678", "1234:5678", "status eq 'active' AND source eq 'consumptioncommitment'", Context.NONE);
809+
}
810+
}
811+
```
812+
771813
### Marketplaces_List
772814

773815
```java
@@ -921,6 +963,27 @@ public final class MarketplacesListSamples {
921963
}
922964
```
923965

966+
### Operations_List
967+
968+
```java
969+
import com.azure.core.util.Context;
970+
971+
/** Samples for Operations List. */
972+
public final class OperationsListSamples {
973+
/*
974+
* x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/OperationList.json
975+
*/
976+
/**
977+
* Sample code: OperationList.
978+
*
979+
* @param manager Entry point to ConsumptionManager.
980+
*/
981+
public static void operationList(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
982+
manager.operations().list(Context.NONE);
983+
}
984+
}
985+
```
986+
924987
### PriceSheet_Get
925988

926989
```java
@@ -980,6 +1043,7 @@ public final class PriceSheetGetByBillingPeriodSamples {
9801043
```java
9811044
import com.azure.core.util.Context;
9821045
import com.azure.resourcemanager.consumption.models.LookBackPeriod;
1046+
import com.azure.resourcemanager.consumption.models.Scope;
9831047
import com.azure.resourcemanager.consumption.models.Term;
9841048

9851049
/** Samples for ReservationRecommendationDetails Get. */
@@ -996,7 +1060,14 @@ public final class ReservationRecommendationDetailsGetSamples {
9961060
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
9971061
manager
9981062
.reservationRecommendationDetails()
999-
.getWithResponse("Single", "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", Context.NONE);
1063+
.getWithResponse(
1064+
"subscriptions/00000000-0000-0000-0000-00000000",
1065+
Scope.SINGLE,
1066+
"westus",
1067+
Term.P3Y,
1068+
LookBackPeriod.LAST30DAYS,
1069+
"Standard_DS13_v2",
1070+
Context.NONE);
10001071
}
10011072

10021073
/*
@@ -1012,7 +1083,13 @@ public final class ReservationRecommendationDetailsGetSamples {
10121083
manager
10131084
.reservationRecommendationDetails()
10141085
.getWithResponse(
1015-
"Shared", "australiaeast", Term.P1Y, LookBackPeriod.LAST7DAYS, "Standard_B2s", Context.NONE);
1086+
"providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-00000000:00000000-0000-0000-0000-00000000/billingProfiles/00000000-0000-0000-0000-00000000",
1087+
Scope.SHARED,
1088+
"australiaeast",
1089+
Term.P1Y,
1090+
LookBackPeriod.LAST7DAYS,
1091+
"Standard_B2s",
1092+
Context.NONE);
10161093
}
10171094

10181095
/*
@@ -1027,7 +1104,14 @@ public final class ReservationRecommendationDetailsGetSamples {
10271104
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
10281105
manager
10291106
.reservationRecommendationDetails()
1030-
.getWithResponse("Single", "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", Context.NONE);
1107+
.getWithResponse(
1108+
"subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/testGroup",
1109+
Scope.SINGLE,
1110+
"westus",
1111+
Term.P3Y,
1112+
LookBackPeriod.LAST30DAYS,
1113+
"Standard_DS13_v2",
1114+
Context.NONE);
10311115
}
10321116

10331117
/*
@@ -1042,7 +1126,14 @@ public final class ReservationRecommendationDetailsGetSamples {
10421126
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
10431127
manager
10441128
.reservationRecommendationDetails()
1045-
.getWithResponse("Shared", "eastus", Term.P1Y, LookBackPeriod.LAST60DAYS, "Standard_DS14_v2", Context.NONE);
1129+
.getWithResponse(
1130+
"providers/Microsoft.Billing/billingAccounts/000000",
1131+
Scope.SHARED,
1132+
"eastus",
1133+
Term.P1Y,
1134+
LookBackPeriod.LAST60DAYS,
1135+
"Standard_DS14_v2",
1136+
Context.NONE);
10461137
}
10471138
}
10481139
```

0 commit comments

Comments
 (0)