diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/api/Azure.ResourceManager.IotHub.netstandard2.0.cs b/sdk/iothub/Azure.ResourceManager.IotHub/api/Azure.ResourceManager.IotHub.netstandard2.0.cs index d933399ea090..e27712ec01d2 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/api/Azure.ResourceManager.IotHub.netstandard2.0.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/api/Azure.ResourceManager.IotHub.netstandard2.0.cs @@ -267,6 +267,7 @@ public static partial class ArmIotHubModelFactory public static Azure.ResourceManager.IotHub.Models.RouteCompilationError RouteCompilationError(string message = null, Azure.ResourceManager.IotHub.Models.RouteErrorSeverity? severity = default(Azure.ResourceManager.IotHub.Models.RouteErrorSeverity?), Azure.ResourceManager.IotHub.Models.RouteErrorRange location = null) { throw null; } public static Azure.ResourceManager.IotHub.Models.RouteErrorPosition RouteErrorPosition(int? line = default(int?), int? column = default(int?)) { throw null; } public static Azure.ResourceManager.IotHub.Models.RouteErrorRange RouteErrorRange(Azure.ResourceManager.IotHub.Models.RouteErrorPosition start = null, Azure.ResourceManager.IotHub.Models.RouteErrorPosition end = null) { throw null; } + public static Azure.ResourceManager.IotHub.Models.RoutingCosmosDBSqlApiProperties RoutingCosmosDBSqlApiProperties(string name = null, string id = null, string subscriptionId = null, string resourceGroup = null, System.Uri endpointUri = null, Azure.ResourceManager.IotHub.Models.IotHubAuthenticationType? authenticationType = default(Azure.ResourceManager.IotHub.Models.IotHubAuthenticationType?), Azure.Core.ResourceIdentifier userAssignedIdentity = null, string primaryKey = null, string secondaryKey = null, string databaseName = null, string containerName = null, string partitionKeyName = null, string partitionKeyTemplate = null) { throw null; } } public partial class CloudToDeviceFeedbackQueueProperties { @@ -924,9 +925,27 @@ internal RouteErrorRange() { } public static bool operator !=(Azure.ResourceManager.IotHub.Models.RouteErrorSeverity left, Azure.ResourceManager.IotHub.Models.RouteErrorSeverity right) { throw null; } public override string ToString() { throw null; } } + public partial class RoutingCosmosDBSqlApiProperties + { + public RoutingCosmosDBSqlApiProperties(string name, System.Uri endpointUri, string databaseName, string containerName) { } + public Azure.ResourceManager.IotHub.Models.IotHubAuthenticationType? AuthenticationType { get { throw null; } set { } } + public string ContainerName { get { throw null; } set { } } + public string DatabaseName { get { throw null; } set { } } + public System.Uri EndpointUri { get { throw null; } set { } } + public string Id { get { throw null; } } + public string Name { get { throw null; } set { } } + public string PartitionKeyName { get { throw null; } set { } } + public string PartitionKeyTemplate { get { throw null; } set { } } + public string PrimaryKey { get { throw null; } set { } } + public string ResourceGroup { get { throw null; } set { } } + public string SecondaryKey { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + } public partial class RoutingEndpoints { public RoutingEndpoints() { } + public System.Collections.Generic.IList CosmosDBSqlContainers { get { throw null; } } public System.Collections.Generic.IList EventHubs { get { throw null; } } public System.Collections.Generic.IList ServiceBusQueues { get { throw null; } } public System.Collections.Generic.IList ServiceBusTopics { get { throw null; } } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/ArmIotHubModelFactory.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/ArmIotHubModelFactory.cs index 082d1f34d868..22e820e50159 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/ArmIotHubModelFactory.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/ArmIotHubModelFactory.cs @@ -103,6 +103,26 @@ public static EventHubCompatibleEndpointProperties EventHubCompatibleEndpointPro return new EventHubCompatibleEndpointProperties(retentionTimeInDays, partitionCount, partitionIds?.ToList(), eventHubCompatibleName, endpoint); } + /// Initializes a new instance of RoutingCosmosDBSqlApiProperties. + /// 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: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. + /// Id of the cosmos DB sql container endpoint. + /// The subscription identifier of the cosmos DB account. + /// The name of the resource group of the cosmos DB account. + /// The url of the cosmos DB account. It must include the protocol https://. + /// Method used to authenticate against the cosmos DB sql container endpoint. + /// Managed identity properties of routing cosmos DB container endpoint. + /// The primary key of the cosmos DB account. + /// The secondary key of the cosmos DB account. + /// The name of the cosmos DB database in the cosmos DB account. + /// The name of the cosmos DB sql container in the cosmos DB database. + /// The name of the partition key associated with this cosmos DB sql container if one exists. This is an optional parameter. + /// The template for generating a synthetic partition key value for use with this cosmos DB sql container. The template must include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. This parameter is only required if PartitionKeyName is specified. + /// A new instance for mocking. + public static RoutingCosmosDBSqlApiProperties RoutingCosmosDBSqlApiProperties(string name = null, string id = null, string subscriptionId = null, string resourceGroup = null, Uri endpointUri = null, IotHubAuthenticationType? authenticationType = null, ResourceIdentifier userAssignedIdentity = null, string primaryKey = null, string secondaryKey = null, string databaseName = null, string containerName = null, string partitionKeyName = null, string partitionKeyTemplate = null) + { + return new RoutingCosmosDBSqlApiProperties(name, id, subscriptionId, resourceGroup, endpointUri, authenticationType, userAssignedIdentity != null ? new ManagedIdentity(userAssignedIdentity) : null, primaryKey, secondaryKey, databaseName, containerName, partitionKeyName, partitionKeyTemplate); + } + /// Initializes a new instance of IotHubLocationDescription. /// The name of the Azure region. /// The role of the region, can be either primary or secondary. The primary region is where the IoT hub is currently provisioned. The secondary region is the Azure disaster recovery (DR) paired region and also the region where the IoT hub can failover to. diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRoutingProperties.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRoutingProperties.cs index e1a4133c39ee..72fd15cf5e74 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRoutingProperties.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/IotHubRoutingProperties.cs @@ -23,7 +23,7 @@ public IotHubRoutingProperties() /// Initializes a new instance of IotHubRoutingProperties. /// The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs. /// The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs. - /// The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint. + /// The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not present in the template, the fallback route is disabled by default. /// The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid. internal IotHubRoutingProperties(RoutingEndpoints endpoints, IList routes, IotHubFallbackRouteProperties fallbackRoute, IList enrichments) { @@ -37,7 +37,7 @@ internal IotHubRoutingProperties(RoutingEndpoints endpoints, IList The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs. public IList Routes { get; } - /// The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint. + /// The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not present in the template, the fallback route is disabled by default. public IotHubFallbackRouteProperties FallbackRoute { get; set; } /// The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid. public IList Enrichments { get; } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingCosmosDBSqlApiProperties.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingCosmosDBSqlApiProperties.Serialization.cs new file mode 100644 index 000000000000..18ad5ea549f5 --- /dev/null +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingCosmosDBSqlApiProperties.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotHub.Models +{ + public partial class RoutingCosmosDBSqlApiProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (Optional.IsDefined(ResourceGroup)) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + writer.WritePropertyName("endpointUri"u8); + writer.WriteStringValue(EndpointUri.AbsoluteUri); + if (Optional.IsDefined(AuthenticationType)) + { + writer.WritePropertyName("authenticationType"u8); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity); + } + if (Optional.IsDefined(PrimaryKey)) + { + writer.WritePropertyName("primaryKey"u8); + writer.WriteStringValue(PrimaryKey); + } + if (Optional.IsDefined(SecondaryKey)) + { + writer.WritePropertyName("secondaryKey"u8); + writer.WriteStringValue(SecondaryKey); + } + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + writer.WritePropertyName("containerName"u8); + writer.WriteStringValue(ContainerName); + if (Optional.IsDefined(PartitionKeyName)) + { + writer.WritePropertyName("partitionKeyName"u8); + writer.WriteStringValue(PartitionKeyName); + } + if (Optional.IsDefined(PartitionKeyTemplate)) + { + writer.WritePropertyName("partitionKeyTemplate"u8); + writer.WriteStringValue(PartitionKeyTemplate); + } + writer.WriteEndObject(); + } + + internal static RoutingCosmosDBSqlApiProperties DeserializeRoutingCosmosDBSqlApiProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + Optional id = default; + Optional subscriptionId = default; + Optional resourceGroup = default; + Uri endpointUri = default; + Optional authenticationType = default; + Optional identity = default; + Optional primaryKey = default; + Optional secondaryKey = default; + string databaseName = default; + string containerName = default; + Optional partitionKeyName = default; + Optional partitionKeyTemplate = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroup"u8)) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointUri"u8)) + { + endpointUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("authenticationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new IotHubAuthenticationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ManagedIdentity.DeserializeManagedIdentity(property.Value); + continue; + } + if (property.NameEquals("primaryKey"u8)) + { + primaryKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryKey"u8)) + { + secondaryKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerName"u8)) + { + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("partitionKeyName"u8)) + { + partitionKeyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("partitionKeyTemplate"u8)) + { + partitionKeyTemplate = property.Value.GetString(); + continue; + } + } + return new RoutingCosmosDBSqlApiProperties(name, id.Value, subscriptionId.Value, resourceGroup.Value, endpointUri, Optional.ToNullable(authenticationType), identity.Value, primaryKey.Value, secondaryKey.Value, databaseName, containerName, partitionKeyName.Value, partitionKeyTemplate.Value); + } + } +} diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingCosmosDBSqlApiProperties.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingCosmosDBSqlApiProperties.cs new file mode 100644 index 000000000000..04f372032517 --- /dev/null +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingCosmosDBSqlApiProperties.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.IotHub.Models +{ + /// The properties related to a cosmos DB sql container endpoint. + public partial class RoutingCosmosDBSqlApiProperties + { + /// Initializes a new instance of RoutingCosmosDBSqlApiProperties. + /// 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: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. + /// The url of the cosmos DB account. It must include the protocol https://. + /// The name of the cosmos DB database in the cosmos DB account. + /// The name of the cosmos DB sql container in the cosmos DB database. + /// , , or is null. + public RoutingCosmosDBSqlApiProperties(string name, Uri endpointUri, string databaseName, string containerName) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(endpointUri, nameof(endpointUri)); + Argument.AssertNotNull(databaseName, nameof(databaseName)); + Argument.AssertNotNull(containerName, nameof(containerName)); + + Name = name; + EndpointUri = endpointUri; + DatabaseName = databaseName; + ContainerName = containerName; + } + + /// Initializes a new instance of RoutingCosmosDBSqlApiProperties. + /// 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: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. + /// Id of the cosmos DB sql container endpoint. + /// The subscription identifier of the cosmos DB account. + /// The name of the resource group of the cosmos DB account. + /// The url of the cosmos DB account. It must include the protocol https://. + /// Method used to authenticate against the cosmos DB sql container endpoint. + /// Managed identity properties of routing cosmos DB container endpoint. + /// The primary key of the cosmos DB account. + /// The secondary key of the cosmos DB account. + /// The name of the cosmos DB database in the cosmos DB account. + /// The name of the cosmos DB sql container in the cosmos DB database. + /// The name of the partition key associated with this cosmos DB sql container if one exists. This is an optional parameter. + /// The template for generating a synthetic partition key value for use with this cosmos DB sql container. The template must include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. This parameter is only required if PartitionKeyName is specified. + internal RoutingCosmosDBSqlApiProperties(string name, string id, string subscriptionId, string resourceGroup, Uri endpointUri, IotHubAuthenticationType? authenticationType, ManagedIdentity identity, string primaryKey, string secondaryKey, string databaseName, string containerName, string partitionKeyName, string partitionKeyTemplate) + { + Name = name; + Id = id; + SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; + EndpointUri = endpointUri; + AuthenticationType = authenticationType; + Identity = identity; + PrimaryKey = primaryKey; + SecondaryKey = secondaryKey; + DatabaseName = databaseName; + ContainerName = containerName; + PartitionKeyName = partitionKeyName; + PartitionKeyTemplate = partitionKeyTemplate; + } + + /// 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: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. + public string Name { get; set; } + /// Id of the cosmos DB sql container endpoint. + public string Id { get; } + /// The subscription identifier of the cosmos DB account. + public string SubscriptionId { get; set; } + /// The name of the resource group of the cosmos DB account. + public string ResourceGroup { get; set; } + /// The url of the cosmos DB account. It must include the protocol https://. + public Uri EndpointUri { get; set; } + /// Method used to authenticate against the cosmos DB sql container endpoint. + public IotHubAuthenticationType? AuthenticationType { get; set; } + /// Managed identity properties of routing cosmos DB container endpoint. + internal ManagedIdentity Identity { get; set; } + /// The user assigned identity. + public ResourceIdentifier UserAssignedIdentity + { + get => Identity is null ? default : Identity.UserAssignedIdentity; + set + { + if (Identity is null) + Identity = new ManagedIdentity(); + Identity.UserAssignedIdentity = value; + } + } + + /// The primary key of the cosmos DB account. + public string PrimaryKey { get; set; } + /// The secondary key of the cosmos DB account. + public string SecondaryKey { get; set; } + /// The name of the cosmos DB database in the cosmos DB account. + public string DatabaseName { get; set; } + /// The name of the cosmos DB sql container in the cosmos DB database. + public string ContainerName { get; set; } + /// The name of the partition key associated with this cosmos DB sql container if one exists. This is an optional parameter. + public string PartitionKeyName { get; set; } + /// The template for generating a synthetic partition key value for use with this cosmos DB sql container. The template must include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. This parameter is only required if PartitionKeyName is specified. + public string PartitionKeyTemplate { get; set; } + } +} diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.Serialization.cs index 0999754f3aa5..e70abe33977a 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.Serialization.cs @@ -56,6 +56,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(CosmosDBSqlContainers)) + { + writer.WritePropertyName("cosmosDBSqlContainers"u8); + writer.WriteStartArray(); + foreach (var item in CosmosDBSqlContainers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); } @@ -69,6 +79,7 @@ internal static RoutingEndpoints DeserializeRoutingEndpoints(JsonElement element Optional> serviceBusTopics = default; Optional> eventHubs = default; Optional> storageContainers = default; + Optional> cosmosDBSqlContainers = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("serviceBusQueues"u8)) @@ -127,8 +138,22 @@ internal static RoutingEndpoints DeserializeRoutingEndpoints(JsonElement element storageContainers = array; continue; } + if (property.NameEquals("cosmosDBSqlContainers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RoutingCosmosDBSqlApiProperties.DeserializeRoutingCosmosDBSqlApiProperties(item)); + } + cosmosDBSqlContainers = array; + continue; + } } - return new RoutingEndpoints(Optional.ToList(serviceBusQueues), Optional.ToList(serviceBusTopics), Optional.ToList(eventHubs), Optional.ToList(storageContainers)); + return new RoutingEndpoints(Optional.ToList(serviceBusQueues), Optional.ToList(serviceBusTopics), Optional.ToList(eventHubs), Optional.ToList(storageContainers), Optional.ToList(cosmosDBSqlContainers)); } } } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.cs index a50316d3396a..2a3f168d1f17 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/Models/RoutingEndpoints.cs @@ -20,6 +20,7 @@ public RoutingEndpoints() ServiceBusTopics = new ChangeTrackingList(); EventHubs = new ChangeTrackingList(); StorageContainers = new ChangeTrackingList(); + CosmosDBSqlContainers = new ChangeTrackingList(); } /// Initializes a new instance of RoutingEndpoints. @@ -27,12 +28,14 @@ public RoutingEndpoints() /// The list of Service Bus topic endpoints that the IoT hub routes the messages to, based on the routing rules. /// The list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. This list does not include the built-in Event Hubs endpoint. /// The list of storage container endpoints that IoT hub routes messages to, based on the routing rules. - internal RoutingEndpoints(IList serviceBusQueues, IList serviceBusTopics, IList eventHubs, IList storageContainers) + /// The list of Cosmos DB container endpoints that IoT hub routes messages to, based on the routing rules. + internal RoutingEndpoints(IList serviceBusQueues, IList serviceBusTopics, IList eventHubs, IList storageContainers, IList cosmosDBSqlContainers) { ServiceBusQueues = serviceBusQueues; ServiceBusTopics = serviceBusTopics; EventHubs = eventHubs; StorageContainers = storageContainers; + CosmosDBSqlContainers = cosmosDBSqlContainers; } /// The list of Service Bus queue endpoints that IoT hub routes the messages to, based on the routing rules. @@ -43,5 +46,7 @@ internal RoutingEndpoints(IList servic public IList EventHubs { get; } /// The list of storage container endpoints that IoT hub routes messages to, based on the routing rules. public IList StorageContainers { get; } + /// The list of Cosmos DB container endpoints that IoT hub routes messages to, based on the routing rules. + public IList CosmosDBSqlContainers { get; } } } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/CertificatesRestOperations.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/CertificatesRestOperations.cs index 2cdd23d88bb5..60f96efe5b1e 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/CertificatesRestOperations.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/CertificatesRestOperations.cs @@ -33,7 +33,7 @@ public CertificatesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-07-02"; + _apiVersion = apiVersion ?? "2023-06-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/IotHubResourceRestOperations.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/IotHubResourceRestOperations.cs index d35ca6ecb77c..1046d5af76dd 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/IotHubResourceRestOperations.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/IotHubResourceRestOperations.cs @@ -33,7 +33,7 @@ public IotHubResourceRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-07-02"; + _apiVersion = apiVersion ?? "2023-06-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/IotHubRestOperations.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/IotHubRestOperations.cs index 65921e4e7563..c3b70b2dcbf1 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/IotHubRestOperations.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/IotHubRestOperations.cs @@ -32,7 +32,7 @@ public IotHubRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-07-02"; + _apiVersion = apiVersion ?? "2023-06-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 05c3ce016c11..31fb952d16a7 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -33,7 +33,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-07-02"; + _apiVersion = apiVersion ?? "2023-06-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 099e36c1cceb..9cbe4807540f 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -33,7 +33,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-07-02"; + _apiVersion = apiVersion ?? "2023-06-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/ResourceProviderCommonRestOperations.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/ResourceProviderCommonRestOperations.cs index 3db444a1868d..609177ae88c2 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/ResourceProviderCommonRestOperations.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/RestOperations/ResourceProviderCommonRestOperations.cs @@ -33,7 +33,7 @@ public ResourceProviderCommonRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-07-02"; + _apiVersion = apiVersion ?? "2023-06-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/autorest.md b/sdk/iothub/Azure.ResourceManager.IotHub/src/autorest.md index 7700ba285ed8..8c92fd5179a7 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/autorest.md +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: IotHub namespace: Azure.ResourceManager.IotHub -require: https://github.com/Azure/azure-rest-api-specs/blob/0f9df940977c680c39938c8b8bd5baf893737ed0/specification/iothub/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/iothub/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true