/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
namespace Aws
{
namespace SSM
{
namespace Model
{
/**
* See Also:
AWS
* API Reference
*/
class CancelCommandRequest : public SSMRequest
{
public:
AWS_SSM_API CancelCommandRequest();
// 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 "CancelCommand"; }
AWS_SSM_API Aws::String SerializePayload() const override;
AWS_SSM_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* The ID of the command you want to cancel.
*/
inline const Aws::String& GetCommandId() const{ return m_commandId; }
inline bool CommandIdHasBeenSet() const { return m_commandIdHasBeenSet; }
inline void SetCommandId(const Aws::String& value) { m_commandIdHasBeenSet = true; m_commandId = value; }
inline void SetCommandId(Aws::String&& value) { m_commandIdHasBeenSet = true; m_commandId = std::move(value); }
inline void SetCommandId(const char* value) { m_commandIdHasBeenSet = true; m_commandId.assign(value); }
inline CancelCommandRequest& WithCommandId(const Aws::String& value) { SetCommandId(value); return *this;}
inline CancelCommandRequest& WithCommandId(Aws::String&& value) { SetCommandId(std::move(value)); return *this;}
inline CancelCommandRequest& WithCommandId(const char* value) { SetCommandId(value); return *this;}
///@}
///@{
/**
* (Optional) A list of managed node IDs on which you want to cancel the
* command. If not provided, the command is canceled on every node on which it was
* requested.
*/
inline const Aws::Vector& GetInstanceIds() const{ return m_instanceIds; }
inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; }
inline void SetInstanceIds(const Aws::Vector& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; }
inline void SetInstanceIds(Aws::Vector&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::move(value); }
inline CancelCommandRequest& WithInstanceIds(const Aws::Vector& value) { SetInstanceIds(value); return *this;}
inline CancelCommandRequest& WithInstanceIds(Aws::Vector&& value) { SetInstanceIds(std::move(value)); return *this;}
inline CancelCommandRequest& AddInstanceIds(const Aws::String& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
inline CancelCommandRequest& AddInstanceIds(Aws::String&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(std::move(value)); return *this; }
inline CancelCommandRequest& AddInstanceIds(const char* value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
///@}
private:
Aws::String m_commandId;
bool m_commandIdHasBeenSet = false;
Aws::Vector m_instanceIds;
bool m_instanceIdsHasBeenSet = false;
};
} // namespace Model
} // namespace SSM
} // namespace Aws