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-appcontainers] [s360 fix] add default value to $.properties.template.scale.maxReplicas #2510

Closed
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,6 +1,8 @@
# Release History

## 1.0.0-beta.5 (Unreleased)
## 1.0.0-beta.1 (2022-10-25)

- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2022-06. 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
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-appcontainers</artifactId>
<version>1.0.0-beta.4</version>
<version>1.0.0-beta.5</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
216 changes: 104 additions & 112 deletions sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro
.append("-")
.append("com.azure.resourcemanager.appcontainers")
.append("/")
.append("1.0.0-beta.4");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ ContainerAppInner createOrUpdate(
* @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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.
* @return the {@link SyncPoller} for polling of container App.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginUpdate(
SyncPoller<PollResult<ContainerAppInner>, ContainerAppInner> beginUpdate(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope);

/**
Expand All @@ -250,10 +250,10 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(
* @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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.
* @return the {@link SyncPoller} for polling of container App.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginUpdate(
SyncPoller<PollResult<ContainerAppInner>, ContainerAppInner> beginUpdate(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context);

/**
Expand All @@ -268,9 +268,10 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(
* @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request
* is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return container App.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope);
ContainerAppInner update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope);

/**
* Update properties of a Container App
Expand All @@ -285,9 +286,10 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(
* @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request
* is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return container App.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void update(
ContainerAppInner update(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ ManagedEnvironmentInner createOrUpdate(
* @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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.
* @return the {@link SyncPoller} for polling of an environment for hosting container apps.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginUpdate(
SyncPoller<PollResult<ManagedEnvironmentInner>, ManagedEnvironmentInner> beginUpdate(
String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope);

/**
Expand All @@ -279,10 +279,10 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(
* @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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.
* @return the {@link SyncPoller} for polling of an environment for hosting container apps.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginUpdate(
SyncPoller<PollResult<ManagedEnvironmentInner>, ManagedEnvironmentInner> beginUpdate(
String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context);

/**
Expand All @@ -297,9 +297,11 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(
* @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request
* is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return an environment for hosting container apps.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope);
ManagedEnvironmentInner update(
String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope);

/**
* Update Managed Environment's properties.
Expand All @@ -314,9 +316,10 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(
* @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request
* is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return an environment for hosting container apps.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void update(
ManagedEnvironmentInner update(
String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public ContainerApp apply() {
serviceManager
.serviceClient()
.getContainerApps()
.createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), Context.NONE);
.update(resourceGroupName, containerAppName, this.innerModel(), Context.NONE);
return this;
}

Expand All @@ -184,7 +184,7 @@ public ContainerApp apply(Context context) {
serviceManager
.serviceClient()
.getContainerApps()
.createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), context);
.update(resourceGroupName, containerAppName, this.innerModel(), context);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Mono<Response<Flux<ByteBuffer>>> delete(
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps"
+ "/{containerAppName}")
@ExpectedResponses({202})
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
Mono<Response<Flux<ByteBuffer>>> update(
@HostParam("$host") String endpoint,
Expand Down Expand Up @@ -1189,7 +1189,7 @@ public void delete(String resourceGroupName, String containerAppName, Context co
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException 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} on successful completion of {@link Mono}.
* @return container App along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(
Expand Down Expand Up @@ -1249,7 +1249,7 @@ private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException 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} on successful completion of {@link Mono}.
* @return container App along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(
Expand Down Expand Up @@ -1305,17 +1305,21 @@ private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation.
* @return the {@link PollerFlux} for polling of container App.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux<PollResult<Void>, Void> beginUpdateAsync(
private PollerFlux<PollResult<ContainerAppInner>, ContainerAppInner> beginUpdateAsync(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) {
Mono<Response<Flux<ByteBuffer>>> mono =
updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope);
return this
.client
.<Void, Void>getLroResult(
mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
.<ContainerAppInner, ContainerAppInner>getLroResult(
mono,
this.client.getHttpPipeline(),
ContainerAppInner.class,
ContainerAppInner.class,
this.client.getContext());
}

/**
Expand All @@ -1330,17 +1334,18 @@ private PollerFlux<PollResult<Void>, Void> beginUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException 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 PollerFlux} for polling of long-running operation.
* @return the {@link PollerFlux} for polling of container App.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux<PollResult<Void>, Void> beginUpdateAsync(
private PollerFlux<PollResult<ContainerAppInner>, ContainerAppInner> beginUpdateAsync(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) {
context = this.client.mergeContext(context);
Mono<Response<Flux<ByteBuffer>>> mono =
updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope, context);
return this
.client
.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
.<ContainerAppInner, ContainerAppInner>getLroResult(
mono, this.client.getHttpPipeline(), ContainerAppInner.class, ContainerAppInner.class, context);
}

/**
Expand All @@ -1354,10 +1359,10 @@ private PollerFlux<PollResult<Void>, Void> beginUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException 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.
* @return the {@link SyncPoller} for polling of container App.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginUpdate(
public SyncPoller<PollResult<ContainerAppInner>, ContainerAppInner> beginUpdate(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) {
return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller();
}
Expand All @@ -1374,10 +1379,10 @@ public SyncPoller<PollResult<Void>, Void> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException 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.
* @return the {@link SyncPoller} for polling of container App.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginUpdate(
public SyncPoller<PollResult<ContainerAppInner>, ContainerAppInner> beginUpdate(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) {
return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).getSyncPoller();
}
Expand All @@ -1393,10 +1398,10 @@ public SyncPoller<PollResult<Void>, Void> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return A {@link Mono} that completes when a successful response is received.
* @return container App on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> updateAsync(
private Mono<ContainerAppInner> updateAsync(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) {
return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope)
.last()
Expand All @@ -1415,10 +1420,10 @@ private Mono<Void> updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return A {@link Mono} that completes when a successful response is received.
* @return container App on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> updateAsync(
private Mono<ContainerAppInner> updateAsync(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) {
return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context)
.last()
Expand All @@ -1436,10 +1441,12 @@ private Mono<Void> updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return container App.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) {
updateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block();
public ContainerAppInner update(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) {
return updateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block();
}

/**
Expand All @@ -1454,11 +1461,12 @@ public void update(String resourceGroupName, String containerAppName, ContainerA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return container App.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void update(
public ContainerAppInner update(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) {
updateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block();
return updateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,6 @@ public void delete(String resourceGroupName, String containerAppName, Context co
this.serviceClient().delete(resourceGroupName, containerAppName, context);
}

public void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) {
this.serviceClient().update(resourceGroupName, containerAppName, containerAppEnvelope);
}

public void update(
String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) {
this.serviceClient().update(resourceGroupName, containerAppName, containerAppEnvelope, context);
}

public Response<CustomHostnameAnalysisResult> listCustomHostnameAnalysisWithResponse(
String resourceGroupName, String containerAppName, String customHostname, Context context) {
Response<CustomHostnameAnalysisResultInner> inner =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public ManagedEnvironment apply() {
serviceManager
.serviceClient()
.getManagedEnvironments()
.createOrUpdate(resourceGroupName, environmentName, this.innerModel(), Context.NONE);
.update(resourceGroupName, environmentName, this.innerModel(), Context.NONE);
return this;
}

Expand All @@ -185,7 +185,7 @@ public ManagedEnvironment apply(Context context) {
serviceManager
.serviceClient()
.getManagedEnvironments()
.createOrUpdate(resourceGroupName, environmentName, this.innerModel(), context);
.update(resourceGroupName, environmentName, this.innerModel(), context);
return this;
}

Expand Down
Loading