Share via


Iot Hub Resource - Create Event Hub Consumer Group

Voeg een consumentengroep toe aan een Event Hub-compatibel eindpunt in een IoT-hub.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}?api-version=2023-06-30

URI-parameters

Name In Vereist Type Description
eventHubEndpointName
path True

string

De naam van het Event Hub-compatibele eindpunt in de IoT-hub.

name
path True

string

De naam van de consumentengroep die u wilt toevoegen.

resourceGroupName
path True

string

De naam van de resourcegroep die de IoT-hub bevat.

resourceName
path True

string

De naam van de IoT-hub.

subscriptionId
path True

string

De abonnements-id.

api-version
query True

string

De versie van de API.

Aanvraagbody

Name Vereist Type Description
properties True

EventHubConsumerGroupName

De naam van de EventHub-consumentengroep.

Antwoorden

Name Type Description
200 OK

EventHubConsumerGroupInfo

Dit is een synchrone bewerking.

Other Status Codes

ErrorDetails

DefaultErrorResponse

Beveiliging

azure_auth

Azure Active Directory OAuth2-stroom

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

IotHubResource_CreateEventHubConsumerGroup

Sample Request

PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/eventHubEndpoints/events/ConsumerGroups/test?api-version=2023-06-30

{
  "properties": {
    "name": "test"
  }
}

Sample Response

{
  "properties": {
    "created": "Thu, 15 Jun 2017 19:20:58 GMT"
  },
  "id": "/subscriptions/cmd-sub-1/resourceGroups/cmd-rg-1/providers/Microsoft.Devices/IotHubs/test-hub-2/eventHubEndpoints/events/ConsumerGroups/%24Default",
  "name": "test",
  "type": "Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups",
  "etag": "AAAAAAFD6M4="
}

Definities

Name Description
ErrorDetails

Foutdetails.

EventHubConsumerGroupBodyDescription

De EventHub-consumentengroep.

EventHubConsumerGroupInfo

De eigenschappen van het object EventHubConsumerGroupInfo.

EventHubConsumerGroupName

De naam van de EventHub-consumentengroep.

ErrorDetails

Foutdetails.

Name Type Description
code

string

De foutcode.

details

string

De foutdetails.

httpStatusCode

string

De HTTP-statuscode.

message

string

Het foutbericht.

EventHubConsumerGroupBodyDescription

De EventHub-consumentengroep.

Name Type Description
properties

EventHubConsumerGroupName

De naam van de EventHub-consumentengroep.

EventHubConsumerGroupInfo

De eigenschappen van het object EventHubConsumerGroupInfo.

Name Type Description
etag

string

De etag.

id

string

De id van de Event Hub-compatibele consumentengroep.

name

string

De naam van de event hub-compatibele consumentengroep.

properties

De tags.

type

string

het resourcetype.

EventHubConsumerGroupName

De naam van de EventHub-consumentengroep.

Name Type Description
name

string

Naam van EventHub-consumentengroep