register_target_with_maintenance_window
async
¶
register_target_with_maintenance_window(
window_id: MaintenanceWindowId,
resource_type: MaintenanceWindowResourceType,
targets: Targets,
*,
config_overrides: Optional[AsyncSSMClientConfig] = 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/async_ssm.py
10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 | |