Skip to content

Commit

Permalink
CodeGen from PR 29834 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 98119ab88ec1661ae92977e3bd98baf268929c8c into 7027f9e5568efa154e4c4e5e0e5acf515177e8a3
  • Loading branch information
SDKAuto committed Jul 16, 2024
1 parent e4d5d92 commit 8fb595a
Show file tree
Hide file tree
Showing 43 changed files with 312 additions and 620 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2024-07-16)

- Azure Resource Manager DevOps Infrastructure client library for Java. This package contains Microsoft Azure SDK for DevOps Infrastructure Management SDK. 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-devopsinfrastructure</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

With above configuration, `azure` client can be authenticated using the following code:
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
Expand Down Expand Up @@ -97,6 +93,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

## SubscriptionUsages

- [ListByLocation](#subscriptionusages_listbylocation)
- [Usages](#subscriptionusages_usages)
### ImageVersions_ListByImage

```java
Expand All @@ -38,7 +38,7 @@
public final class ImageVersionsListByImageSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/
* ImageVersions_ListByImage.json
*/
/**
Expand All @@ -62,7 +62,8 @@ public final class ImageVersionsListByImageSamples {
public final class OperationsListSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/ListOperations.json
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/
* ListOperations.json
*/
/**
* Sample code: Operations_List.
Expand Down Expand Up @@ -95,8 +96,8 @@ import java.util.Arrays;
public final class PoolsCreateOrUpdateSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/CreateOrUpdatePool.
* json
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/
* CreateOrUpdatePool.json
*/
/**
* Sample code: Pools_CreateOrUpdate.
Expand Down Expand Up @@ -133,7 +134,8 @@ public final class PoolsCreateOrUpdateSamples {
public final class PoolsDeleteSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/DeletePool.json
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/
* DeletePool.json
*/
/**
* Sample code: Pools_Delete.
Expand All @@ -155,7 +157,8 @@ public final class PoolsDeleteSamples {
public final class PoolsGetByResourceGroupSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/GetPool.json
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/GetPool.
* json
*/
/**
* Sample code: Pools_Get.
Expand All @@ -177,7 +180,7 @@ public final class PoolsGetByResourceGroupSamples {
public final class PoolsListSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/
* ListPoolsBySubscription.json
*/
/**
Expand All @@ -201,7 +204,7 @@ public final class PoolsListSamples {
public final class PoolsListByResourceGroupSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/
* ListPoolsBySubscriptionAndResourceGroup.json
*/
/**
Expand All @@ -227,7 +230,8 @@ import com.azure.resourcemanager.devopsinfrastructure.models.Pool;
public final class PoolsUpdateSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/UpdatePool.json
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/
* UpdatePool.json
*/
/**
* Sample code: Pools_Update.
Expand All @@ -251,7 +255,7 @@ public final class PoolsUpdateSamples {
public final class ResourceDetailsListByPoolSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/
* ResourceDetails_ListByPool.json
*/
/**
Expand All @@ -275,8 +279,8 @@ public final class ResourceDetailsListByPoolSamples {
public final class SkuListByLocationSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/Sku_ListByLocation.
* json
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/
* Sku_ListByLocation.json
*/
/**
* Sample code: Sku_ListByLocation.
Expand All @@ -290,26 +294,26 @@ public final class SkuListByLocationSamples {
}
```

### SubscriptionUsages_ListByLocation
### SubscriptionUsages_Usages

```java
/**
* Samples for SubscriptionUsages ListByLocation.
* Samples for SubscriptionUsages Usages.
*/
public final class SubscriptionUsagesListByLocationSamples {
public final class SubscriptionUsagesUsagesSamples {
/*
* x-ms-original-file:
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure/examples/2024-04-04-preview/
* SubscriptionUsages_ListByLocation.json
* specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/examples/2024-04-04-preview/
* SubscriptionUsages_Usages.json
*/
/**
* Sample code: SubscriptionUsages_ListByLocation.
* Sample code: SubscriptionUsages_Usages.
*
* @param manager Entry point to DevOpsInfrastructureManager.
*/
public static void subscriptionUsagesListByLocation(
com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) {
manager.subscriptionUsages().listByLocation("eastus", com.azure.core.util.Context.NONE);
public static void
subscriptionUsagesUsages(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) {
manager.subscriptionUsages().usages("eastus", com.azure.core.util.Context.NONE);
}
}
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
Code generated by Microsoft (R) TypeSpec Code Generator.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) TypeSpec Code Generator.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ public interface SubscriptionUsagesClient {
/**
* List Quota resources by subscription ID.
*
* @param locationName Name of the location.
* @param location The location name.
* @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 response of a Quota list operation as paginated response with {@link PagedIterable}.
* @return paged collection of Quota items as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<QuotaInner> listByLocation(String locationName);
PagedIterable<QuotaInner> usages(String location);

/**
* List Quota resources by subscription ID.
*
* @param locationName Name of the location.
* @param location The location name.
* @param context The context to associate with this operation.
* @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 response of a Quota list operation as paginated response with {@link PagedIterable}.
* @return paged collection of Quota items as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<QuotaInner> listByLocation(String locationName, Context context);
PagedIterable<QuotaInner> usages(String location, Context context);
}
Loading

0 comments on commit 8fb595a

Please sign in to comment.