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

This structure contains information about one delivery source in your * account. A delivery source is an Amazon Web Services resource that sends logs to * an Amazon Web Services destination. The destination can be CloudWatch Logs, * Amazon S3, or Firehose.

Only some Amazon Web Services services support * being configured as a delivery source. These services are listed as Supported * [V2 Permissions] in the table at Enabling * logging from Amazon Web Services services.

To configure logs * delivery between a supported Amazon Web Services service and a destination, you * must do the following:

  • Create a delivery source, which is a * logical object that represents the resource that is actually sending the logs. * For more information, see PutDeliverySource.

    *
  • Create a delivery destination, which is a logical object * that represents the actual delivery destination. For more information, see PutDeliveryDestination.

    *
  • If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy * in the destination account to assign an IAM policy to the destination. This * policy allows delivery to that destination.

  • Create a * delivery by pairing exactly one delivery source and one delivery * destination. For more information, see CreateDelivery.

    *

You can configure a single delivery source to send logs to * multiple destinations by creating multiple deliveries. You can also create * multiple deliveries to configure multiple delivery sources to send logs to the * same delivery destination.

See Also:

AWS * API Reference

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

The unique name of the delivery source.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The unique name of the delivery source.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The unique name of the delivery source.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The unique name of the delivery source.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The unique name of the delivery source.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The unique name of the delivery source.

*/ inline DeliverySource& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The unique name of the delivery source.

*/ inline DeliverySource& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The unique name of the delivery source.

