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-sqlvirtualmachine] Sqlvm t2 config(wave4) #8591

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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2021-05-18)

- Azure Resource Manager SqlVirtualMachine client library for Java. This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-2017-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0-beta.1 (2020-12-18)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ Azure Resource Manager SqlVirtualMachine client library for Java.

This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-2017-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.

If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.

Thank you in advance for your collaboration. We really appreciate your time!

## Documentation

Various documentation is available to help you get started

- [API reference documentation][docs]

## Getting started

### Prerequisites
Expand All @@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK.
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-sqlvirtualmachine</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -75,6 +89,8 @@ For details on contributing to this repository, see the [contributing guide](htt
1. Create new Pull Request

<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for SqlVirtualMachine Management</name>
<description>This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network &amp; Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-2017-03-01-preview. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt</description>
<description>This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network &amp; Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-2017-03-01-preview.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down Expand Up @@ -41,6 +41,11 @@
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.16.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-management</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,31 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder
.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.sqlvirtualmachine")
.append("/")
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.name"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version"))
.append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}

if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies
.add(
new UserAgentPolicy(
null,
"com.azure.resourcemanager.sqlvirtualmachine",
"1.0.0-beta.1",
Configuration.getGlobalConfiguration()));
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
Expand All @@ -188,6 +202,7 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr
.add(
new BearerTokenAuthenticationPolicy(
credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
policies.addAll(this.policies);
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package com.azure.resourcemanager.sqlvirtualmachine.implementation;

import com.azure.core.util.Context;
import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener;
import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
Expand All @@ -16,7 +15,7 @@ public final class AvailabilityGroupListenerImpl
implements AvailabilityGroupListener, AvailabilityGroupListener.Definition, AvailabilityGroupListener.Update {
private AvailabilityGroupListenerInner innerObject;

private final SqlVirtualMachineManager serviceManager;
private final com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager;

public String id() {
return this.innerModel().id();
Expand Down Expand Up @@ -59,7 +58,7 @@ public AvailabilityGroupListenerInner innerModel() {
return this.innerObject;
}

private SqlVirtualMachineManager manager() {
private com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager() {
return this.serviceManager;
}

Expand Down Expand Up @@ -104,7 +103,8 @@ public AvailabilityGroupListener create(Context context) {
return this;
}

AvailabilityGroupListenerImpl(String name, SqlVirtualMachineManager serviceManager) {
AvailabilityGroupListenerImpl(
String name, com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerObject = new AvailabilityGroupListenerInner();
this.serviceManager = serviceManager;
this.availabilityGroupListenerName = name;
Expand Down Expand Up @@ -142,7 +142,9 @@ public AvailabilityGroupListener apply(Context context) {
return this;
}

AvailabilityGroupListenerImpl(AvailabilityGroupListenerInner innerObject, SqlVirtualMachineManager serviceManager) {
AvailabilityGroupListenerImpl(
AvailabilityGroupListenerInner innerObject,
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ private Mono<Response<AvailabilityGroupListenerInner>> getWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down Expand Up @@ -402,7 +402,7 @@ private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(
parameters,
accept,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down Expand Up @@ -750,7 +750,7 @@ private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
this.client.getSubscriptionId(),
this.client.getApiVersion(),
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down Expand Up @@ -1044,7 +1044,7 @@ private Mono<PagedResponse<AvailabilityGroupListenerInner>> listByGroupSinglePag
res.getValue().value(),
res.getValue().nextLink(),
null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down Expand Up @@ -1212,7 +1212,7 @@ private Mono<PagedResponse<AvailabilityGroupListenerInner>> listByGroupNextSingl
res.getValue().value(),
res.getValue().nextLink(),
null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.AvailabilityGroupListenersClient;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener;
Expand All @@ -21,10 +20,11 @@ public final class AvailabilityGroupListenersImpl implements AvailabilityGroupLi

private final AvailabilityGroupListenersClient innerClient;

private final SqlVirtualMachineManager serviceManager;
private final com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager;

public AvailabilityGroupListenersImpl(
AvailabilityGroupListenersClient innerClient, SqlVirtualMachineManager serviceManager) {
AvailabilityGroupListenersClient innerClient,
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
Expand Down Expand Up @@ -79,14 +79,14 @@ public PagedIterable<AvailabilityGroupListener> listByGroup(
String resourceGroupName, String sqlVirtualMachineGroupName) {
PagedIterable<AvailabilityGroupListenerInner> inner =
this.serviceClient().listByGroup(resourceGroupName, sqlVirtualMachineGroupName);
return inner.mapPage(inner1 -> new AvailabilityGroupListenerImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new AvailabilityGroupListenerImpl(inner1, this.manager()));
}

public PagedIterable<AvailabilityGroupListener> listByGroup(
String resourceGroupName, String sqlVirtualMachineGroupName, Context context) {
PagedIterable<AvailabilityGroupListenerInner> inner =
this.serviceClient().listByGroup(resourceGroupName, sqlVirtualMachineGroupName, context);
return inner.mapPage(inner1 -> new AvailabilityGroupListenerImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new AvailabilityGroupListenerImpl(inner1, this.manager()));
}

public AvailabilityGroupListener getById(String id) {
Expand Down Expand Up @@ -224,7 +224,7 @@ private AvailabilityGroupListenersClient serviceClient() {
return this.innerClient;
}

private SqlVirtualMachineManager manager() {
private com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager() {
return this.serviceManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package com.azure.resourcemanager.sqlvirtualmachine.implementation;

import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.OperationInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.Operation;
import com.azure.resourcemanager.sqlvirtualmachine.models.OperationDisplay;
Expand All @@ -15,9 +14,11 @@
public final class OperationImpl implements Operation {
private OperationInner innerObject;

private final SqlVirtualMachineManager serviceManager;
private final com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager;

OperationImpl(OperationInner innerObject, SqlVirtualMachineManager serviceManager) {
OperationImpl(
OperationInner innerObject,
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
Expand Down Expand Up @@ -47,7 +48,7 @@ public OperationInner innerModel() {
return this.innerObject;
}

private SqlVirtualMachineManager manager() {
private com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager() {
return this.serviceManager;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private Mono<PagedResponse<OperationInner>> listSinglePageAsync() {
res.getValue().value(),
res.getValue().nextLink(),
null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down Expand Up @@ -228,7 +228,7 @@ private Mono<PagedResponse<OperationInner>> listNextSinglePageAsync(String nextL
res.getValue().value(),
res.getValue().nextLink(),
null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.OperationsClient;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.OperationInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.Operation;
Expand All @@ -19,28 +18,30 @@ public final class OperationsImpl implements Operations {

private final OperationsClient innerClient;

private final SqlVirtualMachineManager serviceManager;
private final com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager;

public OperationsImpl(OperationsClient innerClient, SqlVirtualMachineManager serviceManager) {
public OperationsImpl(
OperationsClient innerClient,
com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}

public PagedIterable<Operation> list() {
PagedIterable<OperationInner> inner = this.serviceClient().list();
return inner.mapPage(inner1 -> new OperationImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}

public PagedIterable<Operation> list(Context context) {
PagedIterable<OperationInner> inner = this.serviceClient().list(context);
return inner.mapPage(inner1 -> new OperationImpl(inner1, this.manager()));
return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}

private OperationsClient serviceClient() {
return this.innerClient;
}

private SqlVirtualMachineManager manager() {
private com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager() {
return this.serviceManager;
}
}
Loading