mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-09-26 11:18:39 +02:00
(plugin) cloud::azure::management::costs - mode costs-explorer 411 bad request (#4175)
This commit is contained in:
parent
a45e84435a
commit
6332bf9241
@ -280,7 +280,7 @@ sub convert_iso8601_to_epoch {
|
||||
nanosecond => $7
|
||||
);
|
||||
|
||||
my $epoch_time = $dt->epoch;
|
||||
my $epoch_time = $dt->epoch();
|
||||
return $epoch_time;
|
||||
|
||||
}
|
||||
@ -327,8 +327,13 @@ sub azure_get_subscription_cost_management {
|
||||
$encoded_form_post = JSON::XS->new->utf8->encode($options{body_post});
|
||||
};
|
||||
|
||||
$self->{http}->add_header(key => 'Content-Type', value => 'application/json');
|
||||
my $response = $self->request_api(method => 'POST', full_url => $full_url, query_form_post => $encoded_form_post, hostname => '');
|
||||
my $response = $self->request_api(
|
||||
method => 'POST',
|
||||
full_url => $full_url,
|
||||
query_form_post => $encoded_form_post,
|
||||
hostname => '',
|
||||
header => ['Content-Type: application/json']
|
||||
);
|
||||
|
||||
return $response->{properties}->{rows};
|
||||
}
|
||||
@ -577,8 +582,8 @@ sub azure_list_vms {
|
||||
sub azure_list_file_shares_set_url {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my $url = $self->{management_endpoint} . "/subscriptions/" . $self->{subscription} . "/resourceGroups/" . $options{resource_group} . "/providers/Microsoft.Storage/storageAccounts/"
|
||||
. $options{storage_account} . "/fileServices/default/shares?api-version=" . $options{api_version};
|
||||
my $url = $self->{management_endpoint} . "/subscriptions/" . $self->{subscription} . "/resourceGroups/" . $options{resource_group} . "/providers/Microsoft.Storage/storageAccounts/" .
|
||||
$options{storage_account} . "/fileServices/default/shares?api-version=" . $options{api_version};
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user