Cfn/Resource/AWS/IAM/Role.pm

filter: Statementstmt 78.6% 48 / 61 Branchbran 33.3% 2 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 10 / 15 Podpod 0.0% 0 / 3 totaltotal 70.5% 60 / 85 CC 4 SCAR 6.9
CC
4
Cov
75%
__ANON__
6.0
__ANON__
2.3
__ANON__
2.1
CRAP 2.0
« Cfn/Resource/Alexa/ASK/Skill.pm ↑ Summary Cfn/Resource/AWS/ElasticLoadBalancingV2/ListenerCertificate.pm »
1 # AWS::IAM::Role generated from spec 18.4.0
2 4 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 coerce 'Cfn::Resource::Properties::AWS::IAM::Role',
5 from 'HashRef',
6 43 ▶ via { Cfn::Resource::Properties::AWS::IAM::Role->new( %$_ ) };
Subroutine __ANON__: called CC=1 SCAR=0.0
7  
8 4 package Cfn::Resource::AWS::IAM::Role {
9 4 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 4 extends 'Cfn::Resource';
11 4 has Properties => (isa => 'Cfn::Resource::Properties::AWS::IAM::Role', is => 'rw', coerce => 1);
12
13 0 ▶ sub AttributeList {
Subroutine AttributeList: not called CC=1 SCAR=6.9
Pod undocumented
14 0 [ 'Arn','RoleId' ]
15 }
16 0 ▶ sub supported_regions {
Subroutine supported_regions: not called CC=1 SCAR=6.9
Pod undocumented
17 0 [ 'af-south-1','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-south-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 0 ▶ sub addPolicy {
Subroutine addPolicy: not called CC=1 SCAR=6.9
Pod undocumented
20 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;
23 0 push @{ $self->Properties->Policies->Value }, @policies;
24 }
25
26 }
27  
28  
29 subtype 'ArrayOfCfn::Resource::Properties::AWS::IAM::Role::Policy',
30 as 'Cfn::Value',
31 14 ▶ where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
$_->isa("Cfn::Value::Array") or $_->isa("Cfn::Value::Function") 14 0 14
32 0 ▶message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
Subroutine __ANON__: not called CC=1 SCAR=1.2
33  
34 coerce 'ArrayOfCfn::Resource::Properties::AWS::IAM::Role::Policy',
35 from 'HashRef',
36 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
37 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
38 0 return $f
39 } else {
40 0 die 'Only accepts functions';
41 }
42 },
43 from 'ArrayRef',
44 14 ▶ via {
Subroutine __ANON__: called CC=1 SCAR=0.0
45 Cfn::Value::Array->new(Value => [
46 map {
47 14 Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::IAM::Role::Policy')->coerce($_)
48 } @$_
49 ]);
50 4 };
51  
52 4 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 18 ▶ via {
Subroutine __ANON__: called CC=2 SCAR=8.1
58 18 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 18 18
59 0 return $f
60 } else {
61 18 return Cfn::Resource::Properties::Object::AWS::IAM::Role::Policy->new( %$_ );
62 }
63 4 };
64  
65 4 package Cfn::Resource::Properties::Object::AWS::IAM::Role::Policy {
66 4 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
67 4 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
68 4 extends 'Cfn::Value::TypedValue';
69
70 4 has PolicyDocument => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
71 4 has PolicyName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
72 }
73  
74 4 package Cfn::Resource::Properties::AWS::IAM::Role {
75 4 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
76 4 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
77 4 extends 'Cfn::Resource::Properties';
78
79 4 has AssumeRolePolicyDocument => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
80 4 has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
81 4 has ManagedPolicyArns => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
82 4 has MaxSessionDuration => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
83 4 has Path => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
84 4 has PermissionsBoundary => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
85 4 has Policies => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IAM::Role::Policy', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86 4 has RoleName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
87 4 has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
88 }
89  
90 4 1;
91 ### main pod documentation begin ###
92  
93 =encoding UTF-8
94  
95 =head1 NAME
96  
97 Cfn::Resource::AWS::IAM::Role - Cfn resource for AWS::IAM::Role
98  
99 =head1 DESCRIPTION
100  
101 This module implements a Perl module that represents the CloudFormation object AWS::IAM::Role.
102  
103 See L<Cfn> for more information on how to use it.
104  
105 =head1 AUTHOR
106  
107 Jose Luis Martinez
108 CAPSiDE
109 jlmartinez@capside.com
110  
111 =head1 COPYRIGHT and LICENSE
112  
113 Copyright (c) 2013 by CAPSiDE
114 This code is distributed under the Apache 2 License. The full text of the
115 license can be found in the LICENSE file included with this module.
116  
117 =cut
« Cfn/Resource/Alexa/ASK/Skill.pm ↑ Summary Cfn/Resource/AWS/ElasticLoadBalancingV2/ListenerCertificate.pm »