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
4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 | |