Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 49ab83f

Browse files
mprincephobologic
authored andcommitted
Update codebuild as of 09/20/18 (cloudtools#1175)
1 parent 98571de commit 49ab83f

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

troposphere/codebuild.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,44 @@ class ProjectTriggers(AWSProperty):
177177
}
178178

179179

180+
def validate_status(status):
181+
""" Validate status
182+
:param status: The Status of CloudWatchLogs or S3Logs
183+
:return: The provided value if valid
184+
"""
185+
valid_statuses = [
186+
'ENABLED',
187+
'DISABLED'
188+
]
189+
190+
if status not in valid_statuses:
191+
raise ValueError('Status: must be one of %s' %
192+
','.join(valid_statuses))
193+
return status
194+
195+
196+
class CloudWatchLogs(AWSProperty):
197+
props = {
198+
"Status": (validate_status, True),
199+
"GroupName": (basestring, False),
200+
"StreamName": (basestring, False)
201+
}
202+
203+
204+
class S3Logs(AWSProperty):
205+
props = {
206+
"Status": (validate_status, True),
207+
"Location": (basestring, False)
208+
}
209+
210+
211+
class LogsConfig(AWSProperty):
212+
props = {
213+
'CloudWatchLogs': (CloudWatchLogs, False),
214+
'S3Logs': (S3Logs, False)
215+
}
216+
217+
180218
class Project(AWSObject):
181219
resource_type = "AWS::CodeBuild::Project"
182220

@@ -187,6 +225,7 @@ class Project(AWSObject):
187225
'Description': (basestring, False),
188226
'EncryptionKey': (basestring, False),
189227
'Environment': (Environment, True),
228+
"LogsConfig": (LogsConfig, False),
190229
'Name': (basestring, True),
191230
'SecondaryArtifacts': ([Artifacts], False),
192231
'SecondarySources': ([Source], False),

0 commit comments

Comments
 (0)