Skip to content

Commit 241d170

Browse files
author
SDKAuto
committed
CodeGen from PR 14869 in Azure/azure-rest-api-specs
Merge c3b56116965592b1b1f44fc2987b282667a081fe into cc7cde9f4adb295c821ba5b4b12c576e49d1e821
1 parent aa466ff commit 241d170

File tree

9 files changed

+334
-73
lines changed

9 files changed

+334
-73
lines changed

sdk/signalr/azure-resourcemanager-signalr/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-06-21)
44

5+
- Azure Resource Manager SignalR client library for Java. This package contains Microsoft Azure SDK for SignalR Management SDK. REST API for Azure SignalR Service. Package tag package-2021-06-01-preview. 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-14)
78

sdk/signalr/azure-resourcemanager-signalr/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 SignalR client library for Java.
44

5-
This package contains Microsoft Azure SDK for SignalR Management SDK. REST API for Azure SignalR Service. Package tag package-2021-04-01-preview. 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 SignalR Management SDK. REST API for Azure SignalR Service. Package tag package-2021-06-01-preview. 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-signalr</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-signalr</artifactId>
12-
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-signalr;current} -->
13-
<packaging>jar</packaging>
10+
<groupId>com.azure.resourcemanager</groupId>
11+
<artifactId>azure-resourcemanager-signalr</artifactId>
12+
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-signalr;current} -->
13+
<packaging>jar</packaging>
1414

15-
<name>Microsoft Azure SDK for SignalR Management</name>
16-
<description>This package contains Microsoft Azure SDK for SignalR Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure SignalR Service. Package tag package-2021-04-01-preview.</description>
17-
<url>https://github.com/Azure/azure-sdk-for-java</url>
15+
<name>Microsoft Azure SDK for SignalR Management</name>
16+
<description>This package contains Microsoft Azure SDK for SignalR Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure SignalR Service. Package tag package-2021-06-01-preview.</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.17.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.0</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.17.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.0</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/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/SignalRManager.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;
@@ -97,6 +97,7 @@ public static final class Configurable {
9797
private HttpClient httpClient;
9898
private HttpLogOptions httpLogOptions;
9999
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
100+
private final List<String> scopes = new ArrayList<>();
100101
private RetryPolicy retryPolicy;
101102
private Duration defaultPollInterval;
102103

@@ -136,6 +137,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
136137
return this;
137138
}
138139

