Event Hubs - Create Or Update

네임스페이스 내에서 새 이벤트 허브를 중첩된 리소스로 만들거나 업데이트합니다.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}?api-version=2024-01-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
eventHubName
path True

string

이벤트 허브 이름

namespaceName
path True

string

네임스페이스 이름

Regex pattern: ^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$

resourceGroupName
path True

string

Azure 구독 내의 리소스 그룹의 이름입니다.

subscriptionId
path True

string

Microsoft Azure 구독을 고유하게 식별하는 구독 자격 증명입니다. 구독 ID는 모든 서비스 호출에 대한 URI의 파트를 형성합니다.

api-version
query True

string

클라이언트 API 버전.

요청 본문

Name 형식 Description
properties.captureDescription

CaptureDescription

캡처 설명의 속성

properties.messageRetentionInDays

integer

이 이벤트 허브에 대한 이벤트를 보존할 일 수이며 값은 1~7일이어야 합니다.

properties.partitionCount

integer

이벤트 허브에 대해 만들어진 파티션의 수, 허용되는 값은 1~32개 파티션입니다.

properties.retentionDescription

RetentionDescription

이벤트 허브 보존 설정

properties.status

EntityStatus

이벤트 허브의 상태 가능한 값을 열거합니다.

properties.userMetadata

string

사용자의 메타데이터를 가져오고 설정합니다.

응답

Name 형식 Description
200 OK

Eventhub

Event Hub가 성공적으로 생성되었습니다.

Other Status Codes

ErrorResponse

작업이 실패한 이유를 설명하는 Eventhub 오류 응답입니다.

보안

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

Name Description
user_impersonation 사용자 계정 가장

예제

EventHubCreate

Sample Request

PUT https://management.azure.com/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.EventHub/namespaces/sdk-Namespace-5357/eventhubs/sdk-EventHub-6547?api-version=2024-01-01

{
  "properties": {
    "messageRetentionInDays": 4,
    "partitionCount": 4,
    "status": "Active",
    "userMetadata": "key",
    "captureDescription": {
      "enabled": true,
      "encoding": "Avro",
      "destination": {
        "name": "EventHubArchive.AzureBlockBlob",
        "properties": {
          "storageAccountResourceId": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage",
          "blobContainer": "container",
          "archiveNameFormat": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
        },
        "identity": {
          "type": "UserAssigned",
          "userAssignedIdentity": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2"
        }
      },
      "intervalInSeconds": 120,
      "sizeLimitInBytes": 10485763
    },
    "retentionDescription": {
      "cleanupPolicy": "Compact",
      "retentionTimeInHours": 96,
      "tombstoneRetentionTimeInHours": 1
    }
  }
}

Sample Response

{
  "id": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.EventHub/namespaces/sdk-Namespace-716/eventhubs/sdk-EventHub-10",
  "name": "sdk-EventHub-10",
  "type": "Microsoft.EventHub/Namespaces/EventHubs",
  "properties": {
    "messageRetentionInDays": 4,
    "partitionCount": 4,
    "status": "Active",
    "userMetadata": "key",
    "createdAt": "2017-06-28T02:45:55.877Z",
    "updatedAt": "2017-06-28T02:46:05.877Z",
    "partitionIds": [
      "0",
      "1",
      "2",
      "3"
    ],
    "captureDescription": {
      "enabled": true,
      "encoding": "Avro",
      "destination": {
        "name": "EventHubArchive.AzureBlockBlob",
        "properties": {
          "storageAccountResourceId": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage",
          "blobContainer": "container",
          "archiveNameFormat": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
        },
        "identity": {
          "type": "UserAssigned",
          "userAssignedIdentity": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2"
        }
      },
      "intervalInSeconds": 120,
      "sizeLimitInBytes": 10485763
    },
    "retentionDescription": {
      "cleanupPolicy": "Compact",
      "retentionTimeInHours": 96,
      "tombstoneRetentionTimeInHours": 1
    }
  }
}

정의

Name Description
CaptureDescription

eventhub에 대한 캡처 설명을 구성하는 속성

CaptureIdentity

캡처 설명을 사용할 수 있는지 여부를 나타내는 값입니다.

CaptureIdentityType

