Skip to content
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: 4 additions & 0 deletions sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 1.0.0-beta.1 (2022-01-18)

- Azure Resource Manager IotHub client library for Java. This package contains Microsoft Azure SDK for IotHub Management SDK. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.1.0 (2021-08-30)

- Add support for new service API version 2021-07-01
Expand Down
2 changes: 1 addition & 1 deletion sdk/iothub/azure-resourcemanager-iothub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager IotHub client library for Java.

This package contains Microsoft Azure SDK for IotHub Management SDK. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07. 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 IotHub Management SDK. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07-02. 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
1,172 changes: 1,114 additions & 58 deletions sdk/iothub/azure-resourcemanager-iothub/SAMPLE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/iothub/azure-resourcemanager-iothub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for IotHub Management</name>
<description>This package contains Microsoft Azure SDK for IotHub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07.</description>
<description>This package contains Microsoft Azure SDK for IotHub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07-02.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
Expand Down Expand Up @@ -41,6 +42,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/** Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure subscription. */
public final class IotHubManager {
Expand Down Expand Up @@ -194,7 +196,7 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
.append("-")
.append("com.azure.resourcemanager.iothub")
.append("/")
.append("1.1.0");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -217,11 +219,24 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies);
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface CertificatesClient {
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the JSON-serialized array of Certificate objects.
* @return the JSON-serialized array of Certificate objects along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<CertificateListDescriptionInner> listByIotHubWithResponse(
Expand Down Expand Up @@ -71,7 +71,7 @@ Response<CertificateListDescriptionInner> listByIotHubWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the X509 Certificate.
* @return the X509 Certificate along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<CertificateDescriptionInner> getWithResponse(
Expand Down Expand Up @@ -111,7 +111,7 @@ CertificateDescriptionInner createOrUpdate(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the X509 Certificate.
* @return the X509 Certificate along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<CertificateDescriptionInner> createOrUpdateWithResponse(
Expand Down Expand Up @@ -149,7 +149,7 @@ Response<CertificateDescriptionInner> createOrUpdateWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException 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.
* @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteWithResponse(
Expand Down Expand Up @@ -186,7 +186,7 @@ CertificateWithNonceDescriptionInner generateVerificationCode(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the X509 Certificate.
* @return the X509 Certificate along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<CertificateWithNonceDescriptionInner> generateVerificationCodeWithResponse(
Expand Down Expand Up @@ -229,7 +229,7 @@ CertificateDescriptionInner verify(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the X509 Certificate.
* @return the X509 Certificate along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<CertificateDescriptionInner> verifyWithResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.azure.resourcemanager.iothub.models.TagsResource;
import com.azure.resourcemanager.iothub.models.TestAllRoutesInput;
import com.azure.resourcemanager.iothub.models.TestRouteInput;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in IotHubResourcesClient. */
public interface IotHubResourcesClient {
Expand Down Expand Up @@ -56,7 +57,7 @@ public interface IotHubResourcesClient {
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the non-security related metadata of an IoT hub.
* @return the non-security related metadata of an IoT hub along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<IotHubDescriptionInner> getByResourceGroupWithResponse(
Expand All @@ -77,9 +78,9 @@ Response<IotHubDescriptionInner> getByResourceGroupWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the IoT hub.
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginCreateOrUpdate(
String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription, String ifMatch);

Expand All @@ -99,9 +100,9 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginCrea
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the IoT hub.
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginCreateOrUpdate(
String resourceGroupName,
String resourceName,
Expand Down Expand Up @@ -184,9 +185,9 @@ IotHubDescriptionInner createOrUpdate(
* @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 description of the IoT hub.
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginUpdate(
String resourceGroupName, String resourceName, TagsResource iotHubTags);

Expand All @@ -200,9 +201,9 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginUpda
* @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 description of the IoT hub.
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginUpdate(
String resourceGroupName, String resourceName, TagsResource iotHubTags, Context context);

Expand Down Expand Up @@ -245,9 +246,9 @@ IotHubDescriptionInner update(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the IoT hub.
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginDelete(
String resourceGroupName, String resourceName);

Expand All @@ -261,9 +262,9 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginDele
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the IoT hub.
* @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginDelete(
String resourceGroupName, String resourceName, Context context);

Expand Down Expand Up @@ -371,7 +372,7 @@ SyncPoller<PollResult<IotHubDescriptionInner>, IotHubDescriptionInner> beginDele
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the statistics from an IoT hub.
* @return the statistics from an IoT hub along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<RegistryStatisticsInner> getStatsWithResponse(
Expand Down Expand Up @@ -469,7 +470,8 @@ EventHubConsumerGroupInfoInner getEventHubConsumerGroup(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
* @return a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub along with {@link
* Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<EventHubConsumerGroupInfoInner> getEventHubConsumerGroupWithResponse(
Expand Down Expand Up @@ -510,7 +512,7 @@ EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the properties of the EventHubConsumerGroupInfo object.
* @return the properties of the EventHubConsumerGroupInfo object along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<EventHubConsumerGroupInfoInner> createEventHubConsumerGroupWithResponse(
Expand Down Expand Up @@ -549,7 +551,7 @@ void deleteEventHubConsumerGroup(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException 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.
* @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteEventHubConsumerGroupWithResponse(
Expand Down Expand Up @@ -614,7 +616,7 @@ Response<Void> deleteEventHubConsumerGroupWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the details of a job from an IoT hub.
* @return the details of a job from an IoT hub along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<JobResponseInner> getJobWithResponse(
Expand Down Expand Up @@ -704,7 +706,7 @@ PagedIterable<EndpointHealthDataInner> getEndpointHealth(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the properties indicating whether a given IoT hub name is available.
* @return the properties indicating whether a given IoT hub name is available along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<IotHubNameAvailabilityInfoInner> checkNameAvailabilityWithResponse(
Expand Down Expand Up @@ -736,7 +738,7 @@ Response<IotHubNameAvailabilityInfoInner> checkNameAvailabilityWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException 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 testing all routes.
* @return result of testing all routes along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<TestAllRoutesResultInner> testAllRoutesWithResponse(
Expand Down Expand Up @@ -768,7 +770,7 @@ Response<TestAllRoutesResultInner> testAllRoutesWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException 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 testing one route.
* @return result of testing one route along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<TestRouteResultInner> testRouteWithResponse(
Expand Down Expand Up @@ -835,7 +837,7 @@ SharedAccessSignatureAuthorizationRuleInner getKeysForKeyName(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a shared access policy by name from an IoT hub.
* @return a shared access policy by name from an IoT hub along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<SharedAccessSignatureAuthorizationRuleInner> getKeysForKeyNameWithResponse(
Expand Down Expand Up @@ -872,7 +874,7 @@ JobResponseInner exportDevices(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the properties of the Job Response object.
* @return the properties of the Job Response object along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<JobResponseInner> exportDevicesWithResponse(
Expand Down Expand Up @@ -909,7 +911,7 @@ JobResponseInner importDevices(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the properties of the Job Response object.
* @return the properties of the Job Response object along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<JobResponseInner> importDevicesWithResponse(
Expand Down
Loading