update_traffic_policy
¶
update_traffic_policy(
traffic_policy_id: TrafficPolicyId,
*,
config_overrides: Optional[MailManagerClientConfig] = None,
traffic_policy_name: Optional[TrafficPolicyName] = None,
policy_statements: Optional[PolicyStatementList] = None,
default_action: Optional[AcceptAction] = None,
max_message_size_bytes: Optional[MaxMessageSizeBytes] = None,
) -> UpdateTrafficPolicyResponse
Update attributes of an already provisioned traffic policy resource.
Parameters:
-
traffic_policy_id(TrafficPolicyId) –The identifier of the traffic policy that you want to update.
-
traffic_policy_name(Optional[TrafficPolicyName], default:None) –A user-friendly name for the traffic policy resource.
-
policy_statements(Optional[PolicyStatementList], default:None) –The list of conditions to be updated for filtering email traffic.
-
default_action(Optional[AcceptAction], default:None) –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
-
max_message_size_bytes(Optional[MaxMessageSizeBytes], default:None) –The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.
Raises:
-
ConflictException–The request configuration has conflicts. For details, see the accompanying error message.
-
ResourceNotFoundException–Occurs when a requested resource is not found.
-
ValidationException–The request validation has failed. For details, see the accompanying error message.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Update TrafficPolicy with new Name
>>> client.update_traffic_policy(traffic_policy_id='tp-12345', traffic_policy_name='trafficPolicyNewName')
Update TrafficPolicy with new PolicyStatements
>>> client.update_traffic_policy(traffic_policy_id='tp-12345', policy_statements=[{'Conditions': [{'StringExpression': {'Evaluate': {'Attribute': 'RECIPIENT'}, 'Operator': 'EQUALS', 'Values': ['[email protected]', '[email protected]']}}], 'Action': 'ALLOW'}])
Update TrafficPolicy with new DefaultAction
Source code in docs_src/capo_mailmanager/_services/mail_manager.py
3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 | |