put_compliance_items
async
¶
put_compliance_items(
resource_id: ComplianceResourceId,
resource_type: ComplianceResourceType,
compliance_type: ComplianceTypeName,
execution_summary: ComplianceExecutionSummary,
items: ComplianceItemEntryList,
*,
config_overrides: Optional[AsyncSSMClientConfig] = None,
item_content_hash: Optional[ComplianceItemContentHash] = None,
upload_type: Optional[ComplianceUploadType] = None,
) -> PutComplianceItemsResult
Registers a compliance type and other compliance details on a designated resource. This operation 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.
ComplianceType can be one of the following:
-
ExecutionId: The execution ID when the patch, association, or custom compliance item was applied.
-
ExecutionType: Specify patch, association, or Custom:
string. -
ExecutionTime. The time the patch, association, or custom compliance item was applied to the managed node.
For State Manager associations, this represents the time when compliance status was captured by the Systems Manager service during its internal compliance aggregation workflow, not necessarily when the association was executed on the managed node. State Manager updates compliance information for all associations on an instance whenever any association executes, which may result in multiple associations showing the same execution time.
-
Id: The patch, association, or custom compliance ID.
-
Title: A title.
-
Status: The status of the compliance item. For example,
approvedfor patches, orFailedfor associations. -
Severity: A patch severity. For example,
Critical. -
DocumentName: An SSM document name. For example,
AWS-RunPatchBaseline. -
DocumentVersion: An SSM document version number. For example, 4.
-
Classification: A patch classification. For example,
security updates. -
PatchBaselineId: A patch baseline ID.
-
PatchSeverity: A patch severity. For example,
Critical. -
PatchState: A patch state. For example,
InstancesWithFailedPatches. -
PatchGroup: The name of a patch group.
-
InstalledTime: The time the association, patch, or custom compliance item was applied to the resource. Specify the time by using the following format:
yyyy-MM-dd'T'HH:mm:ss'Z'
Parameters:
-
resource_id(ComplianceResourceId) –Specify an ID for this resource. For a managed node, this is the node ID.
-
resource_type(ComplianceResourceType) –Specify the type of resource.
ManagedInstanceis currently the only supported resource type. -
compliance_type(ComplianceTypeName) –Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:
string. -
execution_summary(ComplianceExecutionSummary) –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' -
items(ComplianceItemEntryList) –Information about the compliance as defined by the resource type. For example, for a patch compliance type,
Itemsincludes information about the PatchSeverity, Classification, and so on. -
item_content_hash(Optional[ComplianceItemContentHash], default:None) –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.
-
upload_type(Optional[ComplianceUploadType], default:None) –The mode for uploading compliance items. You can specify
COMPLETEorPARTIAL. InCOMPLETEmode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.In
PARTIALmode, the system overwrites compliance information for a specific association. The association must be configured withSyncComplianceset toMANUAL. By default, all requests useCOMPLETEmode.This attribute is only valid for association compliance.
Raises:
-
ComplianceTypeCountLimitExceededException–You specified too many custom compliance types. You can specify a maximum of 10 different types.
-
InternalServerError–An error occurred on the server side.
-
InvalidItemContentException–One or more content items isn't valid.
-
InvalidResourceId–The resource ID isn't valid. Verify that you entered the correct ID and try again.
-
InvalidResourceType–The resource type isn't valid. For example, if you are attempting to tag an EC2 instance, the instance must be a registered managed node.
-
ItemSizeLimitExceededException–The inventory item size has exceeded the size limit.
-
TotalSizeLimitExceededException–The size of inventory data has exceeded the total size limit for the resource.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/async_ssm.py
9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 | |