/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace OpsWorks { namespace Model { /** *

Describes stack or user permissions.

See Also:

AWS * API Reference

*/ class Permission { public: AWS_OPSWORKS_API Permission(); AWS_OPSWORKS_API Permission(Aws::Utils::Json::JsonView jsonValue); AWS_OPSWORKS_API Permission& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_OPSWORKS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A stack ID.

*/ inline const Aws::String& GetStackId() const{ return m_stackId; } /** *

A stack ID.

*/ inline bool StackIdHasBeenSet() const { return m_stackIdHasBeenSet; } /** *

A stack ID.

*/ inline void SetStackId(const Aws::String& value) { m_stackIdHasBeenSet = true; m_stackId = value; } /** *

A stack ID.

*/ inline void SetStackId(Aws::String&& value) { m_stackIdHasBeenSet = true; m_stackId = std::move(value); } /** *

A stack ID.

*/ inline void SetStackId(const char* value) { m_stackIdHasBeenSet = true; m_stackId.assign(value); } /** *

A stack ID.

*/ inline Permission& WithStackId(const Aws::String& value) { SetStackId(value); return *this;} /** *

A stack ID.

*/ inline Permission& WithStackId(Aws::String&& value) { SetStackId(std::move(value)); return *this;} /** *

A stack ID.

*/ inline Permission& WithStackId(const char* value) { SetStackId(value); return *this;} /** *

The Amazon Resource Name (ARN) for an AWS Identity and Access Management * (IAM) role. For more information about IAM ARNs, see Using * Identifiers.

*/ inline const Aws::String& GetIamUserArn() const{ return m_iamUserArn; } /** *

The Amazon Resource Name (ARN) for an AWS Identity and Access Management * (IAM) role. For more information about IAM ARNs, see Using * Identifiers.

*/ inline bool IamUserArnHasBeenSet() const { return m_iamUserArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) for an AWS Identity and Access Management * (IAM) role. For more information about IAM ARNs, see Using * Identifiers.

*/ inline void SetIamUserArn(const Aws::String& value) { m_iamUserArnHasBeenSet = true; m_iamUserArn = value; } /** *

The Amazon Resource Name (ARN) for an AWS Identity and Access Management * (IAM) role. For more information about IAM ARNs, see Using * Identifiers.

*/ inline void SetIamUserArn(Aws::String&& value) { m_iamUserArnHasBeenSet = true; m_iamUserArn = std::move(value); } /** *

The Amazon Resource Name (ARN) for an AWS Identity and Access Management * (IAM) role. For more information about IAM ARNs, see Using * Identifiers.

*/ inline void SetIamUserArn(const char* value) { m_iamUserArnHasBeenSet = true; m_iamUserArn.assign(value); } /** *

The Amazon Resource Name (ARN) for an AWS Identity and Access Management * (IAM) role. For more information about IAM ARNs, see Using * Identifiers.

*/ inline Permission& WithIamUserArn(const Aws::String& value) { SetIamUserArn(value); return *this;} /** *

The Amazon Resource Name (ARN) for an AWS Identity and Access Management * (IAM) role. For more information about IAM ARNs, see Using * Identifiers.

*/ inline Permission& WithIamUserArn(Aws::String&& value) { SetIamUserArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) for an AWS Identity and Access Management * (IAM) role. For more information about IAM ARNs, see Using * Identifiers.

*/ inline Permission& WithIamUserArn(const char* value) { SetIamUserArn(value); return *this;} /** *

Whether the user can use SSH.

*/ inline bool GetAllowSsh() const{ return m_allowSsh; } /** *

Whether the user can use SSH.

*/ inline bool AllowSshHasBeenSet() const { return m_allowSshHasBeenSet; } /** *

Whether the user can use SSH.

*/ inline void SetAllowSsh(bool value) { m_allowSshHasBeenSet = true; m_allowSsh = value; } /** *

Whether the user can use SSH.

*/ inline Permission& WithAllowSsh(bool value) { SetAllowSsh(value); return *this;} /** *

Whether the user can use sudo.

*/ inline bool GetAllowSudo() const{ return m_allowSudo; } /** *

Whether the user can use sudo.

*/ inline bool AllowSudoHasBeenSet() const { return m_allowSudoHasBeenSet; } /** *

Whether the user can use sudo.

*/ inline void SetAllowSudo(bool value) { m_allowSudoHasBeenSet = true; m_allowSudo = value; } /** *

Whether the user can use sudo.

*/ inline Permission& WithAllowSudo(bool value) { SetAllowSudo(value); return *this;} /** *

The user's permission level, which must be the following:

  • * deny

  • show

  • * deploy

  • manage

  • * iam_only

For more information on the * permissions associated with these levels, see Managing * User Permissions

*/ inline const Aws::String& GetLevel() const{ return m_level; } /** *

The user's permission level, which must be the following:

  • * deny

  • show

  • * deploy

  • manage

  • * iam_only

For more information on the * permissions associated with these levels, see Managing * User Permissions

*/ inline bool LevelHasBeenSet() const { return m_levelHasBeenSet; } /** *

The user's permission level, which must be the following:

  • * deny

  • show

  • * deploy

  • manage

  • * iam_only

For more information on the * permissions associated with these levels, see Managing * User Permissions

*/ inline void SetLevel(const Aws::String& value) { m_levelHasBeenSet = true; m_level = value; } /** *

The user's permission level, which must be the following:

  • * deny

  • show

  • * deploy

  • manage

  • * iam_only

For more information on the * permissions associated with these levels, see Managing * User Permissions

*/ inline void SetLevel(Aws::String&& value) { m_levelHasBeenSet = true; m_level = std::move(value); } /** *

The user's permission level, which must be the following:

  • * deny

  • show

  • * deploy

  • manage

  • * iam_only

For more information on the * permissions associated with these levels, see Managing * User Permissions

*/ inline void SetLevel(const char* value) { m_levelHasBeenSet = true; m_level.assign(value); } /** *

The user's permission level, which must be the following:

  • * deny

  • show

  • * deploy

  • manage

  • * iam_only

For more information on the * permissions associated with these levels, see Managing * User Permissions

*/ inline Permission& WithLevel(const Aws::String& value) { SetLevel(value); return *this;} /** *

The user's permission level, which must be the following:

  • * deny

  • show

  • * deploy

  • manage

  • * iam_only

For more information on the * permissions associated with these levels, see Managing * User Permissions

*/ inline Permission& WithLevel(Aws::String&& value) { SetLevel(std::move(value)); return *this;} /** *

The user's permission level, which must be the following:

  • * deny

  • show

  • * deploy

  • manage

  • * iam_only

For more information on the * permissions associated with these levels, see Managing * User Permissions

*/ inline Permission& WithLevel(const char* value) { SetLevel(value); return *this;} private: Aws::String m_stackId; bool m_stackIdHasBeenSet = false; Aws::String m_iamUserArn; bool m_iamUserArnHasBeenSet = false; bool m_allowSsh; bool m_allowSshHasBeenSet = false; bool m_allowSudo; bool m_allowSudoHasBeenSet = false; Aws::String m_level; bool m_levelHasBeenSet = false; }; } // namespace Model } // namespace OpsWorks } // namespace Aws