Skip to content
Merged
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
20 changes: 13 additions & 7 deletions sdk/resourcemanager/api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@
"package": "com.azure.resourcemanager.cosmos",
"args": "--tag=package-2025-04-15 --modelerfour.lenient-model-deduplication --rename-model=DataTransferServiceResourceCreateUpdateProperties:DataTransferServiceResourceCreateUpdateParameters,GraphApiComputeServiceResourceCreateUpdateProperties:GraphApiComputeServiceResourceCreateUpdateParameters,MaterializedViewsBuilderServiceResourceCreateUpdateProperties:MaterializedViewsBuilderServiceResourceCreateUpdateParameters,SqlDedicatedGatewayServiceResourceCreateUpdateProperties:SqlDedicatedGatewayServiceResourceCreateUpdateParameters --enable-sync-stack=false"
},
"deploymentstacks": {
"dir": "azure-resourcemanager-resources",
"source": "specification/resources/resource-manager/readme.md",
"package": "com.azure.resourcemanager.resources",
"args": "--tag=package-deploymentstacks-2024-03 --graalvm-config-suffix=deploymentstacks --enable-sync-stack=false"
},
"dns": {
"dir": "azure-resourcemanager-dns",
"source": "specification/dns/resource-manager/readme.md",
Expand Down Expand Up @@ -226,9 +220,21 @@
"dir": "azure-resourcemanager-resources",
"source": "specification/resources/resource-manager/readme.md",
"package": "com.azure.resourcemanager.resources",
"args": "--tag=package-resources-2025-04 --add-inner=Deployment --enable-sync-stack=false",
"args": "--tag=package-resources-2025-04 --enable-sync-stack=false",
"note": "Remove `final` from `ResourceReference`, as it is used as superclass in deploymentstacks."
},
"deployments": {
"dir": "azure-resourcemanager-resources",
"source": "specification/resources/resource-manager/Microsoft.Resources/deployments/readme.md",
"package": "com.azure.resourcemanager.resources",
"args": "--tag=package-2025-04 --title=DeploymentsManagementClient --add-inner=Deployment,Provider --graalvm-config-suffix=deployments --enable-sync-stack=false"
},
"deploymentstacks": {
"dir": "azure-resourcemanager-resources",
"source": "specification/resources/resource-manager/Microsoft.Resources/deploymentStacks/readme.md",
"package": "com.azure.resourcemanager.resources",
"args": "--tag=package-2024-03 --graalvm-config-suffix=deploymentstacks --enable-sync-stack=false"
},
"resources-hybrid": {
"dir": "../resourcemanagerhybrid/azure-resourcemanager-resources",
"source": "specification/resources/resource-manager/readme.md",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

## 2.52.0-beta.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed
- `DeploymentsClient` and `DeploymentOperationsClient` is now accessed via `ResourceManager::deploymentClient()`.

### Other Changes

- Updated `api-version` of resources to `2025-04-01`.
- `deploymentStackClient()` in `ResourceManager` class is now deprecated. The functionality is moved to "azure-resourcemanager-resources-deploymentstacks" package.

## 2.51.0 (2025-05-26)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-resources",
"Tag": "java/resourcemanager/azure-resourcemanager-resources_6bcfccb64d"
"Tag": "java/resourcemanager/azure-resourcemanager-resources_649d716991"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
import com.azure.resourcemanager.resources.fluent.ChangesManagementClient;
import com.azure.resourcemanager.resources.fluent.DataBoundariesManagementClient;
import com.azure.resourcemanager.resources.fluent.DeploymentStacksManagementClient;
import com.azure.resourcemanager.resources.fluent.DeploymentsManagementClient;
import com.azure.resourcemanager.resources.fluent.FeatureClient;
import com.azure.resourcemanager.resources.fluent.ManagementLockClient;
import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl;
import com.azure.resourcemanager.resources.fluentcore.policy.ProviderRegistrationPolicy;
import com.azure.resourcemanager.resources.implementation.ChangesManagementClientBuilder;
import com.azure.resourcemanager.resources.implementation.DataBoundariesManagementClientBuilder;
import com.azure.resourcemanager.resources.implementation.DeploymentStacksManagementClientBuilder;
import com.azure.resourcemanager.resources.implementation.DeploymentsManagementClientBuilder;
import com.azure.resourcemanager.resources.implementation.FeatureClientBuilder;
import com.azure.resourcemanager.resources.fluent.PolicyClient;
import com.azure.resourcemanager.resources.implementation.ManagementLockClientBuilder;
Expand Down Expand Up @@ -65,6 +67,7 @@ public final class ResourceManager extends Manager<ResourceManagementClient> {
private final ChangesManagementClient resourceChangeClient;
private final DeploymentStacksManagementClient deploymentStackClient;
private final DataBoundariesManagementClient dataBoundaryClient;
private final DeploymentsManagementClient deploymentClient;
// The collections
private ResourceGroups resourceGroups;
private GenericResources genericResources;
Expand Down Expand Up @@ -265,6 +268,11 @@ private ResourceManager(HttpPipeline httpPipeline, AzureProfile profile) {
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.buildClient();

this.deploymentClient = new DeploymentsManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.buildClient();

for (int i = 0; i < httpPipeline.getPolicyCount(); ++i) {
if (httpPipeline.getPolicy(i) instanceof ProviderRegistrationPolicy) {
ProviderRegistrationPolicy policy = (ProviderRegistrationPolicy) httpPipeline.getPolicy(i);
Expand Down Expand Up @@ -330,7 +338,10 @@ public ChangesManagementClient resourceChangeClient() {
* based on Azure REST API.
*
* @return wrapped inner deployment stack client.
*
* @deprecated Use the azure-resourcemanager-resources-deploymentstacks package.
*/
@Deprecated
public DeploymentStacksManagementClient deploymentStackClient() {
return deploymentStackClient;
}
Expand All @@ -345,6 +356,16 @@ public DataBoundariesManagementClient dataBoundaryClient() {
return dataBoundaryClient;
}

/**
* Wrapped inner deployment client providing direct access to auto-generated API implementation,
* based on Azure REST API.
*
* @return wrapped inner deployment client.
*/
public DeploymentsManagementClient deploymentClient() {
return deploymentClient;
}

/**
* Gets the resource group management API entry point.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.resources.fluent;

import com.azure.core.http.HttpPipeline;
import java.time.Duration;

/**
* The interface for DeploymentsManagementClient class.
*/
public interface DeploymentsManagementClient {
/**
* Gets The Microsoft Azure subscription ID.
*
* @return the subscriptionId value.
*/
String getSubscriptionId();

/**
* Gets server parameter.
*
* @return the endpoint value.
*/
String getEndpoint();

/**
* Gets Api Version.
*
* @return the apiVersion value.
*/
String getApiVersion();

/**
* Gets The HTTP pipeline to send requests through.
*
* @return the httpPipeline value.
*/
HttpPipeline getHttpPipeline();

/**
* Gets The default poll interval for long-running operation.
*
* @return the defaultPollInterval value.
*/
Duration getDefaultPollInterval();

/**
* Gets the DeploymentsClient object to access its operations.
*
* @return the DeploymentsClient object.
*/
DeploymentsClient getDeployments();

/**
* Gets the DeploymentOperationsClient object to access its operations.
*
* @return the DeploymentOperationsClient object.
*/
DeploymentOperationsClient getDeploymentOperations();
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ public interface ResourceManagementClient {
*/
OperationsClient getOperations();

/**
* Gets the DeploymentsClient object to access its operations.
*
* @return the DeploymentsClient object.
*/
DeploymentsClient getDeployments();

/**
* Gets the ProvidersClient object to access its operations.
*
Expand Down Expand Up @@ -94,11 +87,4 @@ public interface ResourceManagementClient {
* @return the TagOperationsClient object.
*/
TagOperationsClient getTagOperations();

/**
* Gets the DeploymentOperationsClient object to access its operations.
*
* @return the DeploymentOperationsClient object.
*/
DeploymentOperationsClient getDeploymentOperations();
}
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public List<ResourceReference> outputResources() {

@Override
public DeploymentOperations deploymentOperations() {
return new DeploymentOperationsImpl(this.manager().serviceClient().getDeploymentOperations(), this);
return new DeploymentOperationsImpl(this.manager().deploymentClient().getDeploymentOperations(), this);
}

@Override
Expand All @@ -207,7 +207,7 @@ public void cancel() {

@Override
public Mono<Void> cancelAsync() {
return this.manager().serviceClient().getDeployments().cancelAsync(resourceGroupName, name());
return this.manager().deploymentClient().getDeployments().cancelAsync(resourceGroupName, name());
}

@Override
Expand All @@ -218,7 +218,7 @@ public DeploymentExportResult exportTemplate() {
@Override
public Mono<DeploymentExportResult> exportTemplateAsync() {
return this.manager()
.serviceClient()
.deploymentClient()
.getDeployments()
.exportTemplateAsync(resourceGroupName(), name())
.map(DeploymentExportResultImpl::new);
Expand Down Expand Up @@ -340,7 +340,7 @@ public Accepted<Deployment> beginCreate(Context context) {
return AcceptedImpl.newAccepted(logger, this.manager().serviceClient().getHttpPipeline(),
this.manager().serviceClient().getDefaultPollInterval(),
() -> this.manager()
.serviceClient()
.deploymentClient()
.getDeployments()
.createOrUpdateWithResponseAsync(resourceGroupName(), name(), deploymentCreateUpdateParameters)
.contextWrite(c -> c.putAll(FluxUtil.toReactorContext(context).readOnly()))
Expand All @@ -364,7 +364,7 @@ public Mono<Deployment> beginCreateAsync() {
return Mono.just((Indexable) DeploymentImpl.this);
}
})
.flatMap(indexable -> manager().serviceClient()
.flatMap(indexable -> manager().deploymentClient()
.getDeployments()
.createOrUpdateWithResponseAsync(resourceGroupName(), name(), deploymentCreateUpdateParameters))
.flatMap(activationResponse -> FluxUtil.collectBytesInByteBufferStream(activationResponse.getValue()))
Expand All @@ -388,7 +388,7 @@ public Mono<Deployment> beginCreateAsync() {
@Override
public Mono<Deployment> createResourceAsync() {
return this.manager()
.serviceClient()
.deploymentClient()
.getDeployments()
.createOrUpdateAsync(resourceGroupName(), name(), deploymentCreateUpdateParameters)
.map(deploymentExtendedInner -> {
Expand Down Expand Up @@ -430,7 +430,7 @@ public Mono<Deployment> applyAsync() {
@Override
protected Mono<DeploymentExtendedInner> getInnerAsync() {
return this.manager()
.serviceClient()
.deploymentClient()
.getDeployments()
.getAtManagementGroupScopeAsync(resourceGroupName(), name());
}
Expand Down Expand Up @@ -589,7 +589,7 @@ public WhatIfOperationResult whatIf() {
@Override
public Mono<WhatIfOperationResult> whatIfAsync() {
return this.manager()
.serviceClient()
.deploymentClient()
.getDeployments()
.whatIfAsync(resourceGroupName(), name(), deploymentWhatIf)
.map(WhatIfOperationResultImpl::new);
Expand All @@ -603,7 +603,7 @@ public WhatIfOperationResult whatIfAtSubscriptionScope() {
@Override
public Mono<WhatIfOperationResult> whatIfAtSubscriptionScopeAsync() {
return this.manager()
.serviceClient()
.deploymentClient()
.getDeployments()
.whatIfAtSubscriptionScopeAsync(name(), deploymentWhatIf)
.map(WhatIfOperationResultImpl::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,25 @@ public final class DeploymentOperationsClientImpl implements DeploymentOperation
/**
* The service client containing this operation class.
*/
private final ResourceManagementClientImpl client;
private final DeploymentsManagementClientImpl client;

/**
* Initializes an instance of DeploymentOperationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
DeploymentOperationsClientImpl(ResourceManagementClientImpl client) {
DeploymentOperationsClientImpl(DeploymentsManagementClientImpl client) {
this.service = RestProxy.create(DeploymentOperationsService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}

/**
* The interface defining all the services for ResourceManagementClientDeploymentOperations to be used by the proxy
* service to perform REST calls.
* The interface defining all the services for DeploymentsManagementClientDeploymentOperations to be used by the
* proxy service to perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "ResourceManagementCl")
@ServiceInterface(name = "DeploymentsManagemen")
public interface DeploymentOperationsService {
@Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,25 @@ public final class DeploymentsClientImpl implements InnerSupportsGet<DeploymentE
/**
* The service client containing this operation class.
*/
private final ResourceManagementClientImpl client;
private final DeploymentsManagementClientImpl client;

/**
* Initializes an instance of DeploymentsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
DeploymentsClientImpl(ResourceManagementClientImpl client) {
DeploymentsClientImpl(DeploymentsManagementClientImpl client) {
this.service
= RestProxy.create(DeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}

/**
* The interface defining all the services for ResourceManagementClientDeployments to be used by the proxy service
* to perform REST calls.
* The interface defining all the services for DeploymentsManagementClientDeployments to be used by the proxy
* service to perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "ResourceManagementCl")
@ServiceInterface(name = "DeploymentsManagemen")
public interface DeploymentsService {
@Headers({ "Content-Type: application/json" })
@Delete("/{scope}/providers/Microsoft.Resources/deployments/{deploymentName}")
Expand Down
Loading
Loading