# Send

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Unknown

Source code: <https://github.com/FrendsPlatform/Frends.AmazonSQS>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                | Description                                                                                                                                                                                                   |            |                                                                                                          |            |                                                                                                          |            |                                                         |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------- |
| QueueUrl : `String` | <p>Queue url.</p><p>Examples: https\://{REGION\_ENDPOINT}/queue.                                                                                                                                              | api-domain | /{YOUR\_ACCOUNT\_NUMBER}/{YOUR\_QUEUE\_NAME}</p><p><br>Default: <code>https\://{REGION\_ENDPOINT}/queue. | api-domain | /{YOUR\_ACCOUNT\_NUMBER}/{YOUR\_QUEUE\_NAME}</code><br>Example: <code>https\://{REGION\_ENDPOINT}/queue. | api-domain | /{YOUR\_ACCOUNT\_NUMBER}/{YOUR\_QUEUE\_NAME}</code></p> |
| Message : `String`  | <p>The message to send.</p><p>The maximum string size is 256 KB.</p><p>A message can include only XML, JSON, and unformatted text.</p><p><br>Default: <code>-</code><br>Example: <code>Hello world</code></p> |            |                                                                                                          |            |                                                                                                          |            |                                                         |
| {% endtab %}        |                                                                                                                                                                                                               |            |                                                                                                          |            |                                                                                                          |            |                                                         |

{% tab title="Parameter: Connection" %}

| Name                                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Region : `Regions`                      | <p>The region to connect.</p><p>Possible values:</p><ul><li><code>Undefined</code>:</li></ul><p>The region to connect.</p><ul><li><code>AfSouth1</code>:</li></ul><p>The region to connect.</p><ul><li><code>ApEast1</code>:</li></ul><p>The region to connect.</p><ul><li><code>ApNortheast1</code>:</li></ul><p>The region to connect.</p><ul><li><code>ApNortheast2</code>:</li></ul><p>The region to connect.</p><ul><li><code>ApNortheast3</code>:</li></ul><p>The region to connect.</p><ul><li><code>ApSouth1</code>:</li></ul><p>The region to connect.</p><ul><li><code>ApSoutheast1</code>:</li></ul><p>The region to connect.</p><ul><li><code>ApSoutheast2</code>:</li></ul><p>The region to connect.</p><ul><li><code>CaCentral1</code>:</li></ul><p>The region to connect.</p><ul><li><code>CnNorth1</code>:</li></ul><p>The region to connect.</p><ul><li><code>CnNorthWest1</code>:</li></ul><p>The region to connect.</p><ul><li><code>EuCentral1</code>:</li></ul><p>The region to connect.</p><ul><li><code>EuNorth1</code>:</li></ul><p>The region to connect.</p><ul><li><code>EuSouth1</code>:</li></ul><p>The region to connect.</p><ul><li><code>EuWest1</code>:</li></ul><p>The region to connect.</p><ul><li><code>EuWest2</code>:</li></ul><p>The region to connect.</p><ul><li><code>EuWest3</code>:</li></ul><p>The region to connect.</p><ul><li><code>MeSouth1</code>:</li></ul><p>The region to connect.</p><ul><li><code>SaEast1</code>:</li></ul><p>The region to connect.</p><ul><li><code>UsEast1</code>:</li></ul><p>The region to connect.</p><ul><li><code>UsEast2</code>:</li></ul><p>The region to connect.</p><ul><li><code>UsWest1</code>:</li></ul><p>The region to connect.</p><ul><li><code>UsWest2</code>:</li></ul><p>The region to connect.</p><p><br>Default: <code>13</code><br>Example: <code>Regions.EuNorth1</code></p> |
| UseDefaultCredentials : `Boolean`       | <p>Credentials are loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| CredentialsType : `AwsCredentialsTypes` | <p>Type of Aws Credentials.</p><p>See more <https://docs.aws.amazon.com/sdkfornet1/latest/apidocs/html/T_Amazon_Runtime_AWSCredentials.htm></p><p>Possible values:</p><ul><li><code>AnonymousAwsCredentials</code>:</li></ul><p>Type of Aws Credentials.</p><p>See more <https://docs.aws.amazon.com/sdkfornet1/latest/apidocs/html/T_Amazon_Runtime_AWSCredentials.htm></p><ul><li><code>BasicAwsCredentials</code>:</li></ul><p>Type of Aws Credentials.</p><p>See more <https://docs.aws.amazon.com/sdkfornet1/latest/apidocs/html/T_Amazon_Runtime_AWSCredentials.htm></p><ul><li><code>EnvironmentAwsCredentials</code>:</li></ul><p>Type of Aws Credentials.</p><p>See more <https://docs.aws.amazon.com/sdkfornet1/latest/apidocs/html/T_Amazon_Runtime_AWSCredentials.htm></p><ul><li><code>SessionAwsCredentials</code>:</li></ul><p>Type of Aws Credentials.</p><p>See more <https://docs.aws.amazon.com/sdkfornet1/latest/apidocs/html/T_Amazon_Runtime_AWSCredentials.htm></p><p><br>Default: <code>1</code><br>Example: <code>AwsCredentialsTypes.BasicAwsCredentials</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| AccessKey : `String`                    | <p>Access key used in AmazonSQS connection.</p><p><br>Default: <code>-</code><br>Example: <code>AccessKey</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 🗝SecretKey : `String`                  | <p>Secret key used in AmazonSQS connection.</p><p><br>Default: <code>-</code><br>Example: <code>SecretKey</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 🗝SessionToken : `String`               | <p>Session token for SessionAWSCredentials.</p><p><br>Default: <code>-</code><br>Example: <code>SessionToken</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| {% endtab %}                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

