使用 AWS SDK 对 Systems Manager 执行的操作
以下代码示例演示了如何使用 AWS SDK 来执行各个 Systems Manager 操作。每个示例都包含一个指向 GitHub 的链接,您可以在其中找到有关设置和运行代码的说明。
以下示例仅包括最常用的操作。有关完整列表,请参阅 AWS Systems Manager API 参考。
示例
- AddTagsToResource
- CancelCommand
- CreateActivation
- CreateAssociation
- CreateAssociationBatch
- CreateDocument
- CreateMaintenanceWindow
- CreateOpsItem
- CreatePatchBaseline
- DeleteActivation
- DeleteAssociation
- DeleteDocument
- DeleteMaintenanceWindow
- DeleteOpsItem
- DeleteParameter
- DeletePatchBaseline
- DeregisterManagedInstance
- DeregisterPatchBaselineForPatchGroup
- DeregisterTargetFromMaintenanceWindow
- DeregisterTaskFromMaintenanceWindow
- DescribeActivations
- DescribeAssociation
- DescribeAssociationExecutionTargets
- DescribeAssociationExecutions
- DescribeAutomationExecutions
- DescribeAutomationStepExecutions
- DescribeAvailablePatches
- DescribeDocument
- DescribeDocumentPermission
- DescribeEffectiveInstanceAssociations
- DescribeEffectivePatchesForPatchBaseline
- DescribeInstanceAssociationsStatus
- DescribeInstanceInformation
- DescribeInstancePatchStates
- DescribeInstancePatchStatesForPatchGroup
- DescribeInstancePatches
- DescribeMaintenanceWindowExecutionTaskInvocations
- DescribeMaintenanceWindowExecutionTasks
- DescribeMaintenanceWindowExecutions
- DescribeMaintenanceWindowTargets
- DescribeMaintenanceWindowTasks
- DescribeMaintenanceWindows
- DescribeOpsItems
- DescribeParameters
- DescribePatchBaselines
- DescribePatchGroupState
- DescribePatchGroups
- GetAutomationExecution
- GetCommandInvocation
- GetConnectionStatus
- GetDefaultPatchBaseline
- GetDeployablePatchSnapshotForInstance
- GetDocument
- GetInventory
- GetInventorySchema
- GetMaintenanceWindow
- GetMaintenanceWindowExecution
- GetMaintenanceWindowExecutionTask
- GetParameter
- GetParameterHistory
- GetParameters
- GetPatchBaseline
- GetPatchBaselineForPatchGroup
- ListAssociationVersions
- ListAssociations
- ListCommandInvocations
- ListCommands
- ListComplianceItems
- ListComplianceSummaries
- ListDocumentVersions
- ListDocuments
- ListInventoryEntries
- ListResourceComplianceSummaries
- ListTagsForResource
- ModifyDocumentPermission
- PutComplianceItems
- PutInventory
- PutParameter
- RegisterDefaultPatchBaseline
- RegisterPatchBaselineForPatchGroup
- RegisterTargetWithMaintenanceWindow
- RegisterTaskWithMaintenanceWindow
- RemoveTagsFromResource
- SendCommand
- StartAutomationExecution
- StartSession
- StopAutomationExecution
- UpdateAssociation
- UpdateAssociationStatus
- UpdateDocument
- UpdateDocumentDefaultVersion
- UpdateMaintenanceWindow
- UpdateManagedInstanceRole
- UpdateOpsItem
- UpdatePatchBaseline