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

Specifies the type and name of a resource referenced by an * event.

See Also:

AWS * API Reference

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

The type of a resource referenced by the event returned. When the resource * type cannot be determined, null is returned. Some examples of resource types * are: Instance for EC2, Trail for CloudTrail, DBInstance for * Amazon RDS, and AccessKey for IAM. To learn more about how to look up and * filter events by the resource types supported for a service, see Filtering * CloudTrail Events.

*/ inline const Aws::String& GetResourceType() const{ return m_resourceType; } /** *

The type of a resource referenced by the event returned. When the resource * type cannot be determined, null is returned. Some examples of resource types * are: Instance for EC2, Trail for CloudTrail, DBInstance for * Amazon RDS, and AccessKey for IAM. To learn more about how to look up and * filter events by the resource types supported for a service, see Filtering * CloudTrail Events.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The type of a resource referenced by the event returned. When the resource * type cannot be determined, null is returned. Some examples of resource types * are: Instance for EC2, Trail for CloudTrail, DBInstance for * Amazon RDS, and AccessKey for IAM. To learn more about how to look up and * filter events by the resource types supported for a service, see Filtering * CloudTrail Events.

*/ inline void SetResourceType(const Aws::String& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The type of a resource referenced by the event returned. When the resource * type cannot be determined, null is returned. Some examples of resource types * are: Instance for EC2, Trail for CloudTrail, DBInstance for * Amazon RDS, and AccessKey for IAM. To learn more about how to look up and * filter events by the resource types supported for a service, see Filtering * CloudTrail Events.

*/ inline void SetResourceType(Aws::String&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The type of a resource referenced by the event returned. When the resource * type cannot be determined, null is returned. Some examples of resource types * are: Instance for EC2, Trail for CloudTrail, DBInstance for * Amazon RDS, and AccessKey for IAM. To learn more about how to look up and * filter events by the resource types supported for a service, see Filtering * CloudTrail Events.

*/ inline void SetResourceType(const char* value) { m_resourceTypeHasBeenSet = true; m_resourceType.assign(value); } /** *

The type of a resource referenced by the event returned. When the resource * type cannot be determined, null is returned. Some examples of resource types * are: Instance for EC2, Trail for CloudTrail, DBInstance for * Amazon RDS, and AccessKey for IAM. To learn more about how to look up and * filter events by the resource types supported for a service, see Filtering * CloudTrail Events.

*/ inline Resource& WithResourceType(const Aws::String& value) { SetResourceType(value); return *this;} /** *

The type of a resource referenced by the event returned. When the resource * type cannot be determined, null is returned. Some examples of resource types * are: Instance for EC2, Trail for CloudTrail, DBInstance for * Amazon RDS, and AccessKey for IAM. To learn more about how to look up and * filter events by the resource types supported for a service, see Filtering * CloudTrail Events.

*/ inline Resource& WithResourceType(Aws::String&& value) { SetResourceType(std::move(value)); return *this;} /** *

The type of a resource referenced by the event returned. When the resource * type cannot be determined, null is returned. Some examples of resource types * are: Instance for EC2, Trail for CloudTrail, DBInstance for * Amazon RDS, and AccessKey for IAM. To learn more about how to look up and * filter events by the resource types supported for a service, see Filtering * CloudTrail Events.

*/ inline Resource& WithResourceType(const char* value) { SetResourceType(value); return *this;} /** *

The name of the resource referenced by the event returned. These are * user-created names whose values will depend on the environment. For example, the * resource name might be "auto-scaling-test-group" for an Auto Scaling Group or * "i-1234567" for an EC2 Instance.

*/ inline const Aws::String& GetResourceName() const{ return m_resourceName; } /** *

The name of the resource referenced by the event returned. These are * user-created names whose values will depend on the environment. For example, the * resource name might be "auto-scaling-test-group" for an Auto Scaling Group or * "i-1234567" for an EC2 Instance.

*/ inline bool ResourceNameHasBeenSet() const { return m_resourceNameHasBeenSet; } /** *

The name of the resource referenced by the event returned. These are * user-created names whose values will depend on the environment. For example, the * resource name might be "auto-scaling-test-group" for an Auto Scaling Group or * "i-1234567" for an EC2 Instance.

*/ inline void SetResourceName(const Aws::String& value) { m_resourceNameHasBeenSet = true; m_resourceName = value; } /** *

The name of the resource referenced by the event returned. These are * user-created names whose values will depend on the environment. For example, the * resource name might be "auto-scaling-test-group" for an Auto Scaling Group or * "i-1234567" for an EC2 Instance.

*/ inline void SetResourceName(Aws::String&& value) { m_resourceNameHasBeenSet = true; m_resourceName = std::move(value); } /** *

The name of the resource referenced by the event returned. These are * user-created names whose values will depend on the environment. For example, the * resource name might be "auto-scaling-test-group" for an Auto Scaling Group or * "i-1234567" for an EC2 Instance.

*/ inline void SetResourceName(const char* value) { m_resourceNameHasBeenSet = true; m_resourceName.assign(value); } /** *

The name of the resource referenced by the event returned. These are * user-created names whose values will depend on the environment. For example, the * resource name might be "auto-scaling-test-group" for an Auto Scaling Group or * "i-1234567" for an EC2 Instance.

*/ inline Resource& WithResourceName(const Aws::String& value) { SetResourceName(value); return *this;} /** *

The name of the resource referenced by the event returned. These are * user-created names whose values will depend on the environment. For example, the * resource name might be "auto-scaling-test-group" for an Auto Scaling Group or * "i-1234567" for an EC2 Instance.

*/ inline Resource& WithResourceName(Aws::String&& value) { SetResourceName(std::move(value)); return *this;} /** *

The name of the resource referenced by the event returned. These are * user-created names whose values will depend on the environment. For example, the * resource name might be "auto-scaling-test-group" for an Auto Scaling Group or * "i-1234567" for an EC2 Instance.

*/ inline Resource& WithResourceName(const char* value) { SetResourceName(value); return *this;} private: Aws::String m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::String m_resourceName; bool m_resourceNameHasBeenSet = false; }; } // namespace Model } // namespace CloudTrail } // namespace Aws