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 パラメーター

名前 / 必須 説明
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 のバージョン。

要求本文

名前 説明
properties.captureDescription

CaptureDescription

キャプチャの説明のプロパティ

properties.messageRetentionInDays

integer

このイベント ハブのイベントを保持する日数。値は 1 ~ 7 日にする必要があります

properties.partitionCount

integer

Event Hub 用に作成されたパーティションの数。使用できる値は 1 から 32 個のパーティションです。

properties.retentionDescription

RetentionDescription

イベント ハブの保持設定

properties.status

EntityStatus

イベント ハブの状態に使用できる値を列挙します。

properties.userMetadata

string

ユーザーのメタデータを取得および設定します。

応答

名前 説明
200 OK

Eventhub

Event Hub が正常に作成されました。

Other Status Codes

ErrorResponse

操作が失敗した理由を説明する Eventhub エラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー

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

Scopes

名前 説明
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
    }
  }
}

定義

名前 説明
CaptureDescription

eventhub のキャプチャの説明を構成するためのプロパティ

CaptureIdentity

キャプチャの説明が有効かどうかを示す値。

CaptureIdentityType

Azure Active Directory マネージド ID の種類。

CleanupPolicyRetentionDescription

クリーンアップ ポリシーに使用できる値を列挙します

createdByType

リソースを作成した ID の種類。

Destination

キャプチャの説明のためにストレージの詳細をキャプチャする

EncodingCaptureDescription

キャプチャの説明のエンコード形式に使用できる値を列挙します。 注: "AvroDeflate" は、新しい API バージョンでは非推奨になります

EntityStatus

イベント ハブの状態に使用できる値を列挙します。

ErrorAdditionalInfo

リソース管理エラーの追加情報。

ErrorDetail

エラーの詳細。

ErrorResponse

エラー応答は、Event Hub サービスが受信要求を処理できないことを示します。 理由は、エラー メッセージに示されています。

Eventhub

List 操作または Get Event Hub 操作の 1 つの項目

RetentionDescription

eventhub の保持設定を構成するためのプロパティ

systemData

リソースの作成と最後の変更に関連するメタデータ。

CaptureDescription

eventhub のキャプチャの説明を構成するためのプロパティ

名前 説明
destination

Destination

キャプチャが格納される Destination のプロパティ。 (ストレージ アカウント、BLOB 名)

enabled

boolean

キャプチャの説明が有効かどうかを示す値。

encoding

EncodingCaptureDescription

キャプチャの説明のエンコード形式に使用できる値を列挙します。 注: "AvroDeflate" は、新しい API バージョンでは非推奨になります

intervalInSeconds

integer

時間枠を使用すると、Azure BLOB へのキャプチャが発生する頻度を設定できます。値は 60 から 900 秒の間である必要があります

sizeLimitInBytes

integer

サイズ ウィンドウでは、キャプチャ操作の前に Event Hub に組み込まれるデータの量が定義されます。値は10485760から524288000 バイトの間にする必要があります

skipEmptyArchives

boolean

空のアーカイブをスキップするかどうかを示す値

CaptureIdentity

キャプチャの説明が有効かどうかを示す値。

名前 説明
type

CaptureIdentityType

Azure Active Directory マネージド ID の種類。

userAssignedIdentity

string

マネージド ユーザー ID の ARM ID。 このプロパティは、UserAssignedIdentity 型である必要があります。 type が SystemAssigned の場合は、名前空間に関連付けられているシステム割り当て ID が使用されます。

CaptureIdentityType

Azure Active Directory マネージド ID の種類。

名前 説明
SystemAssigned

string

UserAssigned

string

CleanupPolicyRetentionDescription

クリーンアップ ポリシーに使用できる値を列挙します

名前 説明
Compact

string

Delete

string

createdByType

リソースを作成した ID の種類。

名前 説明
Application

string

Key

string

ManagedIdentity

string

User

string

Destination

キャプチャの説明のためにストレージの詳細をキャプチャする

名前 説明
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 バージョンでは非推奨になります

名前 説明
Avro

string

AvroDeflate

string

EntityStatus

イベント ハブの状態に使用できる値を列挙します。

名前 説明
Active

string

Creating

string

Deleting

string

Disabled

string

ReceiveDisabled

string

Renaming

string

Restoring

string

SendDisabled

string

Unknown

string

ErrorAdditionalInfo

リソース管理エラーの追加情報。

名前 説明
info

object

追加情報。

type

string

追加情報の種類。

ErrorDetail

エラーの詳細。

名前 説明
additionalInfo

ErrorAdditionalInfo[]

エラーの追加情報。

code

string

エラー コード。

details

ErrorDetail[]

エラーの詳細です。

message

string

エラー メッセージ。

target

string

エラーのターゲット。

ErrorResponse

エラー応答は、Event Hub サービスが受信要求を処理できないことを示します。 理由は、エラー メッセージに示されています。

名前 説明
error

ErrorDetail

error オブジェクト。

Eventhub

List 操作または Get Event Hub 操作の 1 つの項目

名前 説明
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

Event Hub 用に作成されたパーティションの数。使用できる値は 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 の保持設定を構成するためのプロパティ

名前 説明
cleanupPolicy

CleanupPolicyRetentionDescription

クリーンアップ ポリシーに使用できる値を列挙します

retentionTimeInHours

integer

このイベント ハブのイベントを保持する時間数。 この値は、cleanupPolicy が Delete の場合にのみ使用されます。 cleanupPolicy が Compact の場合、このプロパティの戻り値は Long.MaxValue です

tombstoneRetentionTimeInHours

integer

圧縮されたイベント ハブの廃棄石マーカーを保持する時間数。 この値は、cleanupPolicy が Compact の場合にのみ使用されます。 コンシューマーは、圧縮されたイベント ハブ内で廃棄石マーカーによって記述された特定のキーの有効なスナップショットを取得するために、オフセットの開始から開始する場合、この指定された時間内に廃棄石マーカーの読み取りを完了する必要があります

systemData

リソースの作成と最後の変更に関連するメタデータ。

名前 説明
createdAt

string

リソース作成のタイムスタンプ (UTC)。

createdBy

string

リソースを作成した ID。

createdByType

createdByType

リソースを作成した ID の種類。

lastModifiedAt

string

リソースを最後に変更した ID の種類。

lastModifiedBy

string

リソースを最後に変更した ID。

lastModifiedByType

createdByType

リソースを最後に変更した ID の種類。