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

Contains information about an instance profile.

This data type is used * as a response element in the following operations:

See Also:

AWS * API Reference

*/ class InstanceProfile { public: AWS_IAM_API InstanceProfile(); AWS_IAM_API InstanceProfile(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_IAM_API InstanceProfile& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The path to the instance profile. For more information about paths, see IAM * identifiers in the IAM User Guide.

*/ inline const Aws::String& GetPath() const{ return m_path; } /** *

The path to the instance profile. For more information about paths, see IAM * identifiers in the IAM User Guide.

*/ inline bool PathHasBeenSet() const { return m_pathHasBeenSet; } /** *

The path to the instance profile. For more information about paths, see IAM * identifiers in the IAM User Guide.

*/ inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; } /** *

The path to the instance profile. For more information about paths, see IAM * identifiers in the IAM User Guide.

*/ inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); } /** *

The path to the instance profile. For more information about paths, see IAM * identifiers in the IAM User Guide.

*/ inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); } /** *

The path to the instance profile. For more information about paths, see IAM * identifiers in the IAM User Guide.

*/ inline InstanceProfile& WithPath(const Aws::String& value) { SetPath(value); return *this;} /** *

The path to the instance profile. For more information about paths, see IAM * identifiers in the IAM User Guide.

*/ inline InstanceProfile& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;} /** *

The path to the instance profile. For more information about paths, see IAM * identifiers in the IAM User Guide.

*/ inline InstanceProfile& WithPath(const char* value) { SetPath(value); return *this;} /** *

The name identifying the instance profile.

*/ inline const Aws::String& GetInstanceProfileName() const{ return m_instanceProfileName; } /** *

The name identifying the instance profile.

*/ inline bool InstanceProfileNameHasBeenSet() const { return m_instanceProfileNameHasBeenSet; } /** *

The name identifying the instance profile.

*/ inline void SetInstanceProfileName(const Aws::String& value) { m_instanceProfileNameHasBeenSet = true; m_instanceProfileName = value; } /** *

The name identifying the instance profile.

*/ inline void SetInstanceProfileName(Aws::String&& value) { m_instanceProfileNameHasBeenSet = true; m_instanceProfileName = std::move(value); } /** *

The name identifying the instance profile.

*/ inline void SetInstanceProfileName(const char* value) { m_instanceProfileNameHasBeenSet = true; m_instanceProfileName.assign(value); } /** *

The name identifying the instance profile.

*/ inline InstanceProfile& WithInstanceProfileName(const Aws::String& value) { SetInstanceProfileName(value); return *this;} /** *

The name identifying the instance profile.

*/ inline InstanceProfile& WithInstanceProfileName(Aws::String&& value) { SetInstanceProfileName(std::move(value)); return *this;} /** *

The name identifying the instance profile.

*/ inline InstanceProfile& WithInstanceProfileName(const char* value) { SetInstanceProfileName(value); return *this;} /** *

The stable and unique string identifying the instance profile. For more * information about IDs, see IAM * identifiers in the IAM User Guide.

*/ inline const Aws::String& GetInstanceProfileId() const{ return m_instanceProfileId; } /** *

The stable and unique string identifying the instance profile. For more * information about IDs, see IAM * identifiers in the IAM User Guide.

*/ inline bool InstanceProfileIdHasBeenSet() const { return m_instanceProfileIdHasBeenSet; } /** *

The stable and unique string identifying the instance profile. For more * information about IDs, see IAM * identifiers in the IAM User Guide.

*/ inline void SetInstanceProfileId(const Aws::String& value) { m_instanceProfileIdHasBeenSet = true; m_instanceProfileId = value; } /** *

The stable and unique string identifying the instance profile. For more * information about IDs, see IAM * identifiers in the IAM User Guide.

*/ inline void SetInstanceProfileId(Aws::String&& value) { m_instanceProfileIdHasBeenSet = true; m_instanceProfileId = std::move(value); } /** *

The stable and unique string identifying the instance profile. For more * information about IDs, see IAM * identifiers in the IAM User Guide.

*/ inline void SetInstanceProfileId(const char* value) { m_instanceProfileIdHasBeenSet = true; m_instanceProfileId.assign(value); } /** *

The stable and unique string identifying the instance profile. For more * information about IDs, see IAM * identifiers in the IAM User Guide.

*/ inline InstanceProfile& WithInstanceProfileId(const Aws::String& value) { SetInstanceProfileId(value); return *this;} /** *

The stable and unique string identifying the instance profile. For more * information about IDs, see IAM * identifiers in the IAM User Guide.

*/ inline InstanceProfile& WithInstanceProfileId(Aws::String&& value) { SetInstanceProfileId(std::move(value)); return *this;} /** *

The stable and unique string identifying the instance profile. For more * information about IDs, see IAM * identifiers in the IAM User Guide.

*/ inline InstanceProfile& WithInstanceProfileId(const char* value) { SetInstanceProfileId(value); return *this;} /** *

The Amazon Resource Name (ARN) specifying the instance profile. For more * information about ARNs and how to use them in policies, see IAM * identifiers in the IAM User Guide.

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

The Amazon Resource Name (ARN) specifying the instance profile. For more * information about ARNs and how to use them in policies, see IAM * identifiers in the IAM User Guide.

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

The Amazon Resource Name (ARN) specifying the instance profile. For more * information about ARNs and how to use them in policies, see IAM * identifiers in the IAM User Guide.

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

The Amazon Resource Name (ARN) specifying the instance profile. For more * information about ARNs and how to use them in policies, see IAM * identifiers in the IAM User Guide.

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

The Amazon Resource Name (ARN) specifying the instance profile. For more * information about ARNs and how to use them in policies, see IAM * identifiers in the IAM User Guide.

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

The Amazon Resource Name (ARN) specifying the instance profile. For more * information about ARNs and how to use them in policies, see IAM * identifiers in the IAM User Guide.

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

The Amazon Resource Name (ARN) specifying the instance profile. For more * information about ARNs and how to use them in policies, see IAM * identifiers in the IAM User Guide.

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

The Amazon Resource Name (ARN) specifying the instance profile. For more * information about ARNs and how to use them in policies, see IAM * identifiers in the IAM User Guide.

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

The date when the instance profile was created.

*/ inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; } /** *

The date when the instance profile was created.

*/ inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; } /** *

The date when the instance profile was created.

*/ inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; } /** *

The date when the instance profile was created.

*/ inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); } /** *

The date when the instance profile was created.

*/ inline InstanceProfile& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;} /** *

The date when the instance profile was created.

*/ inline InstanceProfile& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(std::move(value)); return *this;} /** *

The role associated with the instance profile.

*/ inline const Aws::Vector& GetRoles() const{ return m_roles; } /** *

The role associated with the instance profile.

*/ inline bool RolesHasBeenSet() const { return m_rolesHasBeenSet; } /** *

The role associated with the instance profile.

*/ inline void SetRoles(const Aws::Vector& value) { m_rolesHasBeenSet = true; m_roles = value; } /** *

The role associated with the instance profile.

*/ inline void SetRoles(Aws::Vector&& value) { m_rolesHasBeenSet = true; m_roles = std::move(value); } /** *

The role associated with the instance profile.

*/ inline InstanceProfile& WithRoles(const Aws::Vector& value) { SetRoles(value); return *this;} /** *

The role associated with the instance profile.

*/ inline InstanceProfile& WithRoles(Aws::Vector&& value) { SetRoles(std::move(value)); return *this;} /** *

The role associated with the instance profile.

*/ inline InstanceProfile& AddRoles(const Role& value) { m_rolesHasBeenSet = true; m_roles.push_back(value); return *this; } /** *

The role associated with the instance profile.

*/ inline InstanceProfile& AddRoles(Role&& value) { m_rolesHasBeenSet = true; m_roles.push_back(std::move(value)); return *this; } /** *

A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.

*/ inline InstanceProfile& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.

*/ inline InstanceProfile& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.

*/ inline InstanceProfile& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

A list of tags that are attached to the instance profile. For more * information about tagging, see Tagging IAM * resources in the IAM User Guide.

*/ inline InstanceProfile& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_path; bool m_pathHasBeenSet = false; Aws::String m_instanceProfileName; bool m_instanceProfileNameHasBeenSet = false; Aws::String m_instanceProfileId; bool m_instanceProfileIdHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::Utils::DateTime m_createDate; bool m_createDateHasBeenSet = false; Aws::Vector m_roles; bool m_rolesHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace IAM } // namespace Aws