Azure Active Directory 관리 ID 유형입니다.

CleanupPolicyRetentionDescription

정리 정책에 사용할 수 있는 값을 열거합니다.

createdByType

리소스를 만든 ID의 형식입니다.

Destination

캡처 설명을 위한 스토리지 세부 정보 캡처

EncodingCaptureDescription

캡처 설명의 인코딩 형식에 사용할 수 있는 값을 열거합니다. 참고: 'AvroDeflate'는 새 API 버전에서 더 이상 사용되지 않습니다.

EntityStatus

이벤트 허브의 상태 가능한 값을 열거합니다.

ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

ErrorDetail

오류 세부 정보입니다.

ErrorResponse

오류 응답은 Event Hub 서비스가 들어오는 요청을 처리할 수 없음을 나타냅니다. 그 이유는 오류 메시지에 제공됩니다.

Eventhub

이벤트 허브 나열 또는 가져오기 작업의 단일 항목

RetentionDescription

eventhub에 대한 보존 설정을 구성하는 속성

systemData

리소스 만들기 및 마지막 수정과 관련된 메타데이터입니다.

CaptureDescription

eventhub에 대한 캡처 설명을 구성하는 속성

Name 형식 Description
destination

Destination

캡처가 저장될 대상의 속성입니다. (스토리지 계정, Blob 이름)

enabled

boolean

캡처 설명을 사용할 수 있는지 여부를 나타내는 값입니다.

encoding

EncodingCaptureDescription

캡처 설명의 인코딩 형식에 사용할 수 있는 값을 열거합니다. 참고: 'AvroDeflate'는 새 API 버전에서 더 이상 사용되지 않습니다.

intervalInSeconds

integer

시간 창을 사용하면 캡처가 Azure Blob으로 발생하는 빈도를 설정할 수 있습니다. 값은 60~900초 사이여야 합니다.

sizeLimitInBytes

integer

크기 창은 캡처 작업 전에 Event Hub에 빌드된 데이터의 양을 정의합니다. 값은 10485760~524288000 바이트 사이여야 합니다.

skipEmptyArchives

boolean

빈 보관을 건너뛸지 여부를 나타내는 값입니다.

CaptureIdentity

캡처 설명을 사용할 수 있는지 여부를 나타내는 값입니다.

Name 형식 Description
type

CaptureIdentityType

Azure Active Directory 관리 ID 유형입니다.

userAssignedIdentity

string

관리되는 사용자 ID의 ARM ID입니다. 이 속성은 UserAssignedIdentity 형식이 필요합니다. Type이 SystemAssigned이면 네임스페이스와 연결된 시스템 할당 ID가 사용됩니다.

CaptureIdentityType

Azure Active Directory 관리 ID 유형입니다.

Name 형식 Description
SystemAssigned

string

UserAssigned

string

CleanupPolicyRetentionDescription

정리 정책에 사용할 수 있는 값을 열거합니다.

Name 형식 Description
Compact

string

Delete

string

createdByType

리소스를 만든 ID의 형식입니다.

Name 형식 Description
Application

string

Key

string

ManagedIdentity

string

User

string

Destination

캡처 설명을 위한 스토리지 세부 정보 캡처

Name 형식 Description
identity

CaptureIdentity

캡처 설명을 사용할 수 있는지 여부를 나타내는 값입니다.

name

string

캡처 대상의 이름

properties.archiveNameFormat

string

보관을 위한 Blob 명명 규칙(예: {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}). 여기서 모든 매개 변수(네임스페이스, EventHub 등)는 순서에 관계없이 필수입니다.

properties.blobContainer

string

Blob 컨테이너 이름

properties.dataLakeAccountName

string

캡처된 이벤트의 Azure Data Lake Store 이름

properties.dataLakeFolderPath

string

캡처된 이벤트의 대상 폴더 경로

properties.dataLakeSubscriptionId

string

Azure Data Lake Store의 구독 ID

properties.storageAccountResourceId

string

Blob을 만드는 데 사용할 스토리지 계정의 리소스 ID

EncodingCaptureDescription

캡처 설명의 인코딩 형식에 사용할 수 있는 값을 열거합니다. 참고: 'AvroDeflate'는 새 API 버전에서 더 이상 사용되지 않습니다.

