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
)
[REQUIRED]
The ID of the Traffic Mirror rule.
The destination ports that are associated with the Traffic Mirror rule.
The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.
The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.
The port range to assign to the Traffic Mirror rule.
The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.
The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.
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.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.dict
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'
}
}
Response Structure
(dict) --
TrafficMirrorFilterRule (dict) --
Modifies 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.