fix(aws/health): events mode - filter issue with paws custommode (#2731)

This commit is contained in:
qgarnier 2021-04-23 09:09:14 +02:00 committed by GitHub
parent b2ce45d0f1
commit 373b91c86e
2 changed files with 3 additions and 3 deletions

View File

@ -582,8 +582,8 @@ sub health_describe_events {
my $health = Paws->service('Health', caller => $lwp_caller, region => $self->{option_results}->{region});
my $health_options = { Filter => {} };
foreach ((['service', 'Services'], ['region', 'Regions'], ['entity_value', 'EntityValues'], ['event_status', 'EventStatusCodes'], ['event_category', 'EventTypeCategories'])) {
next if (!defined($options{ $_->[0] }));
$health_options->{Filter}->{ $_->[1] } = $_->[0];
next if (!defined($options{ 'filter_' . $_->[0] }));
$health_options->{Filter}->{ $_->[1] } = $options{ 'filter_' . $_->[0] };
}
while ((my $events = $health->DescribeEvents(%$health_options))) {

View File

@ -103,7 +103,7 @@ sub check_options {
next if ($option eq '');
$self->{filter_options}->{'filter_' . $_} = [] if (!defined($self->{filter_options}->{'filter_' . $_}));
push @{$self->{filter_options}->{'filter_' . $_}}, $option;
push @{$self->{filter_options}->{'filter_' . $_}}, split(/,/, $options);
}
}
}