Name 형식 Description
Avro

string

AvroDeflate

string

EntityStatus

이벤트 허브의 상태 가능한 값을 열거합니다.

Name 형식 Description
Active

string

Creating

string

Deleting

string

Disabled

string

ReceiveDisabled

string

Renaming

string

Restoring

string

SendDisabled

string

Unknown

string

ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

Name 형식 Description
info

object

추가 정보입니다.

type

string

추가 정보 유형입니다.

ErrorDetail

오류 세부 정보입니다.

Name 형식 Description
additionalInfo

ErrorAdditionalInfo[]

오류 추가 정보입니다.

code

string

오류 코드입니다.

details

ErrorDetail[]

오류 세부 정보입니다.

message

string

오류 메시지입니다.

target

string

오류 대상입니다.

ErrorResponse

오류 응답은 Event Hub 서비스가 들어오는 요청을 처리할 수 없음을 나타냅니다. 그 이유는 오류 메시지에 제공됩니다.

Name 형식 Description
error

ErrorDetail

Error 개체.

Eventhub

이벤트 허브 나열 또는 가져오기 작업의 단일 항목

Name 형식 Description
id

string

리소스에 대한 정규화된 리소스 ID입니다. 예 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

리소스가 있는 지리적 위치

name

string

리소스의 이름입니다.

properties.captureDescription

CaptureDescription

캡처 설명의 속성

properties.createdAt

string

이벤트 허브를 만든 정확한 시간입니다.

properties.messageRetentionInDays

integer

이 이벤트 허브에 대한 이벤트를 보존할 일 수이며 값은 1~7일이어야 합니다.

properties.partitionCount

integer

이벤트 허브에 대해 만들어진 파티션의 수, 허용되는 값은 1~32개 파티션입니다.

properties.partitionIds

string[]

이벤트 허브의 현재 분할된 데이터베이스 수입니다.

properties.retentionDescription

RetentionDescription

이벤트 허브 보존 설정

properties.status

EntityStatus

이벤트 허브의 상태 가능한 값을 열거합니다.

properties.updatedAt

string

메시지가 업데이트된 정확한 시간입니다.

properties.userMetadata

string

사용자의 메타데이터를 가져오고 설정합니다.

systemData

systemData

이 리소스와 관련된 시스템 메타 데이터입니다.

type

string

리소스 형식입니다. 예: "Microsoft.EventHub/Namespaces" 또는 "Microsoft.EventHub/Namespaces/EventHubs"

RetentionDescription

eventhub에 대한 보존 설정을 구성하는 속성

Name 형식 Description
cleanupPolicy

CleanupPolicyRetentionDescription

정리 정책에 사용할 수 있는 값을 열거합니다.

retentionTimeInHours

integer

이 이벤트 허브에 대한 이벤트를 보존하는 데 소요되는 시간입니다. 이 값은 cleanupPolicy가 Delete인 경우에만 사용됩니다. cleanupPolicy가 Compact이면 이 속성의 반환된 값은 Long.MaxValue입니다.

tombstoneRetentionTimeInHours

integer

압축된 이벤트 허브의 삭제 표시 표식을 유지하는 데 소요되는 시간입니다. 이 값은 cleanupPolicy가 Compact인 경우에만 사용됩니다. 소비자는 압축된 이벤트 허브 내에서 삭제 표시 표식에 설명된 특정 키에 대한 유효한 스냅샷 가져오기 위해 시작 오프셋에서 시작하는 경우 지정된 시간 내에 삭제 표시 표식 읽기를 완료해야 합니다.

systemData

리소스 만들기 및 마지막 수정과 관련된 메타데이터입니다.

Name 형식 Description
createdAt

string

UTC(리소스 만들기)의 타임스탬프입니다.

createdBy

string

리소스를 만든 ID입니다.

createdByType

createdByType

리소스를 만든 ID의 형식입니다.

lastModifiedAt

string

리소스를 마지막으로 수정한 ID 유형입니다.

lastModifiedBy

string

리소스를 마지막으로 수정한 ID입니다.

lastModifiedByType

createdByType

리소스를 마지막으로 수정한 ID 유형입니다.