Skip to content

Commit d2dbba0

Browse files
mgmt, add databoundary client to resources (#42131)
* config * handwritten code for accessing client via manager * codegen * changelog * test, temporary switch to working api-version 2024-03-01
1 parent 247c1b9 commit d2dbba0

File tree

19 files changed

+1404
-6
lines changed

19 files changed

+1404
-6
lines changed

sdk/resourcemanager/api-specs.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,5 +295,11 @@
295295
"source": "specification/resources/resource-manager/readme.md",
296296
"package": "com.azure.resourcemanager.resources",
297297
"args": "--tag=package-changes-2022-05 --graalvm-config-suffix=change --rename-model=ChangeType:ResourceChangeType,PropertyChangeType:ResourcePropertyChangeType"
298+
},
299+
"databoundaries": {
300+
"dir": "azure-resourcemanager-resources",
301+
"source": "specification/resources/resource-manager/readme.md",
302+
"package": "com.azure.resourcemanager.resources",
303+
"args": "--tag=package-databoundaries-2024-08 --title=DataBoundariesManagementClient --graalvm-config-suffix=databoundary --remove-operation-group=Operations"
298304
}
299305
}

sdk/resourcemanager/azure-resourcemanager-resources/CHANGELOG.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44

55
### Features Added
66

7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
7+
- Added data boundary client of api-version 2024-03-01.
128

139
## 2.43.0 (2024-09-27)
1410

