EC2 / Client / modify_traffic_mirror_filter_rule
modify_traffic_mirror_filter_rule#
- EC2.Client.modify_traffic_mirror_filter_rule(**kwargs)#
Modifies the specified Traffic Mirror rule.
DestinationCidrBlock
andSourceCidrBlock
must both be an IPv4 range or an IPv6 range.See also: AWS API Documentation
Request Syntax
response = client.modify_traffic_mirror_filter_rule( TrafficMirrorFilterRuleId='string', TrafficDirection='ingress'|'egress', RuleNumber=123, RuleAction='accept'|'reject', DestinationPortRange={ 'FromPort': 123, 'ToPort': 123 }, SourcePortRange={ 'FromPort': 123, 'ToPort': 123 }, Protocol=123, DestinationCidrBlock='string', SourceCidrBlock='string', Description='string', RemoveFields=[ 'destination-port-range'|'source-port-range'|'protocol'|'description', ], DryRun=True|False )
- Parameters:
TrafficMirrorFilterRuleId (string) –
[REQUIRED]
The ID of the Traffic Mirror rule.
TrafficDirection (string) – The type of traffic to assign to the rule.
RuleNumber (integer) – The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.
RuleAction (string) – The action to assign to the rule.
DestinationPortRange (dict) –
The destination ports that are associated with the Traffic Mirror rule.
FromPort (integer) –
The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.
ToPort (integer) –
The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.
SourcePortRange (dict) –
The port range to assign to the Traffic Mirror rule.
FromPort (integer) –
The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.
ToPort (integer) –
The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.
Protocol (integer) – The protocol, for example TCP, to assign to the Traffic Mirror rule.
DestinationCidrBlock (string) – The destination CIDR block to assign to the Traffic Mirror rule.
SourceCidrBlock (string) – The source CIDR block to assign to the Traffic Mirror rule.
Description (string) – The description to assign to the Traffic Mirror rule.
RemoveFields (list) –
The properties that you want to remove from the Traffic Mirror filter rule.
When you remove a property from a Traffic Mirror filter rule, the property is set to the default.
(string) –
DryRun (boolean) – Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
- Return type:
dict
- Returns:
Response Syntax
{ 'TrafficMirrorFilterRule': { 'TrafficMirrorFilterRuleId': 'string', 'TrafficMirrorFilterId': 'string', 'TrafficDirection': 'ingress'|'egress', 'RuleNumber': 123, 'RuleAction': 'accept'|'reject', 'Protocol': 123, 'DestinationPortRange': { 'FromPort': 123, 'ToPort': 123 }, 'SourcePortRange': { 'FromPort': 123, 'ToPort': 123 }, 'DestinationCidrBlock': 'string', 'SourceCidrBlock': 'string', 'Description': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } }
Response Structure
(dict) –
TrafficMirrorFilterRule (dict) –
Note
Tags are not returned for ModifyTrafficMirrorFilterRule.
A Traffic Mirror rule.
TrafficMirrorFilterRuleId (string) –
The ID of the Traffic Mirror rule.
TrafficMirrorFilterId (string) –
The ID of the Traffic Mirror filter that the rule is associated with.
TrafficDirection (string) –
The traffic direction assigned to the Traffic Mirror rule.
RuleNumber (integer) –
The rule number of the Traffic Mirror rule.
RuleAction (string) –
The action assigned to the Traffic Mirror rule.
Protocol (integer) –
The protocol assigned to the Traffic Mirror rule.
DestinationPortRange (dict) –
The destination port range assigned to the Traffic Mirror rule.
FromPort (integer) –
The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.
ToPort (integer) –
The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.
SourcePortRange (dict) –
The source port range assigned to the Traffic Mirror rule.
FromPort (integer) –
The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.
ToPort (integer) –
The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.
DestinationCidrBlock (string) –
The destination CIDR block assigned to the Traffic Mirror rule.
SourceCidrBlock (string) –
The source CIDR block assigned to the Traffic Mirror rule.
Description (string) –
The description of the Traffic Mirror rule.
Tags (list) –
Tags on Traffic Mirroring filter rules.
(dict) –
Describes a tag.
Key (string) –
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with
aws:
.Value (string) –
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.