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

A single firewall rule in a rule group.

See Also:

AWS * API Reference

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

The unique identifier of the firewall rule group of the rule.

*/ inline const Aws::String& GetFirewallRuleGroupId() const{ return m_firewallRuleGroupId; } /** *

The unique identifier of the firewall rule group of the rule.

*/ inline bool FirewallRuleGroupIdHasBeenSet() const { return m_firewallRuleGroupIdHasBeenSet; } /** *

The unique identifier of the firewall rule group of the rule.

*/ inline void SetFirewallRuleGroupId(const Aws::String& value) { m_firewallRuleGroupIdHasBeenSet = true; m_firewallRuleGroupId = value; } /** *

The unique identifier of the firewall rule group of the rule.

*/ inline void SetFirewallRuleGroupId(Aws::String&& value) { m_firewallRuleGroupIdHasBeenSet = true; m_firewallRuleGroupId = std::move(value); } /** *

The unique identifier of the firewall rule group of the rule.

*/ inline void SetFirewallRuleGroupId(const char* value) { m_firewallRuleGroupIdHasBeenSet = true; m_firewallRuleGroupId.assign(value); } /** *

The unique identifier of the firewall rule group of the rule.

*/ inline FirewallRule& WithFirewallRuleGroupId(const Aws::String& value) { SetFirewallRuleGroupId(value); return *this;} /** *

The unique identifier of the firewall rule group of the rule.

*/ inline FirewallRule& WithFirewallRuleGroupId(Aws::String&& value) { SetFirewallRuleGroupId(std::move(value)); return *this;} /** *

The unique identifier of the firewall rule group of the rule.

*/ inline FirewallRule& WithFirewallRuleGroupId(const char* value) { SetFirewallRuleGroupId(value); return *this;} /** *

The ID of the domain list that's used in the rule.

*/ inline const Aws::String& GetFirewallDomainListId() const{ return m_firewallDomainListId; } /** *

The ID of the domain list that's used in the rule.

*/ inline bool FirewallDomainListIdHasBeenSet() const { return m_firewallDomainListIdHasBeenSet; } /** *

The ID of the domain list that's used in the rule.

*/ inline void SetFirewallDomainListId(const Aws::String& value) { m_firewallDomainListIdHasBeenSet = true; m_firewallDomainListId = value; } /** *

The ID of the domain list that's used in the rule.

*/ inline void SetFirewallDomainListId(Aws::String&& value) { m_firewallDomainListIdHasBeenSet = true; m_firewallDomainListId = std::move(value); } /** *

The ID of the domain list that's used in the rule.

*/ inline void SetFirewallDomainListId(const char* value) { m_firewallDomainListIdHasBeenSet = true; m_firewallDomainListId.assign(value); } /** *

The ID of the domain list that's used in the rule.

*/ inline FirewallRule& WithFirewallDomainListId(const Aws::String& value) { SetFirewallDomainListId(value); return *this;} /** *

The ID of the domain list that's used in the rule.

*/ inline FirewallRule& WithFirewallDomainListId(Aws::String&& value) { SetFirewallDomainListId(std::move(value)); return *this;} /** *

The ID of the domain list that's used in the rule.

*/ inline FirewallRule& WithFirewallDomainListId(const char* value) { SetFirewallDomainListId(value); return *this;} /** *

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The name of the rule.

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

The priority of the rule in the rule group. This value must be unique within * the rule group. DNS Firewall processes the rules in a rule group by order of * priority, starting from the lowest setting.

*/ inline int GetPriority() const{ return m_priority; } /** *

The priority of the rule in the rule group. This value must be unique within * the rule group. DNS Firewall processes the rules in a rule group by order of * priority, starting from the lowest setting.

*/ inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; } /** *

The priority of the rule in the rule group. This value must be unique within * the rule group. DNS Firewall processes the rules in a rule group by order of * priority, starting from the lowest setting.

*/ inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; } /** *

The priority of the rule in the rule group. This value must be unique within * the rule group. DNS Firewall processes the rules in a rule group by order of * priority, starting from the lowest setting.

*/ inline FirewallRule& WithPriority(int value) { SetPriority(value); return *this;} /** *

The action that DNS Firewall should take on a DNS query when it matches one * of the domains in the rule's domain list:

  • ALLOW - * Permit the request to go through.

  • ALERT - Permit * the request to go through but send an alert to the logs.

  • * BLOCK - Disallow the request. If this is specified, additional * handling details are provided in the rule's BlockResponse setting. *

*/ inline const Action& GetAction() const{ return m_action; } /** *

The action that DNS Firewall should take on a DNS query when it matches one * of the domains in the rule's domain list:

  • ALLOW - * Permit the request to go through.

  • ALERT - Permit * the request to go through but send an alert to the logs.

  • * BLOCK - Disallow the request. If this is specified, additional * handling details are provided in the rule's BlockResponse setting. *

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

The action that DNS Firewall should take on a DNS query when it matches one * of the domains in the rule's domain list:

  • ALLOW - * Permit the request to go through.

  • ALERT - Permit * the request to go through but send an alert to the logs.

  • * BLOCK - Disallow the request. If this is specified, additional * handling details are provided in the rule's BlockResponse setting. *

*/ inline void SetAction(const Action& value) { m_actionHasBeenSet = true; m_action = value; } /** *

The action that DNS Firewall should take on a DNS query when it matches one * of the domains in the rule's domain list:

  • ALLOW - * Permit the request to go through.

  • ALERT - Permit * the request to go through but send an alert to the logs.

  • * BLOCK - Disallow the request. If this is specified, additional * handling details are provided in the rule's BlockResponse setting. *

*/ inline void SetAction(Action&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

The action that DNS Firewall should take on a DNS query when it matches one * of the domains in the rule's domain list:

  • ALLOW - * Permit the request to go through.

  • ALERT - Permit * the request to go through but send an alert to the logs.

  • * BLOCK - Disallow the request. If this is specified, additional * handling details are provided in the rule's BlockResponse setting. *

*/ inline FirewallRule& WithAction(const Action& value) { SetAction(value); return *this;} /** *

The action that DNS Firewall should take on a DNS query when it matches one * of the domains in the rule's domain list:

  • ALLOW - * Permit the request to go through.

  • ALERT - Permit * the request to go through but send an alert to the logs.

  • * BLOCK - Disallow the request. If this is specified, additional * handling details are provided in the rule's BlockResponse setting. *

*/ inline FirewallRule& WithAction(Action&& value) { SetAction(std::move(value)); return *this;} /** *

The way that you want DNS Firewall to block the request. Used for the rule * action setting BLOCK.

  • NODATA - * Respond indicating that the query was successful, but no response is available * for it.

  • NXDOMAIN - Respond indicating that the * domain name that's in the query doesn't exist.

  • * OVERRIDE - Provide a custom override in the response. This option * requires custom handling details in the rule's BlockOverride* * settings.

*/ inline const BlockResponse& GetBlockResponse() const{ return m_blockResponse; } /** *

The way that you want DNS Firewall to block the request. Used for the rule * action setting BLOCK.

  • NODATA - * Respond indicating that the query was successful, but no response is available * for it.

  • NXDOMAIN - Respond indicating that the * domain name that's in the query doesn't exist.

  • * OVERRIDE - Provide a custom override in the response. This option * requires custom handling details in the rule's BlockOverride* * settings.

*/ inline bool BlockResponseHasBeenSet() const { return m_blockResponseHasBeenSet; } /** *

The way that you want DNS Firewall to block the request. Used for the rule * action setting BLOCK.

  • NODATA - * Respond indicating that the query was successful, but no response is available * for it.

  • NXDOMAIN - Respond indicating that the * domain name that's in the query doesn't exist.

  • * OVERRIDE - Provide a custom override in the response. This option * requires custom handling details in the rule's BlockOverride* * settings.

*/ inline void SetBlockResponse(const BlockResponse& value) { m_blockResponseHasBeenSet = true; m_blockResponse = value; } /** *

The way that you want DNS Firewall to block the request. Used for the rule * action setting BLOCK.

  • NODATA - * Respond indicating that the query was successful, but no response is available * for it.

  • NXDOMAIN - Respond indicating that the * domain name that's in the query doesn't exist.

  • * OVERRIDE - Provide a custom override in the response. This option * requires custom handling details in the rule's BlockOverride* * settings.

*/ inline void SetBlockResponse(BlockResponse&& value) { m_blockResponseHasBeenSet = true; m_blockResponse = std::move(value); } /** *

The way that you want DNS Firewall to block the request. Used for the rule * action setting BLOCK.

  • NODATA - * Respond indicating that the query was successful, but no response is available * for it.

  • NXDOMAIN - Respond indicating that the * domain name that's in the query doesn't exist.

  • * OVERRIDE - Provide a custom override in the response. This option * requires custom handling details in the rule's BlockOverride* * settings.

*/ inline FirewallRule& WithBlockResponse(const BlockResponse& value) { SetBlockResponse(value); return *this;} /** *

The way that you want DNS Firewall to block the request. Used for the rule * action setting BLOCK.

  • NODATA - * Respond indicating that the query was successful, but no response is available * for it.

  • NXDOMAIN - Respond indicating that the * domain name that's in the query doesn't exist.

  • * OVERRIDE - Provide a custom override in the response. This option * requires custom handling details in the rule's BlockOverride* * settings.

*/ inline FirewallRule& WithBlockResponse(BlockResponse&& value) { SetBlockResponse(std::move(value)); return *this;} /** *

The custom DNS record to send back in response to the query. Used for the * rule action BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline const Aws::String& GetBlockOverrideDomain() const{ return m_blockOverrideDomain; } /** *

The custom DNS record to send back in response to the query. Used for the * rule action BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline bool BlockOverrideDomainHasBeenSet() const { return m_blockOverrideDomainHasBeenSet; } /** *

The custom DNS record to send back in response to the query. Used for the * rule action BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline void SetBlockOverrideDomain(const Aws::String& value) { m_blockOverrideDomainHasBeenSet = true; m_blockOverrideDomain = value; } /** *

The custom DNS record to send back in response to the query. Used for the * rule action BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline void SetBlockOverrideDomain(Aws::String&& value) { m_blockOverrideDomainHasBeenSet = true; m_blockOverrideDomain = std::move(value); } /** *

The custom DNS record to send back in response to the query. Used for the * rule action BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline void SetBlockOverrideDomain(const char* value) { m_blockOverrideDomainHasBeenSet = true; m_blockOverrideDomain.assign(value); } /** *

The custom DNS record to send back in response to the query. Used for the * rule action BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline FirewallRule& WithBlockOverrideDomain(const Aws::String& value) { SetBlockOverrideDomain(value); return *this;} /** *

The custom DNS record to send back in response to the query. Used for the * rule action BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline FirewallRule& WithBlockOverrideDomain(Aws::String&& value) { SetBlockOverrideDomain(std::move(value)); return *this;} /** *

The custom DNS record to send back in response to the query. Used for the * rule action BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline FirewallRule& WithBlockOverrideDomain(const char* value) { SetBlockOverrideDomain(value); return *this;} /** *

The DNS record's type. This determines the format of the record value that * you provided in BlockOverrideDomain. Used for the rule action * BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline const BlockOverrideDnsType& GetBlockOverrideDnsType() const{ return m_blockOverrideDnsType; } /** *

The DNS record's type. This determines the format of the record value that * you provided in BlockOverrideDomain. Used for the rule action * BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline bool BlockOverrideDnsTypeHasBeenSet() const { return m_blockOverrideDnsTypeHasBeenSet; } /** *

The DNS record's type. This determines the format of the record value that * you provided in BlockOverrideDomain. Used for the rule action * BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline void SetBlockOverrideDnsType(const BlockOverrideDnsType& value) { m_blockOverrideDnsTypeHasBeenSet = true; m_blockOverrideDnsType = value; } /** *

The DNS record's type. This determines the format of the record value that * you provided in BlockOverrideDomain. Used for the rule action * BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline void SetBlockOverrideDnsType(BlockOverrideDnsType&& value) { m_blockOverrideDnsTypeHasBeenSet = true; m_blockOverrideDnsType = std::move(value); } /** *

The DNS record's type. This determines the format of the record value that * you provided in BlockOverrideDomain. Used for the rule action * BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline FirewallRule& WithBlockOverrideDnsType(const BlockOverrideDnsType& value) { SetBlockOverrideDnsType(value); return *this;} /** *

The DNS record's type. This determines the format of the record value that * you provided in BlockOverrideDomain. Used for the rule action * BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline FirewallRule& WithBlockOverrideDnsType(BlockOverrideDnsType&& value) { SetBlockOverrideDnsType(std::move(value)); return *this;} /** *

The recommended amount of time, in seconds, for the DNS resolver or web * browser to cache the provided override record. Used for the rule action * BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline int GetBlockOverrideTtl() const{ return m_blockOverrideTtl; } /** *

The recommended amount of time, in seconds, for the DNS resolver or web * browser to cache the provided override record. Used for the rule action * BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline bool BlockOverrideTtlHasBeenSet() const { return m_blockOverrideTtlHasBeenSet; } /** *

The recommended amount of time, in seconds, for the DNS resolver or web * browser to cache the provided override record. Used for the rule action * BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline void SetBlockOverrideTtl(int value) { m_blockOverrideTtlHasBeenSet = true; m_blockOverrideTtl = value; } /** *

The recommended amount of time, in seconds, for the DNS resolver or web * browser to cache the provided override record. Used for the rule action * BLOCK with a BlockResponse setting of * OVERRIDE.

*/ inline FirewallRule& WithBlockOverrideTtl(int value) { SetBlockOverrideTtl(value); return *this;} /** *

A unique string defined by you to identify the request. This allows you to * retry failed requests without the risk of executing the operation twice. This * can be any unique string, for example, a timestamp.

*/ inline const Aws::String& GetCreatorRequestId() const{ return m_creatorRequestId; } /** *

A unique string defined by you to identify the request. This allows you to * retry failed requests without the risk of executing the operation twice. This * can be any unique string, for example, a timestamp.

*/ inline bool CreatorRequestIdHasBeenSet() const { return m_creatorRequestIdHasBeenSet; } /** *

A unique string defined by you to identify the request. This allows you to * retry failed requests without the risk of executing the operation twice. This * can be any unique string, for example, a timestamp.

*/ inline void SetCreatorRequestId(const Aws::String& value) { m_creatorRequestIdHasBeenSet = true; m_creatorRequestId = value; } /** *

A unique string defined by you to identify the request. This allows you to * retry failed requests without the risk of executing the operation twice. This * can be any unique string, for example, a timestamp.

*/ inline void SetCreatorRequestId(Aws::String&& value) { m_creatorRequestIdHasBeenSet = true; m_creatorRequestId = std::move(value); } /** *

A unique string defined by you to identify the request. This allows you to * retry failed requests without the risk of executing the operation twice. This * can be any unique string, for example, a timestamp.

*/ inline void SetCreatorRequestId(const char* value) { m_creatorRequestIdHasBeenSet = true; m_creatorRequestId.assign(value); } /** *

A unique string defined by you to identify the request. This allows you to * retry failed requests without the risk of executing the operation twice. This * can be any unique string, for example, a timestamp.

*/ inline FirewallRule& WithCreatorRequestId(const Aws::String& value) { SetCreatorRequestId(value); return *this;} /** *

A unique string defined by you to identify the request. This allows you to * retry failed requests without the risk of executing the operation twice. This * can be any unique string, for example, a timestamp.

*/ inline FirewallRule& WithCreatorRequestId(Aws::String&& value) { SetCreatorRequestId(std::move(value)); return *this;} /** *

A unique string defined by you to identify the request. This allows you to * retry failed requests without the risk of executing the operation twice. This * can be any unique string, for example, a timestamp.

*/ inline FirewallRule& WithCreatorRequestId(const char* value) { SetCreatorRequestId(value); return *this;} /** *

The date and time that the rule was created, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline const Aws::String& GetCreationTime() const{ return m_creationTime; } /** *

The date and time that the rule was created, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; } /** *

The date and time that the rule was created, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline void SetCreationTime(const Aws::String& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; } /** *

The date and time that the rule was created, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline void SetCreationTime(Aws::String&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); } /** *

The date and time that the rule was created, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline void SetCreationTime(const char* value) { m_creationTimeHasBeenSet = true; m_creationTime.assign(value); } /** *

The date and time that the rule was created, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline FirewallRule& WithCreationTime(const Aws::String& value) { SetCreationTime(value); return *this;} /** *

The date and time that the rule was created, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline FirewallRule& WithCreationTime(Aws::String&& value) { SetCreationTime(std::move(value)); return *this;} /** *

The date and time that the rule was created, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline FirewallRule& WithCreationTime(const char* value) { SetCreationTime(value); return *this;} /** *

The date and time that the rule was last modified, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline const Aws::String& GetModificationTime() const{ return m_modificationTime; } /** *

The date and time that the rule was last modified, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline bool ModificationTimeHasBeenSet() const { return m_modificationTimeHasBeenSet; } /** *

The date and time that the rule was last modified, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline void SetModificationTime(const Aws::String& value) { m_modificationTimeHasBeenSet = true; m_modificationTime = value; } /** *

The date and time that the rule was last modified, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline void SetModificationTime(Aws::String&& value) { m_modificationTimeHasBeenSet = true; m_modificationTime = std::move(value); } /** *

The date and time that the rule was last modified, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline void SetModificationTime(const char* value) { m_modificationTimeHasBeenSet = true; m_modificationTime.assign(value); } /** *

The date and time that the rule was last modified, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline FirewallRule& WithModificationTime(const Aws::String& value) { SetModificationTime(value); return *this;} /** *

The date and time that the rule was last modified, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline FirewallRule& WithModificationTime(Aws::String&& value) { SetModificationTime(std::move(value)); return *this;} /** *

The date and time that the rule was last modified, in Unix time format and * Coordinated Universal Time (UTC).

*/ inline FirewallRule& WithModificationTime(const char* value) { SetModificationTime(value); return *this;} private: Aws::String m_firewallRuleGroupId; bool m_firewallRuleGroupIdHasBeenSet = false; Aws::String m_firewallDomainListId; bool m_firewallDomainListIdHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; int m_priority; bool m_priorityHasBeenSet = false; Action m_action; bool m_actionHasBeenSet = false; BlockResponse m_blockResponse; bool m_blockResponseHasBeenSet = false; Aws::String m_blockOverrideDomain; bool m_blockOverrideDomainHasBeenSet = false; BlockOverrideDnsType m_blockOverrideDnsType; bool m_blockOverrideDnsTypeHasBeenSet = false; int m_blockOverrideTtl; bool m_blockOverrideTtlHasBeenSet = false; Aws::String m_creatorRequestId; bool m_creatorRequestIdHasBeenSet = false; Aws::String m_creationTime; bool m_creationTimeHasBeenSet = false; Aws::String m_modificationTime; bool m_modificationTimeHasBeenSet = false; }; } // namespace Model } // namespace Route53Resolver } // namespace Aws