Bicep リソース定義
namespaces/eventhubs/authorizationRules リソースの種類は、次をターゲットとする操作と共にデプロイできます。
- リソース グループの - リソース グループのデプロイ コマンド 参照
各 API バージョンで変更されたプロパティの一覧については、変更ログの
使用例
Bicep サンプル
Event Hubs 承認ルールを Event Hubs 内にデプロイする基本的な例。
param location string = 'westeurope'
param resourceName string = 'acctest0001'
resource namespace 'Microsoft.EventHub/namespaces@2022-01-01-preview' = {
name: resourceName
location: location
sku: {
capacity: 1
name: 'Basic'
tier: 'Basic'
}
properties: {
disableLocalAuth: false
isAutoInflateEnabled: false
publicNetworkAccess: 'Enabled'
zoneRedundant: false
}
}
resource eventhub 'Microsoft.EventHub/namespaces/eventhubs@2021-11-01' = {
name: resourceName
parent: namespace
properties: {
messageRetentionInDays: 1
partitionCount: 2
status: 'Active'
}
}
resource authorizationRule 'Microsoft.EventHub/namespaces/eventhubs/authorizationRules@2021-11-01' = {
name: resourceName
parent: eventhub
properties: {
rights: [
'Send'
]
}
}
Azure 検証済みモジュール
次の Azure 検証済みモジュール を使用して、このリソースの種類をデプロイできます。
| Module | Description |
|---|---|
| Event Hub 名前空間 - Eventhub - Authorization Rule | Event Hub 名前空間用 AVM 子モジュール - Eventhub - 認可ルール |
Azure クイック スタートのサンプル
次 Azure クイック スタート テンプレート、このリソースの種類をデプロイするための Bicep サンプルが含まれています。
| Bicep ファイル | Description |
|---|---|
| Moesif API Analytics と収益化の | このテンプレートは、Azure API Management から Moesif API 分析および収益化プラットフォームへの API 呼び出しをログに記録します |
リソースの形式
Microsoft.EventHub/namespaces/eventhubs/authorizationRules リソースを作成するには、次の Bicep をテンプレートに追加します。
resource symbolicname 'Microsoft.EventHub/namespaces/eventhubs/authorizationRules@2014-09-01' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
rights: [
'string'
]
}
}
プロパティ値
Microsoft.EventHub/namespaces/eventhubs/authorizationRules
| Name | Description | Value |
|---|---|---|
| 位置 | データ センターの場所。 | 文字列 |
| name | リソース名 | string Constraints: 最小長 = 1 最大長 = 50 (必須) |
| 親 | Bicep では、子リソースの親リソースを指定できます。 このプロパティを追加する必要があるのは、子リソースが親リソースの外部で宣言されている場合のみです。 詳細については、「親リソースの外部 |
種類のリソースのシンボリック名: 名前空間/eventhubs |
| properties | SharedAccessAuthorizationRule を作成または更新するために指定されたプロパティ | SharedAccessAuthorizationRuleProperties |
SharedAccessAuthorizationRuleProperties
| Name | Description | Value |
|---|---|---|
| rights | ルールに関連付けられている権限。 | 次のいずれかを含む文字列配列: 'Listen' 'Manage' 「送信」(必須) |
ARM テンプレート リソース定義
namespaces/eventhubs/authorizationRules リソースの種類は、次をターゲットとする操作と共にデプロイできます。
- リソースグループ - リソースグループのデプロイコマンドを参照してください。 各APIバージョンの変更プロパティ一覧は 変更ログをご覧ください。
使用例
Azure クイック スタート テンプレート
このリソースの種類 デプロイする Azure クイック スタート テンプレート 次に示します。
| Template | Description |
|---|---|
|
Moesif API Analytics と収益化の Azure にデプロイする |
このテンプレートは、Azure API Management から Moesif API 分析および収益化プラットフォームへの API 呼び出しをログに記録します |
リソースの形式
Microsoft.EventHub/namespaces/eventhubs/authorizationRules リソースを作成するには、テンプレートに次の JSON を追加します。
{
"type": "Microsoft.EventHub/namespaces/eventhubs/authorizationRules",
"apiVersion": "2014-09-01",
"name": "string",
"location": "string",
"properties": {
"rights": [ "string" ]
}
}
プロパティ値
Microsoft.EventHub/namespaces/eventhubs/authorizationRules
| Name | Description | Value |
|---|---|---|
| apiVersion | API のバージョン | '2014-09-01' |
| 位置 | データ センターの場所。 | 文字列 |
| name | リソース名 | string Constraints: 最小長 = 1 最大長 = 50 (必須) |
| properties | SharedAccessAuthorizationRule を作成または更新するために指定されたプロパティ | SharedAccessAuthorizationRuleProperties |
| 型 | リソースの種類 | 'Microsoft.EventHub/namespaces/eventhubs/authorizationRules' |
SharedAccessAuthorizationRuleProperties
| Name | Description | Value |
|---|---|---|
| rights | ルールに関連付けられている権限。 | 次のいずれかを含む文字列配列: 'Listen' 'Manage' 「送信」(必須) |
Terraform (AzAPI プロバイダー) リソース定義
namespaces/eventhubs/authorizationRules リソースの種類は、次をターゲットとする操作と共にデプロイできます。
- リソースグループ 各APIバージョンの変更プロパティ一覧については、 変更ログをご覧ください。
使用例
Terraformサンプル
Event Hubs 承認ルールを Event Hubs 内にデプロイする基本的な例。
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "namespace" {
type = "Microsoft.EventHub/namespaces@2022-01-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
disableLocalAuth = false
isAutoInflateEnabled = false
publicNetworkAccess = "Enabled"
zoneRedundant = false
}
sku = {
capacity = 1
name = "Basic"
tier = "Basic"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "eventhub" {
type = "Microsoft.EventHub/namespaces/eventhubs@2021-11-01"
parent_id = azapi_resource.namespace.id
name = var.resource_name
body = {
properties = {
messageRetentionInDays = 1
partitionCount = 2
status = "Active"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "authorizationRule" {
type = "Microsoft.EventHub/namespaces/eventhubs/authorizationRules@2021-11-01"
parent_id = azapi_resource.eventhub.id
name = var.resource_name
body = {
properties = {
rights = [
"Send",
]
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
リソースの形式
Microsoft.EventHub/namespaces/eventhubs/authorizationRules リソースを作成するには、次の Terraform をテンプレートに追加します。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.EventHub/namespaces/eventhubs/authorizationRules@2014-09-01"
name = "string"
parent_id = "string"
location = "string"
body = {
properties = {
rights = [
"string"
]
}
}
}
プロパティ値
Microsoft.EventHub/namespaces/eventhubs/authorizationRules
| Name | Description | Value |
|---|---|---|
| 位置 | データ センターの場所。 | 文字列 |
| name | リソース名 | string Constraints: 最小長 = 1 最大長 = 50 (必須) |
| parent_id | このリソースの親であるリソースの ID。 | 種類のリソースの ID: namespaces/eventhubs |
| properties | SharedAccessAuthorizationRule を作成または更新するために指定されたプロパティ | SharedAccessAuthorizationRuleProperties |
| 型 | リソースの種類 | "Microsoft.EventHub/namespaces/eventhubs/authorizationRules@2014-09-01" |
SharedAccessAuthorizationRuleProperties
| Name | Description | Value |
|---|---|---|
| rights | ルールに関連付けられている権限。 | 次のいずれかを含む文字列配列: 'Listen' 'Manage' 「送信」(必須) |