sdk/resourcemanager/azure-resourcemanager-resources/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "java",
44
"TagPrefix": "java/resourcemanager/azure-resourcemanager-resources",
5-
"Tag": "java/resourcemanager/azure-resourcemanager-resources_0725d576ae"
5+
"Tag": "java/resourcemanager/azure-resourcemanager-resources_f8a1e5fca6"
66
}

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/ResourceManager.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
import com.azure.core.credential.TokenCredential;
77
import com.azure.core.http.HttpPipeline;
88
import com.azure.resourcemanager.resources.fluent.ChangesManagementClient;
9+
import com.azure.resourcemanager.resources.fluent.DataBoundariesManagementClient;
910
import com.azure.resourcemanager.resources.fluent.DeploymentStacksManagementClient;
1011
import com.azure.resourcemanager.resources.fluent.FeatureClient;
1112
import com.azure.resourcemanager.resources.fluent.ManagementLockClient;
1213
import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl;
1314
import com.azure.resourcemanager.resources.fluentcore.policy.ProviderRegistrationPolicy;
1415
import com.azure.resourcemanager.resources.implementation.ChangesManagementClientBuilder;
16+
import com.azure.resourcemanager.resources.implementation.DataBoundariesManagementClientBuilder;
1517
import com.azure.resourcemanager.resources.implementation.DeploymentStacksManagementClientBuilder;
1618
import com.azure.resourcemanager.resources.implementation.FeatureClientBuilder;
1719
import com.azure.resourcemanager.resources.fluent.PolicyClient;
@@ -62,6 +64,7 @@ public final class ResourceManager extends Manager<ResourceManagementClient> {
6264
private final ManagementLockClient managementLockClient;
6365
private final ChangesManagementClient resourceChangeClient;
6466
private final DeploymentStacksManagementClient deploymentStackClient;
67+
private final DataBoundariesManagementClient dataBoundaryClient;
6568
// The collections
6669
private ResourceGroups resourceGroups;
6770
private GenericResources genericResources;
@@ -264,6 +267,11 @@ private ResourceManager(HttpPipeline httpPipeline, AzureProfile profile) {
264267
.subscriptionId(profile.getSubscriptionId())
265268
.buildClient();
266269

270+
this.dataBoundaryClient = new DataBoundariesManagementClientBuilder()
271+
.pipeline(httpPipeline)
272+
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
273+
.buildClient();
274+
267275
for (int i = 0; i < httpPipeline.getPolicyCount(); ++i) {
268276
if (httpPipeline.getPolicy(i) instanceof ProviderRegistrationPolicy) {
269277
ProviderRegistrationPolicy policy = (ProviderRegistrationPolicy) httpPipeline.getPolicy(i);
@@ -324,6 +332,16 @@ public DeploymentStacksManagementClient deploymentStackClient() {
324332
return deploymentStackClient;
325333
}
326334

335+
/**
336+
* Wrapped inner data boundary client providing direct access to auto-generated API implementation,
337+
* based on Azure REST API.
338+
*
339+
* @return wrapped inner data boundary client.
340+
*/
341+
public DataBoundariesManagementClient dataBoundaryClient() {
342+
return dataBoundaryClient;
343+
}
344+
327345
/**
328346
* @return the resource group management API entry point
329347
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
5+
package com.azure.resourcemanager.resources.fluent;
6+
7+
import com.azure.core.annotation.ReturnType;
8+
import com.azure.core.annotation.ServiceMethod;
9+
import com.azure.core.http.rest.Response;
10+
import com.azure.core.util.Context;
11+
import com.azure.resourcemanager.resources.fluent.models.DataBoundaryDefinitionInner;
12+
import com.azure.resourcemanager.resources.models.DefaultName;
13+
import reactor.core.publisher.Mono;
14+
15+
/**
16+
* An instance of this class provides access to all the operations defined in DataBoundariesClient.
17+
*/
18+
public interface DataBoundariesClient {
19+
/**
20+
* Opt-in tenant to data boundary.
21+
*
22+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
23+
* @param dataBoundaryDefinition The data boundary to opt the tenant to.
24+
* @throws IllegalArgumentException thrown if parameters fail the validation.
25+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
26+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
27+
* @return a data boundary definition along with {@link Response} on successful completion of {@link Mono}.
28+
*/
29+
@ServiceMethod(returns = ReturnType.SINGLE)
30+
Mono<Response<DataBoundaryDefinitionInner>> putWithResponseAsync(DefaultName defaultParameter,
31+
DataBoundaryDefinitionInner dataBoundaryDefinition);
32+
33+
/**
34+
* Opt-in tenant to data boundary.
35+
*
36+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
37+
* @param dataBoundaryDefinition The data boundary to opt the tenant to.
38+
* @throws IllegalArgumentException thrown if parameters fail the validation.
39+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
40+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
41+
* @return a data boundary definition on successful completion of {@link Mono}.
42+
*/
43+
@ServiceMethod(returns = ReturnType.SINGLE)
44+
Mono<DataBoundaryDefinitionInner> putAsync(DefaultName defaultParameter,
45+
DataBoundaryDefinitionInner dataBoundaryDefinition);
46+
47+
/**
48+
* Opt-in tenant to data boundary.
49+
*
50+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
51+
* @param dataBoundaryDefinition The data boundary to opt the tenant to.
52+
* @param context The context to associate with this operation.
53+
* @throws IllegalArgumentException thrown if parameters fail the validation.
54+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
55+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
56+
* @return a data boundary definition along with {@link Response}.
57+
*/
58+
@ServiceMethod(returns = ReturnType.SINGLE)
59+
Response<DataBoundaryDefinitionInner> putWithResponse(DefaultName defaultParameter,
60+
DataBoundaryDefinitionInner dataBoundaryDefinition, Context context);
61+
62+
/**
63+
* Opt-in tenant to data boundary.
64+
*
65+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
66+
* @param dataBoundaryDefinition The data boundary to opt the tenant to.
67+
* @throws IllegalArgumentException thrown if parameters fail the validation.
68+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
69+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
70+
* @return a data boundary definition.
71+
*/
72+
@ServiceMethod(returns = ReturnType.SINGLE)
73+
DataBoundaryDefinitionInner put(DefaultName defaultParameter, DataBoundaryDefinitionInner dataBoundaryDefinition);
74+
75+
/**
76+
* Get data boundary of tenant.
77+
*
78+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
79+
* @throws IllegalArgumentException thrown if parameters fail the validation.
80+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
81+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
82+
* @return data boundary of tenant along with {@link Response} on successful completion of {@link Mono}.
83+
*/
84+
@ServiceMethod(returns = ReturnType.SINGLE)
85+
Mono<Response<DataBoundaryDefinitionInner>> getTenantWithResponseAsync(DefaultName defaultParameter);
86+
87+
/**
88+
* Get data boundary of tenant.
89+
*
90+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
91+
* @throws IllegalArgumentException thrown if parameters fail the validation.
92+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
93+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
94+
* @return data boundary of tenant on successful completion of {@link Mono}.
95+
*/
96+
@ServiceMethod(returns = ReturnType.SINGLE)
97+
Mono<DataBoundaryDefinitionInner> getTenantAsync(DefaultName defaultParameter);
98+
99+
/**
100+
* Get data boundary of tenant.
101+
*
102+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
103+
* @param context The context to associate with this operation.
104+
* @throws IllegalArgumentException thrown if parameters fail the validation.
105+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
106+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
107+
* @return data boundary of tenant along with {@link Response}.
108+
*/
109+
@ServiceMethod(returns = ReturnType.SINGLE)
110+
Response<DataBoundaryDefinitionInner> getTenantWithResponse(DefaultName defaultParameter, Context context);
111+
112+
/**
113+
* Get data boundary of tenant.
114+
*
115+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
116+
* @throws IllegalArgumentException thrown if parameters fail the validation.
117+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
118+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
119+
* @return data boundary of tenant.
120+
*/
121+
@ServiceMethod(returns = ReturnType.SINGLE)
122+
DataBoundaryDefinitionInner getTenant(DefaultName defaultParameter);
123+
124+
/**
125+
* Get data boundary at specified scope.
126+
*
127+
* @param scope The scope at which the operation is performed.
128+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
129+
* @throws IllegalArgumentException thrown if parameters fail the validation.
130+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
131+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
132+
* @return data boundary at specified scope along with {@link Response} on successful completion of {@link Mono}.
133+
*/
134+
@ServiceMethod(returns = ReturnType.SINGLE)
135+
Mono<Response<DataBoundaryDefinitionInner>> getScopeWithResponseAsync(String scope, DefaultName defaultParameter);
136+
137+
/**
138+
* Get data boundary at specified scope.
139+
*
140+
* @param scope The scope at which the operation is performed.
141+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
142+
* @throws IllegalArgumentException thrown if parameters fail the validation.
143+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
144+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
145+
* @return data boundary at specified scope on successful completion of {@link Mono}.
146+
*/
147+
@ServiceMethod(returns = ReturnType.SINGLE)
148+
Mono<DataBoundaryDefinitionInner> getScopeAsync(String scope, DefaultName defaultParameter);
149+
150+
/**
151+
* Get data boundary at specified scope.
152+
*
153+
* @param scope The scope at which the operation is performed.
154+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
155+
* @param context The context to associate with this operation.
156+
* @throws IllegalArgumentException thrown if parameters fail the validation.
157+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
158+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
159+
* @return data boundary at specified scope along with {@link Response}.
160+
*/
161+
@ServiceMethod(returns = ReturnType.SINGLE)
162+
Response<DataBoundaryDefinitionInner> getScopeWithResponse(String scope, DefaultName defaultParameter,
163+
Context context);
164+
165+
/**
166+
* Get data boundary at specified scope.
167+
*
168+
* @param scope The scope at which the operation is performed.
169+
* @param defaultParameter Default string modeled as parameter for auto generation to work correctly.
170+
* @throws IllegalArgumentException thrown if parameters fail the validation.
171+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
172+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
173+
* @return data boundary at specified scope.
174+
*/
175+
@ServiceMethod(returns = ReturnType.SINGLE)
176+
DataBoundaryDefinitionInner getScope(String scope, DefaultName defaultParameter);
177+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
5+
package com.azure.resourcemanager.resources.fluent;
6+
7+
import com.azure.core.http.HttpPipeline;
8+
import java.time.Duration;
9+
10+
/**
11+
* The interface for DataBoundariesManagementClient class.
12+
*/
13+
public interface DataBoundariesManagementClient {
14+
/**
15+
* Gets server parameter.
16+
*
17+
* @return the endpoint value.
18+
*/
19+
String getEndpoint();
20+
21+
/**
22+
* Gets Api Version.
23+
*
24+
* @return the apiVersion value.
25+
*/
26+
String getApiVersion();
27+
28+
/**
29+
* Gets The HTTP pipeline to send requests through.
30+
*
31+
* @return the httpPipeline value.
32+
*/
33+
HttpPipeline getHttpPipeline();
34+
35+
/**
36+
* Gets The default poll interval for long-running operation.
37+
*
38+
* @return the defaultPollInterval value.
39+
*/
40+
Duration getDefaultPollInterval();
41+
42+
/**
43+
* Gets the DataBoundariesClient object to access its operations.
44+
*
45+
* @return the DataBoundariesClient object.
46+
*/
47+
DataBoundariesClient getDataBoundaries();
48+
}

0 commit comments

Comments
 (0)