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

IAM access key details related to a finding.

See Also:

AWS * API Reference

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

The status of the IAM access key related to a finding.

*/ inline const AwsIamAccessKeyStatus& GetStatus() const{ return m_status; } /** *

The status of the IAM access key related to a finding.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the IAM access key related to a finding.

*/ inline void SetStatus(const AwsIamAccessKeyStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the IAM access key related to a finding.

*/ inline void SetStatus(AwsIamAccessKeyStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the IAM access key related to a finding.

*/ inline AwsIamAccessKeyDetails& WithStatus(const AwsIamAccessKeyStatus& value) { SetStatus(value); return *this;} /** *

The status of the IAM access key related to a finding.

*/ inline AwsIamAccessKeyDetails& WithStatus(AwsIamAccessKeyStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

Indicates when the IAM access key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline const Aws::String& GetCreatedAt() const{ return m_createdAt; } /** *

Indicates when the IAM access key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } /** *

Indicates when the IAM access key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetCreatedAt(const Aws::String& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } /** *

Indicates when the IAM access key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetCreatedAt(Aws::String&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } /** *

Indicates when the IAM access key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetCreatedAt(const char* value) { m_createdAtHasBeenSet = true; m_createdAt.assign(value); } /** *

Indicates when the IAM access key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsIamAccessKeyDetails& WithCreatedAt(const Aws::String& value) { SetCreatedAt(value); return *this;} /** *

Indicates when the IAM access key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsIamAccessKeyDetails& WithCreatedAt(Aws::String&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

Indicates when the IAM access key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsIamAccessKeyDetails& WithCreatedAt(const char* value) { SetCreatedAt(value); return *this;} /** *

The ID of the principal associated with an access key.

*/ inline const Aws::String& GetPrincipalId() const{ return m_principalId; } /** *

The ID of the principal associated with an access key.

*/ inline bool PrincipalIdHasBeenSet() const { return m_principalIdHasBeenSet; } /** *

The ID of the principal associated with an access key.

*/ inline void SetPrincipalId(const Aws::String& value) { m_principalIdHasBeenSet = true; m_principalId = value; } /** *

The ID of the principal associated with an access key.

*/ inline void SetPrincipalId(Aws::String&& value) { m_principalIdHasBeenSet = true; m_principalId = std::move(value); } /** *

The ID of the principal associated with an access key.

*/ inline void SetPrincipalId(const char* value) { m_principalIdHasBeenSet = true; m_principalId.assign(value); } /** *

The ID of the principal associated with an access key.

*/ inline AwsIamAccessKeyDetails& WithPrincipalId(const Aws::String& value) { SetPrincipalId(value); return *this;} /** *

The ID of the principal associated with an access key.

*/ inline AwsIamAccessKeyDetails& WithPrincipalId(Aws::String&& value) { SetPrincipalId(std::move(value)); return *this;} /** *

The ID of the principal associated with an access key.

*/ inline AwsIamAccessKeyDetails& WithPrincipalId(const char* value) { SetPrincipalId(value); return *this;} /** *

The type of principal associated with an access key.

*/ inline const Aws::String& GetPrincipalType() const{ return m_principalType; } /** *

The type of principal associated with an access key.

*/ inline bool PrincipalTypeHasBeenSet() const { return m_principalTypeHasBeenSet; } /** *

The type of principal associated with an access key.

*/ inline void SetPrincipalType(const Aws::String& value) { m_principalTypeHasBeenSet = true; m_principalType = value; } /** *

The type of principal associated with an access key.

*/ inline void SetPrincipalType(Aws::String&& value) { m_principalTypeHasBeenSet = true; m_principalType = std::move(value); } /** *

The type of principal associated with an access key.

*/ inline void SetPrincipalType(const char* value) { m_principalTypeHasBeenSet = true; m_principalType.assign(value); } /** *

The type of principal associated with an access key.

*/ inline AwsIamAccessKeyDetails& WithPrincipalType(const Aws::String& value) { SetPrincipalType(value); return *this;} /** *

The type of principal associated with an access key.

*/ inline AwsIamAccessKeyDetails& WithPrincipalType(Aws::String&& value) { SetPrincipalType(std::move(value)); return *this;} /** *

The type of principal associated with an access key.

*/ inline AwsIamAccessKeyDetails& WithPrincipalType(const char* value) { SetPrincipalType(value); return *this;} /** *

The name of the principal.

*/ inline const Aws::String& GetPrincipalName() const{ return m_principalName; } /** *

The name of the principal.

*/ inline bool PrincipalNameHasBeenSet() const { return m_principalNameHasBeenSet; } /** *

The name of the principal.

*/ inline void SetPrincipalName(const Aws::String& value) { m_principalNameHasBeenSet = true; m_principalName = value; } /** *

The name of the principal.

*/ inline void SetPrincipalName(Aws::String&& value) { m_principalNameHasBeenSet = true; m_principalName = std::move(value); } /** *

The name of the principal.

*/ inline void SetPrincipalName(const char* value) { m_principalNameHasBeenSet = true; m_principalName.assign(value); } /** *

The name of the principal.

*/ inline AwsIamAccessKeyDetails& WithPrincipalName(const Aws::String& value) { SetPrincipalName(value); return *this;} /** *

The name of the principal.

*/ inline AwsIamAccessKeyDetails& WithPrincipalName(Aws::String&& value) { SetPrincipalName(std::move(value)); return *this;} /** *

The name of the principal.

*/ inline AwsIamAccessKeyDetails& WithPrincipalName(const char* value) { SetPrincipalName(value); return *this;} /** *

The Amazon Web Services account ID of the account for the key.

*/ inline const Aws::String& GetAccountId() const{ return m_accountId; } /** *

The Amazon Web Services account ID of the account for the key.

*/ inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; } /** *

The Amazon Web Services account ID of the account for the key.

*/ inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; } /** *

The Amazon Web Services account ID of the account for the key.

*/ inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); } /** *

The Amazon Web Services account ID of the account for the key.

*/ inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); } /** *

The Amazon Web Services account ID of the account for the key.

*/ inline AwsIamAccessKeyDetails& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;} /** *

The Amazon Web Services account ID of the account for the key.

*/ inline AwsIamAccessKeyDetails& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;} /** *

The Amazon Web Services account ID of the account for the key.

*/ inline AwsIamAccessKeyDetails& WithAccountId(const char* value) { SetAccountId(value); return *this;} /** *

The identifier of the access key.

*/ inline const Aws::String& GetAccessKeyId() const{ return m_accessKeyId; } /** *

The identifier of the access key.

*/ inline bool AccessKeyIdHasBeenSet() const { return m_accessKeyIdHasBeenSet; } /** *

The identifier of the access key.

*/ inline void SetAccessKeyId(const Aws::String& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = value; } /** *

The identifier of the access key.

*/ inline void SetAccessKeyId(Aws::String&& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = std::move(value); } /** *

The identifier of the access key.

*/ inline void SetAccessKeyId(const char* value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId.assign(value); } /** *

The identifier of the access key.

*/ inline AwsIamAccessKeyDetails& WithAccessKeyId(const Aws::String& value) { SetAccessKeyId(value); return *this;} /** *

The identifier of the access key.

*/ inline AwsIamAccessKeyDetails& WithAccessKeyId(Aws::String&& value) { SetAccessKeyId(std::move(value)); return *this;} /** *

The identifier of the access key.

*/ inline AwsIamAccessKeyDetails& WithAccessKeyId(const char* value) { SetAccessKeyId(value); return *this;} /** *

Information about the session that the key was used for.

*/ inline const AwsIamAccessKeySessionContext& GetSessionContext() const{ return m_sessionContext; } /** *

Information about the session that the key was used for.

*/ inline bool SessionContextHasBeenSet() const { return m_sessionContextHasBeenSet; } /** *

Information about the session that the key was used for.

*/ inline void SetSessionContext(const AwsIamAccessKeySessionContext& value) { m_sessionContextHasBeenSet = true; m_sessionContext = value; } /** *

Information about the session that the key was used for.

*/ inline void SetSessionContext(AwsIamAccessKeySessionContext&& value) { m_sessionContextHasBeenSet = true; m_sessionContext = std::move(value); } /** *

Information about the session that the key was used for.

*/ inline AwsIamAccessKeyDetails& WithSessionContext(const AwsIamAccessKeySessionContext& value) { SetSessionContext(value); return *this;} /** *

Information about the session that the key was used for.

*/ inline AwsIamAccessKeyDetails& WithSessionContext(AwsIamAccessKeySessionContext&& value) { SetSessionContext(std::move(value)); return *this;} private: AwsIamAccessKeyStatus m_status; bool m_statusHasBeenSet = false; Aws::String m_createdAt; bool m_createdAtHasBeenSet = false; Aws::String m_principalId; bool m_principalIdHasBeenSet = false; Aws::String m_principalType; bool m_principalTypeHasBeenSet = false; Aws::String m_principalName; bool m_principalNameHasBeenSet = false; Aws::String m_accountId; bool m_accountIdHasBeenSet = false; Aws::String m_accessKeyId; bool m_accessKeyIdHasBeenSet = false; AwsIamAccessKeySessionContext m_sessionContext; bool m_sessionContextHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws