Skip to content

Commit f765c95

Browse files
authored
[Automation] Generate Fluent Lite from resourcegraph#package-2021-03 (Azure#28079)
1 parent db6c633 commit f765c95

File tree

52 files changed

+788
-2713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+788
-2713
lines changed

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

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,66 @@
11
# Release History
22

3-
## 1.0.0-beta.3 (Unreleased)
3+
## 1.0.0-beta.3 (2022-04-07)
44

5+
- Azure Resource Manager ResourceGraph client library for Java. This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
6+
7+
### Breaking Changes
8+
9+
* `models.ResourcesHistoryRequest` was removed
10+
11+
* `models.ResourceSnapshotData` was removed
12+
13+
* `models.ResourcesHistoryRequestOptions` was removed
14+
15+
* `models.DateTimeInterval` was removed
16+
17+
* `models.ChangeCategory` was removed
18+
19+
* `models.ResourceChangeDetailsRequestParameters` was removed
20+
21+
* `models.ResourceChangeData` was removed
22+
23+
* `models.ColumnDataType` was removed
24+
25+
* `models.ResourceChangeDataAfterSnapshot` was removed
26+
27+
* `models.ResourcePropertyChange` was removed
28+
29+
* `models.Column` was removed
30+
31+
* `models.ResourceChangesRequestParameters` was removed
32+
33+
* `models.ChangeType` was removed
34+
35+
* `models.ResourcesHistoryRequestOptionsResultFormat` was removed
36+
37+
* `models.ResourceChangesRequestParametersInterval` was removed
38+
39+
* `models.ResourceChangeDataBeforeSnapshot` was removed
40+
41+
* `models.PropertyChangeType` was removed
42+
43+
* `models.ResourceChangeList` was removed
44+
45+
#### `models.ResourceProviders` was modified
46+
47+
* `resourceChanges(models.ResourceChangesRequestParameters)` was removed
48+
* `resourcesHistoryWithResponse(models.ResourcesHistoryRequest,com.azure.core.util.Context)` was removed
49+
* `resourceChangesWithResponse(models.ResourceChangesRequestParameters,com.azure.core.util.Context)` was removed
50+
* `resourcesHistory(models.ResourcesHistoryRequest)` was removed
51+
* `resourceChangeDetails(models.ResourceChangeDetailsRequestParameters)` was removed
52+
* `resourceChangeDetailsWithResponse(models.ResourceChangeDetailsRequestParameters,com.azure.core.util.Context)` was removed
53+
54+
### Features Added
55+
56+
#### `ResourceGraphManager$Configurable` was modified
57+
58+
* `withScope(java.lang.String)` was added
59+
* `withRetryOptions(com.azure.core.http.policy.RetryOptions)` was added
60+
61+
#### `ResourceGraphManager` was modified
62+
63+
* `authenticate(com.azure.core.http.HttpPipeline,com.azure.core.management.profile.AzureProfile)` was added
564

665
## 1.0.0-beta.2 (2021-05-24)
766

sdk/resourcegraph/azure-resourcemanager-resourcegraph/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager ResourceGraph client library for Java.
44

