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

Contains information about the last time that an IAM role was used. This * includes the date and time and the Region in which the role was last used. * Activity is only reported for the trailing 400 days. This period can be shorter * if your Region began supporting these features within the last year. The role * might have been used more than 400 days ago. For more information, see Regions * where data is tracked in the IAM user Guide.

This data type is * returned as a response element in the GetRole and * GetAccountAuthorizationDetails operations.

See Also:

AWS * API Reference

*/ class RoleLastUsed { public: AWS_IAM_API RoleLastUsed(); AWS_IAM_API RoleLastUsed(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_IAM_API RoleLastUsed& 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 date and time, in ISO 8601 * date-time format that the role was last used.

This field is null if * the role has not been used within the IAM tracking period. For more information * about the tracking period, see Regions * where data is tracked in the IAM User Guide.

*/ inline const Aws::Utils::DateTime& GetLastUsedDate() const{ return m_lastUsedDate; } /** *

The date and time, in ISO 8601 * date-time format that the role was last used.

This field is null if * the role has not been used within the IAM tracking period. For more information * about the tracking period, see Regions * where data is tracked in the IAM User Guide.

*/ inline bool LastUsedDateHasBeenSet() const { return m_lastUsedDateHasBeenSet; } /** *

The date and time, in ISO 8601 * date-time format that the role was last used.

This field is null if * the role has not been used within the IAM tracking period. For more information * about the tracking period, see Regions * where data is tracked in the IAM User Guide.

*/ inline void SetLastUsedDate(const Aws::Utils::DateTime& value) { m_lastUsedDateHasBeenSet = true; m_lastUsedDate = value; } /** *

The date and time, in ISO 8601 * date-time format that the role was last used.

This field is null if * the role has not been used within the IAM tracking period. For more information * about the tracking period, see Regions * where data is tracked in the IAM User Guide.

*/ inline void SetLastUsedDate(Aws::Utils::DateTime&& value) { m_lastUsedDateHasBeenSet = true; m_lastUsedDate = std::move(value); } /** *

The date and time, in ISO 8601 * date-time format that the role was last used.

This field is null if * the role has not been used within the IAM tracking period. For more information * about the tracking period, see Regions * where data is tracked in the IAM User Guide.

*/ inline RoleLastUsed& WithLastUsedDate(const Aws::Utils::DateTime& value) { SetLastUsedDate(value); return *this;} /** *

The date and time, in ISO 8601 * date-time format that the role was last used.

This field is null if * the role has not been used within the IAM tracking period. For more information * about the tracking period, see Regions * where data is tracked in the IAM User Guide.

*/ inline RoleLastUsed& WithLastUsedDate(Aws::Utils::DateTime&& value) { SetLastUsedDate(std::move(value)); return *this;} /** *

The name of the Amazon Web Services Region in which the role was last * used.

*/ inline const Aws::String& GetRegion() const{ return m_region; } /** *

The name of the Amazon Web Services Region in which the role was last * used.

*/ inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; } /** *

The name of the Amazon Web Services Region in which the role was last * used.

*/ inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; } /** *

The name of the Amazon Web Services Region in which the role was last * used.

*/ inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); } /** *

The name of the Amazon Web Services Region in which the role was last * used.

*/ inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); } /** *

The name of the Amazon Web Services Region in which the role was last * used.

*/ inline RoleLastUsed& WithRegion(const Aws::String& value) { SetRegion(value); return *this;} /** *

The name of the Amazon Web Services Region in which the role was last * used.

*/ inline RoleLastUsed& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;} /** *

The name of the Amazon Web Services Region in which the role was last * used.

*/ inline RoleLastUsed& WithRegion(const char* value) { SetRegion(value); return *this;} private: Aws::Utils::DateTime m_lastUsedDate; bool m_lastUsedDateHasBeenSet = false; Aws::String m_region; bool m_regionHasBeenSet = false; }; } // namespace Model } // namespace IAM } // namespace Aws