diff --git a/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/CHANGELOG.md b/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/CHANGELOG.md index 39caae00eafb..e9ee0654778a 100644 --- a/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/CHANGELOG.md +++ b/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/CHANGELOG.md @@ -1,14 +1,44 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2025-04-15) + +- 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 + +* `withCertificateStoreName(models.CertificateStoreNameOption)` was added +* `certificateStoreName()` was added -### Bugs Fixed +#### `models.Pools` was modified -### Other Changes +* `checkNameAvailability(models.CheckNameAvailability)` was added +* `checkNameAvailabilityWithResponse(models.CheckNameAvailability,com.azure.core.util.Context)` was added ## 1.0.0 (2024-11-21) diff --git a/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/README.md b/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/README.md index 4841308a730c..8c36a0615fcb 100644 --- a/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/README.md +++ b/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/README.md @@ -52,7 +52,7 @@ 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(); @@ -60,7 +60,7 @@ 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. @@ -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/ - - diff --git a/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/SAMPLE.md b/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/SAMPLE.md index e637ad2e8519..a1dec22f6780 100644 --- a/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/SAMPLE.md +++ b/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/SAMPLE.md @@ -11,6 +11,7 @@ ## Pools +- [CheckNameAvailability](#pools_checknameavailability) - [CreateOrUpdate](#pools_createorupdate) - [Delete](#pools_delete) - [GetByResourceGroup](#pools_getbyresourcegroup) @@ -33,55 +34,36 @@ ```java /** - * Samples for ImageVersions ListByImage. + * Samples for Pools Delete. */ -public final class ImageVersionsListByImageSamples { +public final class PoolsDeleteSamples { /* - * x-ms-original-file: 2024-10-19/ImageVersions_ListByImage.json + * x-ms-original-file: 2025-01-21/DeletePool.json */ /** - * Sample code: ImageVersions_ListByImage. + * Sample code: Pools_Delete. * * @param manager Entry point to DevOpsInfrastructureManager. */ - public static void - imageVersionsListByImage(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { - manager.imageVersions().listByImage("my-resource-group", "windows-2022", com.azure.core.util.Context.NONE); + public static void poolsDelete(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { + manager.pools().delete("rg", "pool", com.azure.core.util.Context.NONE); } } ``` ### Operations_List -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2024-10-19/ListOperations.json - */ - /** - * Sample code: Operations_List. - * - * @param manager Entry point to DevOpsInfrastructureManager. - */ - public static void - operationsList(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { - manager.operations().list(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; @@ -91,7 +73,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. @@ -106,12 +88,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(); @@ -119,118 +108,141 @@ public final class PoolsCreateOrUpdateSamples { } ``` -### Pools_Delete +### Pools_CheckNameAvailability ```java /** - * Samples for Pools Delete. + * Samples for Pools List. */ -public final class PoolsDeleteSamples { +public final class PoolsListSamples { /* - * x-ms-original-file: 2024-10-19/DeletePool.json + * x-ms-original-file: 2025-01-21/ListPoolsBySubscription.json */ /** - * Sample code: Pools_Delete. + * Sample code: Pools_ListBySubscription. * * @param manager Entry point to DevOpsInfrastructureManager. */ - public static void poolsDelete(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { - manager.pools().delete("rg", "pool", com.azure.core.util.Context.NONE); + public static void + poolsListBySubscription(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { + manager.pools().list(com.azure.core.util.Context.NONE); } } ``` -### Pools_GetByResourceGroup +### Pools_CreateOrUpdate ```java /** - * Samples for Pools GetByResourceGroup. + * Samples for Pools ListByResourceGroup. */ -public final class PoolsGetByResourceGroupSamples { +public final class PoolsListByResourceGroupSamples { /* - * x-ms-original-file: 2024-10-19/GetPool.json + * x-ms-original-file: 2025-01-21/ListPoolsBySubscriptionAndResourceGroup.json */ /** - * Sample code: Pools_Get. + * Sample code: Pools_ListByResourceGroup. * * @param manager Entry point to DevOpsInfrastructureManager. */ - public static void poolsGet(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { - manager.pools().getByResourceGroupWithResponse("rg", "pool", com.azure.core.util.Context.NONE); + public static void + poolsListByResourceGroup(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { + manager.pools().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } ``` -### Pools_List +### Pools_Delete ```java +import com.azure.resourcemanager.devopsinfrastructure.models.Pool; + /** - * Samples for Pools List. + * Samples for Pools Update. */ -public final class PoolsListSamples { +public final class PoolsUpdateSamples { /* - * x-ms-original-file: 2024-10-19/ListPoolsBySubscription.json + * x-ms-original-file: 2025-01-21/UpdatePool.json */ /** - * Sample code: Pools_ListBySubscription. + * Sample code: Pools_Update. * * @param manager Entry point to DevOpsInfrastructureManager. */ - public static void - poolsListBySubscription(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { - manager.pools().list(com.azure.core.util.Context.NONE); + public static void poolsUpdate(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { + Pool resource + = manager.pools().getByResourceGroupWithResponse("rg", "pool", com.azure.core.util.Context.NONE).getValue(); + resource.update().apply(); } } ``` -### Pools_ListByResourceGroup +### Pools_GetByResourceGroup ```java /** - * Samples for Pools ListByResourceGroup. + * Samples for SubscriptionUsages Usages. */ -public final class PoolsListByResourceGroupSamples { +public final class SubscriptionUsagesUsagesSamples { /* - * x-ms-original-file: 2024-10-19/ListPoolsBySubscriptionAndResourceGroup.json + * x-ms-original-file: 2025-01-21/SubscriptionUsages_Usages.json */ /** - * Sample code: Pools_ListByResourceGroup. + * Sample code: SubscriptionUsages_Usages. * * @param manager Entry point to DevOpsInfrastructureManager. */ public static void - poolsListByResourceGroup(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { - manager.pools().listByResourceGroup("rg", com.azure.core.util.Context.NONE); + subscriptionUsagesUsages(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { + manager.subscriptionUsages().usages("eastus", com.azure.core.util.Context.NONE); } } ``` -### Pools_Update +### Pools_List ```java -import com.azure.resourcemanager.devopsinfrastructure.models.Pool; +/** + * Samples for Pools GetByResourceGroup. + */ +public final class PoolsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-01-21/GetPool.json + */ + /** + * Sample code: Pools_Get. + * + * @param manager Entry point to DevOpsInfrastructureManager. + */ + public static void poolsGet(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { + manager.pools().getByResourceGroupWithResponse("rg", "pool", com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_ListByResourceGroup +```java /** - * Samples for Pools Update. + * Samples for ImageVersions ListByImage. */ -public final class PoolsUpdateSamples { +public final class ImageVersionsListByImageSamples { /* - * x-ms-original-file: 2024-10-19/UpdatePool.json + * x-ms-original-file: 2025-01-21/ImageVersions_ListByImage.json */ /** - * Sample code: Pools_Update. + * Sample code: ImageVersions_ListByImage. * * @param manager Entry point to DevOpsInfrastructureManager. */ - public static void poolsUpdate(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { - Pool resource - = manager.pools().getByResourceGroupWithResponse("rg", "pool", com.azure.core.util.Context.NONE).getValue(); - resource.update().apply(); + public static void + imageVersionsListByImage(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { + manager.imageVersions().listByImage("my-resource-group", "windows-2022", com.azure.core.util.Context.NONE); } } ``` -### ResourceDetails_ListByPool +### Pools_Update ```java /** @@ -238,7 +250,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. @@ -252,24 +264,53 @@ public final class ResourceDetailsListByPoolSamples { } ``` +### ResourceDetails_ListByPool + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: 2025-01-21/ListOperations.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to DevOpsInfrastructureManager. + */ + public static void + operationsList(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + ### Sku_ListByLocation ```java +import com.azure.resourcemanager.devopsinfrastructure.models.CheckNameAvailability; +import com.azure.resourcemanager.devopsinfrastructure.models.DevOpsInfrastructureResourceType; + /** - * Samples for Sku ListByLocation. + * Samples for Pools CheckNameAvailability. */ -public final class SkuListByLocationSamples { +public final class PoolsCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2024-10-19/Sku_ListByLocation.json + * x-ms-original-file: 2025-01-21/Pools_CheckNameAvailability.json */ /** - * Sample code: Sku_ListByLocation. + * Sample code: Pools_CheckNameAvailability. * * @param manager Entry point to DevOpsInfrastructureManager. */ public static void - skuListByLocation(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { - manager.skus().listByLocation("eastus", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -278,20 +319,20 @@ public final class SkuListByLocationSamples { ```java /** - * Samples for SubscriptionUsages Usages. + * Samples for Sku ListByLocation. */ -public final class SubscriptionUsagesUsagesSamples { +public final class SkuListByLocationSamples { /* - * x-ms-original-file: 2024-10-19/SubscriptionUsages_Usages.json + * x-ms-original-file: 2025-01-21/Sku_ListByLocation.json */ /** - * Sample code: SubscriptionUsages_Usages. + * Sample code: Sku_ListByLocation. * * @param manager Entry point to DevOpsInfrastructureManager. */ public static void - subscriptionUsagesUsages(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { - manager.subscriptionUsages().usages("eastus", com.azure.core.util.Context.NONE); + skuListByLocation(com.azure.resourcemanager.devopsinfrastructure.DevOpsInfrastructureManager manager) { + manager.skus().listByLocation("eastus", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/pom.xml b/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/pom.xml index 4d674e1bf373..48787d78b1af 100644 --- a/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/pom.xml +++ b/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/pom.xml @@ -46,7 +46,6 @@ 0 0 true - false diff --git a/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/tsp-location.yaml b/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/tsp-location.yaml index 46317912df7a..e4eaf041c577 100644 --- a/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/tsp-location.yaml +++ b/sdk/devopsinfrastructure/azure-resourcemanager-devopsinfrastructure/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management -commit: 6f175c9c006269a1d0f1928fbc768cacc6ac379a +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs additionalDirectories: