Dapr Subscriptions - Create Or Update
관리되는 환경에서 Dapr 구독을 만들거나 업데이트합니다.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}?api-version=2023-11-02-preview
URI 매개 변수
| Name | In(다음 안에) | 필수 | 형식 | Description |
|---|---|---|---|---|
|
environment
|
path | True |
string pattern: ^[-\w\._\(\)]+$ |
관리되는 환경의 이름입니다. |
|
name
|
path | True |
string |
Dapr 구독의 이름입니다. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
리소스 그룹의 이름입니다. 이름은 대/소문자를 구분하지 않습니다. |
|
subscription
|
path | True |
string minLength: 1 |
대상 구독의 ID입니다. |
|
api-version
|
query | True |
string minLength: 1 |
이 작업에 사용할 API 버전입니다. |
요청 본문
| Name | 형식 | Description |
|---|---|---|
| properties.bulkSubscribe |
대량 구독 옵션 |
|
| properties.deadLetterTopic |
string |
배달 못 한 항목 이름 |
| properties.metadata |
object |
구독 메타데이터 |
| properties.pubsubName |
string |
Dapr PubSub 구성 요소 이름 |
| properties.routes |
구독 경로 |
|
| properties.scopes |
string[] |
구독을 특정 앱으로 제한하는 애플리케이션 범위입니다. |
| properties.topic |
string |
토픽 이름 |
응답
| Name | 형식 | Description |
|---|---|---|
| 200 OK |
그래 |
|
| 201 Created |
만든 |
|
| Other Status Codes |
일반적인 오류 응답입니다. |
보안
azure_auth
Azure Active Directory OAuth2 흐름
형식:
oauth2
Flow:
implicit
권한 부여 URL:
https://login.microsoftonline.com/common/oauth2/authorize
범위
| Name | Description |
|---|---|
| user_impersonation | 사용자 계정 가장 |
예제
Create or update dapr subscription with bulk subscribe configuration and scopes
샘플 요청
PUT https://management.azure.com/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mysubscription?api-version=2023-11-02-preview
{
"properties": {
"pubsubName": "mypubsubcomponent",
"topic": "inventory",
"routes": {
"default": "/products"
},
"scopes": [
"warehouseapp",
"customersupportapp"
],
"bulkSubscribe": {
"enabled": true,
"maxMessagesCount": 123,
"maxAwaitDurationMs": 500
}
}
}
샘플 응답
{
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mysubscription",
"name": "mysubscription",
"type": "Microsoft.App/managedEnvironments/daprSubscriptions",
"properties": {
"pubsubName": "mypubsubcomponent",
"topic": "inventory",
"routes": {
"rules": [],
"default": "/products"
},
"scopes": [
"warehouseapp",
"customersupportapp"
],
"bulkSubscribe": {
"enabled": true,
"maxMessagesCount": 123,
"maxAwaitDurationMs": 500
}
}
}
{
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mysubscription",
"name": "mysubscription",
"type": "Microsoft.App/managedEnvironments/daprSubscriptions",
"properties": {
"pubsubName": "mypubsubcomponent",
"topic": "inventory",
"routes": {
"rules": [],
"default": "/products"
},
"scopes": [
"warehouseapp",
"customersupportapp"
],
"bulkSubscribe": {
"enabled": true,
"maxMessagesCount": 123,
"maxAwaitDurationMs": 500
}
}
}
Create or update dapr subscription with default route only
샘플 요청
PUT https://management.azure.com/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mysubscription?api-version=2023-11-02-preview
{
"properties": {
"pubsubName": "mypubsubcomponent",
"topic": "inventory",
"routes": {
"default": "/products"
}
}
}
샘플 응답
{
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mysubscription",
"name": "mysubscription",
"type": "Microsoft.App/managedEnvironments/daprSubscriptions",
"properties": {
"pubsubName": "mypubsubcomponent",
"topic": "inventory",
"routes": {
"rules": [],
"default": "/products"
}
}
}
{
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mysubscription",
"name": "mysubscription",
"type": "Microsoft.App/managedEnvironments/daprSubscriptions",
"properties": {
"pubsubName": "mypubsubcomponent",
"topic": "inventory",
"routes": {
"rules": [],
"default": "/products"
}
}
}
Create or update dapr subscription with route rules and metadata
샘플 요청
PUT https://management.azure.com/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mysubscription?api-version=2023-11-02-preview
{
"properties": {
"pubsubName": "mypubsubcomponent",
"topic": "inventory",
"metadata": {
"foo": "bar",
"hello": "world"
},
"routes": {
"rules": [
{
"match": "event.type == 'widget'",
"path": "/widgets"
},
{
"match": "event.type == 'gadget'",
"path": "/gadgets"
}
],
"default": "/products"
}
}
}
샘플 응답
{
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mysubscription",
"name": "mysubscription",
"type": "Microsoft.App/managedEnvironments/daprSubscriptions",
"properties": {
"pubsubName": "mypubsubcomponent",
"topic": "inventory",
"routes": {
"rules": [
{
"match": "event.type == 'widget'",
"path": "/widgets"
},
{
"match": "event.type == 'gadget'",
"path": "/gadgets"
}
],
"default": "/products"
},
"metadata": {
"foo": "bar",
"hello": "world"
}
}
}
{
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mysubscription",
"name": "mysubscription",
"type": "Microsoft.App/managedEnvironments/daprSubscriptions",
"properties": {
"pubsubName": "mypubsubcomponent",
"topic": "inventory",
"routes": {
"rules": [
{
"match": "event.type == 'widget'",
"path": "/widgets"
},
{
"match": "event.type == 'gadget'",
"path": "/gadgets"
}
],
"default": "/products"
},
"metadata": {
"foo": "bar",
"hello": "world"
}
}
}
정의
| Name | Description |
|---|---|
|
created |
리소스를 만든 ID의 형식입니다. |
|
Dapr |
Dapr PubSub 이벤트 구독. |
|
Dapr |
Dapr PubSub 대량 구독 옵션. |
|
Dapr |
Dapr Pubsub 이벤트 구독 경로 규칙은 특정 경로에 메시지를 보내기 위한 조건을 지정하는 데 사용됩니다. |
|
Dapr |
Dapr PubSub 이벤트 구독 경로 구성. |
|
Default |
App Service 오류 응답입니다. |
| Details |
세부 정보 또는 오류 |
| Error |
오류 모델입니다. |
|
system |
리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다. |
createdByType
리소스를 만든 ID의 형식입니다.
| 값 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DaprSubscription
Dapr PubSub 이벤트 구독.
| Name | 형식 | Description |
|---|---|---|
| id |
string |
리소스에 대한 정규화된 리소스 ID입니다. 예 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
리소스의 이름 |
| properties.bulkSubscribe |
대량 구독 옵션 |
|
| properties.deadLetterTopic |
string |
배달 못 한 항목 이름 |
| properties.metadata |
object |
구독 메타데이터 |
| properties.pubsubName |
string |
Dapr PubSub 구성 요소 이름 |
| properties.routes |
구독 경로 |
|
| properties.scopes |
string[] |
구독을 특정 앱으로 제한하는 애플리케이션 범위입니다. |
| properties.topic |
string |
토픽 이름 |
| systemData |
createdBy 및 modifiedBy 정보가 포함된 Azure Resource Manager 메타데이터입니다. |
|
| type |
string |
리소스의 형식입니다. 예: "Microsoft.Compute/virtualMachines" 또는 "Microsoft.Storage/storageAccounts" |
DaprSubscriptionBulkSubscribeOptions
Dapr PubSub 대량 구독 옵션.
| Name | 형식 | Default value | Description |
|---|---|---|---|
| enabled |
boolean |
False |
대량 구독 사용 |
| maxAwaitDurationMs |
integer (int32) |
대량 메시지가 앱에 전송되기 전에 대기하는 최대 기간(밀리초)입니다. |
|
| maxMessagesCount |
integer (int32) |
대량 메시지에서 배달할 최대 메시지 수입니다. |
DaprSubscriptionRouteRule
Dapr Pubsub 이벤트 구독 경로 규칙은 특정 경로에 메시지를 보내기 위한 조건을 지정하는 데 사용됩니다.
| Name | 형식 | Description |
|---|---|---|
| match |
string |
이벤트와 일치하는 데 사용되는 선택적 CEL 식입니다. 일치 항목을 지정하지 않으면 경로가 기본값으로 간주됩니다. 규칙은 지정된 순서대로 테스트되므로 가장 구체적인 규칙에서 최소로 정의해야 합니다. 기본 경로는 목록에 마지막으로 표시됩니다. |
| path |
string |
이 규칙과 일치하는 이벤트의 경로입니다. |
DaprSubscriptionRoutes
Dapr PubSub 이벤트 구독 경로 구성.
| Name | 형식 | Description |
|---|---|---|
| default |
string |
규칙과 일치하지 않는 이벤트를 배달하기 위한 기본 경로입니다. |
| rules |
Dapr PubSub 이벤트 구독 경로 규칙 목록입니다. |
DefaultErrorResponse
App Service 오류 응답입니다.
| Name | 형식 | Description |
|---|---|---|
| error |
오류 모델입니다. |
Details
세부 정보 또는 오류
| Name | 형식 | Description |
|---|---|---|
| code |
string |
프로그래밍 방식으로 오류를 식별하는 표준화된 문자열입니다. |
| message |
string |
자세한 오류 설명 및 디버깅 정보입니다. |
| target |
string |
자세한 오류 설명 및 디버깅 정보입니다. |
Error
오류 모델입니다.
| Name | 형식 | Description |
|---|---|---|
| code |
string |
프로그래밍 방식으로 오류를 식별하는 표준화된 문자열입니다. |
| details |
Details[] |
세부 정보 또는 오류 |
| innererror |
string |
디버그 오류에 대한 자세한 정보입니다. |
| message |
string |
자세한 오류 설명 및 디버깅 정보입니다. |
| target |
string |
자세한 오류 설명 및 디버깅 정보입니다. |
systemData
리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다.
| Name | 형식 | Description |
|---|---|---|
| createdAt |
string (date-time) |
리소스 만들기의 타임스탬프(UTC)입니다. |
| createdBy |
string |
리소스를 만든 ID입니다. |
| createdByType |
리소스를 만든 ID의 형식입니다. |
|
| lastModifiedAt |
string (date-time) |
리소스 마지막 수정의 타임스탬프(UTC) |
| lastModifiedBy |
string |
리소스를 마지막으로 수정한 ID입니다. |
| lastModifiedByType |
리소스를 마지막으로 수정한 ID의 형식입니다. |