/** * 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 GrantAccessRequest : public OpsWorksRequest { public: AWS_OPSWORKS_API GrantAccessRequest(); // 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 "GrantAccess"; } AWS_OPSWORKS_API Aws::String SerializePayload() const override; AWS_OPSWORKS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The instance's AWS OpsWorks Stacks ID.

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

The instance's AWS OpsWorks Stacks ID.

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

The instance's AWS OpsWorks Stacks ID.

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

The instance's AWS OpsWorks Stacks ID.

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

The instance's AWS OpsWorks Stacks ID.

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

The instance's AWS OpsWorks Stacks ID.

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

The instance's AWS OpsWorks Stacks ID.

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

The instance's AWS OpsWorks Stacks ID.

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

The length of time (in minutes) that the grant is valid. When the grant * expires at the end of this period, the user will no longer be able to use the * credentials to log in. If the user is logged in at the time, he or she * automatically will be logged out.

*/ inline int GetValidForInMinutes() const{ return m_validForInMinutes; } /** *

The length of time (in minutes) that the grant is valid. When the grant * expires at the end of this period, the user will no longer be able to use the * credentials to log in. If the user is logged in at the time, he or she * automatically will be logged out.

*/ inline bool ValidForInMinutesHasBeenSet() const { return m_validForInMinutesHasBeenSet; } /** *

The length of time (in minutes) that the grant is valid. When the grant * expires at the end of this period, the user will no longer be able to use the * credentials to log in. If the user is logged in at the time, he or she * automatically will be logged out.

*/ inline void SetValidForInMinutes(int value) { m_validForInMinutesHasBeenSet = true; m_validForInMinutes = value; } /** *

The length of time (in minutes) that the grant is valid. When the grant * expires at the end of this period, the user will no longer be able to use the * credentials to log in. If the user is logged in at the time, he or she * automatically will be logged out.

*/ inline GrantAccessRequest& WithValidForInMinutes(int value) { SetValidForInMinutes(value); return *this;} private: Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; int m_validForInMinutes; bool m_validForInMinutesHasBeenSet = false; }; } // namespace Model } // namespace OpsWorks } // namespace Aws