line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# AWS::IAM::Role generated from spec 6.0.0 |
2
|
6
|
|
|
6
|
|
3728
|
use Moose::Util::TypeConstraints; |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
55
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
coerce 'Cfn::Resource::Properties::AWS::IAM::Role', |
5
|
|
|
|
|
|
|
from 'HashRef', |
6
|
|
|
|
|
|
|
via { Cfn::Resource::Properties::AWS::IAM::Role->new( %$_ ) }; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Cfn::Resource::AWS::IAM::Role { |
9
|
6
|
|
|
6
|
|
11704
|
use Moose; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
51
|
|
10
|
|
|
|
|
|
|
extends 'Cfn::Resource'; |
11
|
|
|
|
|
|
|
has Properties => (isa => 'Cfn::Resource::Properties::AWS::IAM::Role', is => 'rw', coerce => 1); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub AttributeList { |
14
|
1
|
|
|
1
|
0
|
4
|
[ 'Arn','RoleId' ] |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
sub supported_regions { |
17
|
1
|
|
|
1
|
0
|
1102
|
[ 'ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-southeast-1','ap-southeast-2','ca-central-1','cn-north-1','cn-northwest-1','eu-central-1','eu-north-1','eu-west-1','eu-west-2','eu-west-3','me-south-1','sa-east-1','us-east-1','us-east-2','us-gov-east-1','us-gov-west-1','us-west-1','us-west-2' ] |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
sub addPolicy { |
20
|
0
|
|
|
0
|
0
|
|
my ($self, @args) = @_; |
21
|
0
|
|
|
|
|
|
require Moose::Util::TypeConstraints; |
22
|
0
|
|
|
|
|
|
my @policies = map { Moose::Util::TypeConstraints::find_type_constraint('Cfn::Value')->coerce($_) } @args; |
|
0
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
push @{ $self->Properties->Policies->Value }, @policies; |
|
0
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
subtype 'ArrayOfCfn::Resource::Properties::AWS::IAM::Role::Policy', |
30
|
|
|
|
|
|
|
as 'Cfn::Value', |
31
|
|
|
|
|
|
|
where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') }, |
32
|
|
|
|
|
|
|
message { "$_ is not a Cfn::Value or a Cfn::Value::Function" }; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
coerce 'ArrayOfCfn::Resource::Properties::AWS::IAM::Role::Policy', |
35
|
|
|
|
|
|
|
from 'HashRef', |
36
|
|
|
|
|
|
|
via { |
37
|
|
|
|
|
|
|
if (my $f = Cfn::TypeLibrary::try_function($_)) { |
38
|
|
|
|
|
|
|
return $f |
39
|
|
|
|
|
|
|
} else { |
40
|
|
|
|
|
|
|
die 'Only accepts functions'; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
from 'ArrayRef', |
44
|
|
|
|
|
|
|
via { |
45
|
|
|
|
|
|
|
Cfn::Value::Array->new(Value => [ |
46
|
|
|
|
|
|
|
map { |
47
|
|
|
|
|
|
|
Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::IAM::Role::Policy')->coerce($_) |
48
|
|
|
|
|
|
|
} @$_ |
49
|
|
|
|
|
|
|
]); |
50
|
|
|
|
|
|
|
}; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
subtype 'Cfn::Resource::Properties::AWS::IAM::Role::Policy', |
53
|
|
|
|
|
|
|
as 'Cfn::Value'; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
coerce 'Cfn::Resource::Properties::AWS::IAM::Role::Policy', |
56
|
|
|
|
|
|
|
from 'HashRef', |
57
|
|
|
|
|
|
|
via { |
58
|
|
|
|
|
|
|
if (my $f = Cfn::TypeLibrary::try_function($_)) { |
59
|
|
|
|
|
|
|
return $f |
60
|
|
|
|
|
|
|
} else { |
61
|
|
|
|
|
|
|
return Cfn::Resource::Properties::AWS::IAM::Role::PolicyValue->new( %$_ ); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
}; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
package Cfn::Resource::Properties::AWS::IAM::Role::PolicyValue { |
66
|
6
|
|
|
6
|
|
40682
|
use Moose; |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
32
|
|
67
|
6
|
|
|
6
|
|
35722
|
use MooseX::StrictConstructor; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
52
|
|
68
|
|
|
|
|
|
|
extends 'Cfn::Value::TypedValue'; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
has PolicyDocument => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); |
71
|
|
|
|
|
|
|
has PolicyName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
package Cfn::Resource::Properties::AWS::IAM::Role { |
75
|
6
|
|
|
6
|
|
18577
|
use Moose; |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
27
|
|
76
|
6
|
|
|
6
|
|
35771
|
use MooseX::StrictConstructor; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
30
|
|
77
|
|
|
|
|
|
|
extends 'Cfn::Resource::Properties'; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
has AssumeRolePolicyDocument => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); |
80
|
|
|
|
|
|
|
has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); |
81
|
|
|
|
|
|
|
has ManagedPolicyArns => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); |
82
|
|
|
|
|
|
|
has MaxSessionDuration => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); |
83
|
|
|
|
|
|
|
has Path => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable'); |
84
|
|
|
|
|
|
|
has PermissionsBoundary => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); |
85
|
|
|
|
|
|
|
has Policies => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IAM::Role::Policy', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); |
86
|
|
|
|
|
|
|
has RoleName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable'); |
87
|
|
|
|
|
|
|
has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
1; |