register_target_with_maintenance_window
¶
register_target_with_maintenance_window(
window_id: MaintenanceWindowId,
resource_type: MaintenanceWindowResourceType,
targets: Targets,
*,
config_overrides: Optional[SSMClientConfig] = None,
owner_information: Optional[OwnerInformation] = None,
name: Optional[MaintenanceWindowName] = None,
description: Optional[MaintenanceWindowDescription] = None,
client_token: Optional[ClientToken] = None,
) -> RegisterTargetWithMaintenanceWindowResult
Registers a target with a maintenance window.
Parameters:
-
window_id(MaintenanceWindowId) –The ID of the maintenance window the target should be registered with.
-
resource_type(MaintenanceWindowResourceType) –The type of target being registered with the maintenance window.
-
targets(Targets) –The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.
If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.
You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.
Example 1: Specify managed node IDs
Key=InstanceIds,Values=, , Example 2: Use tag key-pairs applied to managed nodes
Key=tag:,Values= , Example 3: Use tag-keys applied to managed nodes
Key=tag-key,Values=, Example 4: Use resource group names
Key=resource-groups:Name,Values=Example 5: Use filters for resource group types
Key=resource-groups:ResourceTypeFilters,Values=, For
Key=resource-groups:ResourceTypeFilters, specify resource types in the following formatKey=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPCFor more information about these examples formats, including the best use case for each one, see Examples: Register targets with a maintenance window in the Amazon Web Services Systems Manager User Guide.
-
owner_information(Optional[OwnerInformation], default:None) –User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.
-
name(Optional[MaintenanceWindowName], default:None) –An optional name for the target.
-
description(Optional[MaintenanceWindowDescription], default:None) –An optional description for the target.
-
client_token(Optional[ClientToken], default:None) –User-provided idempotency token.
Raises:
-
DoesNotExistException–Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.
For information about resource quotas in Amazon Web Services Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.
-
IdempotentParameterMismatch–Error returned when an idempotent operation is retried and the parameters don't match the original call to the API with the same idempotency token.
-
InternalServerError–An error occurred on the server side.
-
ResourceLimitExceededException–Error returned when the caller has exceeded the default resource quotas. For example, too many maintenance windows or patch baselines have been created.
For information about resource quotas in Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/ssm.py
9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 | |