MailManager / Client / get_traffic_policy
get_traffic_policy#
- MailManager.Client.get_traffic_policy(**kwargs)#
Fetch attributes of a traffic policy resource.
See also: AWS API Documentation
Request Syntax
response = client.get_traffic_policy( TrafficPolicyId='string' )
- Parameters:
TrafficPolicyId (string) –
[REQUIRED]
The identifier of the traffic policy resource.
- Return type:
dict
- Returns:
Response Syntax
{ 'CreatedTimestamp': datetime(2015, 1, 1), 'DefaultAction': 'ALLOW'|'DENY', 'LastUpdatedTimestamp': datetime(2015, 1, 1), 'MaxMessageSizeBytes': 123, 'PolicyStatements': [ { 'Action': 'ALLOW'|'DENY', 'Conditions': [ { 'BooleanExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' } }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SENDER_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'StringExpression': { 'Evaluate': { 'Attribute': 'RECIPIENT' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'TlsExpression': { 'Evaluate': { 'Attribute': 'TLS_PROTOCOL' }, 'Operator': 'MINIMUM_TLS_VERSION'|'IS', 'Value': 'TLS1_2'|'TLS1_3' } }, ] }, ], 'TrafficPolicyArn': 'string', 'TrafficPolicyId': 'string', 'TrafficPolicyName': 'string' }
Response Structure
(dict) –
CreatedTimestamp (datetime) –
The timestamp of when the traffic policy was created.
DefaultAction (string) –
The default action of the traffic policy.
LastUpdatedTimestamp (datetime) –
The timestamp of when the traffic policy was last updated.
MaxMessageSizeBytes (integer) –
The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.
PolicyStatements (list) –
The list of conditions which are in the traffic policy resource.
(dict) –
The structure containing traffic policy conditions and actions.
Action (string) –
The action that informs a traffic policy resource to either allow or block the email if it matches a condition in the policy statement.
Conditions (list) –
The list of conditions to apply to incoming messages for filtering email traffic.
(dict) –
The email traffic filtering conditions which are contained in a traffic policy resource.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
BooleanExpression
,IpExpression
,StringExpression
,TlsExpression
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
BooleanExpression (dict) –
This represents a boolean type condition matching on the incoming mail. It performs the boolean operation configured in ‘Operator’ and evaluates the ‘Protocol’ object against the ‘Value’.
Evaluate (dict) –
The operand on which to perform a boolean condition operation.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
Analysis
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
Analysis (dict) –
The structure type for a boolean condition stating the Add On ARN and its returned value.
Analyzer (string) –
The Amazon Resource Name (ARN) of an Add On.
ResultField (string) –
The returned value from an Add On.
Operator (string) –
The matching operator for a boolean condition expression.
IpExpression (dict) –
This represents an IP based condition matching on the incoming mail. It performs the operation configured in ‘Operator’ and evaluates the ‘Protocol’ object against the ‘Value’.
Evaluate (dict) –
The left hand side argument of an IP condition expression.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
Attribute
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
Attribute (string) –
An enum type representing the allowed attribute types for an IP condition.
Operator (string) –
The matching operator for an IP condition expression.
Values (list) –
The right hand side argument of an IP condition expression.
(string) –
StringExpression (dict) –
This represents a string based condition matching on the incoming mail. It performs the string operation configured in ‘Operator’ and evaluates the ‘Protocol’ object against the ‘Value’.
Evaluate (dict) –
The left hand side argument of a string condition expression.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
Attribute
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
Attribute (string) –
The enum type representing the allowed attribute types for a string condition.
Operator (string) –
The matching operator for a string condition expression.
Values (list) –
The right hand side argument of a string condition expression.
(string) –
TlsExpression (dict) –
This represents a TLS based condition matching on the incoming mail. It performs the operation configured in ‘Operator’ and evaluates the ‘Protocol’ object against the ‘Value’.
Evaluate (dict) –
The left hand side argument of a TLS condition expression.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
Attribute
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
Attribute (string) –
The enum type representing the allowed attribute types for the TLS condition.
Operator (string) –
The matching operator for a TLS condition expression.
Value (string) –
The right hand side argument of a TLS condition expression.
TrafficPolicyArn (string) –
The Amazon Resource Name (ARN) of the traffic policy resource.
TrafficPolicyId (string) –
The identifier of the traffic policy resource.
TrafficPolicyName (string) –
A user-friendly name for the traffic policy resource.
Exceptions