Skip to content

[AutoPR azure-resourcemanager-nginx] nginx: configurationName can only ever be default (per the API/docs) so hardcoding this value #8656

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

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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sdk/nginx/azure-resourcemanager-nginx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2023-11-29)

- Azure Resource Manager Nginx client library for Java. This package contains Microsoft Azure SDK for Nginx Management SDK. Package tag package-2023-04-01. 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
2 changes: 1 addition & 1 deletion sdk/nginx/azure-resourcemanager-nginx/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-nginx</artifactId>
<version>1.0.0</version>
<version>1.1.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
8 changes: 5 additions & 3 deletions sdk/nginx/azure-resourcemanager-nginx/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ public final class CertificatesListSamples {
### Configurations_CreateOrUpdate

```java
import com.azure.resourcemanager.nginx.fluent.models.NginxConfigurationInner;

/**
* Samples for Configurations CreateOrUpdate.
*/
Expand All @@ -127,7 +129,7 @@ public final class ConfigurationsCreateOrUpdateSamples {
* @param manager Entry point to NginxManager.
*/
public static void configurationsCreateOrUpdate(com.azure.resourcemanager.nginx.NginxManager manager) {
manager.configurations().define("default").withExistingNginxDeployment("myResourceGroup", "myDeployment").create();
manager.configurations().createOrUpdate("myResourceGroup", "myDeployment", null, com.azure.core.util.Context.NONE);
}
}
```
Expand All @@ -148,7 +150,7 @@ public final class ConfigurationsDeleteSamples {
* @param manager Entry point to NginxManager.
*/
public static void configurationsDelete(com.azure.resourcemanager.nginx.NginxManager manager) {
manager.configurations().delete("myResourceGroup", "myDeployment", "default", com.azure.core.util.Context.NONE);
manager.configurations().delete("myResourceGroup", "myDeployment", com.azure.core.util.Context.NONE);
}
}
```
Expand All @@ -169,7 +171,7 @@ public final class ConfigurationsGetSamples {
* @param manager Entry point to NginxManager.
*/
public static void configurationsGet(com.azure.resourcemanager.nginx.NginxManager manager) {
manager.configurations().getWithResponse("myResourceGroup", "myDeployment", "default", com.azure.core.util.Context.NONE);
manager.configurations().getWithResponse("myResourceGroup", "myDeployment", com.azure.core.util.Context.NONE);
}
}
```
Expand Down
1 change: 1 addition & 0 deletions sdk/nginx/azure-resourcemanager-nginx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<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 @@ -211,7 +211,7 @@ public NginxManager authenticate(TokenCredential credential, AzureProfile profil

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.nginx").append("/")
.append("1.0.0");
.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("; ")
Expand Down Expand Up @@ -263,7 +263,7 @@ public Certificates certificates() {
}

/**
* Gets the resource collection API of Configurations. It manages NginxConfiguration.
* Gets the resource collection API of Configurations.
*
* @return Resource collection API of Configurations.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,56 +49,47 @@ public interface ConfigurationsClient {
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @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 NGINX configuration of given NGINX deployment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<NginxConfigurationInner> getWithResponse(String resourceGroupName, String deploymentName,
String configurationName, Context context);
Response<NginxConfigurationInner> getWithResponse(String resourceGroupName, String deploymentName, Context context);

/**
* Get the NGINX configuration of given NGINX deployment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @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 NGINX configuration of given NGINX deployment.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
NginxConfigurationInner get(String resourceGroupName, String deploymentName, String configurationName);
NginxConfigurationInner get(String resourceGroupName, String deploymentName);

/**
* Create or update the NGINX configuration for given NGINX deployment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @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 SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<NginxConfigurationInner>, NginxConfigurationInner>
beginCreateOrUpdate(String resourceGroupName, String deploymentName, String configurationName);
beginCreateOrUpdate(String resourceGroupName, String deploymentName);

/**
* Create or update the NGINX configuration for given NGINX deployment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @param body The NGINX configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -108,31 +99,26 @@ Response<NginxConfigurationInner> getWithResponse(String resourceGroupName, Stri
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<NginxConfigurationInner>, NginxConfigurationInner> beginCreateOrUpdate(
String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationInner body,
Context context);
String resourceGroupName, String deploymentName, NginxConfigurationInner body, Context context);

/**
* Create or update the NGINX configuration for given NGINX deployment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @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 response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
NginxConfigurationInner createOrUpdate(String resourceGroupName, String deploymentName, String configurationName);
NginxConfigurationInner createOrUpdate(String resourceGroupName, String deploymentName);

/**
* Create or update the NGINX configuration for given NGINX deployment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @param body The NGINX configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -141,68 +127,58 @@ SyncPoller<PollResult<NginxConfigurationInner>, NginxConfigurationInner> beginCr
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
NginxConfigurationInner createOrUpdate(String resourceGroupName, String deploymentName, String configurationName,
NginxConfigurationInner createOrUpdate(String resourceGroupName, String deploymentName,
NginxConfigurationInner body, Context context);

/**
* Reset the NGINX configuration of given NGINX deployment to default.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @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 SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String deploymentName,
String configurationName);
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String deploymentName);

/**
* Reset the NGINX configuration of given NGINX deployment to default.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @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 SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String deploymentName,
String configurationName, Context context);
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String deploymentName, Context context);

/**
* Reset the NGINX configuration of given NGINX deployment to default.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @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 delete(String resourceGroupName, String deploymentName, String configurationName);
void delete(String resourceGroupName, String deploymentName);

/**
* Reset the NGINX configuration of given NGINX deployment to default.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of targeted NGINX deployment.
* @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
* NGINX conf.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String deploymentName, String configurationName, Context context);
void delete(String resourceGroupName, String deploymentName, Context context);
}
Loading