/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace OpsWorks { namespace Model { /** */ class StopInstanceRequest : public OpsWorksRequest { public: AWS_OPSWORKS_API StopInstanceRequest(); // 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 "StopInstance"; } AWS_OPSWORKS_API Aws::String SerializePayload() const override; AWS_OPSWORKS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The instance ID.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The instance ID.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The instance ID.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The instance ID.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The instance ID.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The instance ID.

*/ inline StopInstanceRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The instance ID.

*/ inline StopInstanceRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The instance ID.

*/ inline StopInstanceRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

Specifies whether to force an instance to stop. If the instance's root device * type is ebs, or EBS-backed, adding the Force parameter * to the StopInstances API call disassociates the AWS OpsWorks Stacks * instance from EC2, and forces deletion of only the OpsWorks Stacks * instance. You must also delete the formerly-associated instance in EC2 after * troubleshooting and replacing the AWS OpsWorks Stacks instance with a new * one.

*/ inline bool GetForce() const{ return m_force; } /** *

Specifies whether to force an instance to stop. If the instance's root device * type is ebs, or EBS-backed, adding the Force parameter * to the StopInstances API call disassociates the AWS OpsWorks Stacks * instance from EC2, and forces deletion of only the OpsWorks Stacks * instance. You must also delete the formerly-associated instance in EC2 after * troubleshooting and replacing the AWS OpsWorks Stacks instance with a new * one.

*/ inline bool ForceHasBeenSet() const { return m_forceHasBeenSet; } /** *

Specifies whether to force an instance to stop. If the instance's root device * type is ebs, or EBS-backed, adding the Force parameter * to the StopInstances API call disassociates the AWS OpsWorks Stacks * instance from EC2, and forces deletion of only the OpsWorks Stacks * instance. You must also delete the formerly-associated instance in EC2 after * troubleshooting and replacing the AWS OpsWorks Stacks instance with a new * one.

*/ inline void SetForce(bool value) { m_forceHasBeenSet = true; m_force = value; } /** *

Specifies whether to force an instance to stop. If the instance's root device * type is ebs, or EBS-backed, adding the Force parameter * to the StopInstances API call disassociates the AWS OpsWorks Stacks * instance from EC2, and forces deletion of only the OpsWorks Stacks * instance. You must also delete the formerly-associated instance in EC2 after * troubleshooting and replacing the AWS OpsWorks Stacks instance with a new * one.

*/ inline StopInstanceRequest& WithForce(bool value) { SetForce(value); return *this;} private: Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; bool m_force; bool m_forceHasBeenSet = false; }; } // namespace Model } // namespace OpsWorks } // namespace Aws