traffic_policies
Creates, updates, deletes, gets or lists a traffic_policies resource.
Overview
| Name | traffic_policies |
| Type | Resource |
| Id | aws.mailmanager.traffic_policies |
Fields
The following fields are returned by SELECT queries:
- get_traffic_policy
- list_traffic_policies
| Name | Datatype | Description |
|---|---|---|
created_timestamp | string (date-time) | The timestamp of when the traffic policy was created. |
default_action | string | The default action of the traffic policy. (ALLOW, DENY) |
last_updated_timestamp | string (date-time) | The timestamp of when the traffic policy was last updated. |
max_message_size_bytes | integer | The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked. |
policy_statements | array | The list of conditions which are in the traffic policy resource. |
traffic_policy_arn | string | The Amazon Resource Name (ARN) of the traffic policy resource. |
traffic_policy_id | string | The identifier of the traffic policy resource. |
traffic_policy_name | string | A user-friendly name for the traffic policy resource. (pattern: <code>[A-Za-z0-9_-]+</code>) |
| Name | Datatype | Description |
|---|---|---|
default_action | string | Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements (ALLOW, DENY) |
traffic_policy_id | string | The identifier of the traffic policy resource. |
traffic_policy_name | string | A user-friendly name of the traffic policy resource. (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_traffic_policy | select | region | Fetch attributes of a traffic policy resource. | |
list_traffic_policies | select | region | List traffic policy resources. | |
create_traffic_policy | insert | region, TrafficPolicyName, PolicyStatements, DefaultAction | Provision a new traffic policy resource. | |
update_traffic_policy | update | region, TrafficPolicyId | Update attributes of an already provisioned traffic policy resource. | |
delete_traffic_policy | delete | region | Delete a traffic policy 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_traffic_policy
- list_traffic_policies
Fetch attributes of a traffic policy resource.
SELECT
created_timestamp,
default_action,
last_updated_timestamp,
max_message_size_bytes,
policy_statements,
traffic_policy_arn,
traffic_policy_id,
traffic_policy_name
FROM aws.mailmanager.traffic_policies
WHERE region = '{{ region }}' -- required
;
List traffic policy resources.
SELECT
default_action,
traffic_policy_id,
traffic_policy_name
FROM aws.mailmanager.traffic_policies
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_traffic_policy
- Manifest
Provision a new traffic policy resource.
INSERT INTO aws.mailmanager.traffic_policies (
ClientToken,
TrafficPolicyName,
PolicyStatements,
DefaultAction,
MaxMessageSizeBytes,
Tags,
region
)
SELECT
'{{ ClientToken }}',
'{{ TrafficPolicyName }}' /* required */,
'{{ PolicyStatements }}' /* required */,
'{{ DefaultAction }}' /* required */,
{{ MaxMessageSizeBytes }},
'{{ Tags }}',
'{{ region }}'
RETURNING
traffic_policy_id
;
# Description fields are for documentation purposes
- name: traffic_policies
props:
- name: region
value: "{{ region }}"
description: Required parameter for the traffic_policies resource.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
A unique token that Amazon SES uses to recognize subsequent retries of the same request.
- name: TrafficPolicyName
value: "{{ TrafficPolicyName }}"
description: |
A user-friendly name for the traffic policy resource.
- name: PolicyStatements
description: |
Conditional statements for filtering email traffic.
value:
- Conditions: "{{ Conditions }}"
Action: "{{ Action }}"
- name: DefaultAction
value: "{{ DefaultAction }}"
description: |
Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements
valid_values: ['ALLOW', 'DENY']
- name: MaxMessageSizeBytes
value: {{ MaxMessageSizeBytes }}
description: |
The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.
- 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_traffic_policy
Update attributes of an already provisioned traffic policy resource.
UPDATE aws.mailmanager.traffic_policies
SET
TrafficPolicyId = '{{ TrafficPolicyId }}',
TrafficPolicyName = '{{ TrafficPolicyName }}',
PolicyStatements = '{{ PolicyStatements }}',
DefaultAction = '{{ DefaultAction }}',
MaxMessageSizeBytes = {{ MaxMessageSizeBytes }}
WHERE
region = '{{ region }}' --required
AND TrafficPolicyId = '{{ TrafficPolicyId }}' --required;
DELETE examples
- delete_traffic_policy
Delete a traffic policy resource.
DELETE FROM aws.mailmanager.traffic_policies
WHERE region = '{{ region }}' --required
;