File Coverage

blib/lib/Cfn/Resource/AWS/Glue/Database.pm
Criterion Covered Total %
statement 38 38 100.0
branch n/a
condition n/a
subroutine 14 14 100.0
pod 0 2 0.0
total 52 54 96.3


line stmt bran cond sub pod time code
1             # AWS::Glue::Database generated from spec 21.0.0
2 1     1   726 use Moose::Util::TypeConstraints;
  1         4  
  1         10  
3              
4             coerce 'Cfn::Resource::Properties::AWS::Glue::Database',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::Glue::Database->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::Glue::Database {
9 1     1   2259 use Moose;
  1         3  
  1         7  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::Glue::Database', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 4 [ ]
15             }
16             sub supported_regions {
17 1     1 0 1178 [ 'ap-northeast-1','ap-northeast-2','ap-south-1','ap-southeast-1','ap-southeast-2','ca-central-1','cn-northwest-1','eu-central-1','eu-north-1','eu-west-1','eu-west-2','eu-west-3','us-east-1','us-east-2','us-west-1','us-west-2' ]
18             }
19             }
20              
21              
22              
23             subtype 'Cfn::Resource::Properties::AWS::Glue::Database::DataLakePrincipal',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::Glue::Database::DataLakePrincipal',
27             from 'HashRef',
28             via {
29             if (my $f = Cfn::TypeLibrary::try_function($_)) {
30             return $f
31             } else {
32             return Cfn::Resource::Properties::Object::AWS::Glue::Database::DataLakePrincipal->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::Object::AWS::Glue::Database::DataLakePrincipal {
37 1     1   7833 use Moose;
  1         3  
  1         5  
38 1     1   7044 use MooseX::StrictConstructor;
  1         5  
  1         10  
39             extends 'Cfn::Value::TypedValue';
40            
41             has DataLakePrincipalIdentifier => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
42             }
43             subtype 'ArrayOfCfn::Resource::Properties::AWS::Glue::Database::PrincipalPrivileges',
44             as 'Cfn::Value',
45             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
46             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
47              
48             coerce 'ArrayOfCfn::Resource::Properties::AWS::Glue::Database::PrincipalPrivileges',
49             from 'HashRef',
50             via {
51             if (my $f = Cfn::TypeLibrary::try_function($_)) {
52             return $f
53             } else {
54             die 'Only accepts functions';
55             }
56             },
57             from 'ArrayRef',
58             via {
59             Cfn::Value::Array->new(Value => [
60             map {
61             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::Glue::Database::PrincipalPrivileges')->coerce($_)
62             } @$_
63             ]);
64             };
65              
66             subtype 'Cfn::Resource::Properties::AWS::Glue::Database::PrincipalPrivileges',
67             as 'Cfn::Value';
68              
69             coerce 'Cfn::Resource::Properties::AWS::Glue::Database::PrincipalPrivileges',
70             from 'HashRef',
71             via {
72             if (my $f = Cfn::TypeLibrary::try_function($_)) {
73             return $f
74             } else {
75             return Cfn::Resource::Properties::Object::AWS::Glue::Database::PrincipalPrivileges->new( %$_ );
76             }
77             };
78              
79             package Cfn::Resource::Properties::Object::AWS::Glue::Database::PrincipalPrivileges {
80 1     1   3809 use Moose;
  1         7  
  1         5  
81 1     1   6600 use MooseX::StrictConstructor;
  1         3  
  1         5  
82             extends 'Cfn::Value::TypedValue';
83            
84             has Permissions => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
85             has Principal => (isa => 'Cfn::Resource::Properties::AWS::Glue::Database::DataLakePrincipal', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86             }
87              
88             subtype 'Cfn::Resource::Properties::AWS::Glue::Database::DatabaseIdentifier',
89             as 'Cfn::Value';
90              
91             coerce 'Cfn::Resource::Properties::AWS::Glue::Database::DatabaseIdentifier',
92             from 'HashRef',
93             via {
94             if (my $f = Cfn::TypeLibrary::try_function($_)) {
95             return $f
96             } else {
97             return Cfn::Resource::Properties::Object::AWS::Glue::Database::DatabaseIdentifier->new( %$_ );
98             }
99             };
100              
101             package Cfn::Resource::Properties::Object::AWS::Glue::Database::DatabaseIdentifier {
102 1     1   3403 use Moose;
  1         2  
  1         5  
103 1     1   6558 use MooseX::StrictConstructor;
  1         3  
  1         4  
104             extends 'Cfn::Value::TypedValue';
105            
106             has CatalogId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
107             has DatabaseName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
108             }
109              
110             subtype 'Cfn::Resource::Properties::AWS::Glue::Database::DatabaseInput',
111             as 'Cfn::Value';
112              
113             coerce 'Cfn::Resource::Properties::AWS::Glue::Database::DatabaseInput',
114             from 'HashRef',
115             via {
116             if (my $f = Cfn::TypeLibrary::try_function($_)) {
117             return $f
118             } else {
119             return Cfn::Resource::Properties::Object::AWS::Glue::Database::DatabaseInput->new( %$_ );
120             }
121             };
122              
123             package Cfn::Resource::Properties::Object::AWS::Glue::Database::DatabaseInput {
124 1     1   3345 use Moose;
  1         2  
  1         5  
125 1     1   6527 use MooseX::StrictConstructor;
  1         7  
  1         7  
126             extends 'Cfn::Value::TypedValue';
127            
128             has CreateTableDefaultPermissions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::Glue::Database::PrincipalPrivileges', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
129             has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
130             has LocationUri => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
131             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
132             has Parameters => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
133             has TargetDatabase => (isa => 'Cfn::Resource::Properties::AWS::Glue::Database::DatabaseIdentifier', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
134             }
135              
136             package Cfn::Resource::Properties::AWS::Glue::Database {
137 1     1   3357 use Moose;
  1         5  
  1         6  
138 1     1   6479 use MooseX::StrictConstructor;
  1         2  
  1         6  
139             extends 'Cfn::Resource::Properties';
140            
141             has CatalogId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
142             has DatabaseInput => (isa => 'Cfn::Resource::Properties::AWS::Glue::Database::DatabaseInput', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
143             }
144              
145             1;
146             ### main pod documentation begin ###
147              
148             =encoding UTF-8
149              
150             =head1 NAME
151              
152             Cfn::Resource::AWS::Glue::Database - Cfn resource for AWS::Glue::Database
153              
154             =head1 DESCRIPTION
155              
156             This module implements a Perl module that represents the CloudFormation object AWS::Glue::Database.
157              
158             See L<Cfn> for more information on how to use it.
159              
160             =head1 AUTHOR
161              
162             Jose Luis Martinez
163             CAPSiDE
164             jlmartinez@capside.com
165              
166             =head1 COPYRIGHT and LICENSE
167              
168             Copyright (c) 2013 by CAPSiDE
169             This code is distributed under the Apache 2 License. The full text of the
170             license can be found in the LICENSE file included with this module.
171              
172             =cut