Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-resourcemanager-consumption] [Hub Generated] Review request for Microsoft.Consumption to add version stable/2019-10-01 #2129

Closed
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2022-10-12)

- 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).

### Features Added

Expand Down
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-consumption</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
101 changes: 96 additions & 5 deletions sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@

- [ListByBillingAccount](#lotsoperation_listbybillingaccount)
- [ListByBillingProfile](#lotsoperation_listbybillingprofile)
- [ListByCustomer](#lotsoperation_listbycustomer)

## Marketplaces

- [List](#marketplaces_list)

## Operations

- [List](#operations_list)

## PriceSheet

- [Get](#pricesheet_get)
Expand Down Expand Up @@ -302,7 +307,8 @@ public final class BudgetsDeleteSamples {
public static void deleteBudget(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.budgets()
.deleteWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", "TestBudget", Context.NONE);
.deleteByResourceGroupWithResponse(
"subscriptions/00000000-0000-0000-0000-000000000000", "TestBudget", Context.NONE);
}
}
```
Expand Down Expand Up @@ -768,6 +774,42 @@ public final class LotsOperationListByBillingProfileSamples {
}
```

### LotsOperation_ListByCustomer

```java
import com.azure.core.util.Context;

/** Samples for LotsOperation ListByCustomer. */
public final class LotsOperationListByCustomerSamples {
/*
* x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByCustomer.json
*/
/**
* Sample code: LotsListByCustomer.
*
* @param manager Entry point to ConsumptionManager.
*/
public static void lotsListByCustomer(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager.lotsOperations().listByCustomer("1234:5678", "1234:5678", null, Context.NONE);
}

/*
* x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByCustomerWithFilters.json
*/
/**
* Sample code: LotsListByCustomerWithFilter.
*
* @param manager Entry point to ConsumptionManager.
*/
public static void lotsListByCustomerWithFilter(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.lotsOperations()
.listByCustomer(
"1234:5678", "1234:5678", "status eq 'active' AND source eq 'consumptioncommitment'", Context.NONE);
}
}
```

### Marketplaces_List

```java
Expand Down Expand Up @@ -921,6 +963,27 @@ public final class MarketplacesListSamples {
}
```

### Operations_List

```java
import com.azure.core.util.Context;

/** Samples for Operations List. */
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/OperationList.json
*/
/**
* Sample code: PriceSheetForBillingPeriod.
*
* @param manager Entry point to ConsumptionManager.
*/
public static void priceSheetForBillingPeriod(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager.operations().list(Context.NONE);
}
}
```

### PriceSheet_Get

```java
Expand Down Expand Up @@ -980,6 +1043,7 @@ public final class PriceSheetGetByBillingPeriodSamples {
```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.models.LookBackPeriod;
import com.azure.resourcemanager.consumption.models.Scope;
import com.azure.resourcemanager.consumption.models.Term;

/** Samples for ReservationRecommendationDetails Get. */
Expand All @@ -996,7 +1060,14 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendationDetails()
.getWithResponse("Single", "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", Context.NONE);
.getWithResponse(
"subscriptions/00000000-0000-0000-0000-00000000",
Scope.SINGLE,
"westus",
Term.P3Y,
LookBackPeriod.LAST30DAYS,
"Standard_DS13_v2",
Context.NONE);
}

/*
Expand All @@ -1012,7 +1083,13 @@ public final class ReservationRecommendationDetailsGetSamples {
manager
.reservationRecommendationDetails()
.getWithResponse(
"Shared", "australiaeast", Term.P1Y, LookBackPeriod.LAST7DAYS, "Standard_B2s", Context.NONE);
"providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-00000000:00000000-0000-0000-0000-00000000/billingProfiles/00000000-0000-0000-0000-00000000",
Scope.SHARED,
"australiaeast",
Term.P1Y,
LookBackPeriod.LAST7DAYS,
"Standard_B2s",
Context.NONE);
}

/*
Expand All @@ -1027,7 +1104,14 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendationDetails()
.getWithResponse("Single", "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", Context.NONE);
.getWithResponse(
"subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/testGroup",
Scope.SINGLE,
"westus",
Term.P3Y,
LookBackPeriod.LAST30DAYS,
"Standard_DS13_v2",
Context.NONE);
}

/*
Expand All @@ -1042,7 +1126,14 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager
.reservationRecommendationDetails()
.getWithResponse("Shared", "eastus", Term.P1Y, LookBackPeriod.LAST60DAYS, "Standard_DS14_v2", Context.NONE);
.getWithResponse(
"providers/Microsoft.Billing/billingAccounts/000000",
Scope.SHARED,
"eastus",
Term.P1Y,
LookBackPeriod.LAST60DAYS,
"Standard_DS14_v2",
Context.NONE);
}
}
```
Expand Down
Loading