Updated on 2022-09-05 GMT+08:00

Managing Queue Policies

Scenario

Configure queue policies if multiple users or services need to access the same message queue.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner of the management console and select a region.

    Select the same region as your application service.

  3. Click Service List, and choose Application > Distributed Message Service to open the DMS console.
  4. In the navigation pane, choose Queue Manager.
  5. Click the name of a queue for which you want to add a queue policy.
  6. On the queue details page, click the Policy Management tab.
  7. On the Policy Management tab page, click Create Queue Policy.
  8. Specify parameters as shown in Table 1.

    Table 1 Queue policy parameters

    Parameter

    Description

    Queue Name

    Name of the queue to which the new policy will be applied.

    Effect

    • Allow
    • Deny

    The default permission is Allow.

    Policy Type

    • User-based
    • Service-based

    The default policy type is User-based.

    Users

    This parameter is configurable if Policy Type is User-based.

    • All users
    • Specified users: The user list can be any of the following three or any comma-separated combination of the following three: domain IDs, domain names, and Uniform Resource Names (URNs).

      URN is a unique resource ID in the format of urn:csp:service:region_id:domain_id:resourcetype:resource or urn:csp:service:region_id:domain_id:resource.

      Fields:

      • csp: cloud service provider
      • service: abbreviation of a service name, for example, SMN
      • region_id: region ID for example, ap-southeast-1
      • domain_id: domain ID
      • resourcetype: resource type
      • resource: resource name, for example, Topic_test

      URN example: urn:csp:smn:ap-southeast-1:e23bf08ebb924730b452426c60849564:user:Topic_test

    By default, All users is selected.

    Services

    Service authorized to access DMS if Policy Type is Service-based. The following services can be selected:

    • FunctionGraph
    • SMN

    Actions

    Actions on the chosen queue.

    • DMS:GetQueue
    • DMS:CreateGroup
    • DMS:GetGroups
    • DMS:DeleteGroup
    • DMS:ProduceMessages
    • DMS:ConsumeMessages