Skip to content

Commit dac21f3

Browse files
author
SDKAuto
committed
CodeGen from PR 32644 in Azure/azure-rest-api-specs
Merge 24dc94b08ca89b880f1056265583a0ad5de8f52b into 659cff5aeaa6fa871bab67f648dd15cea067e4c3
1 parent 43c2834 commit dac21f3

File tree

535 files changed

+13097
-11273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

535 files changed

+13097
-11273
lines changed

sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md

Lines changed: 796 additions & 4 deletions
Large diffs are not rendered by default.

sdk/appcontainers/azure-resourcemanager-appcontainers/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager ContainerAppsApi client library for Java.
44

5-
This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-08. 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 ContainerAppsApi Management SDK. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2025-02-02-preview. 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-appcontainers</artifactId>
35-
<version>1.1.0-beta.1</version>
35+
<version>1.1.0-beta.2</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
ContainerAppsApiManager manager = ContainerAppsApiManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
100100
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
101101
[coc]: https://opensource.microsoft.com/codeofconduct/
102102
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
103-
104-

sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md

Lines changed: 711 additions & 240 deletions
Large diffs are not rendered by default.

sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for ContainerAppsApi Management</name>
21-
<description>This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-08.</description>
21+
<description>This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2025-02-02-preview.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>
@@ -46,6 +46,7 @@
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
4848
<revapi.skip>true</revapi.skip>
49+
<spotless.skip>false</spotless.skip>
4950
</properties>
5051
<dependencies>
5152
<dependency>

sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.azure.core.http.HttpPipelinePosition;
1212
import com.azure.core.http.policy.AddDatePolicy;
1313
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
14+
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
1415
import com.azure.core.http.policy.HttpLogOptions;
1516
import com.azure.core.http.policy.HttpLoggingPolicy;
1617
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -19,9 +20,9 @@
1920
import com.azure.core.http.policy.RetryOptions;
2021
import com.azure.core.http.policy.RetryPolicy;
2122
import com.azure.core.http.policy.UserAgentPolicy;
22-
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient;
2728
import com.azure.resourcemanager.appcontainers.implementation.AppResilienciesImpl;
@@ -42,6 +43,7 @@
4243
import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsImpl;
4344
import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsImpl;
4445
import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsImpl;
46+
import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsLabelHistoriesImpl;
4547
import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsPatchesImpl;
4648
import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasImpl;
4749
import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsImpl;
@@ -52,10 +54,12 @@
5254
import com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsImpl;
5355
import com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsImpl;
5456
import com.azure.resourcemanager.appcontainers.implementation.FunctionsExtensionsImpl;
57+
import com.azure.resourcemanager.appcontainers.implementation.HttpRouteConfigsImpl;
5558
import com.azure.resourcemanager.appcontainers.implementation.JavaComponentsImpl;
5659
import com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsImpl;
5760
import com.azure.resourcemanager.appcontainers.implementation.JobsImpl;
5861
import com.azure.resourcemanager.appcontainers.implementation.LogicAppsImpl;
62+
import com.azure.resourcemanager.appcontainers.implementation.MaintenanceConfigurationsImpl;
5963
import com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesImpl;
6064
import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsImpl;
6165
import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateEndpointConnectionsImpl;
@@ -85,6 +89,7 @@
8589
import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuilds;
8690
import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildsByContainerApps;
8791
import com.azure.resourcemanager.appcontainers.models.ContainerAppsDiagnostics;
92+
import com.azure.resourcemanager.appcontainers.models.ContainerAppsLabelHistories;
8893
import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatches;
8994
import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisionReplicas;
9095
import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisions;
@@ -95,10 +100,12 @@
95100
import com.azure.resourcemanager.appcontainers.models.DaprSubscriptions;
96101
import com.azure.resourcemanager.appcontainers.models.DotNetComponents;
97102
import com.azure.resourcemanager.appcontainers.models.FunctionsExtensions;
103+
import com.azure.resourcemanager.appcontainers.models.HttpRouteConfigs;
98104
import com.azure.resourcemanager.appcontainers.models.JavaComponents;
99105
import com.azure.resourcemanager.appcontainers.models.Jobs;
100106
import com.azure.resourcemanager.appcontainers.models.JobsExecutions;
101107
import com.azure.resourcemanager.appcontainers.models.LogicApps;
108+
import com.azure.resourcemanager.appcontainers.models.MaintenanceConfigurations;
102109
import com.azure.resourcemanager.appcontainers.models.ManagedCertificates;
103110
import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics;
104111
import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateEndpointConnections;
@@ -115,6 +122,7 @@
115122
import java.time.temporal.ChronoUnit;
116123
import java.util.ArrayList;
117124
import java.util.List;
125+
import java.util.Map;
118126
import java.util.Objects;
119127
import java.util.stream.Collectors;
120128