{% tab title="Parameter: Options" %}

| Name                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ThrowErrorOnFailure : `Boolean`  | <p>Gets or sets a value indicating whether an error should stop the Task and throw an exception.</p><p>If set to true, an exception will be thrown when an error occurs. If set to false, Task will try to continue and the error message will be added into Result.ErrorMessage and Result.Success will be set to false.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                 |
| ErrorMessageOnFailure : `String` | <p>Gets or sets a custom error message to be used when an error occurs and ThrowErrorOnFailure is set to false.</p><p>If empty, the original error message will be used.</p><p><br>Default: <code>-</code><br>Example: <code>Failed to send message to AmazonSQS.</code></p>                                                                                                                                                                                                                     |
| DelaySeconds : `Int32`           | <p>The length of time, in seconds, for which to delay a specific message.</p><p>Valid values: -1 to 900. Maximum: 15 minutes.</p><p>Messages with a positive value become available for processing after the delay period is finished.</p><p>If value is -1, the default value for the queue applies.</p><p>When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level.</p><p><br>Default: <code>-1</code><br>Example: <code>-1</code></p> |
| {% endtab %}                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

{% tab title="Result: Result" %}

| Name                    | Description                                                                                                                                                   |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`     | <p>Gets a value indicating whether the Task was executed successfully.<br>Example: <code>true</code></p>                                                      |
| MessageId : `String`    | <p>MessageId.<br>Example: <code>aae72806-1469-4663-b3d3-5228d163baa6</code></p>                                                                               |
| StatusCode : `String`   | <p>Status code of the operation.<br>Example: <code>OK</code></p>                                                                                              |
| ContentLength : `Int64` | <p>Length of the sent content.<br>Example: <code>378</code></p>                                                                                               |
| Error : `Error`         | <p>Error information. This value is generated when an exception occurs and Options.ThrowErrorOnFailure = false.<br>Example: <code>Error occured...</code></p> |
| {% endtab %}            |                                                                                                                                                               |

{% tab title="Changelog" %}

## Changelog

### \[2.0.0] - 2025-07-23

#### Added

* ErrorMessageOnFailure property to Options class for custom error messages
* Error class in Definitions folder with Message and AdditionalInfo properties
* ErrorHandler class in Helpers folder for centralized error handling

#### Changed

* Renamed AnonymousAWSCredentials to AnonymousAwsCredentials
* Renamed BasicAWSCredentials to BasicAwsCredentials
* Renamed EnvironmentAWSCredentials to EnvironmentAwsCredentials
* Renamed SessionAWSCredentials to SessionAwsCredentials
* Renamed ThrowExceptionOnError to ThrowErrorOnFailure
* Renamed HttpStatus property to StatusCode in Result class
* Updated error handling to use centralized ErrorHandler.Handle method
* ThrowErrorOnFailure now defaults to true for consistent behavior
* Restructured task parameters into Input, Connection, and Options classes

#### Removed

* \[Breaking] ErrorMessage property from Result class (replaced with Error object)

### \[1.0.0] - 2024-01-08

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