140+
/**
141+
* Adds the scope to permission sets.
142+
*
143+
* @param scope the scope.
144+
* @return the configurable object itself.
145+
*/
146+
public Configurable withScope(String scope) {
147+
this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
148+
return this;
149+
}
150+
139151
/**
140152
* Sets the retry policy to the HTTP pipeline.
141153
*
@@ -192,6 +204,9 @@ public SignalRManager authenticate(TokenCredential credential, AzureProfile prof
192204
userAgentBuilder.append(" (auto-generated)");
193205
}
194206

207+
if (scopes.isEmpty()) {
208+
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
209+
}
195210
if (retryPolicy == null) {
196211
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
197212
}
@@ -201,10 +216,7 @@ public SignalRManager authenticate(TokenCredential credential, AzureProfile prof
201216
HttpPolicyProviders.addBeforeRetryPolicies(policies);
202217
policies.add(retryPolicy);
203218
policies.add(new AddDatePolicy());
204-
policies
205-
.add(
206-
new BearerTokenAuthenticationPolicy(
207-
credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
219+
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
208220
policies.addAll(this.policies);
209221
HttpPolicyProviders.addAfterRetryPolicies(policies);
210222
policies.add(new HttpLoggingPolicy(httpLogOptions));

sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SignalRResourceInner.java

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,31 @@ public class SignalRResourceInner extends Resource {
143143
@JsonProperty(value = "properties.networkACLs")
144144
private SignalRNetworkACLs networkACLs;
145145

146+
/*
147+
* Enable or disable public network access. Default to "Enabled".
148+
* When it's Enabled, network ACLs still apply.
149+
* When it's Disabled, public network access is always disabled no matter
150+
* what you set in network ACLs.
151+
*/
152+
@JsonProperty(value = "properties.publicNetworkAccess")
153+
private String publicNetworkAccess;
154+
155+
/*
156+
* DisableLocalAuth
157+
* Enable or disable local auth with AccessKey
158+
* When set as true, connection with AccessKey=xxx won't work.
159+
*/
160+
@JsonProperty(value = "properties.disableLocalAuth")
161+
private Boolean disableLocalAuth;
162+
163+
/*
164+
* disableAadAuth
165+
* Enable or disable aad auth
166+
* When set as true, connection with AuthType=aad won't work.
167+
*/
168+
@JsonProperty(value = "properties.disableAadAuth")
169+
private Boolean disableAadAuth;
170+
146171
/**
147172
* Get the sku property: The billing information of the resource.(e.g. Free, Standard).
148173
*
@@ -396,6 +421,74 @@ public SignalRResourceInner withNetworkACLs(SignalRNetworkACLs networkACLs) {
396421
return this;
397422
}
398423

424+
/**
425+
* Get the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". When it's
426+
* Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what
427+
* you set in network ACLs.
428+
*
429+
* @return the publicNetworkAccess value.
430+
*/
431+
public String publicNetworkAccess() {
432+
return this.publicNetworkAccess;
433+
}
434+
435+
/**
436+
* Set the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". When it's
437+
* Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what
438+
* you set in network ACLs.
439+
*
440+
* @param publicNetworkAccess the publicNetworkAccess value to set.
441+
* @return the SignalRResourceInner object itself.
442+
*/
443+
public SignalRResourceInner withPublicNetworkAccess(String publicNetworkAccess) {
444+
this.publicNetworkAccess = publicNetworkAccess;
445+
return this;
446+
}
447+
448+
/**
449+
* Get the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey When set as true,
450+
* connection with AccessKey=xxx won't work.
451+
*
452+
* @return the disableLocalAuth value.
453+
*/
454+
public Boolean disableLocalAuth() {
455+
return this.disableLocalAuth;
456+
}
457+
458+
/**
459+
* Set the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey When set as true,
460+
* connection with AccessKey=xxx won't work.
461+
*
462+
* @param disableLocalAuth the disableLocalAuth value to set.
463+
* @return the SignalRResourceInner object itself.
464+
*/
465+
public SignalRResourceInner withDisableLocalAuth(Boolean disableLocalAuth) {
466+
this.disableLocalAuth = disableLocalAuth;
467+
return this;
468+
}
469+
470+
/**
471+
* Get the disableAadAuth property: disableAadAuth Enable or disable aad auth When set as true, connection with
472+
* AuthType=aad won't work.
473+
*
474+
* @return the disableAadAuth value.
475+
*/
476+
public Boolean disableAadAuth() {
477+
return this.disableAadAuth;
478+
}
479+
480+
/**
481+
* Set the disableAadAuth property: disableAadAuth Enable or disable aad auth When set as true, connection with
482+
* AuthType=aad won't work.
483+
*
484+
* @param disableAadAuth the disableAadAuth value to set.
485+
* @return the SignalRResourceInner object itself.
486+
*/
487+
public SignalRResourceInner withDisableAadAuth(Boolean disableAadAuth) {
488+
this.disableAadAuth = disableAadAuth;
489+
return this;
490+
}
491+
399492
/** {@inheritDoc} */
400493
@Override
401494
public SignalRResourceInner withLocation(String location) {

sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRManagementClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public SignalRSharedPrivateLinkResourcesClient getSignalRSharedPrivateLinkResour
214214
this.defaultPollInterval = defaultPollInterval;
215215
this.subscriptionId = subscriptionId;
216216
this.endpoint = endpoint;
217-
this.apiVersion = "2021-04-01-preview";
217+
this.apiVersion = "2021-06-01-preview";
218218
this.operations = new OperationsClientImpl(this);
219219
this.signalRs = new SignalRsClientImpl(this);
220220
this.usages = new UsagesClientImpl(this);

0 commit comments

Comments
 (0)