aws ssm put-compliance-items
Registers a compliance type and other compliance details on a designated resource. AWS CLI reference
1 example 7 options Its page in the AWS CLI reference
Examples
To register a compliance type and compliance details to a designated instance
The following put-compliance-items example registers the compliance type Custom:AVCheck to the specified managed instance.
aws ssm put-compliance-items --resource-id "i-1234567890abcdef0" --resource-type "ManagedInstance" --compliance-type "Custom:AVCheck" --execution-summary "ExecutionTime=2019-02-18T16:00:00Z" --items "Id=Version2.0,Title=ScanHost,Severity=CRITICAL,Status=COMPLIANT"Identify--resource-idSpecify an ID for this resource.--resource-typeSpecify the type of resource.--compliance-typeSpecify the compliance type.--execution-summaryA summary of the call execution that includes an execution ID, the type of execution (for example, Command), and the date/time of the execution using a datetime object that is saved in the following format: yyyy-MM-dd'T'HH:mm:ss'Z'--itemsInformation about the compliance as defined by the resource type.This command produces no output.
For more information, see Assign custom compliance metadata using the AWS CLI in the AWS Systems Manager User Guide.
Options
--compliance-typeSpecify the compliance type.--execution-summaryA summary of the call execution that includes an execution ID, the type of execution (for example, Command), and the date/time of the execution using a datetime object that is saved in the following format: yyyy-MM-dd'T'HH:mm:ss'Z'--item-content-hashMD5 or SHA-256 content hash.--itemsInformation about the compliance as defined by the resource type.--resource-idSpecify an ID for this resource.--resource-typeSpecify the type of resource.--upload-typeThe mode for uploading compliance items.