Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-resourcemanager-synapse] Adding InferencePool, Group and Endpoint #7024

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.8 (Unreleased)
## 1.0.0-beta.1 (2023-09-15)

- 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-composite-v2. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
4 changes: 3 additions & 1 deletion sdk/synapse/azure-resourcemanager-synapse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-synapse</artifactId>
<version>1.0.0-beta.7</version>
<version>1.0.0-beta.8</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fsynapse%2Fazure-resourcemanager-synapse%2FREADME.png)
56 changes: 17 additions & 39 deletions sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@
- [Get](#sqlpools_get)
- [ListByWorkspace](#sqlpools_listbyworkspace)
- [Pause](#sqlpools_pause)
- [Rename](#sqlpools_rename)
- [Resume](#sqlpools_resume)
- [Update](#sqlpools_update)

Expand Down Expand Up @@ -554,7 +553,7 @@ public final class BigDataPoolsCreateOrUpdateSamples {
.define("ExamplePool")
.withRegion("West US 2")
.withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace")
.withTags(mapOf("key", "value"))
.withTags(mapOf("key", "fakeTokenPlaceholder"))
.withAutoScale(new AutoScaleProperties().withMinNodeCount(3).withEnabled(true).withMaxNodeCount(50))
.withAutoPause(new AutoPauseProperties().withDelayInMinutes(15).withEnabled(true))
.withIsAutotuneEnabled(false)
Expand All @@ -568,6 +567,7 @@ public final class BigDataPoolsCreateOrUpdateSamples {
.create();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -669,9 +669,10 @@ public final class BigDataPoolsUpdateSamples {
.getWithResponse(
"ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("key", "value")).apply();
resource.update().withTags(mapOf("key", "fakeTokenPlaceholder")).apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -1818,6 +1819,7 @@ public final class IpFirewallRulesReplaceAllSamples {
com.azure.core.util.Context.NONE);
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -3503,10 +3505,11 @@ public final class PrivateLinkHubsCreateOrUpdateSamples {
.define("privateLinkHub1")
.withRegion("East US")
.withExistingResourceGroup("resourceGroup1")
.withTags(mapOf("key", "value"))
.withTags(mapOf("key", "fakeTokenPlaceholder"))
.create();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -3621,9 +3624,10 @@ public final class PrivateLinkHubsUpdateSamples {
.privateLinkHubs()
.getByResourceGroupWithResponse("resourceGroup1", "privateLinkHub1", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("key", "value")).apply();
resource.update().withTags(mapOf("key", "fakeTokenPlaceholder")).apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -5630,6 +5634,7 @@ public final class SqlPoolsCreateSamples {
.create();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -5737,36 +5742,6 @@ public final class SqlPoolsPauseSamples {
}
```

### SqlPools_Rename

```java
import com.azure.resourcemanager.synapse.models.ResourceMoveDefinition;

/** Samples for SqlPools Rename. */
public final class SqlPoolsRenameSamples {
/*
* x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RenameSqlPool.json
*/
/**
* Sample code: Rename a SQL Analytics pool.
*
* @param manager Entry point to SynapseManager.
*/
public static void renameASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) {
manager
.sqlPools()
.renameWithResponse(
"Default-SQL-SouthEastAsia",
"testsvr",
"testdb",
new ResourceMoveDefinition()
.withId(
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Synapse/workspaces/testsvr/sqlPools/newtestdb"),
com.azure.core.util.Context.NONE);
}
}
```

### SqlPools_Resume

```java
Expand Down Expand Up @@ -5816,6 +5791,7 @@ public final class SqlPoolsUpdateSamples {
resource.update().withTags(mapOf()).withSku(new Sku().withTier("").withName("")).withMaxSizeBytes(0L).apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -6557,7 +6533,7 @@ public final class WorkspaceManagedSqlServerUsagesListSamples {

```java
import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName;
import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated;
import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties;
import java.util.Arrays;

/** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments CreateOrUpdate. */
Expand Down Expand Up @@ -6622,7 +6598,7 @@ public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpda
.withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
.withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
.withRecurringScans(
new VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated()
new VulnerabilityAssessmentRecurringScansProperties()
.withIsEnabled(true)
.withEmailSubscriptionAdmins(true)
.withEmails(Arrays.asList("email1@mail.com", "email2@mail.com")))
Expand Down Expand Up @@ -6811,7 +6787,7 @@ public final class WorkspacesCreateOrUpdateSamples {
.define("workspace1")
.withRegion("East US")
.withExistingResourceGroup("resourceGroup1")
.withTags(mapOf("key", "value"))
.withTags(mapOf("key", "fakeTokenPlaceholder"))
.withIdentity(
new ManagedIdentity()
.withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
Expand Down Expand Up @@ -6863,6 +6839,7 @@ public final class WorkspacesCreateOrUpdateSamples {
.create();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down Expand Up @@ -6989,7 +6966,7 @@ public final class WorkspacesUpdateSamples {
.getValue();
resource
.update()
.withTags(mapOf("key", "value"))
.withTags(mapOf("key", "fakeTokenPlaceholder"))
.withIdentity(new ManagedIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
.withSqlAdministratorLoginPassword("password")
.withManagedVirtualNetworkSettings(
Expand Down Expand Up @@ -7020,6 +6997,7 @@ public final class WorkspacesUpdateSamples {
.apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down
9 changes: 8 additions & 1 deletion sdk/synapse/azure-resourcemanager-synapse/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest Code Generator.
-->
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
Expand Down Expand Up @@ -38,7 +43,9 @@
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.skip>true</jacoco.skip>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public SynapseManager authenticate(TokenCredential credential, AzureProfile prof
.append("-")
.append("com.azure.resourcemanager.synapse")
.append("/")
.append("1.0.0-beta.7");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -1535,8 +1535,10 @@ public KustoPoolPrivateLinkResourcesOperations kustoPoolPrivateLinkResourcesOper
}

/**
* @return Wrapped service client SynapseManagementClient providing direct access to the underlying auto-generated
* API implementation, based on Azure REST API.
* Gets wrapped service client SynapseManagementClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
*
* @return Wrapped service client SynapseManagementClient.
*/
public SynapseManagementClient serviceClient() {
return this.clientObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public interface SqlPoolMetadataSyncConfigsClient {
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the metadata sync configuration for a SQL pool along with {@link Response}.
*/
Expand All @@ -40,6 +42,8 @@ Response<MetadataSyncConfigInner> getWithResponse(
* @param sqlPoolName SQL pool name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the metadata sync configuration for a SQL pool.
*/
Expand All @@ -58,6 +62,8 @@ Response<MetadataSyncConfigInner> getWithResponse(
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return metadata sync configuration along with {@link Response}.
*/
Expand All @@ -80,6 +86,8 @@ Response<MetadataSyncConfigInner> createWithResponse(
* @param metadataSyncConfiguration Metadata sync configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return metadata sync configuration.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.synapse.fluent.models.SqlPoolInner;
import com.azure.resourcemanager.synapse.models.ResourceMoveDefinition;
import com.azure.resourcemanager.synapse.models.SqlPoolPatchInfo;

/** An instance of this class provides access to all the operations defined in SqlPoolsClient. */
Expand Down Expand Up @@ -144,6 +143,8 @@ SqlPoolInner update(
* @param sqlPoolInfo The SQL pool to create.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of sQL pool.
*/
Expand All @@ -163,6 +164,8 @@ SyncPoller<PollResult<SqlPoolInner>, SqlPoolInner> beginCreate(
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of sQL pool.
*/
Expand All @@ -181,6 +184,8 @@ SyncPoller<PollResult<SqlPoolInner>, SqlPoolInner> beginCreate(
* @param sqlPoolInfo The SQL pool to create.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return sQL pool.
*/
Expand All @@ -199,6 +204,8 @@ SyncPoller<PollResult<SqlPoolInner>, SqlPoolInner> beginCreate(
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return sQL pool.
*/
Expand Down Expand Up @@ -440,43 +447,4 @@ SyncPoller<PollResult<SqlPoolInner>, SqlPoolInner> beginResume(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SqlPoolInner resume(String resourceGroupName, String workspaceName, String sqlPoolName, Context context);

/**
* Rename a SQL pool
*
* <p>Rename a SQL pool.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param sqlPoolName SQL pool name.
* @param parameters The resource move definition for renaming this Sql pool.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> renameWithResponse(
String resourceGroupName,
String workspaceName,
String sqlPoolName,
ResourceMoveDefinition parameters,
Context context);

/**
* Rename a SQL pool
*
* <p>Rename a SQL pool.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param sqlPoolName SQL pool name.
* @param parameters The resource move definition for renaming this Sql pool.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void rename(String resourceGroupName, String workspaceName, String sqlPoolName, ResourceMoveDefinition parameters);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated;
import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** A server vulnerability assessment. */
Expand Down Expand Up @@ -113,7 +113,7 @@ public ServerVulnerabilityAssessmentInner withStorageAccountAccessKey(String sto
*
* @return the recurringScans value.
*/
public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans() {
public VulnerabilityAssessmentRecurringScansProperties recurringScans() {
return this.innerProperties() == null ? null : this.innerProperties().recurringScans();
}

Expand All @@ -124,7 +124,7 @@ public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringSca
* @return the ServerVulnerabilityAssessmentInner object itself.
*/
public ServerVulnerabilityAssessmentInner withRecurringScans(
VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans) {
VulnerabilityAssessmentRecurringScansProperties recurringScans) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerVulnerabilityAssessmentProperties();
}
Expand Down
Loading