/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SecurityHub { namespace Model { /** *

Provides details about one of the following actions that affects or that was * taken on a resource:

  • A remote IP address issued an Amazon Web * Services API call

  • A DNS request was received

  • *

    A remote IP address attempted to connect to an EC2 instance

  • *

    A remote IP address attempted a port probe on an EC2 instance

  • *

See Also:

AWS * API Reference

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

The type of action that was detected. The possible action types are:

    *
  • NETWORK_CONNECTION

  • * AWS_API_CALL

  • DNS_REQUEST

    *
  • PORT_PROBE

*/ inline const Aws::String& GetActionType() const{ return m_actionType; } /** *

The type of action that was detected. The possible action types are:

    *
  • NETWORK_CONNECTION

  • * AWS_API_CALL

  • DNS_REQUEST

    *
  • PORT_PROBE

*/ inline bool ActionTypeHasBeenSet() const { return m_actionTypeHasBeenSet; } /** *

The type of action that was detected. The possible action types are:

    *
  • NETWORK_CONNECTION

  • * AWS_API_CALL

  • DNS_REQUEST

    *
  • PORT_PROBE

*/ inline void SetActionType(const Aws::String& value) { m_actionTypeHasBeenSet = true; m_actionType = value; } /** *

The type of action that was detected. The possible action types are:

    *
  • NETWORK_CONNECTION

  • * AWS_API_CALL

  • DNS_REQUEST

    *
  • PORT_PROBE

*/ inline void SetActionType(Aws::String&& value) { m_actionTypeHasBeenSet = true; m_actionType = std::move(value); } /** *

The type of action that was detected. The possible action types are:

    *
  • NETWORK_CONNECTION

  • * AWS_API_CALL

  • DNS_REQUEST

    *
  • PORT_PROBE

*/ inline void SetActionType(const char* value) { m_actionTypeHasBeenSet = true; m_actionType.assign(value); } /** *

The type of action that was detected. The possible action types are:

    *
  • NETWORK_CONNECTION

  • * AWS_API_CALL

  • DNS_REQUEST

    *
  • PORT_PROBE

*/ inline Action& WithActionType(const Aws::String& value) { SetActionType(value); return *this;} /** *

The type of action that was detected. The possible action types are:

    *
  • NETWORK_CONNECTION

  • * AWS_API_CALL

  • DNS_REQUEST

    *
  • PORT_PROBE

*/ inline Action& WithActionType(Aws::String&& value) { SetActionType(std::move(value)); return *this;} /** *

The type of action that was detected. The possible action types are:

    *
  • NETWORK_CONNECTION

  • * AWS_API_CALL

  • DNS_REQUEST

    *
  • PORT_PROBE

*/ inline Action& WithActionType(const char* value) { SetActionType(value); return *this;} /** *

Included if ActionType is NETWORK_CONNECTION. * Provides details about the network connection that was detected.

*/ inline const NetworkConnectionAction& GetNetworkConnectionAction() const{ return m_networkConnectionAction; } /** *

Included if ActionType is NETWORK_CONNECTION. * Provides details about the network connection that was detected.

*/ inline bool NetworkConnectionActionHasBeenSet() const { return m_networkConnectionActionHasBeenSet; } /** *

Included if ActionType is NETWORK_CONNECTION. * Provides details about the network connection that was detected.

*/ inline void SetNetworkConnectionAction(const NetworkConnectionAction& value) { m_networkConnectionActionHasBeenSet = true; m_networkConnectionAction = value; } /** *

Included if ActionType is NETWORK_CONNECTION. * Provides details about the network connection that was detected.

*/ inline void SetNetworkConnectionAction(NetworkConnectionAction&& value) { m_networkConnectionActionHasBeenSet = true; m_networkConnectionAction = std::move(value); } /** *

Included if ActionType is NETWORK_CONNECTION. * Provides details about the network connection that was detected.

*/ inline Action& WithNetworkConnectionAction(const NetworkConnectionAction& value) { SetNetworkConnectionAction(value); return *this;} /** *

Included if ActionType is NETWORK_CONNECTION. * Provides details about the network connection that was detected.

*/ inline Action& WithNetworkConnectionAction(NetworkConnectionAction&& value) { SetNetworkConnectionAction(std::move(value)); return *this;} /** *

Included if ActionType is AWS_API_CALL. Provides * details about the API call that was detected.

*/ inline const AwsApiCallAction& GetAwsApiCallAction() const{ return m_awsApiCallAction; } /** *

Included if ActionType is AWS_API_CALL. Provides * details about the API call that was detected.

*/ inline bool AwsApiCallActionHasBeenSet() const { return m_awsApiCallActionHasBeenSet; } /** *

Included if ActionType is AWS_API_CALL. Provides * details about the API call that was detected.

*/ inline void SetAwsApiCallAction(const AwsApiCallAction& value) { m_awsApiCallActionHasBeenSet = true; m_awsApiCallAction = value; } /** *

Included if ActionType is AWS_API_CALL. Provides * details about the API call that was detected.

*/ inline void SetAwsApiCallAction(AwsApiCallAction&& value) { m_awsApiCallActionHasBeenSet = true; m_awsApiCallAction = std::move(value); } /** *

Included if ActionType is AWS_API_CALL. Provides * details about the API call that was detected.

*/ inline Action& WithAwsApiCallAction(const AwsApiCallAction& value) { SetAwsApiCallAction(value); return *this;} /** *

Included if ActionType is AWS_API_CALL. Provides * details about the API call that was detected.

*/ inline Action& WithAwsApiCallAction(AwsApiCallAction&& value) { SetAwsApiCallAction(std::move(value)); return *this;} /** *

Included if ActionType is DNS_REQUEST. Provides * details about the DNS request that was detected.

*/ inline const DnsRequestAction& GetDnsRequestAction() const{ return m_dnsRequestAction; } /** *

Included if ActionType is DNS_REQUEST. Provides * details about the DNS request that was detected.

*/ inline bool DnsRequestActionHasBeenSet() const { return m_dnsRequestActionHasBeenSet; } /** *

Included if ActionType is DNS_REQUEST. Provides * details about the DNS request that was detected.

*/ inline void SetDnsRequestAction(const DnsRequestAction& value) { m_dnsRequestActionHasBeenSet = true; m_dnsRequestAction = value; } /** *

Included if ActionType is DNS_REQUEST. Provides * details about the DNS request that was detected.

*/ inline void SetDnsRequestAction(DnsRequestAction&& value) { m_dnsRequestActionHasBeenSet = true; m_dnsRequestAction = std::move(value); } /** *

Included if ActionType is DNS_REQUEST. Provides * details about the DNS request that was detected.

*/ inline Action& WithDnsRequestAction(const DnsRequestAction& value) { SetDnsRequestAction(value); return *this;} /** *

Included if ActionType is DNS_REQUEST. Provides * details about the DNS request that was detected.

*/ inline Action& WithDnsRequestAction(DnsRequestAction&& value) { SetDnsRequestAction(std::move(value)); return *this;} /** *

Included if ActionType is PORT_PROBE. Provides * details about the port probe that was detected.

*/ inline const PortProbeAction& GetPortProbeAction() const{ return m_portProbeAction; } /** *

Included if ActionType is PORT_PROBE. Provides * details about the port probe that was detected.

*/ inline bool PortProbeActionHasBeenSet() const { return m_portProbeActionHasBeenSet; } /** *

Included if ActionType is PORT_PROBE. Provides * details about the port probe that was detected.

*/ inline void SetPortProbeAction(const PortProbeAction& value) { m_portProbeActionHasBeenSet = true; m_portProbeAction = value; } /** *

Included if ActionType is PORT_PROBE. Provides * details about the port probe that was detected.

*/ inline void SetPortProbeAction(PortProbeAction&& value) { m_portProbeActionHasBeenSet = true; m_portProbeAction = std::move(value); } /** *

Included if ActionType is PORT_PROBE. Provides * details about the port probe that was detected.

*/ inline Action& WithPortProbeAction(const PortProbeAction& value) { SetPortProbeAction(value); return *this;} /** *

Included if ActionType is PORT_PROBE. Provides * details about the port probe that was detected.

*/ inline Action& WithPortProbeAction(PortProbeAction&& value) { SetPortProbeAction(std::move(value)); return *this;} private: Aws::String m_actionType; bool m_actionTypeHasBeenSet = false; NetworkConnectionAction m_networkConnectionAction; bool m_networkConnectionActionHasBeenSet = false; AwsApiCallAction m_awsApiCallAction; bool m_awsApiCallActionHasBeenSet = false; DnsRequestAction m_dnsRequestAction; bool m_dnsRequestActionHasBeenSet = false; PortProbeAction m_portProbeAction; bool m_portProbeActionHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws