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

## 1.1.0-beta.1 (Unreleased)
## 1.1.0-beta.1 (2025-02-28)

- 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

### Breaking Changes
* `models.CheckNameAvailability` was added

* `models.CheckNameAvailabilityResult` was added

* `models.DevOpsInfrastructureResourceType` was added

* `models.CheckNameAvailabilityReason` was added

* `models.AvailabilityStatus` was added

* `models.CertificateStoreNameOption` was added

* `models.EphemeralType` was added

#### `models.PoolImage` was modified

* `ephemeralType()` was added
* `withEphemeralType(models.EphemeralType)` was added

#### `models.Organization` was modified

* `withOpenAccess(java.lang.Boolean)` was added
* `openAccess()` was added

#### `models.SecretsManagementSettings` was modified

* `certificateStoreName()` was added
* `withCertificateStoreName(models.CertificateStoreNameOption)` was added

### Bugs Fixed
#### `models.Pools` was modified

### Other Changes
* `checkNameAvailabilityWithResponse(models.CheckNameAvailability,com.azure.core.util.Context)` was added
* `checkNameAvailability(models.CheckNameAvailability)` was added

## 1.0.0 (2024-11-21)

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</version>
<version>1.1.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
DevOpsInfrastructureManager manager = DevOpsInfrastructureManager
.authenticate(credential, profile);
```

The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.

See [Authentication][authenticate] for more options.

Expand Down Expand Up @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/


Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

## Pools

- [CheckNameAvailability](#pools_checknameavailability)
- [CreateOrUpdate](#pools_createorupdate)
- [Delete](#pools_delete)
- [GetByResourceGroup](#pools_getbyresourcegroup)
Expand All @@ -37,7 +38,7 @@
*/
public final class ImageVersionsListByImageSamples {
/*
* x-ms-original-file: 2024-10-19/ImageVersions_ListByImage.json
* x-ms-original-file: 2025-01-21/ImageVersions_ListByImage.json
*/
/**
* Sample code: ImageVersions_ListByImage.
Expand All @@ -59,7 +60,7 @@ public final class ImageVersionsListByImageSamples {
*/
public final class OperationsListSamples {
/*
* x-ms-original-file: 2024-10-19/ListOperations.json
* x-ms-original-file: 2025-01-21/ListOperations.json
*/
/**
* Sample code: Operations_List.
Expand All @@ -73,15 +74,48 @@ public final class OperationsListSamples {
}
```

### Pools_CheckNameAvailability

```java
import com.azure.resourcemanager.devopsinfrastructure.models.CheckNameAvailability;
import com.azure.resourcemanager.devopsinfrastructure.models.DevOpsInfrastructureResourceType;

/**
* Samples for Pools CheckNameAvailability.
*/
public final class PoolsCheckNameAvailabilitySamples {
/*
* x-ms-original-file: 2025-01-21/Pools_CheckNameAvailability.json
*/
/**
* Sample code: Pools_CheckNameAvailability.
*
* @param manager Entry point to DevOpsInfrastructureManager.
*/
public static void
poolsCheckNameAvailability(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) {
manager.pools()
.checkNameAvailabilityWithResponse(
new CheckNameAvailability().withName("mydevopspool")
.withType(DevOpsInfrastructureResourceType.MICROSOFT_DEV_OPS_INFRASTRUCTURE_POOLS),
com.azure.core.util.Context.NONE);
}
}
```

### Pools_CreateOrUpdate

```java
import com.azure.resourcemanager.devopsinfrastructure.models.AzureDevOpsOrganizationProfile;
import com.azure.resourcemanager.devopsinfrastructure.models.CertificateStoreNameOption;
import com.azure.resourcemanager.devopsinfrastructure.models.DevOpsAzureSku;
import com.azure.resourcemanager.devopsinfrastructure.models.EphemeralType;
import com.azure.resourcemanager.devopsinfrastructure.models.Organization;
import com.azure.resourcemanager.devopsinfrastructure.models.OsProfile;
import com.azure.resourcemanager.devopsinfrastructure.models.PoolImage;
import com.azure.resourcemanager.devopsinfrastructure.models.PoolProperties;
import com.azure.resourcemanager.devopsinfrastructure.models.ProvisioningState;
import com.azure.resourcemanager.devopsinfrastructure.models.SecretsManagementSettings;
import com.azure.resourcemanager.devopsinfrastructure.models.StatelessAgentProfile;
import com.azure.resourcemanager.devopsinfrastructure.models.VmssFabricProfile;
import java.util.Arrays;
Expand All @@ -91,7 +125,7 @@ import java.util.Arrays;
*/
public final class PoolsCreateOrUpdateSamples {
/*
* x-ms-original-file: 2024-10-19/CreateOrUpdatePool.json
* x-ms-original-file: 2025-01-21/CreateOrUpdatePool.json
*/
/**
* Sample code: Pools_CreateOrUpdate.
Expand All @@ -106,12 +140,19 @@ public final class PoolsCreateOrUpdateSamples {
.withExistingResourceGroup("rg")
.withProperties(new PoolProperties().withProvisioningState(ProvisioningState.SUCCEEDED)
.withMaximumConcurrency(10)
.withOrganizationProfile(new AzureDevOpsOrganizationProfile()
.withOrganizations(Arrays.asList(new Organization().withUrl("https://mseng.visualstudio.com"))))
.withOrganizationProfile(new AzureDevOpsOrganizationProfile().withOrganizations(
Arrays.asList(new Organization().withUrl("https://mseng.visualstudio.com").withOpenAccess(true))))
.withAgentProfile(new StatelessAgentProfile())
.withFabricProfile(new VmssFabricProfile().withSku(new DevOpsAzureSku().withName("Standard_D4ads_v5"))
.withImages(Arrays.asList(new PoolImage()
.withResourceId("/MicrosoftWindowsServer/WindowsServer/2019-Datacenter/latest"))))
.withFabricProfile(
new VmssFabricProfile().withSku(new DevOpsAzureSku().withName("Standard_D4ads_v5"))
.withImages(Arrays.asList(new PoolImage()
.withResourceId("/MicrosoftWindowsServer/WindowsServer/2019-Datacenter/latest")
.withEphemeralType(EphemeralType.AUTOMATIC)))
.withOsProfile(
new OsProfile().withSecretsManagementSettings(new SecretsManagementSettings()
.withCertificateStoreName(CertificateStoreNameOption.ROOT)
.withObservedCertificates(Arrays.asList("https://abc.vault.azure.net/secrets/one"))
.withKeyExportable(false))))
.withDevCenterProjectResourceId(
"/subscriptions/222e81d0-cf38-4dab-baa5-289bf16baaa4/resourceGroups/rg-1es-devcenter/providers/Microsoft.DevCenter/projects/1ES"))
.create();
Expand All @@ -127,7 +168,7 @@ public final class PoolsCreateOrUpdateSamples {
*/
public final class PoolsDeleteSamples {
/*
* x-ms-original-file: 2024-10-19/DeletePool.json
* x-ms-original-file: 2025-01-21/DeletePool.json
*/
/**
* Sample code: Pools_Delete.
Expand All @@ -148,7 +189,7 @@ public final class PoolsDeleteSamples {
*/
public final class PoolsGetByResourceGroupSamples {
/*
* x-ms-original-file: 2024-10-19/GetPool.json
* x-ms-original-file: 2025-01-21/GetPool.json
*/
/**
* Sample code: Pools_Get.
Expand All @@ -169,7 +210,7 @@ public final class PoolsGetByResourceGroupSamples {
*/
public final class PoolsListSamples {
/*
* x-ms-original-file: 2024-10-19/ListPoolsBySubscription.json
* x-ms-original-file: 2025-01-21/ListPoolsBySubscription.json
*/
/**
* Sample code: Pools_ListBySubscription.
Expand All @@ -191,7 +232,7 @@ public final class PoolsListSamples {
*/
public final class PoolsListByResourceGroupSamples {
/*
* x-ms-original-file: 2024-10-19/ListPoolsBySubscriptionAndResourceGroup.json
* x-ms-original-file: 2025-01-21/ListPoolsBySubscriptionAndResourceGroup.json
*/
/**
* Sample code: Pools_ListByResourceGroup.
Expand All @@ -215,7 +256,7 @@ import com.azure.resourcemanager.devopsinfrastructure.models.Pool;
*/
public final class PoolsUpdateSamples {
/*
* x-ms-original-file: 2024-10-19/UpdatePool.json
* x-ms-original-file: 2025-01-21/UpdatePool.json
*/
/**
* Sample code: Pools_Update.
Expand All @@ -238,7 +279,7 @@ public final class PoolsUpdateSamples {
*/
public final class ResourceDetailsListByPoolSamples {
/*
* x-ms-original-file: 2024-10-19/ResourceDetails_ListByPool.json
* x-ms-original-file: 2025-01-21/ResourceDetails_ListByPool.json
*/
/**
* Sample code: ResourceDetails_ListByPool.
Expand All @@ -260,7 +301,7 @@ public final class ResourceDetailsListByPoolSamples {
*/
public final class SkuListByLocationSamples {
/*
* x-ms-original-file: 2024-10-19/Sku_ListByLocation.json
* x-ms-original-file: 2025-01-21/Sku_ListByLocation.json
*/
/**
* Sample code: Sku_ListByLocation.
Expand All @@ -282,7 +323,7 @@ public final class SkuListByLocationSamples {
*/
public final class SubscriptionUsagesUsagesSamples {
/*
* x-ms-original-file: 2024-10-19/SubscriptionUsages_Usages.json
* x-ms-original-file: 2025-01-21/SubscriptionUsages_Usages.json
*/
/**
* Sample code: SubscriptionUsages_Usages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.devopsinfrastructure.fluent.models.CheckNameAvailabilityResultInner;
import com.azure.resourcemanager.devopsinfrastructure.fluent.models.PoolInner;
import com.azure.resourcemanager.devopsinfrastructure.models.CheckNameAvailability;
import com.azure.resourcemanager.devopsinfrastructure.models.PoolUpdate;

/**
Expand Down Expand Up @@ -267,4 +269,30 @@ SyncPoller<PollResult<PoolInner>, PoolInner> beginUpdate(String resourceGroupNam
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<PoolInner> list(Context context);

/**
* Checks that the pool name is valid and is not already in use.
*
* @param body The CheckAvailability request.
* @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 CheckNameAvailability operation response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<CheckNameAvailabilityResultInner> checkNameAvailabilityWithResponse(CheckNameAvailability body,
Context context);

/**
* Checks that the pool name is valid and is not already in use.
*
* @param body The CheckAvailability request.
* @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 CheckNameAvailability operation response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
CheckNameAvailabilityResultInner checkNameAvailability(CheckNameAvailability body);
}
Loading