你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Dapr Subscriptions - List

Get the Dapr subscriptions for a managed environment.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions?api-version=2024-02-02-preview

URI Parameters

Name In Required Type Description
environmentName
path True

string

Name of the Managed Environment.

Regex pattern: ^[-\w\._\(\)]+$

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

DaprSubscriptionsCollection

OK

Other Status Codes

DefaultErrorResponse

Common error response.

Security

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 impersonate your user account

Examples

List Dapr subscriptions

Sample request

GET https://management.azure.com/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions?api-version=2024-02-02-preview

Sample response

{
  "value": [
    {
      "id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mybulksubscription",
      "name": "mybulksubscription",
      "type": "Microsoft.App/managedEnvironments/daprSubscriptions",
      "properties": {
        "pubsubName": "mypubsubcomponent",
        "topic": "inventory",
        "routes": {
          "rules": [],
          "default": "/products"
        },
        "bulkSubscribe": {
          "enabled": true,
          "maxMessagesCount": 123,
          "maxAwaitDurationMs": 500
        }
      }
    },
    {
      "id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprSubscriptions/mydefaultsubscription",
      "name": "mydefaultsubscription",
      "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/myroutingsubscription",
      "name": "myroutingsubscription",
      "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"
        }
      }
    }
  ]
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

DaprSubscription

Dapr PubSub Event Subscription.

DaprSubscriptionBulkSubscribeOptions

Dapr PubSub Bulk Subscription Options.

DaprSubscriptionRouteRule

Dapr Pubsub Event Subscription Route Rule is used to specify the condition for sending a message to a specific path.

DaprSubscriptionRoutes

Dapr PubSub Event Subscription Routes configuration.

DaprSubscriptionsCollection

Dapr Subscriptions ARM resource.

DefaultErrorResponse

App Service error response.

Details

Details or the error

Error

Error model.

systemData

Metadata pertaining to creation and last modification of the resource.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DaprSubscription

Dapr PubSub Event Subscription.

Name Type Description
id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties.bulkSubscribe

DaprSubscriptionBulkSubscribeOptions

Bulk subscription options

properties.deadLetterTopic

string

Deadletter topic name

properties.metadata

object

Subscription metadata

properties.pubsubName

string

Dapr PubSub component name

properties.routes

DaprSubscriptionRoutes

Subscription routes

properties.scopes

string[]

Application scopes to restrict the subscription to specific apps.

properties.topic

string

Topic name

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

DaprSubscriptionBulkSubscribeOptions

Dapr PubSub Bulk Subscription Options.

Name Type Default value Description
enabled

boolean

False

Enable bulk subscription

maxAwaitDurationMs

integer

Maximum duration in milliseconds to wait before a bulk message is sent to the app.

maxMessagesCount

integer

Maximum number of messages to deliver in a bulk message.

DaprSubscriptionRouteRule

Dapr Pubsub Event Subscription Route Rule is used to specify the condition for sending a message to a specific path.

Name Type Description
match

string

The optional CEL expression used to match the event. If the match is not specified, then the route is considered the default. The rules are tested in the order specified, so they should be define from most-to-least specific. The default route should appear last in the list.

path

string

The path for events that match this rule

DaprSubscriptionRoutes

Dapr PubSub Event Subscription Routes configuration.

Name Type Description
default

string

The default path to deliver events that do not match any of the rules.

rules

DaprSubscriptionRouteRule[]

The list of Dapr PubSub Event Subscription Route Rules.

DaprSubscriptionsCollection

Dapr Subscriptions ARM resource.

Name Type Description
nextLink

string

Link to next page of resources.

value

DaprSubscription[]

Collection of resources.

DefaultErrorResponse

App Service error response.

Name Type Description
error

Error

Error model.

Details

Details or the error

Name Type Description
code

string

Standardized string to programmatically identify the error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

Error

Error model.

Name Type Description
code

string

Standardized string to programmatically identify the error.

details

Details[]

Details or the error

innererror

string

More information to debug error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.