Menu
AWS Systems Manager
API Reference (API Version 2014-11-06)

PutComplianceItems

Registers a compliance type and other compliance details on a designated resource. This action lets you register custom compliance details with a resource. This call overwrites existing compliance information on the resource, so you must provide a full list of compliance items each time that you send the request.

Request Syntax

{ "ComplianceType": "string", "ExecutionSummary": { "ExecutionId": "string", "ExecutionTime": number, "ExecutionType": "string" }, "ItemContentHash": "string", "Items": [ { "Details": { "string" : "string" }, "Id": "string", "Severity": "string", "Status": "string", "Title": "string" } ], "ResourceId": "string", "ResourceType": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ComplianceType

Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:string.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: [A-Za-z0-9_\-]\w+|Custom:[a-zA-Z0-9_\-]\w+

Required: Yes

ExecutionSummary

A 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'.

Type: ComplianceExecutionSummary object

Required: Yes

ItemContentHash

MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.

Type: String

Length Constraints: Maximum length of 256.

Required: No

Items

Information about the compliance as defined by the resource type. For example, for a patch compliance type, Items includes information about the PatchSeverity, Classification, etc.

Type: Array of ComplianceItemEntry objects

Array Members: Minimum number of 0 items. Maximum number of 10000 items.

Required: Yes

ResourceId

Specify an ID for this resource. For a managed instance, this is the instance ID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: Yes

ResourceType

Specify the type of resource. ManagedInstance is currently the only supported resource type.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 50.

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

ComplianceTypeCountLimitExceededException

You specified too many custom compliance types. You can specify a maximum of 10 different types.

HTTP Status Code: 400

InternalServerError

An error occurred on the server side.

HTTP Status Code: 400

InvalidItemContentException

One or more content items is not valid.

HTTP Status Code: 400

InvalidResourceId

The resource ID is not valid. Verify that you entered the correct ID and try again.

HTTP Status Code: 400

InvalidResourceType

The resource type is not valid. For example, if you are attempting to tag an instance, the instance must be a registered, managed instance.

HTTP Status Code: 400

ItemSizeLimitExceededException

The inventory item size has exceeded the size limit.

HTTP Status Code: 400

TotalSizeLimitExceededException

The size of inventory data has exceeded the total size limit for the resource.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: