-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for AWS::Iot::ScheduledAudit (#16)
* Add support for AWS::Iot::ScheduledAudit * Add improvements for the second revision for ScheduledAudit PR * Add improvements for the third revision for ScheduledAudit PR * Add improvements for the fourth revision for ScheduledAudit PR * Add improvements for the fifth revision for ScheduledAudit PR * Add improvements for the fifth revision for ScheduledAudit PR * Add improvements for the sixth revision for ScheduledAudit PR * Use ProgressEvents instead of Cfn exceptions Co-authored-by: Saurabh Singh <[email protected]>
- Loading branch information
1 parent
2ab36d7
commit 8d18680
Showing
28 changed files
with
2,104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# macOS | ||
.DS_Store | ||
._* | ||
|
||
# Maven outputs | ||
.classpath | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea | ||
out.java | ||
out/ | ||
.settings | ||
.project | ||
|
||
# auto-generated files | ||
target/ | ||
|
||
# our logs | ||
rpdk.log | ||
|
||
# contains credentials | ||
sam-tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"typeName": "AWS::IoT::ScheduledAudit", | ||
"language": "java", | ||
"runtime": "java8", | ||
"entrypoint": "com.amazonaws.iot.scheduledaudit.HandlerWrapper::handleRequest", | ||
"testEntrypoint": "com.amazonaws.iot.scheduledaudit.HandlerWrapper::testEntrypoint", | ||
"settings": { | ||
"namespace": [ | ||
"com", | ||
"amazonaws", | ||
"iot", | ||
"scheduledaudit" | ||
], | ||
"codegen_template_path": "guided_aws", | ||
"protocolVersion": "2.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
{ | ||
"typeName": "AWS::IoT::ScheduledAudit", | ||
"description": "Scheduled audits can be used to specify the checks you want to perform during an audit and how often the audit should be run.", | ||
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-iot.git", | ||
"definitions": { | ||
"Tag": { | ||
"description": "A key-value pair to associate with a resource.", | ||
"type": "object", | ||
"properties": { | ||
"Key": { | ||
"type": "string", | ||
"description": "The tag's key.", | ||
"minLength": 1, | ||
"maxLength": 128 | ||
}, | ||
"Value": { | ||
"type": "string", | ||
"description": "The tag's value.", | ||
"minLength": 1, | ||
"maxLength": 256 | ||
} | ||
}, | ||
"required": [ | ||
"Value", | ||
"Key" | ||
], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"properties": { | ||
"ScheduledAuditName": { | ||
"description": "The name you want to give to the scheduled audit.", | ||
"type": "string", | ||
"pattern": "[a-zA-Z0-9:_-]+", | ||
"minLength": 1, | ||
"maxLength": 128 | ||
}, | ||
"Frequency": { | ||
"description": "How often the scheduled audit takes place. Can be one of DAILY, WEEKLY, BIWEEKLY, or MONTHLY.", | ||
"type": "string", | ||
"enum": [ | ||
"DAILY", | ||
"WEEKLY", | ||
"BIWEEKLY", | ||
"MONTHLY" | ||
] | ||
}, | ||
"DayOfMonth": { | ||
"description": "The day of the month on which the scheduled audit takes place. Can be 1 through 31 or LAST. This field is required if the frequency parameter is set to MONTHLY.", | ||
"type": "string", | ||
"pattern": "^([1-9]|[12][0-9]|3[01])$|^LAST$" | ||
}, | ||
"DayOfWeek": { | ||
"description": "The day of the week on which the scheduled audit takes place. Can be one of SUN, MON, TUE,WED, THU, FRI, or SAT. This field is required if the frequency parameter is set to WEEKLY or BIWEEKLY.", | ||
"type": "string", | ||
"enum": [ | ||
"SUN", | ||
"MON", | ||
"TUE", | ||
"WED", | ||
"THU", | ||
"FRI", | ||
"SAT" | ||
] | ||
}, | ||
"TargetCheckNames": { | ||
"description": "Which checks are performed during the scheduled audit. Checks must be enabled for your account.", | ||
"type": "array", | ||
"uniqueItems": true, | ||
"insertionOrder": false, | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"ScheduledAuditArn": { | ||
"description": "The ARN (Amazon resource name) of the scheduled audit.", | ||
"type": "string", | ||
"minLength": 20, | ||
"maxLength": 2048 | ||
}, | ||
"Tags": { | ||
"type": "array", | ||
"maxItems": 50, | ||
"uniqueItems": true, | ||
"insertionOrder": false, | ||
"description": "An array of key-value pairs to apply to this resource.", | ||
"items": { | ||
"$ref": "#/definitions/Tag" | ||
} | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"primaryIdentifier": [ | ||
"/properties/ScheduledAuditName" | ||
], | ||
"required": [ | ||
"Frequency", | ||
"TargetCheckNames" | ||
], | ||
"createOnlyProperties": [ | ||
"/properties/ScheduledAuditName" | ||
], | ||
"readOnlyProperties": [ | ||
"/properties/ScheduledAuditArn" | ||
], | ||
"handlers": { | ||
"create": { | ||
"permissions": [ | ||
"iot:CreateScheduledAudit" | ||
] | ||
}, | ||
"read": { | ||
"permissions": [ | ||
"iot:DescribeScheduledAudit", | ||
"iot:ListTagsForResource" | ||
] | ||
}, | ||
"update": { | ||
"permissions": [ | ||
"iot:UpdateScheduledAudit", | ||
"iot:ListTagsForResource", | ||
"iot:UntagResource", | ||
"iot:TagResource" | ||
] | ||
}, | ||
"delete": { | ||
"permissions": [ | ||
"iot:DescribeScheduledAudit", | ||
"iot:DeleteScheduledAudit" | ||
] | ||
}, | ||
"list": { | ||
"permissions": [ | ||
"iot:ListScheduledAudits" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"ScheduledAuditName": "CfnContractTest", | ||
"Frequency": "DAILY", | ||
"TargetCheckNames": [ | ||
"CA_CERTIFICATE_EXPIRING_CHECK", | ||
"DEVICE_CERTIFICATE_EXPIRING_CHECK" | ||
], | ||
"Tags": [ | ||
{ | ||
"Key": "testTagKey", | ||
"Value": "tagValue" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"ScheduledAuditName": "CfnContractTest", | ||
"Frequency": "DAILY", | ||
"TargetCheckNames": [ | ||
"DEVICE_CERTIFICATE_SHARED_CHECK", | ||
"REVOKED_CA_CERT_CHECK" | ||
], | ||
"Tags": [ | ||
{ | ||
"Key": "testTagKey", | ||
"Value": "tagValue" | ||
} | ||
], | ||
"ScheduledAuditArn": "Arn is read only" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"ScheduledAuditName": "CfnContractTest", | ||
"Frequency": "MONTHLY", | ||
"DayOfMonth": "LAST", | ||
"TargetCheckNames": [ | ||
"CA_CERTIFICATE_EXPIRING_CHECK" | ||
], | ||
"Tags": [ | ||
{ | ||
"Key": "testTagKey", | ||
"Value": "tagValue" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lombok.addLombokGeneratedAnnotation = true |
Oops, something went wrong.