diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 9608fb14c453..f7900b75c03f 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -227,7 +227,7 @@ com.azure.resourcemanager:azure-resourcemanager-netapp;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-storagecache;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-redisenterprise;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-hybridkubernetes;1.0.0-beta.1;1.0.0-beta.2
-com.azure.resourcemanager:azure-resourcemanager-iothub;1.0.0-beta.2;1.0.0-beta.3
+com.azure.resourcemanager:azure-resourcemanager-iothub;1.0.0-beta.2;1.0.0
com.azure.resourcemanager:azure-resourcemanager-datadog;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-communication;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-apimanagement;1.0.0-beta.1;1.0.0-beta.2
diff --git a/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md b/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
index 934250a12ed9..c495319642f0 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
+++ b/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
@@ -1,7 +1,135 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0 (2021-05-14)
+- 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-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+### Breaking Change
+
+* `models.CertificateBodyDescription` was removed
+
+#### `models.IotHubResources` was modified
+
+* `createEventHubConsumerGroupWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+* `createEventHubConsumerGroup(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed
+
+#### `models.CertificateDescription$Update` was modified
+
+* `withCertificate(java.lang.String)` was removed
+
+#### `models.CertificateDescription$Definition` was modified
+
+* `withCertificate(java.lang.String)` was removed
+
+### New Feature
+
+* `models.ArmIdentity` was added
+
+* `models.ResourceIdentityType` was added
+
+* `models.EventHubConsumerGroupName` was added
+
+* `models.EventHubConsumerGroupInfo$DefinitionStages` was added
+
+* `models.EventHubConsumerGroupBodyDescription` was added
+
+* `models.EventHubConsumerGroupInfo$Definition` was added
+
+* `models.NetworkRuleIpAction` was added
+
+* `models.NetworkRuleSetProperties` was added
+
+* `models.DefaultAction` was added
+
+* `models.ArmUserIdentity` was added
+
+* `models.ManagedIdentity` was added
+
+* `models.NetworkRuleSetIpRule` was added
+
+#### `models.EventHubConsumerGroupInfo` was modified
+
+* `refresh()` was added
+* `refresh(com.azure.core.util.Context)` was added
+
+#### `models.IotHubResources` was modified
+
+* `defineEventHubConsumerGroup(java.lang.String)` was added
+* `getEventHubConsumerGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added
+* `deleteEventHubConsumerGroupById(java.lang.String)` was added
+* `deleteEventHubConsumerGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added
+* `getEventHubConsumerGroupById(java.lang.String)` was added
+
+#### `models.IotHubProperties` was modified
+
+* `networkRuleSets()` was added
+* `withNetworkRuleSets(models.NetworkRuleSetProperties)` was added
+
+#### `models.RoutingServiceBusQueueEndpointProperties` was modified
+
+* `withIdentity(models.ManagedIdentity)` was added
+* `identity()` was added
+
+#### `models.RoutingStorageContainerProperties` was modified
+
+* `withIdentity(models.ManagedIdentity)` was added
+* `identity()` was added
+
+#### `models.ExportDevicesRequest` was modified
+
+* `configurationsBlobName()` was added
+* `includeConfigurations()` was added
+* `withIncludeConfigurations(java.lang.Boolean)` was added
+* `withIdentity(models.ManagedIdentity)` was added
+* `identity()` was added
+* `withConfigurationsBlobName(java.lang.String)` was added
+
+#### `models.ImportDevicesRequest` was modified
+
+* `includeConfigurations()` was added
+* `withIdentity(models.ManagedIdentity)` was added
+* `withConfigurationsBlobName(java.lang.String)` was added
+* `identity()` was added
+* `withIncludeConfigurations(java.lang.Boolean)` was added
+* `configurationsBlobName()` was added
+
+#### `models.StorageEndpointProperties` was modified
+
+* `identity()` was added
+* `withIdentity(models.ManagedIdentity)` was added
+
+#### `models.EndpointHealthData` was modified
+
+* `lastSuccessfulSendAttemptTime()` was added
+* `lastKnownErrorTime()` was added
+* `lastKnownError()` was added
+* `lastSendAttemptTime()` was added
+
+#### `models.CertificateDescription$Update` was modified
+
+* `withProperties(models.CertificateProperties)` was added
+
+#### `models.CertificateDescription$Definition` was modified
+
+* `withProperties(models.CertificateProperties)` was added
+
+#### `models.RoutingEventHubProperties` was modified
+
+* `withIdentity(models.ManagedIdentity)` was added
+* `identity()` was added
+
+#### `models.RoutingServiceBusTopicEndpointProperties` was modified
+
+* `identity()` was added
+* `withIdentity(models.ManagedIdentity)` was added
+
+#### `models.IotHubDescription` was modified
+
+* `identity()` was added
+
+#### `models.IotHubDescription$Definition` was modified
+
+* `withIdentity(models.ArmIdentity)` was added
## 1.0.0-beta.2 (2021-05-13)
diff --git a/sdk/iothub/azure-resourcemanager-iothub/README.md b/sdk/iothub/azure-resourcemanager-iothub/README.md
index 4def32a71c36..aea81a25c2f2 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/README.md
+++ b/sdk/iothub/azure-resourcemanager-iothub/README.md
@@ -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-2020-03. 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-03. 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
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-iothub
- 1.0.0-beta.2
+ 1.0.0
```
[//]: # ({x-version-update-end})
diff --git a/sdk/iothub/azure-resourcemanager-iothub/pom.xml b/sdk/iothub/azure-resourcemanager-iothub/pom.xml
index 00597becd0c8..5253d55d8f75 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/pom.xml
+++ b/sdk/iothub/azure-resourcemanager-iothub/pom.xml
@@ -9,11 +9,11 @@
com.azure.resourcemanager
azure-resourcemanager-iothub
- 1.0.0-beta.3
+ 1.0.0
jar
Microsoft Azure SDK for IotHub Management
- 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-2020-03.
+ 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-03.
https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java
index 2205321bb28c..2ebe2d85afdc 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java
@@ -182,7 +182,7 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
.append("-")
.append("com.azure.resourcemanager.iothub")
.append("/")
- .append("1.0.0-beta.2");
+ .append("1.0.0");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/CertificatesClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/CertificatesClient.java
index 02569754c6ec..bc2ca2a5e211 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/CertificatesClient.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/CertificatesClient.java
@@ -11,7 +11,6 @@
import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
import com.azure.resourcemanager.iothub.fluent.models.CertificateListDescriptionInner;
import com.azure.resourcemanager.iothub.fluent.models.CertificateWithNonceDescriptionInner;
-import com.azure.resourcemanager.iothub.models.CertificateBodyDescription;
import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription;
/** An instance of this class provides access to all the operations defined in CertificatesClient. */
@@ -96,7 +95,7 @@ CertificateDescriptionInner createOrUpdate(
String resourceGroupName,
String resourceName,
String certificateName,
- CertificateBodyDescription certificateDescription);
+ CertificateDescriptionInner certificateDescription);
/**
* Adds new or replaces existing certificate.
@@ -119,7 +118,7 @@ Response createOrUpdateWithResponse(
String resourceGroupName,
String resourceName,
String certificateName,
- CertificateBodyDescription certificateDescription,
+ CertificateDescriptionInner certificateDescription,
String ifMatch,
Context context);
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java
index 1070f2767a21..611befd840b7 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java
@@ -22,6 +22,7 @@
import com.azure.resourcemanager.iothub.fluent.models.SharedAccessSignatureAuthorizationRuleInner;
import com.azure.resourcemanager.iothub.fluent.models.TestAllRoutesResultInner;
import com.azure.resourcemanager.iothub.fluent.models.TestRouteResultInner;
+import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupBodyDescription;
import com.azure.resourcemanager.iothub.models.ExportDevicesRequest;
import com.azure.resourcemanager.iothub.models.ImportDevicesRequest;
import com.azure.resourcemanager.iothub.models.OperationInputs;
@@ -481,6 +482,7 @@ Response getEventHubConsumerGroupWithResponse(
* @param resourceName The name of the IoT hub.
* @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
* @param name The name of the consumer group to add.
+ * @param consumerGroupBody The consumer group to add.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
@@ -489,7 +491,11 @@ Response getEventHubConsumerGroupWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name);
+ String resourceGroupName,
+ String resourceName,
+ String eventHubEndpointName,
+ String name,
+ EventHubConsumerGroupBodyDescription consumerGroupBody);
/**
* Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.
@@ -498,6 +504,7 @@ EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
* @param resourceName The name of the IoT hub.
* @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
* @param name The name of the consumer group to add.
+ * @param consumerGroupBody The consumer group to add.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
@@ -507,7 +514,12 @@ EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createEventHubConsumerGroupWithResponse(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name, Context context);
+ String resourceGroupName,
+ String resourceName,
+ String eventHubEndpointName,
+ String name,
+ EventHubConsumerGroupBodyDescription consumerGroupBody,
+ Context context);
/**
* Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EndpointHealthDataInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EndpointHealthDataInner.java
index dd0da3aa0fbd..2091a2c740a4 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EndpointHealthDataInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EndpointHealthDataInner.java
@@ -5,10 +5,12 @@
package com.azure.resourcemanager.iothub.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.DateTimeRfc1123;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.EndpointHealthStatus;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
/** The health data for an endpoint. */
@Fluent
@@ -37,6 +39,30 @@ public final class EndpointHealthDataInner {
@JsonProperty(value = "healthStatus")
private EndpointHealthStatus healthStatus;
+ /*
+ * Last error obtained when a message failed to be delivered to iot hub
+ */
+ @JsonProperty(value = "lastKnownError")
+ private String lastKnownError;
+
+ /*
+ * Time at which the last known error occurred
+ */
+ @JsonProperty(value = "lastKnownErrorTime")
+ private DateTimeRfc1123 lastKnownErrorTime;
+
+ /*
+ * Last time iot hub successfully sent a message to the endpoint
+ */
+ @JsonProperty(value = "lastSuccessfulSendAttemptTime")
+ private DateTimeRfc1123 lastSuccessfulSendAttemptTime;
+
+ /*
+ * Last time iot hub tried to send a message to the endpoint
+ */
+ @JsonProperty(value = "lastSendAttemptTime")
+ private DateTimeRfc1123 lastSendAttemptTime;
+
/**
* Get the endpointId property: Id of the endpoint.
*
@@ -91,6 +117,107 @@ public EndpointHealthDataInner withHealthStatus(EndpointHealthStatus healthStatu
return this;
}
+ /**
+ * Get the lastKnownError property: Last error obtained when a message failed to be delivered to iot hub.
+ *
+ * @return the lastKnownError value.
+ */
+ public String lastKnownError() {
+ return this.lastKnownError;
+ }
+
+ /**
+ * Set the lastKnownError property: Last error obtained when a message failed to be delivered to iot hub.
+ *
+ * @param lastKnownError the lastKnownError value to set.
+ * @return the EndpointHealthDataInner object itself.
+ */
+ public EndpointHealthDataInner withLastKnownError(String lastKnownError) {
+ this.lastKnownError = lastKnownError;
+ return this;
+ }
+
+ /**
+ * Get the lastKnownErrorTime property: Time at which the last known error occurred.
+ *
+ * @return the lastKnownErrorTime value.
+ */
+ public OffsetDateTime lastKnownErrorTime() {
+ if (this.lastKnownErrorTime == null) {
+ return null;
+ }
+ return this.lastKnownErrorTime.getDateTime();
+ }
+
+ /**
+ * Set the lastKnownErrorTime property: Time at which the last known error occurred.
+ *
+ * @param lastKnownErrorTime the lastKnownErrorTime value to set.
+ * @return the EndpointHealthDataInner object itself.
+ */
+ public EndpointHealthDataInner withLastKnownErrorTime(OffsetDateTime lastKnownErrorTime) {
+ if (lastKnownErrorTime == null) {
+ this.lastKnownErrorTime = null;
+ } else {
+ this.lastKnownErrorTime = new DateTimeRfc1123(lastKnownErrorTime);
+ }
+ return this;
+ }
+
+ /**
+ * Get the lastSuccessfulSendAttemptTime property: Last time iot hub successfully sent a message to the endpoint.
+ *
+ * @return the lastSuccessfulSendAttemptTime value.
+ */
+ public OffsetDateTime lastSuccessfulSendAttemptTime() {
+ if (this.lastSuccessfulSendAttemptTime == null) {
+ return null;
+ }
+ return this.lastSuccessfulSendAttemptTime.getDateTime();
+ }
+
+ /**
+ * Set the lastSuccessfulSendAttemptTime property: Last time iot hub successfully sent a message to the endpoint.
+ *
+ * @param lastSuccessfulSendAttemptTime the lastSuccessfulSendAttemptTime value to set.
+ * @return the EndpointHealthDataInner object itself.
+ */
+ public EndpointHealthDataInner withLastSuccessfulSendAttemptTime(OffsetDateTime lastSuccessfulSendAttemptTime) {
+ if (lastSuccessfulSendAttemptTime == null) {
+ this.lastSuccessfulSendAttemptTime = null;
+ } else {
+ this.lastSuccessfulSendAttemptTime = new DateTimeRfc1123(lastSuccessfulSendAttemptTime);
+ }
+ return this;
+ }
+
+ /**
+ * Get the lastSendAttemptTime property: Last time iot hub tried to send a message to the endpoint.
+ *
+ * @return the lastSendAttemptTime value.
+ */
+ public OffsetDateTime lastSendAttemptTime() {
+ if (this.lastSendAttemptTime == null) {
+ return null;
+ }
+ return this.lastSendAttemptTime.getDateTime();
+ }
+
+ /**
+ * Set the lastSendAttemptTime property: Last time iot hub tried to send a message to the endpoint.
+ *
+ * @param lastSendAttemptTime the lastSendAttemptTime value to set.
+ * @return the EndpointHealthDataInner object itself.
+ */
+ public EndpointHealthDataInner withLastSendAttemptTime(OffsetDateTime lastSendAttemptTime) {
+ if (lastSendAttemptTime == null) {
+ this.lastSendAttemptTime = null;
+ } else {
+ this.lastSendAttemptTime = new DateTimeRfc1123(lastSendAttemptTime);
+ }
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java
index 95e4261c931e..ee5bb394fea5 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java
@@ -20,7 +20,7 @@ public final class EventHubConsumerGroupInfoInner extends ProxyResource {
* The tags.
*/
@JsonProperty(value = "properties")
- private Map properties;
+ private Map properties;
/*
* The etag.
@@ -33,7 +33,7 @@ public final class EventHubConsumerGroupInfoInner extends ProxyResource {
*
* @return the properties value.
*/
- public Map properties() {
+ public Map properties() {
return this.properties;
}
@@ -43,7 +43,7 @@ public Map properties() {
* @param properties the properties value to set.
* @return the EventHubConsumerGroupInfoInner object itself.
*/
- public EventHubConsumerGroupInfoInner withProperties(Map properties) {
+ public EventHubConsumerGroupInfoInner withProperties(Map properties) {
this.properties = properties;
return this;
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubDescriptionInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubDescriptionInner.java
index 4eebe4e0ddf7..6cc25bbe0aac 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubDescriptionInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubDescriptionInner.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.iothub.models.ArmIdentity;
import com.azure.resourcemanager.iothub.models.IotHubProperties;
import com.azure.resourcemanager.iothub.models.IotHubSkuInfo;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -38,6 +39,12 @@ public final class IotHubDescriptionInner extends Resource {
@JsonProperty(value = "sku", required = true)
private IotHubSkuInfo sku;
+ /*
+ * The managed identities for the IotHub.
+ */
+ @JsonProperty(value = "identity")
+ private ArmIdentity identity;
+
/**
* Get the etag property: The Etag field is *not* required. If it is provided in the response body, it must also be
* provided as a header per the normal ETag convention.
@@ -100,6 +107,26 @@ public IotHubDescriptionInner withSku(IotHubSkuInfo sku) {
return this;
}
+ /**
+ * Get the identity property: The managed identities for the IotHub.
+ *
+ * @return the identity value.
+ */
+ public ArmIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The managed identities for the IotHub.
+ *
+ * @param identity the identity value to set.
+ * @return the IotHubDescriptionInner object itself.
+ */
+ public IotHubDescriptionInner withIdentity(ArmIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/** {@inheritDoc} */
@Override
public IotHubDescriptionInner withLocation(String location) {
@@ -130,5 +157,8 @@ public void validate() {
} else {
sku().validate();
}
+ if (identity() != null) {
+ identity().validate();
+ }
}
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateDescriptionImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateDescriptionImpl.java
index c11f3867f41d..f526e7cd6a82 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateDescriptionImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateDescriptionImpl.java
@@ -6,7 +6,6 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
-import com.azure.resourcemanager.iothub.models.CertificateBodyDescription;
import com.azure.resourcemanager.iothub.models.CertificateDescription;
import com.azure.resourcemanager.iothub.models.CertificateProperties;
@@ -52,12 +51,8 @@ private com.azure.resourcemanager.iothub.IotHubManager manager() {
private String createIfMatch;
- private CertificateBodyDescription createCertificateDescription;
-
private String updateIfMatch;
- private CertificateBodyDescription updateCertificateDescription;
-
public CertificateDescriptionImpl withExistingIotHub(String resourceGroupName, String resourceName) {
this.resourceGroupName = resourceGroupName;
this.resourceName = resourceName;
@@ -70,12 +65,7 @@ public CertificateDescription create() {
.serviceClient()
.getCertificates()
.createOrUpdateWithResponse(
- resourceGroupName,
- resourceName,
- certificateName,
- createCertificateDescription,
- createIfMatch,
- Context.NONE)
+ resourceGroupName, resourceName, certificateName, this.innerModel(), createIfMatch, Context.NONE)
.getValue();
return this;
}
@@ -86,12 +76,7 @@ public CertificateDescription create(Context context) {
.serviceClient()
.getCertificates()
.createOrUpdateWithResponse(
- resourceGroupName,
- resourceName,
- certificateName,
- createCertificateDescription,
- createIfMatch,
- context)
+ resourceGroupName, resourceName, certificateName, this.innerModel(), createIfMatch, context)
.getValue();
return this;
}
@@ -101,12 +86,10 @@ public CertificateDescription create(Context context) {
this.serviceManager = serviceManager;
this.certificateName = name;
this.createIfMatch = null;
- this.createCertificateDescription = new CertificateBodyDescription();
}
public CertificateDescriptionImpl update() {
this.updateIfMatch = null;
- this.updateCertificateDescription = new CertificateBodyDescription();
return this;
}
@@ -116,12 +99,7 @@ public CertificateDescription apply() {
.serviceClient()
.getCertificates()
.createOrUpdateWithResponse(
- resourceGroupName,
- resourceName,
- certificateName,
- updateCertificateDescription,
- updateIfMatch,
- Context.NONE)
+ resourceGroupName, resourceName, certificateName, this.innerModel(), updateIfMatch, Context.NONE)
.getValue();
return this;
}
@@ -132,12 +110,7 @@ public CertificateDescription apply(Context context) {
.serviceClient()
.getCertificates()
.createOrUpdateWithResponse(
- resourceGroupName,
- resourceName,
- certificateName,
- updateCertificateDescription,
- updateIfMatch,
- context)
+ resourceGroupName, resourceName, certificateName, this.innerModel(), updateIfMatch, context)
.getValue();
return this;
}
@@ -171,14 +144,9 @@ public CertificateDescription refresh(Context context) {
return this;
}
- public CertificateDescriptionImpl withCertificate(String certificate) {
- if (isInCreateMode()) {
- this.createCertificateDescription.withCertificate(certificate);
- return this;
- } else {
- this.updateCertificateDescription.withCertificate(certificate);
- return this;
- }
+ public CertificateDescriptionImpl withProperties(CertificateProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
}
public CertificateDescriptionImpl withIfMatch(String ifMatch) {
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesClientImpl.java
index 42570974a5c1..656d8a942edd 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesClientImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesClientImpl.java
@@ -29,7 +29,6 @@
import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
import com.azure.resourcemanager.iothub.fluent.models.CertificateListDescriptionInner;
import com.azure.resourcemanager.iothub.fluent.models.CertificateWithNonceDescriptionInner;
-import com.azure.resourcemanager.iothub.models.CertificateBodyDescription;
import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription;
import com.azure.resourcemanager.iothub.models.ErrorDetailsException;
import reactor.core.publisher.Mono;
@@ -107,7 +106,7 @@ Mono> createOrUpdate(
@PathParam("resourceName") String resourceName,
@PathParam("certificateName") String certificateName,
@HeaderParam("If-Match") String ifMatch,
- @BodyParam("application/json") CertificateBodyDescription certificateDescription,
+ @BodyParam("application/json") CertificateDescriptionInner certificateDescription,
@HeaderParam("Accept") String accept,
Context context);
@@ -497,7 +496,7 @@ private Mono> createOrUpdateWithResponseAs
String resourceGroupName,
String resourceName,
String certificateName,
- CertificateBodyDescription certificateDescription,
+ CertificateDescriptionInner certificateDescription,
String ifMatch) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -568,7 +567,7 @@ private Mono> createOrUpdateWithResponseAs
String resourceGroupName,
String resourceName,
String certificateName,
- CertificateBodyDescription certificateDescription,
+ CertificateDescriptionInner certificateDescription,
String ifMatch,
Context context) {
if (this.client.getEndpoint() == null) {
@@ -636,7 +635,7 @@ private Mono createOrUpdateAsync(
String resourceGroupName,
String resourceName,
String certificateName,
- CertificateBodyDescription certificateDescription,
+ CertificateDescriptionInner certificateDescription,
String ifMatch) {
return createOrUpdateWithResponseAsync(
resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch)
@@ -667,7 +666,7 @@ private Mono createOrUpdateAsync(
String resourceGroupName,
String resourceName,
String certificateName,
- CertificateBodyDescription certificateDescription) {
+ CertificateDescriptionInner certificateDescription) {
final String ifMatch = null;
return createOrUpdateWithResponseAsync(
resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch)
@@ -698,7 +697,7 @@ public CertificateDescriptionInner createOrUpdate(
String resourceGroupName,
String resourceName,
String certificateName,
- CertificateBodyDescription certificateDescription) {
+ CertificateDescriptionInner certificateDescription) {
final String ifMatch = null;
return createOrUpdateAsync(resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch)
.block();
@@ -724,7 +723,7 @@ public Response createOrUpdateWithResponse(
String resourceGroupName,
String resourceName,
String certificateName,
- CertificateBodyDescription certificateDescription,
+ CertificateDescriptionInner certificateDescription,
String ifMatch,
Context context) {
return createOrUpdateWithResponseAsync(
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EndpointHealthDataImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EndpointHealthDataImpl.java
index 1508cdf252a6..54567d44118a 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EndpointHealthDataImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EndpointHealthDataImpl.java
@@ -7,6 +7,7 @@
import com.azure.resourcemanager.iothub.fluent.models.EndpointHealthDataInner;
import com.azure.resourcemanager.iothub.models.EndpointHealthData;
import com.azure.resourcemanager.iothub.models.EndpointHealthStatus;
+import java.time.OffsetDateTime;
public final class EndpointHealthDataImpl implements EndpointHealthData {
private EndpointHealthDataInner innerObject;
@@ -27,6 +28,22 @@ public EndpointHealthStatus healthStatus() {
return this.innerModel().healthStatus();
}
+ public String lastKnownError() {
+ return this.innerModel().lastKnownError();
+ }
+
+ public OffsetDateTime lastKnownErrorTime() {
+ return this.innerModel().lastKnownErrorTime();
+ }
+
+ public OffsetDateTime lastSuccessfulSendAttemptTime() {
+ return this.innerModel().lastSuccessfulSendAttemptTime();
+ }
+
+ public OffsetDateTime lastSendAttemptTime() {
+ return this.innerModel().lastSendAttemptTime();
+ }
+
public EndpointHealthDataInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EventHubConsumerGroupInfoImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EventHubConsumerGroupInfoImpl.java
index fb7945732d37..ec5e786d3b82 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EventHubConsumerGroupInfoImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EventHubConsumerGroupInfoImpl.java
@@ -4,12 +4,16 @@
package com.azure.resourcemanager.iothub.implementation;
+import com.azure.core.util.Context;
import com.azure.resourcemanager.iothub.fluent.models.EventHubConsumerGroupInfoInner;
+import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupBodyDescription;
import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupInfo;
+import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupName;
import java.util.Collections;
import java.util.Map;
-public final class EventHubConsumerGroupInfoImpl implements EventHubConsumerGroupInfo {
+public final class EventHubConsumerGroupInfoImpl
+ implements EventHubConsumerGroupInfo, EventHubConsumerGroupInfo.Definition {
private EventHubConsumerGroupInfoInner innerObject;
private final com.azure.resourcemanager.iothub.IotHubManager serviceManager;
@@ -32,8 +36,8 @@ public String type() {
return this.innerModel().type();
}
- public Map properties() {
- Map inner = this.innerModel().properties();
+ public Map properties() {
+ Map inner = this.innerModel().properties();
if (inner != null) {
return Collections.unmodifiableMap(inner);
} else {
@@ -52,4 +56,78 @@ public EventHubConsumerGroupInfoInner innerModel() {
private com.azure.resourcemanager.iothub.IotHubManager manager() {
return this.serviceManager;
}
+
+ private String resourceGroupName;
+
+ private String resourceName;
+
+ private String eventHubEndpointName;
+
+ private String name;
+
+ private EventHubConsumerGroupBodyDescription createConsumerGroupBody;
+
+ public EventHubConsumerGroupInfoImpl withExistingEventHubEndpoint(
+ String resourceGroupName, String resourceName, String eventHubEndpointName) {
+ this.resourceGroupName = resourceGroupName;
+ this.resourceName = resourceName;
+ this.eventHubEndpointName = eventHubEndpointName;
+ return this;
+ }
+
+ public EventHubConsumerGroupInfo create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIotHubResources()
+ .createEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, createConsumerGroupBody, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EventHubConsumerGroupInfo create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIotHubResources()
+ .createEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, createConsumerGroupBody, context)
+ .getValue();
+ return this;
+ }
+
+ EventHubConsumerGroupInfoImpl(String name, com.azure.resourcemanager.iothub.IotHubManager serviceManager) {
+ this.innerObject = new EventHubConsumerGroupInfoInner();
+ this.serviceManager = serviceManager;
+ this.name = name;
+ this.createConsumerGroupBody = new EventHubConsumerGroupBodyDescription();
+ }
+
+ public EventHubConsumerGroupInfo refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIotHubResources()
+ .getEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EventHubConsumerGroupInfo refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIotHubResources()
+ .getEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, context)
+ .getValue();
+ return this;
+ }
+
+ public EventHubConsumerGroupInfoImpl withProperties(EventHubConsumerGroupName properties) {
+ this.createConsumerGroupBody.withProperties(properties);
+ return this;
+ }
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java
index f39fb205e7d0..3ab5b4bc3098 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java
@@ -222,7 +222,7 @@ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2020-03-01";
+ this.apiVersion = "2021-03-31";
this.operations = new OperationsClientImpl(this);
this.iotHubResources = new IotHubResourcesClientImpl(this);
this.resourceProviderCommons = new ResourceProviderCommonsClientImpl(this);
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubDescriptionImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubDescriptionImpl.java
index f095491e588a..660420847382 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubDescriptionImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubDescriptionImpl.java
@@ -9,6 +9,7 @@
import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.iothub.fluent.models.IotHubDescriptionInner;
+import com.azure.resourcemanager.iothub.models.ArmIdentity;
import com.azure.resourcemanager.iothub.models.ExportDevicesRequest;
import com.azure.resourcemanager.iothub.models.ImportDevicesRequest;
import com.azure.resourcemanager.iothub.models.IotHubDescription;
@@ -63,6 +64,10 @@ public IotHubSkuInfo sku() {
return this.innerModel().sku();
}
+ public ArmIdentity identity() {
+ return this.innerModel().identity();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -233,6 +238,11 @@ public IotHubDescriptionImpl withProperties(IotHubProperties properties) {
return this;
}
+ public IotHubDescriptionImpl withIdentity(ArmIdentity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+
public IotHubDescriptionImpl withIfMatch(String ifMatch) {
this.createIfMatch = ifMatch;
return this;
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java
index 23a3dcfb5f86..1b0e088be46a 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java
@@ -48,6 +48,7 @@
import com.azure.resourcemanager.iothub.fluent.models.TestRouteResultInner;
import com.azure.resourcemanager.iothub.models.EndpointHealthDataListResult;
import com.azure.resourcemanager.iothub.models.ErrorDetailsException;
+import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupBodyDescription;
import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupsListResult;
import com.azure.resourcemanager.iothub.models.ExportDevicesRequest;
import com.azure.resourcemanager.iothub.models.ImportDevicesRequest;
@@ -255,6 +256,7 @@ Mono> createEventHubConsumerGroup(
@PathParam("resourceName") String resourceName,
@PathParam("eventHubEndpointName") String eventHubEndpointName,
@PathParam("name") String name,
+ @BodyParam("application/json") EventHubConsumerGroupBodyDescription consumerGroupBody,
@HeaderParam("Accept") String accept,
Context context);
@@ -2595,6 +2597,7 @@ public Response getEventHubConsumerGroupWithResp
* @param resourceName The name of the IoT hub.
* @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
* @param name The name of the consumer group to add.
+ * @param consumerGroupBody The consumer group to add.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorDetailsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -2602,7 +2605,11 @@ public Response getEventHubConsumerGroupWithResp
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createEventHubConsumerGroupWithResponseAsync(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name) {
+ String resourceGroupName,
+ String resourceName,
+ String eventHubEndpointName,
+ String name,
+ EventHubConsumerGroupBodyDescription consumerGroupBody) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -2629,6 +2636,12 @@ private Mono> createEventHubConsumerGro
if (name == null) {
return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
}
+ if (consumerGroupBody == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter consumerGroupBody is required and cannot be null."));
+ } else {
+ consumerGroupBody.validate();
+ }
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -2642,6 +2655,7 @@ private Mono> createEventHubConsumerGro
resourceName,
eventHubEndpointName,
name,
+ consumerGroupBody,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -2654,6 +2668,7 @@ private Mono> createEventHubConsumerGro
* @param resourceName The name of the IoT hub.
* @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
* @param name The name of the consumer group to add.
+ * @param consumerGroupBody The consumer group to add.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorDetailsException thrown if the request is rejected by server.
@@ -2662,7 +2677,12 @@ private Mono> createEventHubConsumerGro
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createEventHubConsumerGroupWithResponseAsync(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name, Context context) {
+ String resourceGroupName,
+ String resourceName,
+ String eventHubEndpointName,
+ String name,
+ EventHubConsumerGroupBodyDescription consumerGroupBody,
+ Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -2689,6 +2709,12 @@ private Mono> createEventHubConsumerGro
if (name == null) {
return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
}
+ if (consumerGroupBody == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter consumerGroupBody is required and cannot be null."));
+ } else {
+ consumerGroupBody.validate();
+ }
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -2700,6 +2726,7 @@ private Mono> createEventHubConsumerGro
resourceName,
eventHubEndpointName,
name,
+ consumerGroupBody,
accept,
context);
}
@@ -2711,6 +2738,7 @@ private Mono> createEventHubConsumerGro
* @param resourceName The name of the IoT hub.
* @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
* @param name The name of the consumer group to add.
+ * @param consumerGroupBody The consumer group to add.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorDetailsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -2718,8 +2746,13 @@ private Mono> createEventHubConsumerGro
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createEventHubConsumerGroupAsync(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name) {
- return createEventHubConsumerGroupWithResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name)
+ String resourceGroupName,
+ String resourceName,
+ String eventHubEndpointName,
+ String name,
+ EventHubConsumerGroupBodyDescription consumerGroupBody) {
+ return createEventHubConsumerGroupWithResponseAsync(
+ resourceGroupName, resourceName, eventHubEndpointName, name, consumerGroupBody)
.flatMap(
(Response res) -> {
if (res.getValue() != null) {
@@ -2737,6 +2770,7 @@ private Mono createEventHubConsumerGroupAsync(
* @param resourceName The name of the IoT hub.
* @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
* @param name The name of the consumer group to add.
+ * @param consumerGroupBody The consumer group to add.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorDetailsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -2744,8 +2778,14 @@ private Mono createEventHubConsumerGroupAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name) {
- return createEventHubConsumerGroupAsync(resourceGroupName, resourceName, eventHubEndpointName, name).block();
+ String resourceGroupName,
+ String resourceName,
+ String eventHubEndpointName,
+ String name,
+ EventHubConsumerGroupBodyDescription consumerGroupBody) {
+ return createEventHubConsumerGroupAsync(
+ resourceGroupName, resourceName, eventHubEndpointName, name, consumerGroupBody)
+ .block();
}
/**
@@ -2755,6 +2795,7 @@ public EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
* @param resourceName The name of the IoT hub.
* @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
* @param name The name of the consumer group to add.
+ * @param consumerGroupBody The consumer group to add.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ErrorDetailsException thrown if the request is rejected by server.
@@ -2763,9 +2804,14 @@ public EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createEventHubConsumerGroupWithResponse(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name, Context context) {
+ String resourceGroupName,
+ String resourceName,
+ String eventHubEndpointName,
+ String name,
+ EventHubConsumerGroupBodyDescription consumerGroupBody,
+ Context context) {
return createEventHubConsumerGroupWithResponseAsync(
- resourceGroupName, resourceName, eventHubEndpointName, name, context)
+ resourceGroupName, resourceName, eventHubEndpointName, name, consumerGroupBody, context)
.block();
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesImpl.java
index 5e9ee7c3509b..55ab18982c3c 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesImpl.java
@@ -198,37 +198,6 @@ public Response getEventHubConsumerGroupWithResponse(
}
}
- public EventHubConsumerGroupInfo createEventHubConsumerGroup(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name) {
- EventHubConsumerGroupInfoInner inner =
- this
- .serviceClient()
- .createEventHubConsumerGroup(resourceGroupName, resourceName, eventHubEndpointName, name);
- if (inner != null) {
- return new EventHubConsumerGroupInfoImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public Response createEventHubConsumerGroupWithResponse(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name, Context context) {
- Response inner =
- this
- .serviceClient()
- .createEventHubConsumerGroupWithResponse(
- resourceGroupName, resourceName, eventHubEndpointName, name, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new EventHubConsumerGroupInfoImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
public void deleteEventHubConsumerGroup(
String resourceGroupName, String resourceName, String eventHubEndpointName, String name) {
this.serviceClient().deleteEventHubConsumerGroup(resourceGroupName, resourceName, eventHubEndpointName, name);
@@ -508,6 +477,82 @@ public Response getByIdWithResponse(String id, Context contex
return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context);
}
+ public EventHubConsumerGroupInfo getEventHubConsumerGroupById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'IotHubs'.", id)));
+ }
+ String eventHubEndpointName = Utils.getValueFromIdByName(id, "eventHubEndpoints");
+ if (eventHubEndpointName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'eventHubEndpoints'.", id)));
+ }
+ String name = Utils.getValueFromIdByName(id, "ConsumerGroups");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'ConsumerGroups'.", id)));
+ }
+ return this
+ .getEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, Context.NONE)
+ .getValue();
+ }
+
+ public Response getEventHubConsumerGroupByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'IotHubs'.", id)));
+ }
+ String eventHubEndpointName = Utils.getValueFromIdByName(id, "eventHubEndpoints");
+ if (eventHubEndpointName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'eventHubEndpoints'.", id)));
+ }
+ String name = Utils.getValueFromIdByName(id, "ConsumerGroups");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'ConsumerGroups'.", id)));
+ }
+ return this
+ .getEventHubConsumerGroupWithResponse(resourceGroupName, resourceName, eventHubEndpointName, name, context);
+ }
+
public IotHubDescription deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
@@ -546,6 +591,83 @@ public IotHubDescription deleteByIdWithResponse(String id, Context context) {
return this.delete(resourceGroupName, resourceName, context);
}
+ public void deleteEventHubConsumerGroupById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'IotHubs'.", id)));
+ }
+ String eventHubEndpointName = Utils.getValueFromIdByName(id, "eventHubEndpoints");
+ if (eventHubEndpointName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'eventHubEndpoints'.", id)));
+ }
+ String name = Utils.getValueFromIdByName(id, "ConsumerGroups");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'ConsumerGroups'.", id)));
+ }
+ this
+ .deleteEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, Context.NONE)
+ .getValue();
+ }
+
+ public Response deleteEventHubConsumerGroupByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'IotHubs'.", id)));
+ }
+ String eventHubEndpointName = Utils.getValueFromIdByName(id, "eventHubEndpoints");
+ if (eventHubEndpointName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'eventHubEndpoints'.", id)));
+ }
+ String name = Utils.getValueFromIdByName(id, "ConsumerGroups");
+ if (name == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'ConsumerGroups'.", id)));
+ }
+ return this
+ .deleteEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, context);
+ }
+
private IotHubResourcesClient serviceClient() {
return this.innerClient;
}
@@ -557,4 +679,8 @@ private com.azure.resourcemanager.iothub.IotHubManager manager() {
public IotHubDescriptionImpl define(String name) {
return new IotHubDescriptionImpl(name, this.manager());
}
+
+ public EventHubConsumerGroupInfoImpl defineEventHubConsumerGroup(String name) {
+ return new EventHubConsumerGroupInfoImpl(name, this.manager());
+ }
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java
new file mode 100644
index 000000000000..32e27c25e82a
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The ArmIdentity model. */
+@Fluent
+public class ArmIdentity {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmIdentity.class);
+
+ /*
+ * Principal Id
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /*
+ * Tenant Id
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /*
+ * The type of identity used for the resource. The type 'SystemAssigned,
+ * UserAssigned' includes both an implicitly created identity and a set of
+ * user assigned identities. The type 'None' will remove any identities
+ * from the service.
+ */
+ @JsonProperty(value = "type")
+ private ResourceIdentityType type;
+
+ /*
+ * Dictionary of
+ */
+ @JsonProperty(value = "userAssignedIdentities")
+ private Map userAssignedIdentities;
+
+ /**
+ * Get the principalId property: Principal Id.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the tenantId property: Tenant Id.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the type property: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned'
+ * includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove
+ * any identities from the service.
+ *
+ * @return the type value.
+ */
+ public ResourceIdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned'
+ * includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove
+ * any identities from the service.
+ *
+ * @param type the type value to set.
+ * @return the ArmIdentity object itself.
+ */
+ public ArmIdentity withType(ResourceIdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the userAssignedIdentities property: Dictionary of <ArmUserIdentity>.
+ *
+ * @return the userAssignedIdentities value.
+ */
+ public Map userAssignedIdentities() {
+ return this.userAssignedIdentities;
+ }
+
+ /**
+ * Set the userAssignedIdentities property: Dictionary of <ArmUserIdentity>.
+ *
+ * @param userAssignedIdentities the userAssignedIdentities value to set.
+ * @return the ArmIdentity object itself.
+ */
+ public ArmIdentity withUserAssignedIdentities(Map userAssignedIdentities) {
+ this.userAssignedIdentities = userAssignedIdentities;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (userAssignedIdentities() != null) {
+ userAssignedIdentities()
+ .values()
+ .forEach(
+ e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmUserIdentity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmUserIdentity.java
new file mode 100644
index 000000000000..8ce8ce614807
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmUserIdentity.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The ArmUserIdentity model. */
+@Immutable
+public class ArmUserIdentity {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmUserIdentity.class);
+
+ /*
+ * The principalId property.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /*
+ * The clientId property.
+ */
+ @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
+ private String clientId;
+
+ /**
+ * Get the principalId property: The principalId property.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the clientId property: The clientId property.
+ *
+ * @return the clientId value.
+ */
+ public String clientId() {
+ return this.clientId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateBodyDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateBodyDescription.java
deleted file mode 100644
index 920af42ee369..000000000000
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateBodyDescription.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.iothub.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The JSON-serialized X509 Certificate. */
-@Fluent
-public final class CertificateBodyDescription {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateBodyDescription.class);
-
- /*
- * base-64 representation of the X509 leaf certificate .cer file or just
- * .pem file content.
- */
- @JsonProperty(value = "certificate")
- private String certificate;
-
- /**
- * Get the certificate property: base-64 representation of the X509 leaf certificate .cer file or just .pem file
- * content.
- *
- * @return the certificate value.
- */
- public String certificate() {
- return this.certificate;
- }
-
- /**
- * Set the certificate property: base-64 representation of the X509 leaf certificate .cer file or just .pem file
- * content.
- *
- * @param certificate the certificate value to set.
- * @return the CertificateBodyDescription object itself.
- */
- public CertificateBodyDescription withCertificate(String certificate) {
- this.certificate = certificate;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java
index 1229ac59f675..71f56c61ddd8 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java
@@ -75,7 +75,7 @@ interface WithParentResource {
* The stage of the CertificateDescription definition which contains all the minimum required properties for the
* resource to be created, but also allows for any other optional properties to be specified.
*/
- interface WithCreate extends DefinitionStages.WithCertificate, DefinitionStages.WithIfMatch {
+ interface WithCreate extends DefinitionStages.WithProperties, DefinitionStages.WithIfMatch {
/**
* Executes the create request.
*
@@ -91,17 +91,15 @@ interface WithCreate extends DefinitionStages.WithCertificate, DefinitionStages.
*/
CertificateDescription create(Context context);
}
- /** The stage of the CertificateDescription definition allowing to specify certificate. */
- interface WithCertificate {
+ /** The stage of the CertificateDescription definition allowing to specify properties. */
+ interface WithProperties {
/**
- * Specifies the certificate property: base-64 representation of the X509 leaf certificate .cer file or just
- * .pem file content..
+ * Specifies the properties property: The description of an X509 CA Certificate..
*
- * @param certificate base-64 representation of the X509 leaf certificate .cer file or just .pem file
- * content.
+ * @param properties The description of an X509 CA Certificate.
* @return the next definition stage.
*/
- WithCreate withCertificate(String certificate);
+ WithCreate withProperties(CertificateProperties properties);
}
/** The stage of the CertificateDescription definition allowing to specify ifMatch. */
interface WithIfMatch {
@@ -124,7 +122,7 @@ interface WithIfMatch {
CertificateDescription.Update update();
/** The template for CertificateDescription update. */
- interface Update extends UpdateStages.WithCertificate, UpdateStages.WithIfMatch {
+ interface Update extends UpdateStages.WithProperties, UpdateStages.WithIfMatch {
/**
* Executes the update request.
*
@@ -142,17 +140,15 @@ interface Update extends UpdateStages.WithCertificate, UpdateStages.WithIfMatch
}
/** The CertificateDescription update stages. */
interface UpdateStages {
- /** The stage of the CertificateDescription update allowing to specify certificate. */
- interface WithCertificate {
+ /** The stage of the CertificateDescription update allowing to specify properties. */
+ interface WithProperties {
/**
- * Specifies the certificate property: base-64 representation of the X509 leaf certificate .cer file or just
- * .pem file content..
+ * Specifies the properties property: The description of an X509 CA Certificate..
*
- * @param certificate base-64 representation of the X509 leaf certificate .cer file or just .pem file
- * content.
+ * @param properties The description of an X509 CA Certificate.
* @return the next definition stage.
*/
- Update withCertificate(String certificate);
+ Update withProperties(CertificateProperties properties);
}
/** The stage of the CertificateDescription update allowing to specify ifMatch. */
interface WithIfMatch {
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/DefaultAction.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/DefaultAction.java
new file mode 100644
index 000000000000..4731ff0dc046
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/DefaultAction.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for DefaultAction. */
+public final class DefaultAction extends ExpandableStringEnum {
+ /** Static value Deny for DefaultAction. */
+ public static final DefaultAction DENY = fromString("Deny");
+
+ /** Static value Allow for DefaultAction. */
+ public static final DefaultAction ALLOW = fromString("Allow");
+
+ /**
+ * Creates or finds a DefaultAction from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding DefaultAction.
+ */
+ @JsonCreator
+ public static DefaultAction fromString(String name) {
+ return fromString(name, DefaultAction.class);
+ }
+
+ /** @return known DefaultAction values. */
+ public static Collection values() {
+ return values(DefaultAction.class);
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthData.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthData.java
index 70567df7e496..3ab6be25f96a 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthData.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthData.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.iothub.models;
import com.azure.resourcemanager.iothub.fluent.models.EndpointHealthDataInner;
+import java.time.OffsetDateTime;
/** An immutable client-side representation of EndpointHealthData. */
public interface EndpointHealthData {
@@ -29,6 +30,34 @@ public interface EndpointHealthData {
*/
EndpointHealthStatus healthStatus();
+ /**
+ * Gets the lastKnownError property: Last error obtained when a message failed to be delivered to iot hub.
+ *
+ * @return the lastKnownError value.
+ */
+ String lastKnownError();
+
+ /**
+ * Gets the lastKnownErrorTime property: Time at which the last known error occurred.
+ *
+ * @return the lastKnownErrorTime value.
+ */
+ OffsetDateTime lastKnownErrorTime();
+
+ /**
+ * Gets the lastSuccessfulSendAttemptTime property: Last time iot hub successfully sent a message to the endpoint.
+ *
+ * @return the lastSuccessfulSendAttemptTime value.
+ */
+ OffsetDateTime lastSuccessfulSendAttemptTime();
+
+ /**
+ * Gets the lastSendAttemptTime property: Last time iot hub tried to send a message to the endpoint.
+ *
+ * @return the lastSendAttemptTime value.
+ */
+ OffsetDateTime lastSendAttemptTime();
+
/**
* Gets the inner com.azure.resourcemanager.iothub.fluent.models.EndpointHealthDataInner object.
*
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthStatus.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthStatus.java
index 0e10d579ae18..29f6463f85dd 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthStatus.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthStatus.java
@@ -16,6 +16,9 @@ public final class EndpointHealthStatus extends ExpandableStringEnum properties();
+ Map properties();
/**
* Gets the etag property: The etag.
@@ -50,4 +51,75 @@ public interface EventHubConsumerGroupInfo {
* @return the inner object.
*/
EventHubConsumerGroupInfoInner innerModel();
+
+ /** The entirety of the EventHubConsumerGroupInfo definition. */
+ interface Definition
+ extends DefinitionStages.Blank,
+ DefinitionStages.WithParentResource,
+ DefinitionStages.WithProperties,
+ DefinitionStages.WithCreate {
+ }
+ /** The EventHubConsumerGroupInfo definition stages. */
+ interface DefinitionStages {
+ /** The first stage of the EventHubConsumerGroupInfo definition. */
+ interface Blank extends WithParentResource {
+ }
+ /** The stage of the EventHubConsumerGroupInfo definition allowing to specify parent resource. */
+ interface WithParentResource {
+ /**
+ * Specifies resourceGroupName, resourceName, eventHubEndpointName.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
+ * @return the next definition stage.
+ */
+ WithProperties withExistingEventHubEndpoint(
+ String resourceGroupName, String resourceName, String eventHubEndpointName);
+ }
+ /** The stage of the EventHubConsumerGroupInfo definition allowing to specify properties. */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: The EventHub consumer group name..
+ *
+ * @param properties The EventHub consumer group name.
+ * @return the next definition stage.
+ */
+ WithCreate withProperties(EventHubConsumerGroupName properties);
+ }
+ /**
+ * The stage of the EventHubConsumerGroupInfo definition which contains all the minimum required properties for
+ * the resource to be created, but also allows for any other optional properties to be specified.
+ */
+ interface WithCreate {
+ /**
+ * Executes the create request.
+ *
+ * @return the created resource.
+ */
+ EventHubConsumerGroupInfo create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ EventHubConsumerGroupInfo create(Context context);
+ }
+ }
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @return the refreshed resource.
+ */
+ EventHubConsumerGroupInfo refresh();
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @param context The context to associate with this operation.
+ * @return the refreshed resource.
+ */
+ EventHubConsumerGroupInfo refresh(Context context);
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupName.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupName.java
new file mode 100644
index 000000000000..dbf7c7fcb7fe
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupName.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The EventHub consumer group name. */
+@Fluent
+public final class EventHubConsumerGroupName {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubConsumerGroupName.class);
+
+ /*
+ * EventHub consumer group name
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * Get the name property: EventHub consumer group name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: EventHub consumer group name.
+ *
+ * @param name the name value to set.
+ * @return the EventHubConsumerGroupName object itself.
+ */
+ public EventHubConsumerGroupName withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (name() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property name in model EventHubConsumerGroupName"));
+ }
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ExportDevicesRequest.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ExportDevicesRequest.java
index f1214ffe1ea0..15cb7939bc71 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ExportDevicesRequest.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ExportDevicesRequest.java
@@ -41,6 +41,26 @@ public final class ExportDevicesRequest {
@JsonProperty(value = "authenticationType")
private AuthenticationType authenticationType;
+ /*
+ * Managed identity properties of storage endpoint for export devices.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedIdentity identity;
+
+ /*
+ * The value indicating whether configurations should be exported.
+ */
+ @JsonProperty(value = "includeConfigurations")
+ private Boolean includeConfigurations;
+
+ /*
+ * The name of the blob that will be created in the provided output blob
+ * container. This blob will contain the exported configurations for the
+ * Iot Hub.
+ */
+ @JsonProperty(value = "configurationsBlobName")
+ private String configurationsBlobName;
+
/**
* Get the exportBlobContainerUri property: The export blob container URI.
*
@@ -125,6 +145,68 @@ public ExportDevicesRequest withAuthenticationType(AuthenticationType authentica
return this;
}
+ /**
+ * Get the identity property: Managed identity properties of storage endpoint for export devices.
+ *
+ * @return the identity value.
+ */
+ public ManagedIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed identity properties of storage endpoint for export devices.
+ *
+ * @param identity the identity value to set.
+ * @return the ExportDevicesRequest object itself.
+ */
+ public ExportDevicesRequest withIdentity(ManagedIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the includeConfigurations property: The value indicating whether configurations should be exported.
+ *
+ * @return the includeConfigurations value.
+ */
+ public Boolean includeConfigurations() {
+ return this.includeConfigurations;
+ }
+
+ /**
+ * Set the includeConfigurations property: The value indicating whether configurations should be exported.
+ *
+ * @param includeConfigurations the includeConfigurations value to set.
+ * @return the ExportDevicesRequest object itself.
+ */
+ public ExportDevicesRequest withIncludeConfigurations(Boolean includeConfigurations) {
+ this.includeConfigurations = includeConfigurations;
+ return this;
+ }
+
+ /**
+ * Get the configurationsBlobName property: The name of the blob that will be created in the provided output blob
+ * container. This blob will contain the exported configurations for the Iot Hub.
+ *
+ * @return the configurationsBlobName value.
+ */
+ public String configurationsBlobName() {
+ return this.configurationsBlobName;
+ }
+
+ /**
+ * Set the configurationsBlobName property: The name of the blob that will be created in the provided output blob
+ * container. This blob will contain the exported configurations for the Iot Hub.
+ *
+ * @param configurationsBlobName the configurationsBlobName value to set.
+ * @return the ExportDevicesRequest object itself.
+ */
+ public ExportDevicesRequest withConfigurationsBlobName(String configurationsBlobName) {
+ this.configurationsBlobName = configurationsBlobName;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -137,5 +219,8 @@ public void validate() {
new IllegalArgumentException(
"Missing required property exportBlobContainerUri in model ExportDevicesRequest"));
}
+ if (identity() != null) {
+ identity().validate();
+ }
}
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ImportDevicesRequest.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ImportDevicesRequest.java
index 26e528f9dca7..90956e1d595f 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ImportDevicesRequest.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ImportDevicesRequest.java
@@ -46,6 +46,25 @@ public final class ImportDevicesRequest {
@JsonProperty(value = "authenticationType")
private AuthenticationType authenticationType;
+ /*
+ * Managed identity properties of storage endpoint for import devices.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedIdentity identity;
+
+ /*
+ * The value indicating whether configurations should be imported.
+ */
+ @JsonProperty(value = "includeConfigurations")
+ private Boolean includeConfigurations;
+
+ /*
+ * The blob name to be used when importing configurations from the provided
+ * input blob container.
+ */
+ @JsonProperty(value = "configurationsBlobName")
+ private String configurationsBlobName;
+
/**
* Get the inputBlobContainerUri property: The input blob container URI.
*
@@ -148,6 +167,68 @@ public ImportDevicesRequest withAuthenticationType(AuthenticationType authentica
return this;
}
+ /**
+ * Get the identity property: Managed identity properties of storage endpoint for import devices.
+ *
+ * @return the identity value.
+ */
+ public ManagedIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed identity properties of storage endpoint for import devices.
+ *
+ * @param identity the identity value to set.
+ * @return the ImportDevicesRequest object itself.
+ */
+ public ImportDevicesRequest withIdentity(ManagedIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the includeConfigurations property: The value indicating whether configurations should be imported.
+ *
+ * @return the includeConfigurations value.
+ */
+ public Boolean includeConfigurations() {
+ return this.includeConfigurations;
+ }
+
+ /**
+ * Set the includeConfigurations property: The value indicating whether configurations should be imported.
+ *
+ * @param includeConfigurations the includeConfigurations value to set.
+ * @return the ImportDevicesRequest object itself.
+ */
+ public ImportDevicesRequest withIncludeConfigurations(Boolean includeConfigurations) {
+ this.includeConfigurations = includeConfigurations;
+ return this;
+ }
+
+ /**
+ * Get the configurationsBlobName property: The blob name to be used when importing configurations from the provided
+ * input blob container.
+ *
+ * @return the configurationsBlobName value.
+ */
+ public String configurationsBlobName() {
+ return this.configurationsBlobName;
+ }
+
+ /**
+ * Set the configurationsBlobName property: The blob name to be used when importing configurations from the provided
+ * input blob container.
+ *
+ * @param configurationsBlobName the configurationsBlobName value to set.
+ * @return the ImportDevicesRequest object itself.
+ */
+ public ImportDevicesRequest withConfigurationsBlobName(String configurationsBlobName) {
+ this.configurationsBlobName = configurationsBlobName;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -166,5 +247,8 @@ public void validate() {
new IllegalArgumentException(
"Missing required property outputBlobContainerUri in model ImportDevicesRequest"));
}
+ if (identity() != null) {
+ identity().validate();
+ }
}
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java
index dc93fa7a8fff..51917bccba12 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java
@@ -70,6 +70,13 @@ public interface IotHubDescription {
*/
IotHubSkuInfo sku();
+ /**
+ * Gets the identity property: The managed identities for the IotHub.
+ *
+ * @return the identity value.
+ */
+ ArmIdentity identity();
+
/**
* Gets the region of the resource.
*
@@ -150,6 +157,7 @@ interface WithCreate
extends DefinitionStages.WithTags,
DefinitionStages.WithEtag,
DefinitionStages.WithProperties,
+ DefinitionStages.WithIdentity,
DefinitionStages.WithIfMatch {
/**
* Executes the create request.
@@ -198,6 +206,16 @@ interface WithProperties {
*/
WithCreate withProperties(IotHubProperties properties);
}
+ /** The stage of the IotHubDescription definition allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: The managed identities for the IotHub..
+ *
+ * @param identity The managed identities for the IotHub.
+ * @return the next definition stage.
+ */
+ WithCreate withIdentity(ArmIdentity identity);
+ }
/** The stage of the IotHubDescription definition allowing to specify ifMatch. */
interface WithIfMatch {
/**
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java
index 71916c2fd6ad..1a8baac9b4da 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java
@@ -37,6 +37,12 @@ public final class IotHubProperties {
@JsonProperty(value = "ipFilterRules")
private List ipFilterRules;
+ /*
+ * Network Rule Set Properties of IotHub
+ */
+ @JsonProperty(value = "networkRuleSets")
+ private NetworkRuleSetProperties networkRuleSets;
+
/*
* Specifies the minimum TLS version to support for this hub. Can be set to
* "1.2" to have clients that use a TLS version below 1.2 to be rejected.
@@ -194,6 +200,26 @@ public IotHubProperties withIpFilterRules(List ipFilterRules) {
return this;
}
+ /**
+ * Get the networkRuleSets property: Network Rule Set Properties of IotHub.
+ *
+ * @return the networkRuleSets value.
+ */
+ public NetworkRuleSetProperties networkRuleSets() {
+ return this.networkRuleSets;
+ }
+
+ /**
+ * Set the networkRuleSets property: Network Rule Set Properties of IotHub.
+ *
+ * @param networkRuleSets the networkRuleSets value to set.
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withNetworkRuleSets(NetworkRuleSetProperties networkRuleSets) {
+ this.networkRuleSets = networkRuleSets;
+ return this;
+ }
+
/**
* Get the minTlsVersion property: Specifies the minimum TLS version to support for this hub. Can be set to "1.2" to
* have clients that use a TLS version below 1.2 to be rejected.
@@ -457,6 +483,9 @@ public void validate() {
if (ipFilterRules() != null) {
ipFilterRules().forEach(e -> e.validate());
}
+ if (networkRuleSets() != null) {
+ networkRuleSets().validate();
+ }
if (privateEndpointConnections() != null) {
privateEndpointConnections().forEach(e -> e.validate());
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubResources.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubResources.java
index e0f59905c862..7508b995a125 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubResources.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubResources.java
@@ -230,39 +230,6 @@ EventHubConsumerGroupInfo getEventHubConsumerGroup(
Response getEventHubConsumerGroupWithResponse(
String resourceGroupName, String resourceName, String eventHubEndpointName, String name, Context context);
- /**
- * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.
- *
- * @param resourceGroupName The name of the resource group that contains the IoT hub.
- * @param resourceName The name of the IoT hub.
- * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
- * @param name The name of the consumer group to add.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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.
- */
- EventHubConsumerGroupInfo createEventHubConsumerGroup(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name);
-
- /**
- * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.
- *
- * @param resourceGroupName The name of the resource group that contains the IoT hub.
- * @param resourceName The name of the IoT hub.
- * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
- * @param name The name of the consumer group to add.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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.
- */
- Response createEventHubConsumerGroupWithResponse(
- String resourceGroupName, String resourceName, String eventHubEndpointName, String name, Context context);
-
/**
* Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
*
@@ -657,6 +624,31 @@ Response importDevicesWithResponse(
*/
Response getByIdWithResponse(String id, Context context);
+ /**
+ * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
+ *
+ * @param id the resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ EventHubConsumerGroupInfo getEventHubConsumerGroupById(String id);
+
+ /**
+ * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
+ *
+ * @param id the resource ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ Response getEventHubConsumerGroupByIdWithResponse(String id, Context context);
+
/**
* Delete an IoT hub.
*
@@ -682,6 +674,30 @@ Response importDevicesWithResponse(
*/
IotHubDescription deleteByIdWithResponse(String id, Context context);
+ /**
+ * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
+ *
+ * @param id the resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ void deleteEventHubConsumerGroupById(String id);
+
+ /**
+ * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
+ *
+ * @param id the resource ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ Response deleteEventHubConsumerGroupByIdWithResponse(String id, Context context);
+
/**
* Begins definition for a new IotHubDescription resource.
*
@@ -689,4 +705,12 @@ Response importDevicesWithResponse(
* @return the first stage of the new IotHubDescription definition.
*/
IotHubDescription.DefinitionStages.Blank define(String name);
+
+ /**
+ * Begins definition for a new EventHubConsumerGroupInfo resource.
+ *
+ * @param name resource name.
+ * @return the first stage of the new EventHubConsumerGroupInfo definition.
+ */
+ EventHubConsumerGroupInfo.DefinitionStages.Blank defineEventHubConsumerGroup(String name);
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ManagedIdentity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ManagedIdentity.java
new file mode 100644
index 000000000000..1ccf0db4f1f9
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ManagedIdentity.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of the Managed identity. */
+@Fluent
+public class ManagedIdentity {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentity.class);
+
+ /*
+ * The user assigned identity.
+ */
+ @JsonProperty(value = "userAssignedIdentity")
+ private String userAssignedIdentity;
+
+ /**
+ * Get the userAssignedIdentity property: The user assigned identity.
+ *
+ * @return the userAssignedIdentity value.
+ */
+ public String userAssignedIdentity() {
+ return this.userAssignedIdentity;
+ }
+
+ /**
+ * Set the userAssignedIdentity property: The user assigned identity.
+ *
+ * @param userAssignedIdentity the userAssignedIdentity value to set.
+ * @return the ManagedIdentity object itself.
+ */
+ public ManagedIdentity withUserAssignedIdentity(String userAssignedIdentity) {
+ this.userAssignedIdentity = userAssignedIdentity;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleIpAction.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleIpAction.java
new file mode 100644
index 000000000000..1f4cf94b56ba
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleIpAction.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for NetworkRuleIpAction. */
+public final class NetworkRuleIpAction extends ExpandableStringEnum {
+ /** Static value Allow for NetworkRuleIpAction. */
+ public static final NetworkRuleIpAction ALLOW = fromString("Allow");
+
+ /**
+ * Creates or finds a NetworkRuleIpAction from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding NetworkRuleIpAction.
+ */
+ @JsonCreator
+ public static NetworkRuleIpAction fromString(String name) {
+ return fromString(name, NetworkRuleIpAction.class);
+ }
+
+ /** @return known NetworkRuleIpAction values. */
+ public static Collection values() {
+ return values(NetworkRuleIpAction.class);
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetIpRule.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetIpRule.java
new file mode 100644
index 000000000000..420a12f6ab9f
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetIpRule.java
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** IP Rule to be applied as part of Network Rule Set. */
+@Fluent
+public final class NetworkRuleSetIpRule {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkRuleSetIpRule.class);
+
+ /*
+ * Name of the IP filter rule.
+ */
+ @JsonProperty(value = "filterName", required = true)
+ private String filterName;
+
+ /*
+ * IP Filter Action
+ */
+ @JsonProperty(value = "action")
+ private NetworkRuleIpAction action;
+
+ /*
+ * A string that contains the IP address range in CIDR notation for the
+ * rule.
+ */
+ @JsonProperty(value = "ipMask", required = true)
+ private String ipMask;
+
+ /**
+ * Get the filterName property: Name of the IP filter rule.
+ *
+ * @return the filterName value.
+ */
+ public String filterName() {
+ return this.filterName;
+ }
+
+ /**
+ * Set the filterName property: Name of the IP filter rule.
+ *
+ * @param filterName the filterName value to set.
+ * @return the NetworkRuleSetIpRule object itself.
+ */
+ public NetworkRuleSetIpRule withFilterName(String filterName) {
+ this.filterName = filterName;
+ return this;
+ }
+
+ /**
+ * Get the action property: IP Filter Action.
+ *
+ * @return the action value.
+ */
+ public NetworkRuleIpAction action() {
+ return this.action;
+ }
+
+ /**
+ * Set the action property: IP Filter Action.
+ *
+ * @param action the action value to set.
+ * @return the NetworkRuleSetIpRule object itself.
+ */
+ public NetworkRuleSetIpRule withAction(NetworkRuleIpAction action) {
+ this.action = action;
+ return this;
+ }
+
+ /**
+ * Get the ipMask property: A string that contains the IP address range in CIDR notation for the rule.
+ *
+ * @return the ipMask value.
+ */
+ public String ipMask() {
+ return this.ipMask;
+ }
+
+ /**
+ * Set the ipMask property: A string that contains the IP address range in CIDR notation for the rule.
+ *
+ * @param ipMask the ipMask value to set.
+ * @return the NetworkRuleSetIpRule object itself.
+ */
+ public NetworkRuleSetIpRule withIpMask(String ipMask) {
+ this.ipMask = ipMask;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (filterName() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property filterName in model NetworkRuleSetIpRule"));
+ }
+ if (ipMask() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property ipMask in model NetworkRuleSetIpRule"));
+ }
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetProperties.java
new file mode 100644
index 000000000000..7121e4d7c4d0
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetProperties.java
@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Network Rule Set Properties of IotHub. */
+@Fluent
+public final class NetworkRuleSetProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkRuleSetProperties.class);
+
+ /*
+ * Default Action for Network Rule Set
+ */
+ @JsonProperty(value = "defaultAction")
+ private DefaultAction defaultAction;
+
+ /*
+ * If True, then Network Rule Set is also applied to BuiltIn EventHub
+ * EndPoint of IotHub
+ */
+ @JsonProperty(value = "applyToBuiltInEventHubEndpoint", required = true)
+ private boolean applyToBuiltInEventHubEndpoint;
+
+ /*
+ * List of IP Rules
+ */
+ @JsonProperty(value = "ipRules", required = true)
+ private List ipRules;
+
+ /**
+ * Get the defaultAction property: Default Action for Network Rule Set.
+ *
+ * @return the defaultAction value.
+ */
+ public DefaultAction defaultAction() {
+ return this.defaultAction;
+ }
+
+ /**
+ * Set the defaultAction property: Default Action for Network Rule Set.
+ *
+ * @param defaultAction the defaultAction value to set.
+ * @return the NetworkRuleSetProperties object itself.
+ */
+ public NetworkRuleSetProperties withDefaultAction(DefaultAction defaultAction) {
+ this.defaultAction = defaultAction;
+ return this;
+ }
+
+ /**
+ * Get the applyToBuiltInEventHubEndpoint property: If True, then Network Rule Set is also applied to BuiltIn
+ * EventHub EndPoint of IotHub.
+ *
+ * @return the applyToBuiltInEventHubEndpoint value.
+ */
+ public boolean applyToBuiltInEventHubEndpoint() {
+ return this.applyToBuiltInEventHubEndpoint;
+ }
+
+ /**
+ * Set the applyToBuiltInEventHubEndpoint property: If True, then Network Rule Set is also applied to BuiltIn
+ * EventHub EndPoint of IotHub.
+ *
+ * @param applyToBuiltInEventHubEndpoint the applyToBuiltInEventHubEndpoint value to set.
+ * @return the NetworkRuleSetProperties object itself.
+ */
+ public NetworkRuleSetProperties withApplyToBuiltInEventHubEndpoint(boolean applyToBuiltInEventHubEndpoint) {
+ this.applyToBuiltInEventHubEndpoint = applyToBuiltInEventHubEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the ipRules property: List of IP Rules.
+ *
+ * @return the ipRules value.
+ */
+ public List ipRules() {
+ return this.ipRules;
+ }
+
+ /**
+ * Set the ipRules property: List of IP Rules.
+ *
+ * @param ipRules the ipRules value to set.
+ * @return the NetworkRuleSetProperties object itself.
+ */
+ public NetworkRuleSetProperties withIpRules(List ipRules) {
+ this.ipRules = ipRules;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (ipRules() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property ipRules in model NetworkRuleSetProperties"));
+ } else {
+ ipRules().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ResourceIdentityType.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ResourceIdentityType.java
new file mode 100644
index 000000000000..c7beca944286
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ResourceIdentityType.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.models;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/** Defines values for ResourceIdentityType. */
+public enum ResourceIdentityType {
+ /** Enum value SystemAssigned. */
+ SYSTEM_ASSIGNED("SystemAssigned"),
+
+ /** Enum value UserAssigned. */
+ USER_ASSIGNED("UserAssigned"),
+
+ /** Enum value SystemAssigned, UserAssigned. */
+ SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"),
+
+ /** Enum value None. */
+ NONE("None");
+
+ /** The actual serialized value for a ResourceIdentityType instance. */
+ private final String value;
+
+ ResourceIdentityType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ResourceIdentityType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ResourceIdentityType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ResourceIdentityType fromString(String value) {
+ ResourceIdentityType[] items = ResourceIdentityType.values();
+ for (ResourceIdentityType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEventHubProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEventHubProperties.java
index 857d7ac7bf29..235e904a445c 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEventHubProperties.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEventHubProperties.java
@@ -44,6 +44,12 @@ public final class RoutingEventHubProperties {
@JsonProperty(value = "authenticationType")
private AuthenticationType authenticationType;
+ /*
+ * Managed identity properties of routing event hub endpoint.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedIdentity identity;
+
/*
* The name that identifies this endpoint. The name can only include
* alphanumeric characters, periods, underscores, hyphens and has a maximum
@@ -166,6 +172,26 @@ public RoutingEventHubProperties withAuthenticationType(AuthenticationType authe
return this;
}
+ /**
+ * Get the identity property: Managed identity properties of routing event hub endpoint.
+ *
+ * @return the identity value.
+ */
+ public ManagedIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed identity properties of routing event hub endpoint.
+ *
+ * @param identity the identity value to set.
+ * @return the RoutingEventHubProperties object itself.
+ */
+ public RoutingEventHubProperties withIdentity(ManagedIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Get the name property: The name that identifies this endpoint. The name can only include alphanumeric characters,
* periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved:
@@ -236,6 +262,9 @@ public RoutingEventHubProperties withResourceGroup(String resourceGroup) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
if (name() == null) {
throw logger
.logExceptionAsError(
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusQueueEndpointProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusQueueEndpointProperties.java
index 0e53f5ec5b88..3736dc3a2a26 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusQueueEndpointProperties.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusQueueEndpointProperties.java
@@ -45,6 +45,12 @@ public final class RoutingServiceBusQueueEndpointProperties {
@JsonProperty(value = "authenticationType")
private AuthenticationType authenticationType;
+ /*
+ * Managed identity properties of routing service bus queue endpoint.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedIdentity identity;
+
/*
* The name that identifies this endpoint. The name can only include
* alphanumeric characters, periods, underscores, hyphens and has a maximum
@@ -167,6 +173,26 @@ public RoutingServiceBusQueueEndpointProperties withAuthenticationType(Authentic
return this;
}
+ /**
+ * Get the identity property: Managed identity properties of routing service bus queue endpoint.
+ *
+ * @return the identity value.
+ */
+ public ManagedIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed identity properties of routing service bus queue endpoint.
+ *
+ * @param identity the identity value to set.
+ * @return the RoutingServiceBusQueueEndpointProperties object itself.
+ */
+ public RoutingServiceBusQueueEndpointProperties withIdentity(ManagedIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Get the name property: The name that identifies this endpoint. The name can only include alphanumeric characters,
* periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved:
@@ -239,6 +265,9 @@ public RoutingServiceBusQueueEndpointProperties withResourceGroup(String resourc
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
if (name() == null) {
throw logger
.logExceptionAsError(
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusTopicEndpointProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusTopicEndpointProperties.java
index c3585aedea7d..190b697a5b82 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusTopicEndpointProperties.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusTopicEndpointProperties.java
@@ -45,6 +45,12 @@ public final class RoutingServiceBusTopicEndpointProperties {
@JsonProperty(value = "authenticationType")
private AuthenticationType authenticationType;
+ /*
+ * Managed identity properties of routing service bus topic endpoint.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedIdentity identity;
+
/*
* The name that identifies this endpoint. The name can only include
* alphanumeric characters, periods, underscores, hyphens and has a maximum
@@ -167,6 +173,26 @@ public RoutingServiceBusTopicEndpointProperties withAuthenticationType(Authentic
return this;
}
+ /**
+ * Get the identity property: Managed identity properties of routing service bus topic endpoint.
+ *
+ * @return the identity value.
+ */
+ public ManagedIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed identity properties of routing service bus topic endpoint.
+ *
+ * @param identity the identity value to set.
+ * @return the RoutingServiceBusTopicEndpointProperties object itself.
+ */
+ public RoutingServiceBusTopicEndpointProperties withIdentity(ManagedIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Get the name property: The name that identifies this endpoint. The name can only include alphanumeric characters,
* periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved:
@@ -239,6 +265,9 @@ public RoutingServiceBusTopicEndpointProperties withResourceGroup(String resourc
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
if (name() == null) {
throw logger
.logExceptionAsError(
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java
index 092fb58842a2..666b10fecd93 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java
@@ -25,6 +25,9 @@ public final class RoutingSource extends ExpandableStringEnum {
/** Static value DeviceJobLifecycleEvents for RoutingSource. */
public static final RoutingSource DEVICE_JOB_LIFECYCLE_EVENTS = fromString("DeviceJobLifecycleEvents");
+ /** Static value DeviceConnectionStateEvents for RoutingSource. */
+ public static final RoutingSource DEVICE_CONNECTION_STATE_EVENTS = fromString("DeviceConnectionStateEvents");
+
/**
* Creates or finds a RoutingSource from its string representation.
*
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerProperties.java
index fe75186ae836..1221f96c48dd 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerProperties.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerProperties.java
@@ -38,6 +38,12 @@ public final class RoutingStorageContainerProperties {
@JsonProperty(value = "authenticationType")
private AuthenticationType authenticationType;
+ /*
+ * Managed identity properties of routing storage endpoint.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedIdentity identity;
+
/*
* The name that identifies this endpoint. The name can only include
* alphanumeric characters, periods, underscores, hyphens and has a maximum
@@ -176,6 +182,26 @@ public RoutingStorageContainerProperties withAuthenticationType(AuthenticationTy
return this;
}
+ /**
+ * Get the identity property: Managed identity properties of routing storage endpoint.
+ *
+ * @return the identity value.
+ */
+ public ManagedIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed identity properties of routing storage endpoint.
+ *
+ * @param identity the identity value to set.
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withIdentity(ManagedIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Get the name property: The name that identifies this endpoint. The name can only include alphanumeric characters,
* periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved:
@@ -354,6 +380,9 @@ public RoutingStorageContainerProperties withEncoding(RoutingStorageContainerPro
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
if (name() == null) {
throw logger
.logExceptionAsError(
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/StorageEndpointProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/StorageEndpointProperties.java
index 56b8560b35c5..bc0000316554 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/StorageEndpointProperties.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/StorageEndpointProperties.java
@@ -45,6 +45,12 @@ public final class StorageEndpointProperties {
@JsonProperty(value = "authenticationType")
private AuthenticationType authenticationType;
+ /*
+ * Managed identity properties of storage endpoint for file upload.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedIdentity identity;
+
/**
* Get the sasTtlAsIso8601 property: The period of time for which the SAS URI generated by IoT Hub for file upload
* is valid. See:
@@ -135,6 +141,26 @@ public StorageEndpointProperties withAuthenticationType(AuthenticationType authe
return this;
}
+ /**
+ * Get the identity property: Managed identity properties of storage endpoint for file upload.
+ *
+ * @return the identity value.
+ */
+ public ManagedIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed identity properties of storage endpoint for file upload.
+ *
+ * @param identity the identity value to set.
+ * @return the StorageEndpointProperties object itself.
+ */
+ public StorageEndpointProperties withIdentity(ManagedIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -153,5 +179,8 @@ public void validate() {
new IllegalArgumentException(
"Missing required property containerName in model StorageEndpointProperties"));
}
+ if (identity() != null) {
+ identity().validate();
+ }
}
}