Module: CfnDsl::Patches

Defined in:
lib/cfndsl/patches.rb

Overview

Module for handling inconsistencies in the published resource specification from AWS rubocop:disable Metrics/ModuleLength

Class Method Summary collapse

Class Method Details

.resourcesObject

Missing/malformed resources from the resource specification rubocop:disable Metrics/MethodLength



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/cfndsl/patches.rb', line 9

def self.resources
  {
    'AWS::EC2::VPCEndpoint' => {
      'Properties' => {
        'PolicyDocument' => { 'PrimitiveType' => 'Json' },
        'PrivateDnsEnabled' => { 'PrimitiveType' => 'Boolean' },
        'RouteTableIds' => { 'PrimitiveType' => 'String' },
        'SecurityGroupIds' => { 'PrimitiveType' => 'String' },
        'ServiceName' => { 'PrimitiveType' => 'String' },
        'SubnetIds' => { 'PrimitiveType' => 'String' },
        'VpcEndpointType' => { 'PrimitiveType' => 'String' },
        'VpcId' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::CloudWatch::Alarm' => {
      'Properties' => {
        'ActionsEnabled' => { 'PrimitiveType' => 'Boolean' },
        'AlarmActions' => { 'Type' => 'List', 'PrimitiveType' => 'String' },
        'AlarmDescription' => { 'PrimitiveType' => 'String' },
        'AlarmName' => { 'PrimitiveType' => 'String' },
        'ComparisonOperator' => { 'PrimitiveType' => 'String' },
        'DatapointsToAlarm' => { 'PrimitiveType' => 'Integer' },
        'Dimensions' => { 'Type' => 'List', 'ItemType' => 'Dimension' },
        'EvaluateLowSampleCountPercentile' => { 'PrimitiveType' => 'String' },
        'EvaluationPeriods' => { 'PrimitiveType' => 'Integer' },
        'ExtendedStatistic' => { 'PrimitiveType' => 'String' },
        'InsufficientDataActions' => { 'Type' => 'List', 'PrimitiveType' => 'String' },
        'Metrics' => { 'Type' => 'List', 'PrimitiveType' => 'Json' },
        'MetricName' => { 'PrimitiveType' => 'String' },
        'Namespace' => { 'PrimitiveType' => 'String' },
        'OKActions' => { 'Type' => 'List', 'PrimitiveType' => 'String' },
        'Period' => { 'PrimitiveType' => 'Integer' },
        'Statistic' => { 'PrimitiveType' => 'String' },
        'Threshold' => { 'PrimitiveType' => 'Double' },
        'TreatMissingData' => { 'PrimitiveType' => 'String' },
        'Unit' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::Serverless::Function' => {
      'Properties' => {
        'Tags' => { 'PrimitiveType' => 'Json', 'ItemType' => 'String' },
        'Handler' => { 'PrimitiveType' => 'String' },
        'Runtime' => { 'PrimitiveType' => 'String' },
        'CodeUri' => { 'PrimitiveType' => 'String' },
        'InlineCode' => { 'PrimitiveType' => 'String' },
        'FunctionName' => { 'PrimitiveType' => 'String' },
        'Description' => { 'PrimitiveType' => 'String' },
        'MemorySize' => { 'PrimitiveType' => 'Integer' },
        'Timeout' => { 'PrimitiveType' => 'Integer' },
        'Role' => { 'PrimitiveType' => 'String' },
        'Policies' => { 'Type' => 'List', 'ItemType' => 'Policy' },
        'Environment' => { 'PrimitiveType' => 'Json' },
        'VpcConfig' => { 'Type' => 'VpcConfig' },
        'Events' => { 'PrimitiveType' => 'Json' },
        'Tracing' => { 'PrimitiveType' => 'String' },
        'KmsKeyArn' => { 'PrimitiveType' => 'String' },
        'DeadLetterQueue' => { 'PrimitiveType' => 'Json' },
        'DeploymentPreference' => { 'Type' => 'DeploymentPreference' },
        'AutoPublishAlias' => { 'PrimitiveType' => 'String' },
        'ReservedConcurrentExecutions' => { 'PrimitiveType' => 'Integer' }
      }
    },
    'AWS::IAM::Role' => {
      'Properties' => {
        'Tags' => { 'ItemType' => 'Tag', 'Type' => 'List' },
        'AssumeRolePolicyDocument' => { 'PrimitiveType' => 'Json' },
        'ManagedPolicyArns' => { 'PrimitiveItemType' => 'String', 'Type' => 'List' },
        'Path' => { 'PrimitiveType' => 'String' },
        'Policies' => { 'ItemType' => 'Policy', 'Type' => 'List' },
        'RoleName' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::Serverless::Api' => {
      'Properties' => {
        'Name' => { 'PrimitiveType' => 'String' },
        'StageName' => { 'PrimitiveType' => 'String' },
        'DefinitionUri' => { 'PrimitiveType' => 'String' },
        'DefinitionBody' => { 'PrimitiveType' => 'Json' },
        'CacheClusterEnabled' => { 'PrimitiveType' => 'Boolean' },
        'CacheClusterSize' => { 'PrimitiveType' => 'String' },
        'Variables' => { 'PrimitiveType' => 'Json' },
        'MethodSettings' => { 'PrimitiveType' => 'Json' },
        'EndpointConfiguration' => { 'PrimitiveType' => 'String' },
        'BinaryMediaTypes' => { 'Type' => 'List', 'PrimitiveType' => 'String' },
        'Cors' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::Serverless::SimpleTable' => {
      'Properties' => {
        'PrimaryKey' => { 'Type' => 'PrimaryKey' },
        'ProvisionedThroughput' => { 'Type' => 'ProvisionedThroughput' },
        'Tags' => { 'PrimitiveType' => 'Json', 'ItemType' => 'String' },
        'TableName' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::Serverless::Application' => {
      'Properties' => {
        'Location' => { 'PrimitiveType' => 'String' },
        'Parameters' => { 'PrimitiveType' => 'Json', 'ItemType' => 'String' },
        'NotificationARNs' => { 'PrimitiveType' => 'String' },
        'Tags' => { 'PrimitiveType' => 'Json', 'ItemType' => 'String' },
        'TimeoutInMinutes' => { 'PrimitiveType' => 'Integer' }
      }
    },
    'AWS::SSM::Parameter' => {
      'Properties' => {
        'Name' => { 'PrimitiveType' => 'String' },
        'Description' => { 'PrimitiveType' => 'String' },
        'Type' => { 'PrimitiveType' => 'String' },
        'Value' => { 'PrimitiveType' => 'String' }
      }
    }
  }
end

.typesObject

Missing/malformed types from the resource specification rubocop:disable Metrics/MethodLength



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/cfndsl/patches.rb', line 127

def self.types
  {
    'AWS::EC2::LaunchTemplate.Tag' => {
      'Properties' => {
        'Value' => { 'PrimitiveType' => 'String' },
        'Key' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::EC2::SpotFleet.Tag' => {
      'Properties' => {
        'Value' => { 'PrimitiveType' => 'String' },
        'Key' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::EC2::CapacityReservation.Tag' => {
      'Properties' => {
        'Value' => { 'PrimitiveType' => 'String' },
        'Key' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::DLM::LifecyclePolicy.Tag' => {
      'Properties' => {
        'Value' => { 'PrimitiveType' => 'String' },
        'Key' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::Api::GatewayDeployment.Tag' => {
      'Properties' => {
        'Value' => { 'PrimitiveType' => 'String' },
        'Key' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::EC2::ClientVpnEndpoint.Tag' => {
      'Properties' => {
        'Value' => { 'PrimitiveType' => 'String' },
        'Key' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::Serverless::SimpleTable.PrimaryKey' => {
      'Properties' => {
        'Name' => { 'PrimitiveType' => 'String' },
        'Type' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::Serverless::SimpleTable.ProvisionedThroughput' => {
      'Properties' => {
        'ReadCapacityUnits' => { 'PrimitiveType' => 'Integer' },
        'WriteCapacityUnits' => { 'PrimitiveType' => 'Integer' }
      }
    },
    'AWS::Serverless::Function.Policy' => {
      'Properties' => {
        'PolicyDocument' => { 'PrimitiveType' => 'Json' },
        'PolicyName' => { 'PrimitiveType' => 'String' }
      }
    },
    'AWS::Serverless::Function.VpcConfig' => {
      'Properties' => {
        'SecurityGroupIds' => { 'Type' => 'List', 'PrimitiveType' => 'String' },
        'SubnetIds' => { 'Type' => 'List', 'PrimitiveType' => 'String' }
      }
    },
    'AWS::Serverless::Function.DeploymentPreference' => {
      'Properties' => {
        'Enabled' => { 'PrimitiveType' => 'Boolean' },
        'Type' => { 'PrimitiveType' => 'String' },
        'Alarms' => { 'Type' => 'List', 'PrimitiveType' => 'String' },
        'Hooks' => { 'Type' => 'List', 'PrimitiveType' => 'String' }
      }
    }
  }
end