Skip to content
Open
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
  •  
  •  
  •  
8 changes: 3 additions & 5 deletions sdk/webpubsub/azure-resourcemanager-webpubsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager WebPubSub client library for Java.

This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package tag package-2024-03-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package api-version 2025-12-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

Expand Down Expand Up @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
WebPubSubManager manager = WebPubSubManager
.authenticate(credential, profile);
```

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

See [Authentication][authenticate] for more options.

Expand Down Expand Up @@ -108,5 +108,3 @@ 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/


274 changes: 167 additions & 107 deletions sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest Code Generator.
~ Code generated by Microsoft (R) TypeSpec 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">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.azure</groupId>
Expand All @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for WebPubSub Management</name>
<description>This package contains Microsoft Azure SDK for WebPubSub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure WebPubSub Service. Package tag package-2024-03-01.</description>
<description>This package contains Microsoft Azure SDK for WebPubSub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure WebPubSub Service. Package api-version 2025-12-01-preview.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -45,13 +45,9 @@
<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>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.5.1</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
Expand All @@ -74,6 +70,11 @@
<version>1.18.4</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.5.1</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-resources</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.webpubsub;

Expand All @@ -11,17 +11,18 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.webpubsub.fluent.WebPubSubManagementClient;
import com.azure.resourcemanager.webpubsub.implementation.OperationsImpl;
Expand All @@ -30,6 +31,7 @@
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubCustomDomainsImpl;
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubHubsImpl;
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubManagementClientBuilder;
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPersistentStoragesImpl;
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateEndpointConnectionsImpl;
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateLinkResourcesImpl;
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubReplicaSharedPrivateLinkResourcesImpl;
Expand All @@ -41,16 +43,18 @@
import com.azure.resourcemanager.webpubsub.models.WebPubSubCustomCertificates;
import com.azure.resourcemanager.webpubsub.models.WebPubSubCustomDomains;
import com.azure.resourcemanager.webpubsub.models.WebPubSubHubs;
import com.azure.resourcemanager.webpubsub.models.WebPubSubPersistentStorages;
import com.azure.resourcemanager.webpubsub.models.WebPubSubPrivateEndpointConnections;
import com.azure.resourcemanager.webpubsub.models.WebPubSubPrivateLinkResources;
import com.azure.resourcemanager.webpubsub.models.WebPubSubReplicas;
import com.azure.resourcemanager.webpubsub.models.WebPubSubReplicaSharedPrivateLinkResources;
import com.azure.resourcemanager.webpubsub.models.WebPubSubs;
import com.azure.resourcemanager.webpubsub.models.WebPubSubReplicas;
import com.azure.resourcemanager.webpubsub.models.WebPubSubSharedPrivateLinkResources;
import com.azure.resourcemanager.webpubsub.models.WebPubSubs;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;

Expand All @@ -61,25 +65,27 @@
public final class WebPubSubManager {
private Operations operations;

private WebPubSubHubs webPubSubHubs;

private WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources;

private WebPubSubs webPubSubs;

private Usages usages;
private WebPubSubPrivateLinkResources webPubSubPrivateLinkResources;

private WebPubSubCustomCertificates webPubSubCustomCertificates;

private WebPubSubCustomDomains webPubSubCustomDomains;

private WebPubSubHubs webPubSubHubs;

private WebPubSubPrivateEndpointConnections webPubSubPrivateEndpointConnections;

private WebPubSubPrivateLinkResources webPubSubPrivateLinkResources;

private WebPubSubReplicas webPubSubReplicas;

private WebPubSubReplicaSharedPrivateLinkResources webPubSubReplicaSharedPrivateLinkResources;

private WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources;
private WebPubSubPersistentStorages webPubSubPersistentStorages;

private Usages usages;

private final WebPubSubManagementClient clientObject;

Expand Down Expand Up @@ -133,6 +139,9 @@ public static Configurable configure() {
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private static final String SDK_VERSION = "version";
private static final Map<String, String> PROPERTIES
= CoreUtils.getProperties("azure-resourcemanager-webpubsub.properties");

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -240,12 +249,14 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");

String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.webpubsub")
.append("/")
.append("1.1.0");
.append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down Expand Up @@ -278,7 +289,7 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
Expand All @@ -303,6 +314,31 @@ public Operations operations() {
return operations;
}

/**
* Gets the resource collection API of WebPubSubHubs. It manages WebPubSubHub.
*
* @return Resource collection API of WebPubSubHubs.
*/
public WebPubSubHubs webPubSubHubs() {
if (this.webPubSubHubs == null) {
this.webPubSubHubs = new WebPubSubHubsImpl(clientObject.getWebPubSubHubs(), this);
}
return webPubSubHubs;
}

/**
* Gets the resource collection API of WebPubSubSharedPrivateLinkResources. It manages SharedPrivateLinkResource.
*
* @return Resource collection API of WebPubSubSharedPrivateLinkResources.
*/
public WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources() {
if (this.webPubSubSharedPrivateLinkResources == null) {
this.webPubSubSharedPrivateLinkResources = new WebPubSubSharedPrivateLinkResourcesImpl(
clientObject.getWebPubSubSharedPrivateLinkResources(), this);
}
return webPubSubSharedPrivateLinkResources;
}

/**
* Gets the resource collection API of WebPubSubs. It manages WebPubSubResource.
*
Expand All @@ -316,15 +352,16 @@ public WebPubSubs webPubSubs() {
}

/**
* Gets the resource collection API of Usages.
* Gets the resource collection API of WebPubSubPrivateLinkResources.
*
* @return Resource collection API of Usages.
* @return Resource collection API of WebPubSubPrivateLinkResources.
*/
public Usages usages() {
if (this.usages == null) {
this.usages = new UsagesImpl(clientObject.getUsages(), this);
public WebPubSubPrivateLinkResources webPubSubPrivateLinkResources() {
if (this.webPubSubPrivateLinkResources == null) {
this.webPubSubPrivateLinkResources
= new WebPubSubPrivateLinkResourcesImpl(clientObject.getWebPubSubPrivateLinkResources(), this);
}
return usages;
return webPubSubPrivateLinkResources;
}

/**
Expand Down Expand Up @@ -353,18 +390,6 @@ public WebPubSubCustomDomains webPubSubCustomDomains() {
return webPubSubCustomDomains;
}

/**
* Gets the resource collection API of WebPubSubHubs. It manages WebPubSubHub.
*
* @return Resource collection API of WebPubSubHubs.
*/
public WebPubSubHubs webPubSubHubs() {
if (this.webPubSubHubs == null) {
this.webPubSubHubs = new WebPubSubHubsImpl(clientObject.getWebPubSubHubs(), this);
}
return webPubSubHubs;
}

/**
* Gets the resource collection API of WebPubSubPrivateEndpointConnections.
*
Expand All @@ -378,19 +403,6 @@ public WebPubSubPrivateEndpointConnections webPubSubPrivateEndpointConnections()
return webPubSubPrivateEndpointConnections;
}

/**
* Gets the resource collection API of WebPubSubPrivateLinkResources.
*
* @return Resource collection API of WebPubSubPrivateLinkResources.
*/
public WebPubSubPrivateLinkResources webPubSubPrivateLinkResources() {
if (this.webPubSubPrivateLinkResources == null) {
this.webPubSubPrivateLinkResources
= new WebPubSubPrivateLinkResourcesImpl(clientObject.getWebPubSubPrivateLinkResources(), this);
}
return webPubSubPrivateLinkResources;
}

/**
* Gets the resource collection API of WebPubSubReplicas. It manages Replica.
*
Expand All @@ -417,16 +429,28 @@ public WebPubSubReplicaSharedPrivateLinkResources webPubSubReplicaSharedPrivateL
}

/**
* Gets the resource collection API of WebPubSubSharedPrivateLinkResources. It manages SharedPrivateLinkResource.
* Gets the resource collection API of WebPubSubPersistentStorages. It manages PersistentStorage.
*
* @return Resource collection API of WebPubSubSharedPrivateLinkResources.
* @return Resource collection API of WebPubSubPersistentStorages.
*/
public WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources() {
if (this.webPubSubSharedPrivateLinkResources == null) {
this.webPubSubSharedPrivateLinkResources = new WebPubSubSharedPrivateLinkResourcesImpl(
clientObject.getWebPubSubSharedPrivateLinkResources(), this);
public WebPubSubPersistentStorages webPubSubPersistentStorages() {
if (this.webPubSubPersistentStorages == null) {
this.webPubSubPersistentStorages
= new WebPubSubPersistentStoragesImpl(clientObject.getWebPubSubPersistentStorages(), this);
}
return webPubSubSharedPrivateLinkResources;
return webPubSubPersistentStorages;
}

/**
* Gets the resource collection API of Usages.
*
* @return Resource collection API of Usages.
*/
public Usages usages() {
if (this.usages == null) {
this.usages = new UsagesImpl(clientObject.getUsages(), this);
}
return usages;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.webpubsub.fluent;

Expand All @@ -15,23 +15,23 @@
*/
public interface OperationsClient {
/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
* List the operations for the provider.
*
* @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 result of the request to list REST API operations as paginated response with {@link PagedIterable}.
* @return paged collection of Operation items as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationInner> list();

/**
* Lists all of the available REST API operations of the Microsoft.SignalRService provider.
* List the operations for the provider.
*
* @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 result of the request to list REST API operations as paginated response with {@link PagedIterable}.
* @return paged collection of Operation items as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationInner> list(Context context);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.webpubsub.fluent;

Expand All @@ -17,7 +17,7 @@ public interface UsagesClient {
/**
* List resource usage quotas by location.
*
* @param location the location like "eastus".
* @param location The location 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 RuntimeException all other wrapped checked exceptions if the request fails to be sent.
Expand All @@ -30,7 +30,7 @@ public interface UsagesClient {
/**
* List resource usage quotas by location.
*
* @param location the location like "eastus".
* @param location The location name.
* @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.
Expand Down
Loading
Loading