Cfn/Resource/AWS/IAM/Role.pm

filter: Statementstmt 81.9% 50 / 61 Branchbran 33.3% 2 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 12 / 15 Podpod 0.0% 0 / 3 totaltotal 75.2% 64 / 85 CC 4 SCAR 6.3
CC
4
Cov
78%
__ANON__
6.0
__ANON__
2.3
__ANON__
2.1
CRAP 1.9
« Cfn/Resource/AWS/Redshift/Cluster.pm ↑ Summary Cfn/Resource/AWS/ElasticLoadBalancingV2/ListenerCertificate.pm »
1 # AWS::IAM::Role generated from spec 18.4.0
2 6 ▶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 44 ▶ via { Cfn::Resource::Properties::AWS::IAM::Role->new( %$_ ) };
Subroutine __ANON__: called CC=1 SCAR=0.0
7  
8 6 package Cfn::Resource::AWS::IAM::Role {
9 6 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 6 extends 'Cfn::Resource';
11 6 has Properties => (isa => 'Cfn::Resource::Properties::AWS::IAM::Role', is => 'rw', coerce => 1);
12
13 sub AttributeList {
14 1 ▶ [ 'Arn','RoleId' ]
Subroutine AttributeList: called CC=1 SCAR=0.0
Pod undocumented
15 }
16 sub supported_regions {
17 1 ▶ [ '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' ]
Subroutine supported_regions: called CC=1 SCAR=0.0
Pod undocumented
18 }
19 sub addPolicy {
20 0 ▶ my ($self, @args) = @_;
Subroutine addPolicy: not called CC=1 SCAR=6.9
Pod undocumented
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 15 ▶ 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") 0 15 15
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 via {
37 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
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 via {
45 Cfn::Value::Array->new(Value => [
46 map {
47 15 ▶ Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::IAM::Role::Policy')->coerce($_)
Subroutine __ANON__: called CC=1 SCAR=0.0
48 } @$_
49 ]);
50 6 };
51  
52 6 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 19 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Subroutine __ANON__: called CC=2 SCAR=8.1
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 19 19
59 0 return $f
60 } else {
61 19 return Cfn::Resource::Properties::Object::AWS::IAM::Role::Policy->new( %$_ );
62 }
63 6 };
64  
65 6 package Cfn::Resource::Properties::Object::AWS::IAM::Role::Policy {
66 6 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
67 6 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
68 6 extends 'Cfn::Value::TypedValue';
69
70 6 has PolicyDocument => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
71 6 has PolicyName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
72 }
73  
74 6 package Cfn::Resource::Properties::AWS::IAM::Role {
75 6 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
76 6 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
77 6 extends 'Cfn::Resource::Properties';
78
79 6 has AssumeRolePolicyDocument => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
80 6 has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
81 6 has ManagedPolicyArns => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
82 6 has MaxSessionDuration => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
83 6 has Path => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
84 6 has PermissionsBoundary => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
85 6 has Policies => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IAM::Role::Policy', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86 6 has RoleName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
87 6 has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
88 }
89  
90 6 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/AWS/Redshift/Cluster.pm ↑ Summary Cfn/Resource/AWS/ElasticLoadBalancingV2/ListenerCertificate.pm »