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

Provides information about an identity that performed an action on an * affected resource by using temporary security credentials. The credentials were * obtained using the AssumeRole operation of the Security Token Service (STS) * API.

See Also:

AWS * API Reference

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

The Amazon Web Services access key ID that identifies the credentials.

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

The Amazon Web Services access key ID that identifies the credentials.

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

The Amazon Web Services access key ID that identifies the credentials.

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

The Amazon Web Services access key ID that identifies the credentials.

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

The Amazon Web Services access key ID that identifies the credentials.

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

The Amazon Web Services access key ID that identifies the credentials.

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

The Amazon Web Services access key ID that identifies the credentials.

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

The Amazon Web Services access key ID that identifies the credentials.

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

The unique identifier for the Amazon Web Services account that owns the * entity that was used to get the credentials.

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

The unique identifier for the Amazon Web Services account that owns the * entity that was used to get the credentials.

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

The unique identifier for the Amazon Web Services account that owns the * entity that was used to get the credentials.

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

The unique identifier for the Amazon Web Services account that owns the * entity that was used to get the credentials.

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

The unique identifier for the Amazon Web Services account that owns the * entity that was used to get the credentials.

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

The unique identifier for the Amazon Web Services account that owns the * entity that was used to get the credentials.

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

The unique identifier for the Amazon Web Services account that owns the * entity that was used to get the credentials.

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

The unique identifier for the Amazon Web Services account that owns the * entity that was used to get the credentials.

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

The Amazon Resource Name (ARN) of the entity that was used to get the * credentials.

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

The Amazon Resource Name (ARN) of the entity that was used to get the * credentials.

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

The Amazon Resource Name (ARN) of the entity that was used to get the * credentials.

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

The Amazon Resource Name (ARN) of the entity that was used to get the * credentials.

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

The Amazon Resource Name (ARN) of the entity that was used to get the * credentials.

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

The Amazon Resource Name (ARN) of the entity that was used to get the * credentials.

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

The Amazon Resource Name (ARN) of the entity that was used to get the * credentials.

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

The Amazon Resource Name (ARN) of the entity that was used to get the * credentials.

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

The unique identifier for the entity that was used to get the * credentials.

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

The unique identifier for the entity that was used to get the * credentials.

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

The unique identifier for the entity that was used to get the * credentials.

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

The unique identifier for the entity that was used to get the * credentials.

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

The unique identifier for the entity that was used to get the * credentials.

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

The unique identifier for the entity that was used to get the * credentials.

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

The unique identifier for the entity that was used to get the * credentials.

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

The unique identifier for the entity that was used to get the * credentials.

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

The details of the session that was created for the credentials, including * the entity that issued the session.

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

The details of the session that was created for the credentials, including * the entity that issued the session.

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

The details of the session that was created for the credentials, including * the entity that issued the session.

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

The details of the session that was created for the credentials, including * the entity that issued the session.

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

The details of the session that was created for the credentials, including * the entity that issued the session.

*/ inline AssumedRole& WithSessionContext(const SessionContext& value) { SetSessionContext(value); return *this;} /** *

The details of the session that was created for the credentials, including * the entity that issued the session.

*/ inline AssumedRole& WithSessionContext(SessionContext&& value) { SetSessionContext(std::move(value)); return *this;} private: Aws::String m_accessKeyId; bool m_accessKeyIdHasBeenSet = false; Aws::String m_accountId; bool m_accountIdHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::String m_principalId; bool m_principalIdHasBeenSet = false; SessionContext m_sessionContext; bool m_sessionContextHasBeenSet = false; }; } // namespace Model } // namespace Macie2 } // namespace Aws