Skip to content

Commit fdd946f

Browse files
author
SDKAuto
committed
CodeGen from PR 14763 in Azure/azure-rest-api-specs
Merge 6d38c221c7b95edb6654d0627bec43dfda14e557 into 2737ef83c687cd61721ece7af713921d0df2485a
1 parent faf0204 commit fdd946f

17 files changed

+617
-82
lines changed

sdk/synapse/azure-resourcemanager-synapse/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-16)
44

5+
- Azure Resource Manager Synapse client library for Java. This package contains Microsoft Azure SDK for Synapse Management SDK. Azure Synapse Analytics Management Client. Package tag package-2021-05. 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-07)
78

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

5-
This package contains Microsoft Azure SDK for Synapse Management SDK. Azure Synapse Analytics Management Client. 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).
5+
This package contains Microsoft Azure SDK for Synapse Management SDK. Azure Synapse Analytics Management Client. Package tag package-2021-05. 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-synapse</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-synapse</artifactId>
12-
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-synapse;current} -->
13-
<packaging>jar</packaging>
10+
<groupId>com.azure.resourcemanager</groupId>
11+
<artifactId>azure-resourcemanager-synapse</artifactId>
12+
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-synapse;current} -->
13+
<packaging>jar</packaging>
1414

15-
<name>Microsoft Azure SDK for Synapse Management</name>
16-
<description>This package contains Microsoft Azure SDK for Synapse Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Synapse Analytics Management Client. Package tag package-2021-03.</description>
17-
<url>https://github.com/Azure/azure-sdk-for-java</url>
15+
<name>Microsoft Azure SDK for Synapse Management</name>
16+
<description>This package contains Microsoft Azure SDK for Synapse Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Synapse Analytics Management Client. Package tag package-2021-05.</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/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.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;
@@ -317,6 +317,7 @@ public static final class Configurable {
317317
private HttpClient httpClient;
318318
private HttpLogOptions httpLogOptions;
319319
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
320+
private final List<String> scopes = new ArrayList<>();
320321
private RetryPolicy retryPolicy;
321322
private Duration defaultPollInterval;
322323

@@ -356,6 +357,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
356357
return this;
357358
}
358359

360+
/**
361+
* Adds the scope to permission sets.
362+
*
363+
* @param scope the scope.
364+
* @return the configurable object itself.
365+
*/
366+
public Configurable withScope(String scope) {
367+
this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
368+
return this;
369+
}
370+
359371
/**
360372
* Sets the retry policy to the HTTP pipeline.
361373
*
@@ -412,6 +424,9 @@ public SynapseManager authenticate(TokenCredential credential, AzureProfile prof
412424
userAgentBuilder.append(" (auto-generated)");
413425
}
414426

427+
if (scopes.isEmpty()) {
428+
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
429+
}
415430
if (retryPolicy == null) {
416431
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
417432
}
@@ -421,10 +436,7 @@ public SynapseManager authenticate(TokenCredential credential, AzureProfile prof
421436
HttpPolicyProviders.addBeforeRetryPolicies(policies);
422437
policies.add(retryPolicy);
423438
policies.add(new AddDatePolicy());
424-
policies
425-
.add(
426-
new BearerTokenAuthenticationPolicy(
427-
credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
439+
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
428440
policies.addAll(this.policies);
429441
HttpPolicyProviders.addAfterRetryPolicies(policies);
430442
policies.add(new HttpLoggingPolicy(httpLogOptions));

sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/PrivateEndpointConnectionsPrivateLinkHubsClient.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.azure.core.annotation.ReturnType;
88
import com.azure.core.annotation.ServiceMethod;
99
import com.azure.core.http.rest.PagedIterable;
10+
import com.azure.core.http.rest.Response;
1011
import com.azure.core.util.Context;
1112
import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionForPrivateLinkHubInner;
1213

@@ -43,4 +44,35 @@ PagedIterable<PrivateEndpointConnectionForPrivateLinkHubInner> list(
4344
@ServiceMethod(returns = ReturnType.COLLECTION)
4445
PagedIterable<PrivateEndpointConnectionForPrivateLinkHubInner> list(
4546
String resourceGroupName, String privateLinkHubName, Context context);
47+
48+
/**
49+
* Get all PrivateEndpointConnection in the PrivateLinkHub by name.
50+
*
51+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
52+
* @param privateLinkHubName Name of the privateLinkHub.
53+
* @param privateEndpointConnectionName Name of the privateEndpointConnection.
54+
* @throws IllegalArgumentException thrown if parameters fail the validation.
55+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
56+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
57+
* @return all PrivateEndpointConnection in the PrivateLinkHub by name.
58+
*/
59+
@ServiceMethod(returns = ReturnType.SINGLE)
60+
PrivateEndpointConnectionForPrivateLinkHubInner get(
61+
String resourceGroupName, String privateLinkHubName, String privateEndpointConnectionName);
62+
63+
/**
64+
* Get all PrivateEndpointConnection in the PrivateLinkHub by name.
65+
*
66+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
67+
* @param privateLinkHubName Name of the privateLinkHub.
68+
* @param privateEndpointConnectionName Name of the privateEndpointConnection.
69+
* @param context The context to associate with this operation.
70+
* @throws IllegalArgumentException thrown if parameters fail the validation.
71+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
72+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
73+
* @return all PrivateEndpointConnection in the PrivateLinkHub by name.
74+
*/
75+
@ServiceMethod(returns = ReturnType.SINGLE)
76+
Response<PrivateEndpointConnectionForPrivateLinkHubInner> getWithResponse(
77+
String resourceGroupName, String privateLinkHubName, String privateEndpointConnectionName, Context context);
4678
}

sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceInner.java

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.azure.core.annotation.JsonFlatten;
99
import com.azure.core.management.Resource;
1010
import com.azure.core.util.logging.ClientLogger;
11+
import com.azure.resourcemanager.synapse.models.CspWorkspaceAdminProperties;
1112
import com.azure.resourcemanager.synapse.models.DataLakeStorageAccountDetails;
1213
import com.azure.resourcemanager.synapse.models.EncryptionDetails;
1314
import com.azure.resourcemanager.synapse.models.ManagedIdentity;
@@ -136,11 +137,17 @@ public class WorkspaceInner extends Resource {
136137
private String adlaResourceId;
137138

138139
/*
139-
* Enable or Disable pubic network access to workspace
140+
* Enable or Disable public network access to workspace
140141
*/
141142
@JsonProperty(value = "properties.publicNetworkAccess")
142143
private WorkspacePublicNetworkAccess publicNetworkAccess;
143144

145+
/*
146+
* Initial workspace AAD admin properties for a CSP subscription
147+
*/
148+
@JsonProperty(value = "properties.cspWorkspaceAdminProperties")
149+
private CspWorkspaceAdminProperties cspWorkspaceAdminProperties;
150+
144151
/**
145152
* Get the identity property: Identity of the workspace.
146153
*
@@ -449,7 +456,7 @@ public String adlaResourceId() {
449456
}
450457

451458
/**
452-
* Get the publicNetworkAccess property: Enable or Disable pubic network access to workspace.
459+
* Get the publicNetworkAccess property: Enable or Disable public network access to workspace.
453460
*
454461
* @return the publicNetworkAccess value.
455462
*/
@@ -458,7 +465,7 @@ public WorkspacePublicNetworkAccess publicNetworkAccess() {
458465
}
459466

460467
/**
461-
* Set the publicNetworkAccess property: Enable or Disable pubic network access to workspace.
468+
* Set the publicNetworkAccess property: Enable or Disable public network access to workspace.
462469
*
463470
* @param publicNetworkAccess the publicNetworkAccess value to set.
464471
* @return the WorkspaceInner object itself.
@@ -468,6 +475,26 @@ public WorkspaceInner withPublicNetworkAccess(WorkspacePublicNetworkAccess publi
468475
return this;
469476
}
470477

478+
/**
479+
* Get the cspWorkspaceAdminProperties property: Initial workspace AAD admin properties for a CSP subscription.
480+
*
481+
* @return the cspWorkspaceAdminProperties value.
482+
*/
483+
public CspWorkspaceAdminProperties cspWorkspaceAdminProperties() {
484+
return this.cspWorkspaceAdminProperties;
485+
}
486+
487+
/**
488+
* Set the cspWorkspaceAdminProperties property: Initial workspace AAD admin properties for a CSP subscription.
489+
*
490+
* @param cspWorkspaceAdminProperties the cspWorkspaceAdminProperties value to set.
491+
* @return the WorkspaceInner object itself.
492+
*/
493+
public WorkspaceInner withCspWorkspaceAdminProperties(CspWorkspaceAdminProperties cspWorkspaceAdminProperties) {
494+
this.cspWorkspaceAdminProperties = cspWorkspaceAdminProperties;
495+
return this;
496+
}
497+
471498
/** {@inheritDoc} */
472499
@Override
473500
public WorkspaceInner withLocation(String location) {
@@ -512,5 +539,8 @@ public void validate() {
512539
if (purviewConfiguration() != null) {
513540
purviewConfiguration().validate();
514541
}
542+
if (cspWorkspaceAdminProperties() != null) {
543+
cspWorkspaceAdminProperties().validate();
544+
}
515545
}
516546
}

0 commit comments

Comments
 (0)