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

[Event-based policies only] Specifies an event that activates an * event-based policy.

See Also:

AWS * API Reference

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

The type of event. Currently, only snapshot sharing events are supported.

*/ inline const EventTypeValues& GetEventType() const{ return m_eventType; } /** *

The type of event. Currently, only snapshot sharing events are supported.

*/ inline bool EventTypeHasBeenSet() const { return m_eventTypeHasBeenSet; } /** *

The type of event. Currently, only snapshot sharing events are supported.

*/ inline void SetEventType(const EventTypeValues& value) { m_eventTypeHasBeenSet = true; m_eventType = value; } /** *

The type of event. Currently, only snapshot sharing events are supported.

*/ inline void SetEventType(EventTypeValues&& value) { m_eventTypeHasBeenSet = true; m_eventType = std::move(value); } /** *

The type of event. Currently, only snapshot sharing events are supported.

*/ inline EventParameters& WithEventType(const EventTypeValues& value) { SetEventType(value); return *this;} /** *

The type of event. Currently, only snapshot sharing events are supported.

*/ inline EventParameters& WithEventType(EventTypeValues&& value) { SetEventType(std::move(value)); return *this;} /** *

The IDs of the Amazon Web Services accounts that can trigger policy by * sharing snapshots with your account. The policy only runs if one of the * specified Amazon Web Services accounts shares a snapshot with your account.

*/ inline const Aws::Vector& GetSnapshotOwner() const{ return m_snapshotOwner; } /** *

The IDs of the Amazon Web Services accounts that can trigger policy by * sharing snapshots with your account. The policy only runs if one of the * specified Amazon Web Services accounts shares a snapshot with your account.

*/ inline bool SnapshotOwnerHasBeenSet() const { return m_snapshotOwnerHasBeenSet; } /** *

The IDs of the Amazon Web Services accounts that can trigger policy by * sharing snapshots with your account. The policy only runs if one of the * specified Amazon Web Services accounts shares a snapshot with your account.

*/ inline void SetSnapshotOwner(const Aws::Vector& value) { m_snapshotOwnerHasBeenSet = true; m_snapshotOwner = value; } /** *

The IDs of the Amazon Web Services accounts that can trigger policy by * sharing snapshots with your account. The policy only runs if one of the * specified Amazon Web Services accounts shares a snapshot with your account.

*/ inline void SetSnapshotOwner(Aws::Vector&& value) { m_snapshotOwnerHasBeenSet = true; m_snapshotOwner = std::move(value); } /** *

The IDs of the Amazon Web Services accounts that can trigger policy by * sharing snapshots with your account. The policy only runs if one of the * specified Amazon Web Services accounts shares a snapshot with your account.

*/ inline EventParameters& WithSnapshotOwner(const Aws::Vector& value) { SetSnapshotOwner(value); return *this;} /** *

The IDs of the Amazon Web Services accounts that can trigger policy by * sharing snapshots with your account. The policy only runs if one of the * specified Amazon Web Services accounts shares a snapshot with your account.

*/ inline EventParameters& WithSnapshotOwner(Aws::Vector&& value) { SetSnapshotOwner(std::move(value)); return *this;} /** *

The IDs of the Amazon Web Services accounts that can trigger policy by * sharing snapshots with your account. The policy only runs if one of the * specified Amazon Web Services accounts shares a snapshot with your account.

*/ inline EventParameters& AddSnapshotOwner(const Aws::String& value) { m_snapshotOwnerHasBeenSet = true; m_snapshotOwner.push_back(value); return *this; } /** *

The IDs of the Amazon Web Services accounts that can trigger policy by * sharing snapshots with your account. The policy only runs if one of the * specified Amazon Web Services accounts shares a snapshot with your account.

*/ inline EventParameters& AddSnapshotOwner(Aws::String&& value) { m_snapshotOwnerHasBeenSet = true; m_snapshotOwner.push_back(std::move(value)); return *this; } /** *

The IDs of the Amazon Web Services accounts that can trigger policy by * sharing snapshots with your account. The policy only runs if one of the * specified Amazon Web Services accounts shares a snapshot with your account.

*/ inline EventParameters& AddSnapshotOwner(const char* value) { m_snapshotOwnerHasBeenSet = true; m_snapshotOwner.push_back(value); return *this; } /** *

The snapshot description that can trigger the policy. The description pattern * is specified using a regular expression. The policy runs only if a snapshot with * a description that matches the specified pattern is shared with your * account.

For example, specifying ^.*Created for policy: * policy-1234567890abcdef0.*$ configures the policy to run only if * snapshots created by policy policy-1234567890abcdef0 are shared * with your account.

*/ inline const Aws::String& GetDescriptionRegex() const{ return m_descriptionRegex; } /** *

The snapshot description that can trigger the policy. The description pattern * is specified using a regular expression. The policy runs only if a snapshot with * a description that matches the specified pattern is shared with your * account.

For example, specifying ^.*Created for policy: * policy-1234567890abcdef0.*$ configures the policy to run only if * snapshots created by policy policy-1234567890abcdef0 are shared * with your account.

*/ inline bool DescriptionRegexHasBeenSet() const { return m_descriptionRegexHasBeenSet; } /** *

The snapshot description that can trigger the policy. The description pattern * is specified using a regular expression. The policy runs only if a snapshot with * a description that matches the specified pattern is shared with your * account.

For example, specifying ^.*Created for policy: * policy-1234567890abcdef0.*$ configures the policy to run only if * snapshots created by policy policy-1234567890abcdef0 are shared * with your account.

*/ inline void SetDescriptionRegex(const Aws::String& value) { m_descriptionRegexHasBeenSet = true; m_descriptionRegex = value; } /** *

The snapshot description that can trigger the policy. The description pattern * is specified using a regular expression. The policy runs only if a snapshot with * a description that matches the specified pattern is shared with your * account.

For example, specifying ^.*Created for policy: * policy-1234567890abcdef0.*$ configures the policy to run only if * snapshots created by policy policy-1234567890abcdef0 are shared * with your account.

*/ inline void SetDescriptionRegex(Aws::String&& value) { m_descriptionRegexHasBeenSet = true; m_descriptionRegex = std::move(value); } /** *

The snapshot description that can trigger the policy. The description pattern * is specified using a regular expression. The policy runs only if a snapshot with * a description that matches the specified pattern is shared with your * account.

For example, specifying ^.*Created for policy: * policy-1234567890abcdef0.*$ configures the policy to run only if * snapshots created by policy policy-1234567890abcdef0 are shared * with your account.

*/ inline void SetDescriptionRegex(const char* value) { m_descriptionRegexHasBeenSet = true; m_descriptionRegex.assign(value); } /** *

The snapshot description that can trigger the policy. The description pattern * is specified using a regular expression. The policy runs only if a snapshot with * a description that matches the specified pattern is shared with your * account.

For example, specifying ^.*Created for policy: * policy-1234567890abcdef0.*$ configures the policy to run only if * snapshots created by policy policy-1234567890abcdef0 are shared * with your account.

*/ inline EventParameters& WithDescriptionRegex(const Aws::String& value) { SetDescriptionRegex(value); return *this;} /** *

The snapshot description that can trigger the policy. The description pattern * is specified using a regular expression. The policy runs only if a snapshot with * a description that matches the specified pattern is shared with your * account.

For example, specifying ^.*Created for policy: * policy-1234567890abcdef0.*$ configures the policy to run only if * snapshots created by policy policy-1234567890abcdef0 are shared * with your account.

*/ inline EventParameters& WithDescriptionRegex(Aws::String&& value) { SetDescriptionRegex(std::move(value)); return *this;} /** *

The snapshot description that can trigger the policy. The description pattern * is specified using a regular expression. The policy runs only if a snapshot with * a description that matches the specified pattern is shared with your * account.

For example, specifying ^.*Created for policy: * policy-1234567890abcdef0.*$ configures the policy to run only if * snapshots created by policy policy-1234567890abcdef0 are shared * with your account.

*/ inline EventParameters& WithDescriptionRegex(const char* value) { SetDescriptionRegex(value); return *this;} private: EventTypeValues m_eventType; bool m_eventTypeHasBeenSet = false; Aws::Vector m_snapshotOwner; bool m_snapshotOwnerHasBeenSet = false; Aws::String m_descriptionRegex; bool m_descriptionRegexHasBeenSet = false; }; } // namespace Model } // namespace DLM } // namespace Aws