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
9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 | |