Skip to content

Commit 31aca86

Browse files
author
SDKAuto
committed
CodeGen from PR 15128 in Azure/azure-rest-api-specs
Merge e6db333d1033d3290068c78e13d02da49d98681e into dc90355ba177c3412bdb5b5569595834e1da33a4
1 parent 00c2df9 commit 31aca86

File tree

61 files changed

+3312
-240
lines changed

Some content is hidden

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

61 files changed

+3312
-240
lines changed

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

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

3-
## 1.0.0-beta.2 (Unreleased)
3+
## 1.0.0-beta.1 (2021-07-21)
44

5+
- Azure Resource Manager ServiceFabric client library for Java. This package contains Microsoft Azure SDK for ServiceFabric Management SDK. Service Fabric Management Client. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
56

67
## 1.0.0-beta.1 (2021-04-16)
78

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

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

33
Azure Resource Manager ServiceFabric client library for Java.
44

5-
This package contains Microsoft Azure SDK for ServiceFabric Management SDK. Service Fabric Management Client. Package tag package-2019-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 ServiceFabric Management SDK. Service Fabric Management Client. Package tag package-2021-06. 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-servicefabric</artifactId>
35-
<version>1.0.0-beta.1</version>
35+
<version>1.0.0-beta.2</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -74,6 +74,8 @@ See [API design][design] for general introduction on design and key concepts on
7474

7575
## Examples
7676

77+
78+
7779
## Troubleshooting
7880

7981
## Next steps
Lines changed: 80 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,86 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2-
<modelVersion>4.0.0</modelVersion>
3-
<parent>
4-
<groupId>com.azure</groupId>
5-
<artifactId>azure-client-sdk-parent</artifactId>
6-
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
7-
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
8-
</parent>
2+
<modelVersion>4.0.0</modelVersion>
3+
<parent>
4+
<groupId>com.azure</groupId>
5+
<artifactId>azure-client-sdk-parent</artifactId>
6+
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
7+
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
8+
</parent>
99

10-
<groupId>com.azure.resourcemanager</groupId>
11-
<artifactId>azure-resourcemanager-servicefabric</artifactId>
12-
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-servicefabric;current} -->
13-
<packaging>jar</packaging>
10+
<groupId>com.azure.resourcemanager</groupId>
11+
<artifactId>azure-resourcemanager-servicefabric</artifactId>
12+
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-servicefabric;current} -->
13+
<packaging>jar</packaging>
1414

15-
<name>Microsoft Azure SDK for ServiceFabric Management</name>
16-
<description>This package contains Microsoft Azure SDK for ServiceFabric Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Management Client. Package tag package-2019-03.</description>
17-
<url>https://github.com/Azure/azure-sdk-for-java</url>
15+
<name>Microsoft Azure SDK for ServiceFabric Management</name>
16+
<description>This package contains Microsoft Azure SDK for ServiceFabric Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Management Client. Package tag package-2021-06.</description>
17+
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

19-
<licenses>
20-
<license>
21-
<name>The MIT License (MIT)</name>
22-
<url>http://opensource.org/licenses/MIT</url>
23-
<distribution>repo</distribution>
24-
</license>
25-
</licenses>
19+
<licenses>
20+
<license>
21+
<name>The MIT License (MIT)</name>
22+
<url>http://opensource.org/licenses/MIT</url>
23+
<distribution>repo</distribution>
24+
</license>
25+
</licenses>
2626

27-
<scm>
28-
<url>https://github.com/Azure/azure-sdk-for-java</url>
29-
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection>
30-
<developerConnection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</developerConnection>
31-
<tag>HEAD</tag>
32-
</scm>
33-
<developers>
34-
<developer>
35-
<id>microsoft</id>
36-
<name>Microsoft</name>
37-
</developer>
38-
</developers>
39-
<properties>
40-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41-
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
42-
</properties>
43-
<dependencies>
44-
<dependency>
45-
<groupId>com.azure</groupId>
46-
<artifactId>azure-core</artifactId>
47-
<version>1.18.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
48-
</dependency>
49-
<dependency>
50-
<groupId>com.azure</groupId>
51-
<artifactId>azure-core-management</artifactId>
52-
<version>1.3.1</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
53-
</dependency>
54-
</dependencies>
55-
<build>
56-
<plugins>
57-
<plugin>
58-
<groupId>org.jacoco</groupId>
59-
<artifactId>jacoco-maven-plugin</artifactId>
60-
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
61-
<configuration>
62-
<skip>true</skip>
63-
</configuration>
64-
</plugin>
65-
</plugins>
66-
</build>
27+
<scm>
28+
<url>https://github.com/Azure/azure-sdk-for-java</url>
29+
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection>
30+
<developerConnection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</developerConnection>
31+
<tag>HEAD</tag>
32+
</scm>
33+
<developers>
34+
<developer>
35+
<id>microsoft</id>
36+
<name>Microsoft</name>
37+
</developer>
38+
</developers>
39+
<properties>
40+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41+
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
42+
</properties>
43+
<dependencies>
44+
<dependency>
45+
<groupId>com.azure</groupId>
46+
<artifactId>azure-core</artifactId>
47+
<version>1.18.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
48+
</dependency>
49+
<dependency>
50+
<groupId>com.azure</groupId>
51+
<artifactId>azure-core-management</artifactId>
52+
<version>1.3.1</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
53+
</dependency>
54+
</dependencies>
55+
<build>
56+
<plugins>
57+
<plugin>
58+
<groupId>org.jacoco</groupId>
59+
<artifactId>jacoco-maven-plugin</artifactId>
60+
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
61+
<configuration>
62+
<skip>true</skip>
63+
</configuration>
64+
</plugin>
65+
<plugin>
66+
<groupId>org.revapi</groupId>
67+
<artifactId>revapi-maven-plugin</artifactId>
68+
<version>0.11.2</version> <!-- {x-version-update;org.revapi:revapi-maven-plugin;external_dependency} -->
69+
<configuration>
70+
<analysisConfiguration>
71+
<revapi.ignore>
72+
<item>
73+
<code>java.method.addedToInterface</code>
74+
</item>
75+
<item>
76+
<regex>true</regex>
77+
<code>.*</code>
78+
<package>com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*</package>
79+
</item>
80+
</revapi.ignore>
81+
</analysisConfiguration>
82+
</configuration>
83+
</plugin>
84+
</plugins>
85+
</build>
6786
</project>

sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/ServiceFabricManager.java

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
import com.azure.core.http.HttpPipeline;
1010
import com.azure.core.http.HttpPipelineBuilder;
1111
import com.azure.core.http.policy.AddDatePolicy;
12-
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
1312
import com.azure.core.http.policy.HttpLogOptions;
1413
import com.azure.core.http.policy.HttpLoggingPolicy;
1514
import com.azure.core.http.policy.HttpPipelinePolicy;
1615
import com.azure.core.http.policy.HttpPolicyProviders;
1716
import com.azure.core.http.policy.RequestIdPolicy;
1817
import com.azure.core.http.policy.RetryPolicy;
1918
import com.azure.core.http.policy.UserAgentPolicy;
19+
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
2020
import com.azure.core.management.profile.AzureProfile;
2121
import com.azure.core.util.Configuration;
2222
import com.azure.core.util.logging.ClientLogger;
@@ -101,6 +101,7 @@ public static final class Configurable {
101101
private HttpClient httpClient;
102102
private HttpLogOptions httpLogOptions;
103103
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
104+
private final List<String> scopes = new ArrayList<>();
104105
private RetryPolicy retryPolicy;
105106
private Duration defaultPollInterval;
106107

@@ -140,6 +141,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
140141
return this;
141142
}
142143

