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- { 'TrafficPolicyName': 'string', 'TrafficPolicyId': 'string', 'TrafficPolicyArn': 'string', 'PolicyStatements': [ { 'Conditions': [ { 'StringExpression': { 'Evaluate': { 'Attribute': 'RECIPIENT', 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' } }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SENDER_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'Ipv6Expression': { 'Evaluate': { 'Attribute': 'SENDER_IPV6' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'TlsExpression': { 'Evaluate': { 'Attribute': 'TLS_PROTOCOL' }, 'Operator': 'MINIMUM_TLS_VERSION'|'IS', 'Value': 'TLS1_2'|'TLS1_3' }, 'BooleanExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' }, 'IsInAddressList': { 'Attribute': 'RECIPIENT', 'AddressLists': [ 'string', ] } }, 'Operator': 'IS_TRUE'|'IS_FALSE' } }, ], 'Action': 'ALLOW'|'DENY' }, ], 'MaxMessageSizeBytes': 123, 'DefaultAction': 'ALLOW'|'DENY', 'CreatedTimestamp': datetime(2015, 1, 1), 'LastUpdatedTimestamp': datetime(2015, 1, 1) } - Response Structure- (dict) – - TrafficPolicyName (string) – - A user-friendly name for the traffic policy resource. 
- TrafficPolicyId (string) – - The identifier of the traffic policy resource. 
- TrafficPolicyArn (string) – - The Amazon Resource Name (ARN) of the traffic policy resource. 
- PolicyStatements (list) – - The list of conditions which are in the traffic policy resource. - (dict) – - The structure containing traffic policy conditions and actions. - 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: - StringExpression,- IpExpression,- Ipv6Expression,- TlsExpression,- BooleanExpression. If a client receives an unknown member it will set- SDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure of- SDK_UNKNOWN_MEMBERis as follows:- 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} - 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,- Analysis. If a client receives an unknown member it will set- SDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure of- SDK_UNKNOWN_MEMBERis as follows:- 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} - Attribute (string) – - The enum type representing the allowed attribute types for a string condition. 
- Analysis (dict) – - The structure type for a string 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 string condition expression. 
- Values (list) – - The right hand side argument of a string condition expression. - (string) – 
 
 
- 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 set- SDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure of- SDK_UNKNOWN_MEMBERis 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) – 
 
 
- Ipv6Expression (dict) – - This represents an IPv6 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 IPv6 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 set- SDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure of- SDK_UNKNOWN_MEMBERis as follows:- 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} - Attribute (string) – - An enum type representing the allowed attribute types for an IPv6 condition. 
 
- Operator (string) – - The matching operator for an IPv6 condition expression. 
- Values (list) – - The right hand side argument of an IPv6 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 set- SDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure of- SDK_UNKNOWN_MEMBERis 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. 
 
- 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,- IsInAddressList. If a client receives an unknown member it will set- SDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure of- SDK_UNKNOWN_MEMBERis 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. 
 
- IsInAddressList (dict) – - The structure type for a boolean condition that provides the address lists to evaluate incoming traffic on. - Attribute (string) – - The email attribute that needs to be evaluated against the address list. 
- AddressLists (list) – - The address lists that will be used for evaluation. - (string) – 
 
 
 
- Operator (string) – - The matching operator for a boolean condition expression. 
 
 
 
- 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. 
 
 
- MaxMessageSizeBytes (integer) – - The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked. 
- DefaultAction (string) – - The default action of the traffic policy. 
- CreatedTimestamp (datetime) – - The timestamp of when the traffic policy was created. 
- LastUpdatedTimestamp (datetime) – - The timestamp of when the traffic policy was last updated. 
 
 
 - Exceptions