diff --git a/sdk/iothub/arm-iothub/src/iotHubClientContext.ts b/sdk/iothub/arm-iothub/src/iotHubClientContext.ts index 5a89d346ac3a..605bd1a14509 100644 --- a/sdk/iothub/arm-iothub/src/iotHubClientContext.ts +++ b/sdk/iothub/arm-iothub/src/iotHubClientContext.ts @@ -44,7 +44,7 @@ export class IotHubClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2020-04-01'; + this.apiVersion = '2020-06-15'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts b/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts index 419a02c62409..e6d7ca990213 100644 --- a/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts +++ b/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts @@ -8,7 +8,6 @@ export { BaseResource, - CertificateBodyDescription, CertificateDescription, CertificateListDescription, CertificateProperties, diff --git a/sdk/iothub/arm-iothub/src/models/index.ts b/sdk/iothub/arm-iothub/src/models/index.ts index bcfc0d8ce730..fd70b41deb45 100644 --- a/sdk/iothub/arm-iothub/src/models/index.ts +++ b/sdk/iothub/arm-iothub/src/models/index.ts @@ -1224,6 +1224,23 @@ export interface EventHubConsumerGroupInfo extends BaseResource { readonly etag?: string; } +/** + * The EventHub consumer group name. + */ +export interface EventHubConsumerGroupName { + /** + * EventHub consumer group name + */ + name?: string; +} + +/** + * The EventHub consumer group. + */ +export interface EventHubConsumerGroupBodyDescription { + properties?: EventHubConsumerGroupName; +} + /** * Input values. */ @@ -1561,6 +1578,13 @@ export interface IotHubResourceUpdateOptionalParams extends msRest.RequestOption tags?: { [propertyName: string]: string }; } +/** + * Optional Parameters. + */ +export interface IotHubResourceCreateEventHubConsumerGroupOptionalParams extends msRest.RequestOptionsBase { + properties?: EventHubConsumerGroupName; +} + /** * Optional Parameters. */ @@ -1591,10 +1615,7 @@ export interface CertificatesCreateOrUpdateOptionalParams extends msRest.Request * update an existing certificate. */ ifMatch?: string; - /** - * base-64 representation of the X509 leaf certificate .cer file or just .pem file content. - */ - certificate?: string; + properties?: CertificateProperties; } /** diff --git a/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts b/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts index e13ca5856587..92a9788ce55c 100644 --- a/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts +++ b/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts @@ -18,7 +18,9 @@ export { EndpointHealthDataListResult, EnrichmentProperties, ErrorDetails, + EventHubConsumerGroupBodyDescription, EventHubConsumerGroupInfo, + EventHubConsumerGroupName, EventHubConsumerGroupsListResult, EventHubProperties, ExportDevicesRequest, diff --git a/sdk/iothub/arm-iothub/src/models/mappers.ts b/sdk/iothub/arm-iothub/src/models/mappers.ts index fe32df06c670..18a8b8bbd4df 100644 --- a/sdk/iothub/arm-iothub/src/models/mappers.ts +++ b/sdk/iothub/arm-iothub/src/models/mappers.ts @@ -2034,6 +2034,39 @@ export const EventHubConsumerGroupInfo: msRest.CompositeMapper = { } }; +export const EventHubConsumerGroupName: msRest.CompositeMapper = { + serializedName: "EventHubConsumerGroupName", + type: { + name: "Composite", + className: "EventHubConsumerGroupName", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const EventHubConsumerGroupBodyDescription: msRest.CompositeMapper = { + serializedName: "EventHubConsumerGroupBodyDescription", + type: { + name: "Composite", + className: "EventHubConsumerGroupBodyDescription", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "EventHubConsumerGroupName" + } + } + } + } +}; + export const OperationInputs: msRest.CompositeMapper = { serializedName: "OperationInputs", type: { diff --git a/sdk/iothub/arm-iothub/src/operations/certificates.ts b/sdk/iothub/arm-iothub/src/operations/certificates.ts index c1d660fd08ef..6bce1e641031 100644 --- a/sdk/iothub/arm-iothub/src/operations/certificates.ts +++ b/sdk/iothub/arm-iothub/src/operations/certificates.ts @@ -330,13 +330,13 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { ], requestBody: { parameterPath: { - certificate: [ + properties: [ "options", - "certificate" + "properties" ] }, mapper: { - ...Mappers.CertificateBodyDescription, + ...Mappers.CertificateDescription, required: true } }, diff --git a/sdk/iothub/arm-iothub/src/operations/iotHubResource.ts b/sdk/iothub/arm-iothub/src/operations/iotHubResource.ts index 19266d2904fa..a92c88433fd8 100644 --- a/sdk/iothub/arm-iothub/src/operations/iotHubResource.ts +++ b/sdk/iothub/arm-iothub/src/operations/iotHubResource.ts @@ -309,35 +309,31 @@ export class IotHubResource { * @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 [options] The optional parameters * @returns Promise */ - createEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + createEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, options?: Models.IotHubResourceCreateEventHubConsumerGroupOptionalParams): Promise; /** * @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 callback The callback */ - createEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, name: string, callback: msRest.ServiceCallback): void; + createEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, callback: msRest.ServiceCallback): void; /** * @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 options The optional parameters * @param callback The callback */ - createEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, options: Models.IotHubResourceCreateEventHubConsumerGroupOptionalParams, callback: msRest.ServiceCallback): void; + createEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, options?: Models.IotHubResourceCreateEventHubConsumerGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, resourceName, eventHubEndpointName, - name, options }, createEventHubConsumerGroupOperationSpec, @@ -1268,8 +1264,7 @@ const createEventHubConsumerGroupOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.eventHubEndpointName, - Parameters.name + Parameters.eventHubEndpointName ], queryParameters: [ Parameters.apiVersion @@ -1277,6 +1272,18 @@ const createEventHubConsumerGroupOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: { + properties: [ + "options", + "properties" + ] + }, + mapper: { + ...Mappers.EventHubConsumerGroupBodyDescription, + required: true + } + }, responses: { 200: { bodyMapper: Mappers.EventHubConsumerGroupInfo