5-
This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-preview-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-resourcegraph</artifactId>
35-
<version>1.0.0-beta.2</version>
35+
<version>1.0.0-beta.3</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -88,6 +88,7 @@ queryRequest.withOptions(new QueryRequestOptions().withResultFormat(ResultFormat
8888
response = manager.resourceProviders().resources(queryRequest);
8989

9090
```
91+
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcegraph/azure-resourcemanager-resourcegraph/SAMPLE.md)
9192

9293

9394
## Troubleshooting
Lines changed: 284 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,284 @@
1+
# Code snippets and samples
2+
3+
4+
## Operations
5+
6+
- [List](#operations_list)
7+
8+
## ResourceProvider
9+
10+
- [Resources](#resourceprovider_resources)
11+
### Operations_List
12+
13+
```java
14+
import com.azure.core.util.Context;
15+
16+
/** Samples for Operations List. */
17+
public final class OperationsListSamples {
18+
/*
19+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/OperationsList.json
20+
*/
21+
/**
22+
* Sample code: OperationsList.
23+
*
24+
* @param manager Entry point to ResourceGraphManager.
25+
*/
26+
public static void operationsList(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
27+
manager.operations().list(Context.NONE);
28+
}
29+
}
30+
```
31+
32+
### ResourceProvider_Resources
33+
34+
```java
35+
import com.azure.core.util.Context;
36+
import com.azure.resourcemanager.resourcegraph.models.FacetRequest;
37+
import com.azure.resourcemanager.resourcegraph.models.FacetRequestOptions;
38+
import com.azure.resourcemanager.resourcegraph.models.FacetSortOrder;
39+
import com.azure.resourcemanager.resourcegraph.models.QueryRequest;
40+
import com.azure.resourcemanager.resourcegraph.models.QueryRequestOptions;
41+
import java.util.Arrays;
42+
43+
/** Samples for ResourceProvider Resources. */
44+
public final class ResourceProviderResourcesSamples {
45+
/*
46+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesMgBasicQuery.json
47+
*/
48+
/**
49+
* Sample code: Basic management group query.
50+
*
51+
* @param manager Entry point to ResourceGraphManager.
52+
*/
53+
public static void basicManagementGroupQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
54+
manager
55+
.resourceProviders()
56+
.resourcesWithResponse(
57+
new QueryRequest()
58+
.withManagementGroups(Arrays.asList("e927f598-c1d4-4f72-8541-95d83a6a4ac8", "ProductionMG"))
59+
.withQuery("Resources | project id, name, type, location, tags | limit 3"),
60+
Context.NONE);
61+
}
62+
63+
/*
64+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesBasicQuery.json
65+
*/
66+
/**
67+
* Sample code: Basic query.
68+
*
69+
* @param manager Entry point to ResourceGraphManager.
70+
*/
71+
public static void basicQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
72+
manager
73+
.resourceProviders()
74+
.resourcesWithResponse(
75+
new QueryRequest()
76+
.withSubscriptions(Arrays.asList("cfbbd179-59d2-4052-aa06-9270a38aa9d6"))
77+
.withQuery("Resources | project id, name, type, location, tags | limit 3"),
78+
Context.NONE);
79+
}
80+
81+
/*
82+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesFacetQuery.json
83+
*/
84+
/**
85+
* Sample code: Query with a facet request.
86+
*
87+
* @param manager Entry point to ResourceGraphManager.
88+
*/
89+
public static void queryWithAFacetRequest(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
90+
manager
91+
.resourceProviders()
92+
.resourcesWithResponse(
93+
new QueryRequest()
94+
.withSubscriptions(Arrays.asList("cfbbd179-59d2-4052-aa06-9270a38aa9d6"))
95+
.withQuery(
96+
"Resources | where type =~ 'Microsoft.Compute/virtualMachines' | project id, name, location,"
97+
+ " resourceGroup, properties.storageProfile.osDisk.osType | limit 5")
98+
.withFacets(
99+
Arrays
100+
.asList(
101+
new FacetRequest()
102+
.withExpression("location")
103+
.withOptions(
104+
new FacetRequestOptions().withSortOrder(FacetSortOrder.DESC).withTop(3)),
105+
new FacetRequest()
106+
.withExpression("properties.storageProfile.osDisk.osType")
107+
.withOptions(
108+
new FacetRequestOptions().withSortOrder(FacetSortOrder.DESC).withTop(3)),
109+
new FacetRequest()
110+
.withExpression("nonExistingColumn")
111+
.withOptions(
112+
new FacetRequestOptions().withSortOrder(FacetSortOrder.DESC).withTop(3)),
113+
new FacetRequest()
114+
.withExpression("resourceGroup")
115+
.withOptions(
116+
new FacetRequestOptions()
117+
.withSortBy("tolower(resourceGroup)")
118+
.withSortOrder(FacetSortOrder.ASC)
119+
.withTop(3)),
120+
new FacetRequest()
121+
.withExpression("resourceGroup")
122+
.withOptions(
123+
new FacetRequestOptions()
124+
.withFilter("resourceGroup contains 'test'")
125+
.withTop(3)))),
126+
Context.NONE);
127+
}
128+
129+
/*
130+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesFilterQuery.json
131+
*/
132+
/**
133+
* Sample code: Filter resources.
134+
*
135+
* @param manager Entry point to ResourceGraphManager.
136+
*/
137+
public static void filterResources(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
138+
manager
139+
.resourceProviders()
140+
.resourcesWithResponse(
141+
new QueryRequest()
142+
.withSubscriptions(Arrays.asList("cfbbd179-59d2-4052-aa06-9270a38aa9d6"))
143+
.withQuery(
144+
"Resources | project id, name, type, location | where type =~"
145+
+ " 'Microsoft.Compute/virtualMachines' | limit 3"),
146+
Context.NONE);
147+
}
148+
149+
/*
150+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesSummarizeQuery.json
151+
*/
152+
/**
153+
* Sample code: Summarize resources by location.
154+
*
155+
* @param manager Entry point to ResourceGraphManager.
156+
*/
157+
public static void summarizeResourcesByLocation(
158+
com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
159+
manager
160+
.resourceProviders()
161+
.resourcesWithResponse(
162+
new QueryRequest()
163+
.withSubscriptions(Arrays.asList("cfbbd179-59d2-4052-aa06-9270a38aa9d6"))
164+
.withQuery("Resources | project id, name, type, location | summarize by location"),
165+
Context.NONE);
166+
}
167+
168+
/*
169+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesPropertiesQuery.json
170+
*/
171+
/**
172+
* Sample code: Access a properties field.
173+
*
174+
* @param manager Entry point to ResourceGraphManager.
175+
*/
176+
public static void accessAPropertiesField(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
177+
manager
178+
.resourceProviders()
179+
.resourcesWithResponse(
180+
new QueryRequest()
181+
.withSubscriptions(Arrays.asList("cfbbd179-59d2-4052-aa06-9270a38aa9d6"))
182+
.withQuery(
183+
"Resources | where type =~ 'Microsoft.Compute/virtualMachines' | summarize count() by"
184+
+ " tostring(properties.storageProfile.osDisk.osType)"),
185+
Context.NONE);
186+
}
187+
188+
/*
189+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesComplexQuery.json
190+
*/
191+
/**
192+
* Sample code: Complex query.
193+
*
194+
* @param manager Entry point to ResourceGraphManager.
195+
*/
196+
public static void complexQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
197+
manager
198+
.resourceProviders()
199+
.resourcesWithResponse(
200+
new QueryRequest()
201+
.withSubscriptions(Arrays.asList("cfbbd179-59d2-4052-aa06-9270a38aa9d6"))
202+
.withQuery(
203+
"Resources | project id, name, type, location | where type =~"
204+
+ " 'Microsoft.Compute/virtualMachines' | summarize count() by location | top 3 by count_"),
205+
Context.NONE);
206+
}
207+
208+
/*
209+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesNextPageQuery.json
210+
*/
211+
/**
212+
* Sample code: Next page query.
213+
*
214+
* @param manager Entry point to ResourceGraphManager.
215+
*/
216+
public static void nextPageQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
217+
manager
218+
.resourceProviders()
219+
.resourcesWithResponse(
220+
new QueryRequest()
221+
.withSubscriptions(Arrays.asList("cfbbd179-59d2-4052-aa06-9270a38aa9d6"))
222+
.withQuery("Resources | where name contains 'test' | project id, name, type, location")
223+
.withOptions(
224+
new QueryRequestOptions()
225+
.withSkipToken("eyAibm8iOiAibHVjayIsICJidXQiOiAibmljZSIsICJ0cnkiOiAiISIgfQ==")),
226+
Context.NONE);
227+
}
228+
229+
/*
230+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesFirstPageQuery.json
231+
*/
232+
/**
233+
* Sample code: First page query.
234+
*
235+
* @param manager Entry point to ResourceGraphManager.
236+
*/
237+
public static void firstPageQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
238+
manager
239+
.resourceProviders()
240+
.resourcesWithResponse(
241+
new QueryRequest()
242+
.withSubscriptions(Arrays.asList("cfbbd179-59d2-4052-aa06-9270a38aa9d6"))
243+
.withQuery("Resources | where name contains 'test' | project id, name, type, location")
244+
.withOptions(new QueryRequestOptions().withTop(3).withSkip(0)),
245+
Context.NONE);
246+
}
247+
248+
/*
249+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesTenantBasicQuery.json
250+
*/
251+
/**
252+
* Sample code: Basic tenant query.
253+
*
254+
* @param manager Entry point to ResourceGraphManager.
255+
*/
256+
public static void basicTenantQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
257+
manager
258+
.resourceProviders()
259+
.resourcesWithResponse(
260+
new QueryRequest().withQuery("Resources | project id, name, type, location, tags | limit 3"),
261+
Context.NONE);
262+
}
263+
264+
/*
265+
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesRandomPageQuery.json
266+
*/
267+
/**
268+
* Sample code: Random page query.
269+
*
270+
* @param manager Entry point to ResourceGraphManager.
271+
*/
272+
public static void randomPageQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
273+
manager
274+
.resourceProviders()
275+
.resourcesWithResponse(
276+
new QueryRequest()
277+
.withSubscriptions(Arrays.asList("cfbbd179-59d2-4052-aa06-9270a38aa9d6"))
278+
.withQuery("Resources | where name contains 'test' | project id, name, type, location")
279+
.withOptions(new QueryRequestOptions().withTop(2).withSkip(10)),
280+
Context.NONE);
281+
}
282+
}
283+
```
284+

sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<packaging>jar</packaging>
1414

1515
<name>Microsoft Azure SDK for ResourceGraph Management</name>
16-
<description>This package contains Microsoft Azure SDK for ResourceGraph Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Resource Graph API Reference. Package tag package-preview-2021-03.</description>
16+
<description>This package contains Microsoft Azure SDK for ResourceGraph Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Resource Graph API Reference. Package tag package-2021-03.</description>
1717
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

1919
<licenses>

0 commit comments

Comments
 (0)