/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Organizations { namespace Model { /** *

Contains information about a root, OU, or account that a policy is attached * to.

See Also:

AWS * API Reference

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

The unique identifier (ID) of the policy target.

The regex pattern for a target ID string * requires one of the following:

  • Root - A string that * begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • *
  • Account - A string that consists of exactly 12 digits.

  • *
  • Organizational unit (OU) - A string that begins with "ou-" * followed by from 4 to 32 lowercase letters or digits (the ID of the root that * the OU is in). This string is followed by a second "-" dash and from 8 to 32 * additional lowercase letters or digits.

*/ inline const Aws::String& GetTargetId() const{ return m_targetId; } /** *

The unique identifier (ID) of the policy target.

The regex pattern for a target ID string * requires one of the following:

  • Root - A string that * begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • *
  • Account - A string that consists of exactly 12 digits.

  • *
  • Organizational unit (OU) - A string that begins with "ou-" * followed by from 4 to 32 lowercase letters or digits (the ID of the root that * the OU is in). This string is followed by a second "-" dash and from 8 to 32 * additional lowercase letters or digits.

*/ inline bool TargetIdHasBeenSet() const { return m_targetIdHasBeenSet; } /** *

The unique identifier (ID) of the policy target.

The regex pattern for a target ID string * requires one of the following:

  • Root - A string that * begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • *
  • Account - A string that consists of exactly 12 digits.

  • *
  • Organizational unit (OU) - A string that begins with "ou-" * followed by from 4 to 32 lowercase letters or digits (the ID of the root that * the OU is in). This string is followed by a second "-" dash and from 8 to 32 * additional lowercase letters or digits.

*/ inline void SetTargetId(const Aws::String& value) { m_targetIdHasBeenSet = true; m_targetId = value; } /** *

The unique identifier (ID) of the policy target.

The regex pattern for a target ID string * requires one of the following:

  • Root - A string that * begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • *
  • Account - A string that consists of exactly 12 digits.

  • *
  • Organizational unit (OU) - A string that begins with "ou-" * followed by from 4 to 32 lowercase letters or digits (the ID of the root that * the OU is in). This string is followed by a second "-" dash and from 8 to 32 * additional lowercase letters or digits.

*/ inline void SetTargetId(Aws::String&& value) { m_targetIdHasBeenSet = true; m_targetId = std::move(value); } /** *

The unique identifier (ID) of the policy target.

The regex pattern for a target ID string * requires one of the following:

  • Root - A string that * begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • *
  • Account - A string that consists of exactly 12 digits.

  • *
  • Organizational unit (OU) - A string that begins with "ou-" * followed by from 4 to 32 lowercase letters or digits (the ID of the root that * the OU is in). This string is followed by a second "-" dash and from 8 to 32 * additional lowercase letters or digits.

*/ inline void SetTargetId(const char* value) { m_targetIdHasBeenSet = true; m_targetId.assign(value); } /** *

The unique identifier (ID) of the policy target.

The regex pattern for a target ID string * requires one of the following:

  • Root - A string that * begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • *
  • Account - A string that consists of exactly 12 digits.

  • *
  • Organizational unit (OU) - A string that begins with "ou-" * followed by from 4 to 32 lowercase letters or digits (the ID of the root that * the OU is in). This string is followed by a second "-" dash and from 8 to 32 * additional lowercase letters or digits.

*/ inline PolicyTargetSummary& WithTargetId(const Aws::String& value) { SetTargetId(value); return *this;} /** *

The unique identifier (ID) of the policy target.

The regex pattern for a target ID string * requires one of the following:

  • Root - A string that * begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • *
  • Account - A string that consists of exactly 12 digits.

  • *
  • Organizational unit (OU) - A string that begins with "ou-" * followed by from 4 to 32 lowercase letters or digits (the ID of the root that * the OU is in). This string is followed by a second "-" dash and from 8 to 32 * additional lowercase letters or digits.

*/ inline PolicyTargetSummary& WithTargetId(Aws::String&& value) { SetTargetId(std::move(value)); return *this;} /** *

The unique identifier (ID) of the policy target.

The regex pattern for a target ID string * requires one of the following:

  • Root - A string that * begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • *
  • Account - A string that consists of exactly 12 digits.

  • *
  • Organizational unit (OU) - A string that begins with "ou-" * followed by from 4 to 32 lowercase letters or digits (the ID of the root that * the OU is in). This string is followed by a second "-" dash and from 8 to 32 * additional lowercase letters or digits.

*/ inline PolicyTargetSummary& WithTargetId(const char* value) { SetTargetId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the policy target.

For more * information about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

*/ inline const Aws::String& GetArn() const{ return m_arn; } /** *

The Amazon Resource Name (ARN) of the policy target.

For more * information about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

*/ inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the policy target.

For more * information about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

*/ inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } /** *

The Amazon Resource Name (ARN) of the policy target.

For more * information about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

*/ inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the policy target.

For more * information about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

*/ inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } /** *

The Amazon Resource Name (ARN) of the policy target.

For more * information about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

*/ inline PolicyTargetSummary& WithArn(const Aws::String& value) { SetArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the policy target.

For more * information about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

*/ inline PolicyTargetSummary& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the policy target.

For more * information about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

*/ inline PolicyTargetSummary& WithArn(const char* value) { SetArn(value); return *this;} /** *

The friendly name of the policy target.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy target.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy target.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy target.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy target.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy target.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy target.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy target.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The type of the policy target.

*/ inline const TargetType& GetType() const{ return m_type; } /** *

The type of the policy target.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of the policy target.

*/ inline void SetType(const TargetType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of the policy target.

*/ inline void SetType(TargetType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of the policy target.

*/ inline PolicyTargetSummary& WithType(const TargetType& value) { SetType(value); return *this;} /** *

The type of the policy target.

*/ inline PolicyTargetSummary& WithType(TargetType&& value) { SetType(std::move(value)); return *this;} private: Aws::String m_targetId; bool m_targetIdHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; TargetType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace Organizations } // namespace Aws