/** * 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 Organizations { namespace Model { /** *

Contains details about an organizational unit (OU). An OU is a container of * Amazon Web Services accounts within a root of an organization. Policies that are * attached to an OU apply to all accounts contained in that OU and in any child * OUs.

See Also:

AWS * API Reference

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

The unique identifier (ID) associated with this OU.

The regex pattern for an organizational * unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or * digits (the ID of the root that contains the OU). This string is followed by a * second "-" dash and from 8 to 32 additional lowercase letters or digits.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The unique identifier (ID) associated with this OU.

The regex pattern for an organizational * unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or * digits (the ID of the root that contains the OU). This string is followed by a * second "-" dash and from 8 to 32 additional lowercase letters or digits.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The unique identifier (ID) associated with this OU.

The regex pattern for an organizational * unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or * digits (the ID of the root that contains the OU). This string is followed by a * second "-" dash and from 8 to 32 additional lowercase letters or digits.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The unique identifier (ID) associated with this OU.

The regex pattern for an organizational * unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or * digits (the ID of the root that contains the OU). This string is followed by a * second "-" dash and from 8 to 32 additional lowercase letters or digits.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The unique identifier (ID) associated with this OU.

The regex pattern for an organizational * unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or * digits (the ID of the root that contains the OU). This string is followed by a * second "-" dash and from 8 to 32 additional lowercase letters or digits.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The unique identifier (ID) associated with this OU.

The regex pattern for an organizational * unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or * digits (the ID of the root that contains the OU). This string is followed by a * second "-" dash and from 8 to 32 additional lowercase letters or digits.

*/ inline OrganizationalUnit& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The unique identifier (ID) associated with this OU.

The regex pattern for an organizational * unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or * digits (the ID of the root that contains the OU). This string is followed by a * second "-" dash and from 8 to 32 additional lowercase letters or digits.

*/ inline OrganizationalUnit& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The unique identifier (ID) associated with this OU.

The regex pattern for an organizational * unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or * digits (the ID of the root that contains the OU). This string is followed by a * second "-" dash and from 8 to 32 additional lowercase letters or digits.

*/ inline OrganizationalUnit& WithId(const char* value) { SetId(value); return *this;} /** *

The Amazon Resource Name (ARN) of this OU.

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 this OU.

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 this OU.

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 this OU.

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 this OU.

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 this OU.

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

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

The Amazon Resource Name (ARN) of this OU.

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

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

The Amazon Resource Name (ARN) of this OU.

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

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

The friendly name of this OU.

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 this OU.

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 this OU.

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 this OU.

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 this OU.

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 this OU.

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

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

The friendly name of this OU.

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

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

The friendly name of this OU.

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

*/ inline OrganizationalUnit& WithName(const char* value) { SetName(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; }; } // namespace Model } // namespace Organizations } // namespace Aws