选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

AWS Send SNS or SQS Message task

聚焦模式
AWS Send SNS or SQS Message task - AWS Toolkit for Microsoft Azure DevOps
此页面尚未翻译为您的语言。 请求翻译

Synopsis

Sends a message to an Amazon Simple Notification Service (SNS) topic or to an Amazon Simple Queue Service (SQS) queue.

Description

This task accepts a message to be sent to an Amazon SNS topic or to an Amazon SQS queue. If the message is to be sent to a queue, you can configure an optional delay (in seconds). If you don't specify a delay, the task assumes the default delay that is associated with the queue.

Parameters

You can set the following parameters for the task. Required parameters are noted by an asterisk (*). Other parameters are optional.

Display name*

The default name of the task instance, which can be modified: Send Message

AWS Credentials

Specifies the AWS credentials to be used by the task in the build agent environment.

You can specify credentials using a service endpoint (of type AWS) in the task configuration or you can leave unspecified. If unspecified the task will attempt to obtain credentials from the following sources in order:

  • From task variables named AWS.AccessKeyID, AWS.SecretAccessKey and optionally AWS.SessionToken.

  • From credentials set in environment variables in the build agent process. When using environment variables in the build agent process you may use the standard AWS environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and optionally AWS_SESSION_TOKEN.

  • If the build agent is running on an Amazon EC2 instance, from the instance metadata associated with the EC2 instance. For credentials to be available from EC2 instance metadata the instance must have been started with an instance profile referencing a role granting permissions to the task to make calls to AWS on your behalf. For more information, see Using an IAM role to grant permissions to applications running on Amazon EC2 instances.

AWS Region

The AWS Region code (for example, us-east-1, us-west-2) of the Region containing the AWS resources the task will use or create. For more information, see Regions and endpoints in the Amazon Web Services General Reference.

If a Region is not specified in the task configuration the task will attempt to obtain the Region to be used using the standard AWS environment variable AWS_REGION in the build agent process's environment. Tasks running in build agents hosted on Amazon EC2 instances (Windows or Linux) will also attempt to obtain the Region using the instance metadata associated with the EC2 instance if no Region is configured on the task or set in the environment variable.

Note: The Regions listed in the picker are those known at the time this software was released. New Regions that are not listed may still be used by entering the region code of the Region (for example, us_west_2).

Message Target*

The destination for the message. A message can be sent to a Amazon SNS (SNS) topic or a Amazon SQS (SQS) queue.

Message

The message content to send. The maximum size for both queue and topic targets is 256KB (262144 bytes, not 262144 characters).

For more information on the allowed values and content see the respective service help pages for Publish and SendMessage.

Topic ARN*

The Amazon Resource Name (ARN) of the Amazon SNS topic to which the message will be sent. Required when Message Target is set to SNS Topic.

Queue Url*

The URL of the Amazon SQS queue to which the message will be sent. Required when Message Target is set to SQS Queue.

Delay (seconds)

Available for Amazon SQS queues only.

The length of time, in seconds, for which to delay a specific message. Valid values: 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds value become available for processing after the delay period is finished. If you don't specify a value, the default value for the queue applies.

Task Permissions

This task requires permissions to call the following AWS service APIs (depending on selected task options, not all APIs may be used):

  • sns:GetTopicAttributes

  • sns:Publish

  • sqs:GetQueueAttributes

  • sqs:SendMessage

本页内容

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。