Skip to content

Commit

Permalink
mgmt, deploymentstacks (#40410)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored May 31, 2024
1 parent 57ba284 commit d4ca4b3
Show file tree
Hide file tree
Showing 402 changed files with 26,797 additions and 23,238 deletions.
8 changes: 7 additions & 1 deletion sdk/resourcemanager/api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@
"package": "com.azure.resourcemanager.cosmos",
"args": "--tag=package-2023-11"
},
"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"
},
"dns": {
"dir": "azure-resourcemanager-dns",
"source": "specification/dns/resource-manager/readme.md",
Expand Down Expand Up @@ -220,7 +226,7 @@
"dir": "azure-resourcemanager-resources",
"source": "specification/resources/resource-manager/readme.md",
"package": "com.azure.resourcemanager.resources",
"args": "--tag=package-resources-2022-09 --add-inner=Deployment"
"args": "--tag=package-resources-2024-03 --add-inner=Deployment"
},
"resources-hybrid": {
"dir": "../resourcemanagerhybrid/azure-resourcemanager-resources",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

### Features Added

### Breaking Changes

### Bugs Fixed
- Supported Deployment Stack. See https://learn.microsoft.com/azure/azure-resource-manager/bicep/deployment-stacks

### Other Changes

#### Dependency Updates

- Updated `api-version` of resources to `2024-03-01`.

## 2.39.0 (2024-05-24)

### Features Added
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_ee8c7f5683"
"Tag": "java/resourcemanager/azure-resourcemanager-resources_1f62f881a3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpPipeline;
import com.azure.resourcemanager.resources.fluent.ChangesManagementClient;
import com.azure.resourcemanager.resources.fluent.DeploymentStacksManagementClient;
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.DeploymentStacksManagementClientBuilder;
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 @@ -59,6 +61,7 @@ public final class ResourceManager extends Manager<ResourceManagementClient> {
private final PolicyClient policyClient;
private final ManagementLockClient managementLockClient;
private final ChangesManagementClient resourceChangeClient;
private final DeploymentStacksManagementClient deploymentStackClient;
// The collections
private ResourceGroups resourceGroups;
private GenericResources genericResources;
Expand Down Expand Up @@ -255,6 +258,12 @@ private ResourceManager(HttpPipeline httpPipeline, AzureProfile profile) {
.subscriptionId(profile.getSubscriptionId())
.buildClient();

this.deploymentStackClient = new DeploymentStacksManagementClientBuilder()
.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 @@ -305,6 +314,16 @@ public ChangesManagementClient resourceChangeClient() {
return resourceChangeClient;
}

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

/**
* @return the resource group management API entry point
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,41 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.resources.fluent.models.OperationInner;

/** An instance of this class provides access to all the operations defined in AuthorizationOperationsClient. */
/**
* An instance of this class provides access to all the operations defined in AuthorizationOperationsClient.
*/
public interface AuthorizationOperationsClient {
/**
* Lists all of the available Microsoft.Authorization REST API operations.
*
*
* @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 result of the request to list Microsoft.Authorization operations as paginated response with {@link
* PagedFlux}.
* @return result of the request to list Microsoft.Authorization operations as paginated response with
* {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<OperationInner> listAsync();

/**
* Lists all of the available Microsoft.Authorization REST API operations.
*
*
* @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 result of the request to list Microsoft.Authorization operations as paginated response with {@link
* PagedIterable}.
* @return result of the request to list Microsoft.Authorization operations as paginated response with
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationInner> list();

/**
* Lists all of the available Microsoft.Authorization REST API operations.
*
*
* @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 result of the request to list Microsoft.Authorization operations as paginated response with {@link
* PagedIterable}.
* @return result of the request to list Microsoft.Authorization operations as paginated response with
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationInner> list(Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
import com.azure.resourcemanager.resources.fluent.models.ChangeResourceResultInner;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in ChangesClient. */
/**
* An instance of this class provides access to all the operations defined in ChangesClient.
*/
public interface ChangesClient {
/**
* Obtains a list of change resources from the past 14 days for the target resource.
*
*
* @param resourceGroupName The name of the resource group.
* @param resourceProviderNamespace The name of the resource provider namespace.
* @param resourceType The name of the resource type.
Expand All @@ -30,17 +32,12 @@ public interface ChangesClient {
* @return the list of resources as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<ChangeResourceResultInner> listAsync(
String resourceGroupName,
String resourceProviderNamespace,
String resourceType,
String resourceName,
Long top,
String skipToken);
PagedFlux<ChangeResourceResultInner> listAsync(String resourceGroupName, String resourceProviderNamespace,
String resourceType, String resourceName, Long top, String skipToken);

/**
* Obtains a list of change resources from the past 14 days for the target resource.
*
*
* @param resourceGroupName The name of the resource group.
* @param resourceProviderNamespace The name of the resource provider namespace.
* @param resourceType The name of the resource type.
Expand All @@ -51,12 +48,12 @@ PagedFlux<ChangeResourceResultInner> listAsync(
* @return the list of resources as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<ChangeResourceResultInner> listAsync(
String resourceGroupName, String resourceProviderNamespace, String resourceType, String resourceName);
PagedFlux<ChangeResourceResultInner> listAsync(String resourceGroupName, String resourceProviderNamespace,
String resourceType, String resourceName);

/**
* Obtains a list of change resources from the past 14 days for the target resource.
*
*
* @param resourceGroupName The name of the resource group.
* @param resourceProviderNamespace The name of the resource provider namespace.
* @param resourceType The name of the resource type.
Expand All @@ -67,12 +64,12 @@ PagedFlux<ChangeResourceResultInner> listAsync(
* @return the list of resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ChangeResourceResultInner> list(
String resourceGroupName, String resourceProviderNamespace, String resourceType, String resourceName);
PagedIterable<ChangeResourceResultInner> list(String resourceGroupName, String resourceProviderNamespace,
String resourceType, String resourceName);

/**
* Obtains a list of change resources from the past 14 days for the target resource.
*
*
* @param resourceGroupName The name of the resource group.
* @param resourceProviderNamespace The name of the resource provider namespace.
* @param resourceType The name of the resource type.
Expand All @@ -86,18 +83,12 @@ PagedIterable<ChangeResourceResultInner> list(
* @return the list of resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ChangeResourceResultInner> list(
String resourceGroupName,
String resourceProviderNamespace,
String resourceType,
String resourceName,
Long top,
String skipToken,
Context context);
PagedIterable<ChangeResourceResultInner> list(String resourceGroupName, String resourceProviderNamespace,
String resourceType, String resourceName, Long top, String skipToken, Context context);

/**
* Obtains the specified change resource for the target resource.
*
*
* @param resourceGroupName The name of the resource group.
* @param resourceProviderNamespace The name of the resource provider namespace.
* @param resourceType The name of the resource type.
Expand All @@ -109,16 +100,12 @@ PagedIterable<ChangeResourceResultInner> list(
* @return change Resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Response<ChangeResourceResultInner>> getWithResponseAsync(
String resourceGroupName,
String resourceProviderNamespace,
String resourceType,
String resourceName,
String changeResourceId);
Mono<Response<ChangeResourceResultInner>> getWithResponseAsync(String resourceGroupName,
String resourceProviderNamespace, String resourceType, String resourceName, String changeResourceId);

/**
* Obtains the specified change resource for the target resource.
*
*
* @param resourceGroupName The name of the resource group.
* @param resourceProviderNamespace The name of the resource provider namespace.
* @param resourceType The name of the resource type.
Expand All @@ -130,16 +117,12 @@ Mono<Response<ChangeResourceResultInner>> getWithResponseAsync(
* @return change Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<ChangeResourceResultInner> getAsync(
String resourceGroupName,
String resourceProviderNamespace,
String resourceType,
String resourceName,
String changeResourceId);
Mono<ChangeResourceResultInner> getAsync(String resourceGroupName, String resourceProviderNamespace,
String resourceType, String resourceName, String changeResourceId);

/**
* Obtains the specified change resource for the target resource.
*
*
* @param resourceGroupName The name of the resource group.
* @param resourceProviderNamespace The name of the resource provider namespace.
* @param resourceType The name of the resource type.
Expand All @@ -152,17 +135,12 @@ Mono<ChangeResourceResultInner> getAsync(
* @return change Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ChangeResourceResultInner> getWithResponse(
String resourceGroupName,
String resourceProviderNamespace,
String resourceType,
String resourceName,
String changeResourceId,
Context context);
Response<ChangeResourceResultInner> getWithResponse(String resourceGroupName, String resourceProviderNamespace,
String resourceType, String resourceName, String changeResourceId, Context context);

/**
* Obtains the specified change resource for the target resource.
*
*
* @param resourceGroupName The name of the resource group.
* @param resourceProviderNamespace The name of the resource provider namespace.
* @param resourceType The name of the resource type.
Expand All @@ -174,10 +152,6 @@ Response<ChangeResourceResultInner> getWithResponse(
* @return change Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ChangeResourceResultInner get(
String resourceGroupName,
String resourceProviderNamespace,
String resourceType,
String resourceName,
String changeResourceId);
ChangeResourceResultInner get(String resourceGroupName, String resourceProviderNamespace, String resourceType,
String resourceName, String changeResourceId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,48 @@
import com.azure.core.http.HttpPipeline;
import java.time.Duration;

/** The interface for ChangesManagementClient class. */
/**
* The interface for ChangesManagementClient class.
*/
public interface ChangesManagementClient {
/**
* Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
*
*
* @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 ChangesClient object to access its operations.
*
*
* @return the ChangesClient object.
*/
ChangesClient getChanges();
Expand Down
Loading

0 comments on commit d4ca4b3

Please sign in to comment.