fix(aws/health): events mode - filter issue with paws custommode (#2731)
This commit is contained in:
parent
b2ce45d0f1
commit
373b91c86e
|
@ -582,8 +582,8 @@ sub health_describe_events {
|
||||||
my $health = Paws->service('Health', caller => $lwp_caller, region => $self->{option_results}->{region});
|
my $health = Paws->service('Health', caller => $lwp_caller, region => $self->{option_results}->{region});
|
||||||
my $health_options = { Filter => {} };
|
my $health_options = { Filter => {} };
|
||||||
foreach ((['service', 'Services'], ['region', 'Regions'], ['entity_value', 'EntityValues'], ['event_status', 'EventStatusCodes'], ['event_category', 'EventTypeCategories'])) {
|
foreach ((['service', 'Services'], ['region', 'Regions'], ['entity_value', 'EntityValues'], ['event_status', 'EventStatusCodes'], ['event_category', 'EventTypeCategories'])) {
|
||||||
next if (!defined($options{ $_->[0] }));
|
next if (!defined($options{ 'filter_' . $_->[0] }));
|
||||||
$health_options->{Filter}->{ $_->[1] } = $_->[0];
|
$health_options->{Filter}->{ $_->[1] } = $options{ 'filter_' . $_->[0] };
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((my $events = $health->DescribeEvents(%$health_options))) {
|
while ((my $events = $health->DescribeEvents(%$health_options))) {
|
||||||
|
|
|
@ -103,7 +103,7 @@ sub check_options {
|
||||||
next if ($option eq '');
|
next if ($option eq '');
|
||||||
|
|
||||||
$self->{filter_options}->{'filter_' . $_} = [] if (!defined($self->{filter_options}->{'filter_' . $_}));
|
$self->{filter_options}->{'filter_' . $_} = [] if (!defined($self->{filter_options}->{'filter_' . $_}));
|
||||||
push @{$self->{filter_options}->{'filter_' . $_}}, $option;
|
push @{$self->{filter_options}->{'filter_' . $_}}, split(/,/, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue