File Coverage

blib/lib/CloudHealth/API/Call/EnableAWSAccount.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 22 22 100.0


line stmt bran cond sub pod time code
1             package CloudHealth::API::Call::EnableAWSAccount;
2 1     1   579 use Moo;
  1         3  
  1         7  
3 1     1   451 use MooX::StrictConstructor;
  1         4  
  1         8  
4 1     1   1132 use Types::Standard qw/Str Int Bool Dict Optional ArrayRef/;
  1         3  
  1         18  
5              
6             has name => (is => 'ro', isa => Str);
7             has authentication => (
8             is => 'ro', required => 1,
9             isa => Dict[
10             protocol => Str,
11             access_key => Optional[Str],
12             secret_key => Optional[Str],
13             assume_role_arn => Optional[Str],
14             assume_role_external_id => Optional[Str],
15             ]
16             );
17             has billing => (is => 'ro', isa => Dict[bucket => Str]);
18             has cloudtrail => (
19             is => 'ro',
20             isa => Dict[
21             enabled => Bool,
22             bucket => Str,
23             prefix => Optional[Str]
24             ]
25             );
26             has aws_config => (
27             is => 'ro',
28             isa => Dict[
29             enabled => Bool,
30             bucket => Str,
31             prefix => Optional[Str]
32             ]
33             );
34             has cloudwatch => (
35             is => 'ro',
36             isa => Dict[enabled => Bool]
37             );
38             has tags => (
39             is => 'ro',
40             isa => ArrayRef[Dict[key => Str, value => Str]]
41             );
42             has hide_public_fields => (is => 'ro', isa => Bool);
43             has region => (is => 'ro', isa => Str);
44              
45             sub _body_params { [
46 1     1   11 { name => 'name' },
47             { name => 'authentication' },
48             { name => 'billing' },
49             { name => 'cloudtrail' },
50             { name => 'aws_config' },
51             { name => 'cloudwatch' },
52             { name => 'tags' },
53             { name => 'hide_public_fields' },
54             { name => 'region' },
55             ] }
56 1     1   5 sub _query_params { [ ] }
57 1     1   4 sub _url_params { [ ] }
58 1     1   22 sub _method { 'POST' }
59 1     1   4 sub _url { 'https://chapi.cloudhealthtech.com/v1/aws_accounts' }
60              
61             1;