/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace SSM { namespace Model { /** */ class RegisterTargetWithMaintenanceWindowRequest : public SSMRequest { public: AWS_SSM_API RegisterTargetWithMaintenanceWindowRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "RegisterTargetWithMaintenanceWindow"; } AWS_SSM_API Aws::String SerializePayload() const override; AWS_SSM_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The ID of the maintenance window the target should be registered with.

*/ inline const Aws::String& GetWindowId() const{ return m_windowId; } /** *

The ID of the maintenance window the target should be registered with.

*/ inline bool WindowIdHasBeenSet() const { return m_windowIdHasBeenSet; } /** *

The ID of the maintenance window the target should be registered with.

*/ inline void SetWindowId(const Aws::String& value) { m_windowIdHasBeenSet = true; m_windowId = value; } /** *

The ID of the maintenance window the target should be registered with.

*/ inline void SetWindowId(Aws::String&& value) { m_windowIdHasBeenSet = true; m_windowId = std::move(value); } /** *

The ID of the maintenance window the target should be registered with.

*/ inline void SetWindowId(const char* value) { m_windowIdHasBeenSet = true; m_windowId.assign(value); } /** *

The ID of the maintenance window the target should be registered with.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithWindowId(const Aws::String& value) { SetWindowId(value); return *this;} /** *

The ID of the maintenance window the target should be registered with.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithWindowId(Aws::String&& value) { SetWindowId(std::move(value)); return *this;} /** *

The ID of the maintenance window the target should be registered with.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithWindowId(const char* value) { SetWindowId(value); return *this;} /** *

The type of target being registered with the maintenance window.

*/ inline const MaintenanceWindowResourceType& GetResourceType() const{ return m_resourceType; } /** *

The type of target being registered with the maintenance window.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The type of target being registered with the maintenance window.

*/ inline void SetResourceType(const MaintenanceWindowResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The type of target being registered with the maintenance window.

*/ inline void SetResourceType(MaintenanceWindowResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The type of target being registered with the maintenance window.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithResourceType(const MaintenanceWindowResourceType& value) { SetResourceType(value); return *this;} /** *

The type of target being registered with the maintenance window.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithResourceType(MaintenanceWindowResourceType&& value) { SetResourceType(std::move(value)); return *this;} /** *

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=<instance-id-1>,<instance-id-2>,<instance-id-3> *

Example 2: Use tag key-pairs applied to managed nodes

* Key=tag:<my-tag-key>,Values=<my-tag-value-1>,<my-tag-value-2> *

Example 3: Use tag-keys applied to managed nodes

* Key=tag-key,Values=<my-tag-key-1>,<my-tag-key-2>

*

Example 4: Use resource group names

* Key=resource-groups:Name,Values=<resource-group-name>

*

Example 5: Use filters for resource group types

* Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>,<resource-type-2> *

For Key=resource-groups:ResourceTypeFilters, specify * resource types in the following format

* Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC *

For 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.

*/ inline const Aws::Vector& GetTargets() const{ return m_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=<instance-id-1>,<instance-id-2>,<instance-id-3> *

Example 2: Use tag key-pairs applied to managed nodes

* Key=tag:<my-tag-key>,Values=<my-tag-value-1>,<my-tag-value-2> *

Example 3: Use tag-keys applied to managed nodes

* Key=tag-key,Values=<my-tag-key-1>,<my-tag-key-2>

*

Example 4: Use resource group names

* Key=resource-groups:Name,Values=<resource-group-name>

*

Example 5: Use filters for resource group types

* Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>,<resource-type-2> *

For Key=resource-groups:ResourceTypeFilters, specify * resource types in the following format

* Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC *

For 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.

*/ inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; } /** *

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=<instance-id-1>,<instance-id-2>,<instance-id-3> *

Example 2: Use tag key-pairs applied to managed nodes

* Key=tag:<my-tag-key>,Values=<my-tag-value-1>,<my-tag-value-2> *

Example 3: Use tag-keys applied to managed nodes

* Key=tag-key,Values=<my-tag-key-1>,<my-tag-key-2>

*

Example 4: Use resource group names

* Key=resource-groups:Name,Values=<resource-group-name>

*

Example 5: Use filters for resource group types

* Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>,<resource-type-2> *

For Key=resource-groups:ResourceTypeFilters, specify * resource types in the following format

* Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC *

For 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.

*/ inline void SetTargets(const Aws::Vector& value) { m_targetsHasBeenSet = true; m_targets = value; } /** *

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=<instance-id-1>,<instance-id-2>,<instance-id-3> *

Example 2: Use tag key-pairs applied to managed nodes

* Key=tag:<my-tag-key>,Values=<my-tag-value-1>,<my-tag-value-2> *

Example 3: Use tag-keys applied to managed nodes

* Key=tag-key,Values=<my-tag-key-1>,<my-tag-key-2>

*

Example 4: Use resource group names

* Key=resource-groups:Name,Values=<resource-group-name>

*

Example 5: Use filters for resource group types

* Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>,<resource-type-2> *

For Key=resource-groups:ResourceTypeFilters, specify * resource types in the following format

* Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC *

For 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.

*/ inline void SetTargets(Aws::Vector&& value) { m_targetsHasBeenSet = true; m_targets = std::move(value); } /** *

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=<instance-id-1>,<instance-id-2>,<instance-id-3> *

Example 2: Use tag key-pairs applied to managed nodes

* Key=tag:<my-tag-key>,Values=<my-tag-value-1>,<my-tag-value-2> *

Example 3: Use tag-keys applied to managed nodes

* Key=tag-key,Values=<my-tag-key-1>,<my-tag-key-2>

*

Example 4: Use resource group names

* Key=resource-groups:Name,Values=<resource-group-name>

*

Example 5: Use filters for resource group types

* Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>,<resource-type-2> *

For Key=resource-groups:ResourceTypeFilters, specify * resource types in the following format

* Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC *

For 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.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithTargets(const Aws::Vector& value) { SetTargets(value); return *this;} /** *

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=<instance-id-1>,<instance-id-2>,<instance-id-3> *

Example 2: Use tag key-pairs applied to managed nodes

* Key=tag:<my-tag-key>,Values=<my-tag-value-1>,<my-tag-value-2> *

Example 3: Use tag-keys applied to managed nodes

* Key=tag-key,Values=<my-tag-key-1>,<my-tag-key-2>

*

Example 4: Use resource group names

* Key=resource-groups:Name,Values=<resource-group-name>

*

Example 5: Use filters for resource group types

* Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>,<resource-type-2> *

For Key=resource-groups:ResourceTypeFilters, specify * resource types in the following format

* Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC *

For 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.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithTargets(Aws::Vector&& value) { SetTargets(std::move(value)); return *this;} /** *

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=<instance-id-1>,<instance-id-2>,<instance-id-3> *

Example 2: Use tag key-pairs applied to managed nodes

* Key=tag:<my-tag-key>,Values=<my-tag-value-1>,<my-tag-value-2> *

Example 3: Use tag-keys applied to managed nodes

* Key=tag-key,Values=<my-tag-key-1>,<my-tag-key-2>

*

Example 4: Use resource group names

* Key=resource-groups:Name,Values=<resource-group-name>

*

Example 5: Use filters for resource group types

* Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>,<resource-type-2> *

For Key=resource-groups:ResourceTypeFilters, specify * resource types in the following format

* Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC *

For 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.

*/ inline RegisterTargetWithMaintenanceWindowRequest& AddTargets(const Target& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; } /** *

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=<instance-id-1>,<instance-id-2>,<instance-id-3> *

Example 2: Use tag key-pairs applied to managed nodes

* Key=tag:<my-tag-key>,Values=<my-tag-value-1>,<my-tag-value-2> *

Example 3: Use tag-keys applied to managed nodes

* Key=tag-key,Values=<my-tag-key-1>,<my-tag-key-2>

*

Example 4: Use resource group names

* Key=resource-groups:Name,Values=<resource-group-name>

*

Example 5: Use filters for resource group types

* Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>,<resource-type-2> *

For Key=resource-groups:ResourceTypeFilters, specify * resource types in the following format

* Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC *

For 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.

*/ inline RegisterTargetWithMaintenanceWindowRequest& AddTargets(Target&& value) { m_targetsHasBeenSet = true; m_targets.push_back(std::move(value)); return *this; } /** *

User-provided value that will be included in any Amazon CloudWatch Events * events raised while running tasks for these targets in this maintenance * window.

*/ inline const Aws::String& GetOwnerInformation() const{ return m_ownerInformation; } /** *

User-provided value that will be included in any Amazon CloudWatch Events * events raised while running tasks for these targets in this maintenance * window.

*/ inline bool OwnerInformationHasBeenSet() const { return m_ownerInformationHasBeenSet; } /** *

User-provided value that will be included in any Amazon CloudWatch Events * events raised while running tasks for these targets in this maintenance * window.

*/ inline void SetOwnerInformation(const Aws::String& value) { m_ownerInformationHasBeenSet = true; m_ownerInformation = value; } /** *

User-provided value that will be included in any Amazon CloudWatch Events * events raised while running tasks for these targets in this maintenance * window.

*/ inline void SetOwnerInformation(Aws::String&& value) { m_ownerInformationHasBeenSet = true; m_ownerInformation = std::move(value); } /** *

User-provided value that will be included in any Amazon CloudWatch Events * events raised while running tasks for these targets in this maintenance * window.

*/ inline void SetOwnerInformation(const char* value) { m_ownerInformationHasBeenSet = true; m_ownerInformation.assign(value); } /** *

User-provided value that will be included in any Amazon CloudWatch Events * events raised while running tasks for these targets in this maintenance * window.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithOwnerInformation(const Aws::String& value) { SetOwnerInformation(value); return *this;} /** *

User-provided value that will be included in any Amazon CloudWatch Events * events raised while running tasks for these targets in this maintenance * window.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithOwnerInformation(Aws::String&& value) { SetOwnerInformation(std::move(value)); return *this;} /** *

User-provided value that will be included in any Amazon CloudWatch Events * events raised while running tasks for these targets in this maintenance * window.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithOwnerInformation(const char* value) { SetOwnerInformation(value); return *this;} /** *

An optional name for the target.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

An optional name for the target.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

An optional name for the target.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

An optional name for the target.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

An optional name for the target.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

An optional name for the target.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

An optional name for the target.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

An optional name for the target.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithName(const char* value) { SetName(value); return *this;} /** *

An optional description for the target.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

An optional description for the target.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

An optional description for the target.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

An optional description for the target.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

An optional description for the target.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

An optional description for the target.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

An optional description for the target.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

An optional description for the target.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

User-provided idempotency token.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

User-provided idempotency token.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

User-provided idempotency token.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

User-provided idempotency token.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

User-provided idempotency token.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

User-provided idempotency token.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

User-provided idempotency token.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

User-provided idempotency token.

*/ inline RegisterTargetWithMaintenanceWindowRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} private: Aws::String m_windowId; bool m_windowIdHasBeenSet = false; MaintenanceWindowResourceType m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::Vector m_targets; bool m_targetsHasBeenSet = false; Aws::String m_ownerInformation; bool m_ownerInformationHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; }; } // namespace Model } // namespace SSM } // namespace Aws