144+
/**
145+
* Adds the scope to permission sets.
146+
*
147+
* @param scope the scope.
148+
* @return the configurable object itself.
149+
*/
150+
public Configurable withScope(String scope) {
151+
this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
152+
return this;
153+
}
154+
143155
/**
144156
* Sets the retry policy to the HTTP pipeline.
145157
*
@@ -196,6 +208,9 @@ public ServiceFabricManager authenticate(TokenCredential credential, AzureProfil
196208
userAgentBuilder.append(" (auto-generated)");
197209
}
198210

211+
if (scopes.isEmpty()) {
212+
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
213+
}
199214
if (retryPolicy == null) {
200215
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
201216
}
@@ -205,10 +220,7 @@ public ServiceFabricManager authenticate(TokenCredential credential, AzureProfil
205220
HttpPolicyProviders.addBeforeRetryPolicies(policies);
206221
policies.add(retryPolicy);
207222
policies.add(new AddDatePolicy());
208-
policies
209-
.add(
210-
new BearerTokenAuthenticationPolicy(
211-
credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
223+
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
212224
policies.addAll(this.policies);
213225
HttpPolicyProviders.addAfterRetryPolicies(policies);
214226
policies.add(new HttpLoggingPolicy(httpLogOptions));

sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/fluent/ClustersClient.java

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
import com.azure.core.util.polling.SyncPoller;
1313
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterInner;
1414
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterListResultInner;
15+
import com.azure.resourcemanager.servicefabric.fluent.models.UpgradableVersionPathResultInner;
1516
import com.azure.resourcemanager.servicefabric.models.ClusterUpdateParameters;
17+
import com.azure.resourcemanager.servicefabric.models.UpgradableVersionsDescription;
1618

1719
/** An instance of this class provides access to all the operations defined in ClustersClient. */
1820
public interface ClustersClient {
@@ -55,7 +57,7 @@ Response<ClusterInner> getByResourceGroupWithResponse(
5557
* @throws IllegalArgumentException thrown if parameters fail the validation.
5658
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
5759
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
58-
* @return the cluster resource properties.
60+
* @return the cluster resource.
5961
*/
6062
@ServiceMethod(returns = ReturnType.SINGLE)
6163
SyncPoller<PollResult<ClusterInner>, ClusterInner> beginCreateOrUpdate(
@@ -71,7 +73,7 @@ SyncPoller<PollResult<ClusterInner>, ClusterInner> beginCreateOrUpdate(
7173
* @throws IllegalArgumentException thrown if parameters fail the validation.
7274
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
7375
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
74-
* @return the cluster resource properties.
76+
* @return the cluster resource.
7577
*/
7678
@ServiceMethod(returns = ReturnType.SINGLE)
7779
SyncPoller<PollResult<ClusterInner>, ClusterInner> beginCreateOrUpdate(
@@ -86,7 +88,7 @@ SyncPoller<PollResult<ClusterInner>, ClusterInner> beginCreateOrUpdate(
8688
* @throws IllegalArgumentException thrown if parameters fail the validation.
8789
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
8890
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
89-
* @return the cluster resource properties.
91+
* @return the cluster resource.
9092
*/
9193
@ServiceMethod(returns = ReturnType.SINGLE)
9294
ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters);
@@ -101,7 +103,7 @@ SyncPoller<PollResult<ClusterInner>, ClusterInner> beginCreateOrUpdate(
101103
* @throws IllegalArgumentException thrown if parameters fail the validation.
102104
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
103105
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
104-
* @return the cluster resource properties.
106+
* @return the cluster resource.
105107
*/
106108
@ServiceMethod(returns = ReturnType.SINGLE)
107109
ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters, Context context);
@@ -116,7 +118,7 @@ SyncPoller<PollResult<ClusterInner>, ClusterInner> beginCreateOrUpdate(
116118
* @throws IllegalArgumentException thrown if parameters fail the validation.
117119
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
118120
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
119-
* @return the cluster resource properties.
121+
* @return the cluster resource.
120122
*/
121123
@ServiceMethod(returns = ReturnType.SINGLE)
122124
SyncPoller<PollResult<ClusterInner>, ClusterInner> beginUpdate(
@@ -133,7 +135,7 @@ SyncPoller<PollResult<ClusterInner>, ClusterInner> beginUpdate(
133135
* @throws IllegalArgumentException thrown if parameters fail the validation.
134136
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
135137
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
136-
* @return the cluster resource properties.
138+
* @return the cluster resource.
137139
*/
138140
@ServiceMethod(returns = ReturnType.SINGLE)
139141
SyncPoller<PollResult<ClusterInner>, ClusterInner> beginUpdate(
@@ -149,7 +151,7 @@ SyncPoller<PollResult<ClusterInner>, ClusterInner> beginUpdate(
149151
* @throws IllegalArgumentException thrown if parameters fail the validation.
150152
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
151153
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
152-
* @return the cluster resource properties.
154+
* @return the cluster resource.
153155
*/
154156
@ServiceMethod(returns = ReturnType.SINGLE)
155157
ClusterInner update(String resourceGroupName, String clusterName, ClusterUpdateParameters parameters);
@@ -165,7 +167,7 @@ SyncPoller<PollResult<ClusterInner>, ClusterInner> beginUpdate(
165167
* @throws IllegalArgumentException thrown if parameters fail the validation.
166168
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
167169
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
168-
* @return the cluster resource properties.
170+
* @return the cluster resource.
169171
*/
170172
@ServiceMethod(returns = ReturnType.SINGLE)
171173
ClusterInner update(
@@ -243,4 +245,40 @@ ClusterInner update(
243245
*/
244246
@ServiceMethod(returns = ReturnType.SINGLE)
245247
Response<ClusterListResultInner> listWithResponse(Context context);
248+
249+
/**
250+
* If a target is not provided, it will get the minimum and maximum versions available from the current cluster
251+
* version. If a target is given, it will provide the required path to get from the current cluster version to the
252+
* target version.
253+
*
254+
* @param resourceGroupName The name of the resource group.
255+
* @param clusterName The name of the cluster resource.
256+
* @throws IllegalArgumentException thrown if parameters fail the validation.
257+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
258+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
259+
* @return the list of intermediate cluster code versions for an upgrade or downgrade.
260+
*/
261+
@ServiceMethod(returns = ReturnType.SINGLE)
262+
UpgradableVersionPathResultInner listUpgradableVersions(String resourceGroupName, String clusterName);
263+
264+
/**
265+
* If a target is not provided, it will get the minimum and maximum versions available from the current cluster
266+
* version. If a target is given, it will provide the required path to get from the current cluster version to the
267+
* target version.
268+
*
269+
* @param resourceGroupName The name of the resource group.
270+
* @param clusterName The name of the cluster resource.
271+
* @param versionsDescription The upgrade path description with target version.
272+
* @param context The context to associate with this operation.
273+
* @throws IllegalArgumentException thrown if parameters fail the validation.
274+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
275+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
276+
* @return the list of intermediate cluster code versions for an upgrade or downgrade.
277+
*/
278+
@ServiceMethod(returns = ReturnType.SINGLE)
279+
Response<UpgradableVersionPathResultInner> listUpgradableVersionsWithResponse(
280+
String resourceGroupName,
281+
String clusterName,
282+
UpgradableVersionsDescription versionsDescription,
283+
Context context);
246284
}

0 commit comments

Comments
 (0)