relays
Creates, updates, deletes, gets or lists a relays resource.
Overview
| Name | relays |
| Type | Resource |
| Id | aws.mailmanager.relays |
Fields
The following fields are returned by SELECT queries:
- get_relay
- list_relays
| Name | Datatype | Description |
|---|---|---|
authentication | object | The authentication attribute—contains the secret ARN where the customer relay server credentials are stored. |
created_timestamp | string (date-time) | The timestamp of when the relay was created. |
last_modified_timestamp | string (date-time) | The timestamp of when relay was last updated. |
relay_arn | string | The Amazon Resource Name (ARN) of the relay. |
relay_id | string | The unique relay identifier. (pattern: <code>[a-zA-Z0-9-]+</code>) |
relay_name | string | The unique name of the relay. (pattern: <code>[a-zA-Z0-9-_]+</code>) |
server_name | string | The destination relay server address. (pattern: <code>[a-zA-Z0-9-.]+</code>) |
server_port | integer | The destination relay server port. |
| Name | Datatype | Description |
|---|---|---|
last_modified_timestamp | string (date-time) | The timestamp of when the relay was last modified. |
relay_id | string | The unique relay identifier. (pattern: <code>[a-zA-Z0-9-]+</code>) |
relay_name | string | The unique relay name. (pattern: <code>[a-zA-Z0-9-_]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_relay | select | region | Fetch the relay resource and it's attributes. | |
list_relays | select | region | Lists all the existing relay resources. | |
create_relay | insert | region, RelayName, ServerName, ServerPort | Creates a relay resource which can be used in rules to relay incoming emails to defined relay destinations. | |
update_relay | update | region, RelayId | Updates the attributes of an existing relay resource. | |
delete_relay | delete | region | Deletes an existing relay resource. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_relay
- list_relays
Fetch the relay resource and it's attributes.
SELECT
authentication,
created_timestamp,
last_modified_timestamp,
relay_arn,
relay_id,
relay_name,
server_name,
server_port
FROM aws.mailmanager.relays
WHERE region = '{{ region }}' -- required
;
Lists all the existing relay resources.
SELECT
last_modified_timestamp,
relay_id,
relay_name
FROM aws.mailmanager.relays
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_relay
- Manifest
Creates a relay resource which can be used in rules to relay incoming emails to defined relay destinations.
INSERT INTO aws.mailmanager.relays (
ClientToken,
RelayName,
ServerName,
ServerPort,
Authentication,
Tags,
region
)
SELECT
'{{ ClientToken }}',
'{{ RelayName }}' /* required */,
'{{ ServerName }}' /* required */,
{{ ServerPort }} /* required */,
'{{ Authentication }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
relay_id
;
# Description fields are for documentation purposes
- name: relays
props:
- name: region
value: "{{ region }}"
description: Required parameter for the relays resource.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
A unique token that Amazon SES uses to recognize subsequent retries of the same request.
- name: RelayName
value: "{{ RelayName }}"
description: |
The unique name of the relay resource.
- name: ServerName
value: "{{ ServerName }}"
description: |
The destination relay server address.
- name: ServerPort
value: {{ ServerPort }}
description: |
The destination relay server port.
- name: Authentication
description: |
Authentication for the relay destination server—specify the secretARN where the SMTP credentials are stored.
value:
SecretArn: "{{ SecretArn }}"
NoAuthentication: "{{ NoAuthentication }}"
- name: Tags
description: |
The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_relay
Updates the attributes of an existing relay resource.
UPDATE aws.mailmanager.relays
SET
RelayId = '{{ RelayId }}',
RelayName = '{{ RelayName }}',
ServerName = '{{ ServerName }}',
ServerPort = {{ ServerPort }},
Authentication = '{{ Authentication }}'
WHERE
region = '{{ region }}' --required
AND RelayId = '{{ RelayId }}' --required;
DELETE examples
- delete_relay
Deletes an existing relay resource.
DELETE FROM aws.mailmanager.relays
WHERE region = '{{ region }}' --required
;