@@ -155,6 +163,8 @@ public final class ContainerAppsApiManager {
155163

156164
private ContainerAppsBuilds containerAppsBuilds;
157165

166+
private ContainerAppsLabelHistories containerAppsLabelHistories;
167+
158168
private ContainerAppsPatches containerAppsPatches;
159169

160170
private ContainerAppsRevisions containerAppsRevisions;
@@ -201,6 +211,10 @@ public final class ContainerAppsApiManager {
201211

202212
private DaprSubscriptions daprSubscriptions;
203213

214+
private HttpRouteConfigs httpRouteConfigs;
215+
216+
private MaintenanceConfigurations maintenanceConfigurations;
217+
204218
private ManagedEnvironmentsStorages managedEnvironmentsStorages;
205219

206220
private ContainerAppsSessionPools containerAppsSessionPools;
@@ -263,6 +277,9 @@ public static Configurable configure() {
263277
*/
264278
public static final class Configurable {
265279
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
280+
private static final String SDK_VERSION = "version";
281+
private static final Map<String, String> PROPERTIES
282+
= CoreUtils.getProperties("azure-resourcemanager-appcontainers.properties");
266283

267284
private HttpClient httpClient;
268285
private HttpLogOptions httpLogOptions;
@@ -370,12 +387,14 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro
370387
Objects.requireNonNull(credential, "'credential' cannot be null.");
371388
Objects.requireNonNull(profile, "'profile' cannot be null.");
372389

390+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
391+
373392
StringBuilder userAgentBuilder = new StringBuilder();
374393
userAgentBuilder.append("azsdk-java")
375394
.append("-")
376395
.append("com.azure.resourcemanager.appcontainers")
377396
.append("/")
378-
.append("1.1.0-beta.1");
397+
.append(clientVersion);
379398
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
380399
userAgentBuilder.append(" (")
381400
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -408,7 +427,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro
408427
HttpPolicyProviders.addBeforeRetryPolicies(policies);
409428
policies.add(retryPolicy);
410429
policies.add(new AddDatePolicy());
411-
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
430+
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
412431
policies.addAll(this.policies.stream()
413432
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
414433
.collect(Collectors.toList()));
@@ -546,7 +565,8 @@ public ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates() {
546565
}
547566

548567
/**
549-
* Gets the resource collection API of ConnectedEnvironmentsDaprComponents. It manages DaprComponent.
568+
* Gets the resource collection API of ConnectedEnvironmentsDaprComponents. It manages
569+
* ConnectedEnvironmentDaprComponent.
550570
*
551571
* @return Resource collection API of ConnectedEnvironmentsDaprComponents.
552572
*/
@@ -608,6 +628,19 @@ public ContainerAppsBuilds containerAppsBuilds() {
608628
return containerAppsBuilds;
609629
}
610630

631+
/**
632+
* Gets the resource collection API of ContainerAppsLabelHistories.
633+
*
634+
* @return Resource collection API of ContainerAppsLabelHistories.
635+
*/
636+
public ContainerAppsLabelHistories containerAppsLabelHistories() {
637+
if (this.containerAppsLabelHistories == null) {
638+
this.containerAppsLabelHistories
639+
= new ContainerAppsLabelHistoriesImpl(clientObject.getContainerAppsLabelHistories(), this);
640+
}
641+
return containerAppsLabelHistories;
642+
}
643+
611644
/**
612645
* Gets the resource collection API of ContainerAppsPatches.
613646
*
@@ -870,7 +903,7 @@ public DaprComponentResiliencyPolicies daprComponentResiliencyPolicies() {
870903
}
871904

872905
/**
873-
* Gets the resource collection API of DaprComponents.
906+
* Gets the resource collection API of DaprComponents. It manages DaprComponent.
874907
*
875908
* @return Resource collection API of DaprComponents.
876909
*/
@@ -893,6 +926,31 @@ public DaprSubscriptions daprSubscriptions() {
893926
return daprSubscriptions;
894927
}
895928

929+
/**
930+
* Gets the resource collection API of HttpRouteConfigs. It manages HttpRouteConfig.
931+
*
932+
* @return Resource collection API of HttpRouteConfigs.
933+
*/
934+
public HttpRouteConfigs httpRouteConfigs() {
935+
if (this.httpRouteConfigs == null) {
936+
this.httpRouteConfigs = new HttpRouteConfigsImpl(clientObject.getHttpRouteConfigs(), this);
937+
}
938+
return httpRouteConfigs;
939+
}
940+
941+
/**
942+
* Gets the resource collection API of MaintenanceConfigurations. It manages MaintenanceConfigurationResource.
943+
*
944+
* @return Resource collection API of MaintenanceConfigurations.
945+
*/
946+
public MaintenanceConfigurations maintenanceConfigurations() {
947+
if (this.maintenanceConfigurations == null) {
948+
this.maintenanceConfigurations
949+
= new MaintenanceConfigurationsImpl(clientObject.getMaintenanceConfigurations(), this);
950+
}
951+
return maintenanceConfigurations;
952+
}
953+
896954
/**
897955
* Gets the resource collection API of ManagedEnvironmentsStorages. It manages ManagedEnvironmentStorage.
898956
*

0 commit comments

Comments
 (0)