*/ inline DeliverySource& WithName(const char* value) { SetName(value); return *this;} /** *

The Amazon Resource Name (ARN) that uniquely identifies this delivery * source.

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

The Amazon Resource Name (ARN) that uniquely identifies this delivery * source.

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

The Amazon Resource Name (ARN) that uniquely identifies this delivery * source.

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

The Amazon Resource Name (ARN) that uniquely identifies this delivery * source.

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

The Amazon Resource Name (ARN) that uniquely identifies this delivery * source.

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

The Amazon Resource Name (ARN) that uniquely identifies this delivery * source.

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

The Amazon Resource Name (ARN) that uniquely identifies this delivery * source.

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

The Amazon Resource Name (ARN) that uniquely identifies this delivery * source.

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

This array contains the ARN of the Amazon Web Services resource that sends * logs and is represented by this delivery source. Currently, only one ARN can be * in the array.

*/ inline const Aws::Vector& GetResourceArns() const{ return m_resourceArns; } /** *

This array contains the ARN of the Amazon Web Services resource that sends * logs and is represented by this delivery source. Currently, only one ARN can be * in the array.

*/ inline bool ResourceArnsHasBeenSet() const { return m_resourceArnsHasBeenSet; } /** *

This array contains the ARN of the Amazon Web Services resource that sends * logs and is represented by this delivery source. Currently, only one ARN can be * in the array.

*/ inline void SetResourceArns(const Aws::Vector& value) { m_resourceArnsHasBeenSet = true; m_resourceArns = value; } /** *

This array contains the ARN of the Amazon Web Services resource that sends * logs and is represented by this delivery source. Currently, only one ARN can be * in the array.

*/ inline void SetResourceArns(Aws::Vector&& value) { m_resourceArnsHasBeenSet = true; m_resourceArns = std::move(value); } /** *

This array contains the ARN of the Amazon Web Services resource that sends * logs and is represented by this delivery source. Currently, only one ARN can be * in the array.

*/ inline DeliverySource& WithResourceArns(const Aws::Vector& value) { SetResourceArns(value); return *this;} /** *

This array contains the ARN of the Amazon Web Services resource that sends * logs and is represented by this delivery source. Currently, only one ARN can be * in the array.

*/ inline DeliverySource& WithResourceArns(Aws::Vector&& value) { SetResourceArns(std::move(value)); return *this;} /** *

This array contains the ARN of the Amazon Web Services resource that sends * logs and is represented by this delivery source. Currently, only one ARN can be * in the array.

*/ inline DeliverySource& AddResourceArns(const Aws::String& value) { m_resourceArnsHasBeenSet = true; m_resourceArns.push_back(value); return *this; } /** *

This array contains the ARN of the Amazon Web Services resource that sends * logs and is represented by this delivery source. Currently, only one ARN can be * in the array.

*/ inline DeliverySource& AddResourceArns(Aws::String&& value) { m_resourceArnsHasBeenSet = true; m_resourceArns.push_back(std::move(value)); return *this; } /** *

This array contains the ARN of the Amazon Web Services resource that sends * logs and is represented by this delivery source. Currently, only one ARN can be * in the array.

*/ inline DeliverySource& AddResourceArns(const char* value) { m_resourceArnsHasBeenSet = true; m_resourceArns.push_back(value); return *this; } /** *

The Amazon Web Services service that is sending logs.

*/ inline const Aws::String& GetService() const{ return m_service; } /** *

The Amazon Web Services service that is sending logs.

*/ inline bool ServiceHasBeenSet() const { return m_serviceHasBeenSet; } /** *

The Amazon Web Services service that is sending logs.

*/ inline void SetService(const Aws::String& value) { m_serviceHasBeenSet = true; m_service = value; } /** *

The Amazon Web Services service that is sending logs.

*/ inline void SetService(Aws::String&& value) { m_serviceHasBeenSet = true; m_service = std::move(value); } /** *

The Amazon Web Services service that is sending logs.

*/ inline void SetService(const char* value) { m_serviceHasBeenSet = true; m_service.assign(value); } /** *

The Amazon Web Services service that is sending logs.

*/ inline DeliverySource& WithService(const Aws::String& value) { SetService(value); return *this;} /** *

The Amazon Web Services service that is sending logs.

*/ inline DeliverySource& WithService(Aws::String&& value) { SetService(std::move(value)); return *this;} /** *

The Amazon Web Services service that is sending logs.

*/ inline DeliverySource& WithService(const char* value) { SetService(value); return *this;} /** *

The type of log that the source is sending. For valid values for this * parameter, see the documentation for the source service.

*/ inline const Aws::String& GetLogType() const{ return m_logType; } /** *

The type of log that the source is sending. For valid values for this * parameter, see the documentation for the source service.

*/ inline bool LogTypeHasBeenSet() const { return m_logTypeHasBeenSet; } /** *

The type of log that the source is sending. For valid values for this * parameter, see the documentation for the source service.

*/ inline void SetLogType(const Aws::String& value) { m_logTypeHasBeenSet = true; m_logType = value; } /** *

The type of log that the source is sending. For valid values for this * parameter, see the documentation for the source service.

*/ inline void SetLogType(Aws::String&& value) { m_logTypeHasBeenSet = true; m_logType = std::move(value); } /** *

The type of log that the source is sending. For valid values for this * parameter, see the documentation for the source service.

*/ inline void SetLogType(const char* value) { m_logTypeHasBeenSet = true; m_logType.assign(value); } /** *

The type of log that the source is sending. For valid values for this * parameter, see the documentation for the source service.

*/ inline DeliverySource& WithLogType(const Aws::String& value) { SetLogType(value); return *this;} /** *

The type of log that the source is sending. For valid values for this * parameter, see the documentation for the source service.

*/ inline DeliverySource& WithLogType(Aws::String&& value) { SetLogType(std::move(value)); return *this;} /** *

The type of log that the source is sending. For valid values for this * parameter, see the documentation for the source service.

*/ inline DeliverySource& WithLogType(const char* value) { SetLogType(value); return *this;} /** *

The tags that have been assigned to this delivery source.

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

The tags that have been assigned to this delivery source.

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

The tags that have been assigned to this delivery source.

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

The tags that have been assigned to this delivery source.

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

The tags that have been assigned to this delivery source.

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

The tags that have been assigned to this delivery source.

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

The tags that have been assigned to this delivery source.

*/ inline DeliverySource& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The tags that have been assigned to this delivery source.

*/ inline DeliverySource& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The tags that have been assigned to this delivery source.

*/ inline DeliverySource& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The tags that have been assigned to this delivery source.

*/ inline DeliverySource& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

The tags that have been assigned to this delivery source.

*/ inline DeliverySource& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The tags that have been assigned to this delivery source.

*/ inline DeliverySource& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The tags that have been assigned to this delivery source.

*/ inline DeliverySource& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::Vector m_resourceArns; bool m_resourceArnsHasBeenSet = false; Aws::String m_service; bool m_serviceHasBeenSet = false; Aws::String m_logType; bool m_logTypeHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchLogs } // namespace Aws