Amazon Web Services/AddPermission

正在自动加载完整文档…

Amazon Web ServicesAmazon SQS 消息队列 API

添加队列权限

向指定主体授予队列权限;该操作会改变队列访问策略。

官方英文详细说明:

Adds a permission to a queue for a specific principal. This allows sharing access to the queue.

When you create a queue, you have full control access rights for the queue. Only you, the owner of the queue, can grant or deny permissions to the queue. For more information about these permissions, see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS Developer Guide.

AddPermission generates a policy for you. You can use

SetQueueAttributes to upload your policy. For more information, see Using Custom Policies with the Amazon SQS Access Policy Language in the Amazon SQS Developer Guide.

An Amazon SQS policy can have a maximum of seven actions per statement.

To remove the ability to change queue permissions, you must deny permission to the AddPermission, RemovePermission, and SetQueueAttributes actions in your IAM policy.

Amazon SQS AddPermission does not support adding a non-account principal.

Cross-account permissions don't apply to this action. For more information, see Grant cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

Amazon Simple Queue Service 的完整 23 个官方 action;保留 AWS JSON 1.0、AWS Query 兼容性、SigV4 与区域 Endpoint 规则。当前网页端尚无 AWS SigV4 与区域选择执行适配器,可使用本地 SDK/CLI 调用。

请求

operationId
AddPermission
服务器
https://sqs.{Region}.{PartitionResult#dnsSuffix}
认证
awsSigV4

请求参数

无 URL、查询或 Header 参数。

Body 参数

string必填

响应

200

object

成功响应。

error

string

Declared service error

{}