All Products
Search
Document Center

Message Service

Last Updated: Sep 30, 2021

Resource Access Management (RAM) users or RAM roles must be granted permissions before they can access cloud resources. RAM uses policies to define permissions. A cloud service defines elements that can be used in a policy statement, such as Action, Resource, and Condition. This topic describes the permissions on Message Service.

The code (RamCode) in RAM that is used to indicate Message Service is mns. You can grant permissions on Message Service at the resource level.

Action

The following table describes the values that you can use in the Action element of a policy statement. The values are defined by Message Service. The following list describes the columns in the table:
  • Action: the value that you can use in the Action element to specify the operation on a resource.

  • API: the API operation that you can call to perform the action. In most cases, only one API operation of a cloud service is required to perform an action. In some cases, multiple API operations must be called to perform an action, or an API operation can be called to perform multiple actions.

  • Access level: the access level of each action. The levels are read, write, and list.

  • Resource type: the type of the resource on which you can authorize a RAM user or a RAM role to perform the operation. Take note of the following items:

    • The required resource types are displayed in bold characters.

    • If the permissions cannot be granted at the resource level, All resources is used in the Resource type column of the action.

  • Condition key: the condition keys that are defined by a cloud service. The Condition key column does not list the common condition keys that are defined by Alibaba Cloud. For more information about the common condition keys, see Policy elements.

  • Dependent action: other actions that a RAM user or a RAM role must have permissions to perform the action. To successfully call the action, a RAM user or a RAM role must have the permissions to perform the dependent action.

Actions

APIs

Access level

Resource types

Condition keys

Dependent actions

mns:ChangeMessageVisibility

N/A

Write


Queue


acs:mns:{#regionId}:{#accountId}:queue/{#queueName}/messages/*


N/A

N/A

mns:CreateQueue

N/A

Write


Queue


acs:mns:{#regionId}:{#accountId}:queue/{#queueName}


N/A

N/A

mns:CreateTopic

N/A

Write


Topic


acs:mns:{#regionId}:{#accountId}:topics/{#topicName}


N/A

N/A

mns:DeleteMessage

N/A

Write


Queue


acs:mns:{#regionId}:{#accountId}:queue/{#queueName}/messages/*


N/A

N/A

mns:DeleteQueue

N/A

Write


Queue


acs:mns:{#regionId}:{#accountId}:queue/{#queueName}


N/A

N/A

mns:DeleteTopic

N/A

Write


Topic


acs:mns:{#regionId}:{#accountId}:topics/{#topicName}


N/A

N/A

mns:GetQueueAttributes

N/A

Read


Queue


acs:mns:{#regionId}:{#accountId}:queue/{#queueName}


N/A

N/A

mns:GetSubscriptionAttributes

N/A

Read


Subscription


acs:mns:{#regionId}:{#accountId}:topics/{#topicName}/subscriptions/{#subscriptionName}


N/A

N/A

mns:GetTopicAttributes

N/A

Read


Topic


acs:mns:{#regionId}:{#accountId}:topics/{#topicName}


N/A

N/A

mns:ListQueue

N/A

List


Queue


acs:mns:{#regionId}:{#accountId}:queue/*


N/A

N/A

mns:ListSubscriptionByTopic

N/A

List


Subscription


acs:mns:{#regionId}:{#accountId}:topics/{#topicName}/subscriptions/*


N/A

N/A

mns:ListTopic

N/A

List


Topic


acs:mns:{#regionId}:{#accountId}:topics/*


N/A

N/A

mns:OpenService

N/A

Write


All resources


acs:mns:*:{#accountId}:*


N/A

N/A

mns:PeekMessage

N/A

Write


Queue


acs:mns:{#regionId}:{#accountId}:queue/{#queueName}/messages/*


N/A

N/A

mns:PublishMessage

N/A

Write


Topic


acs:mns:{#regionId}:{#accountId}:topics/{#topicName}/messages/*


N/A

N/A

mns:ReceiveMessage

N/A

Write


Queue


acs:mns:{#regionId}:{#accountId}:queue/{#queueName}/messages/*


N/A

N/A

mns:SendMessage

N/A

Write


Queue


acs:mns:{#regionId}:{#accountId}:queue/{#queueName}/messages/*


N/A

N/A

mns:SetQueueAttributes

N/A

Write


Queue


acs:mns:{#regionId}:{#accountId}:queue/{#queueName}


N/A

N/A

mns:SetSubscriptionAttributes

N/A

Write


Subscription


acs:mns:{#regionId}:{#accountId}:topics/{#topicName}/subscriptions/{#subscriptionName}


N/A

N/A

mns:SetTopicAttributes

N/A

Write


Topic


acs:mns:{#regionId}:{#accountId}:topics/{#topicName}


N/A

N/A

mns:Subscribe

N/A

Write


Subscription


acs:mns:{#regionId}:{#accountId}:topics/{#topicName}/subscriptions/{#subscriptionName}


N/A

N/A

mns:Unsubscribe

N/A

Write


Subscription


acs:mns:{#regionId}:{#accountId}:topics/{#topicName}/subscriptions/{#subscriptionName}


N/A

N/A

Resource

The following table describes the values that you can use in the Resource element of a policy statement. The values are defined by Message Service.

The Alibaba Cloud Resource Name (ARN) is the unique identifier of the resource on Alibaba Cloud. Take note of the following items:

  • {#} indicates a variable. {#} must be replaced with an actual value. For example, {#regionId} must be replaced with the actual ID of the region where your resource resides.

  • An asterisk (*) is used as a wildcard. Examples:

    • If you specify {#resourceType}/*, all resources are specified.

    • If {#regionId} is set to *, all regions are specified.

    • If {#accountId} is set to *, all Alibaba Cloud accounts are specified.

Resource type

ARN

Queue

acs:mns:{#regionId}:{#accountId}:queue/{#QueueName}

Topic

acs:mns:{#regionId}:{#accountId}:topic/{#TopicName}

Subscription

acs:mns:{#regionId}:{#accountId}:topics/{#topicName}/subscriptions/{#subscriptionName}

Condition

Message Service does not define service-specific condition keys. For more information about common condition keys that are defined by Alibaba Cloud, see Policy elements.