/** * 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 ElasticLoadBalancingv2 { namespace Model { /** */ class AWS_ELASTICLOADBALANCINGV2_API CreateRuleRequest : public ElasticLoadBalancingv2Request { public: CreateRuleRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateRule"; } Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The Amazon Resource Name (ARN) of the listener.

*/ inline const Aws::String& GetListenerArn() const{ return m_listenerArn; } /** *

The Amazon Resource Name (ARN) of the listener.

*/ inline bool ListenerArnHasBeenSet() const { return m_listenerArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the listener.

*/ inline void SetListenerArn(const Aws::String& value) { m_listenerArnHasBeenSet = true; m_listenerArn = value; } /** *

The Amazon Resource Name (ARN) of the listener.

*/ inline void SetListenerArn(Aws::String&& value) { m_listenerArnHasBeenSet = true; m_listenerArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the listener.

*/ inline void SetListenerArn(const char* value) { m_listenerArnHasBeenSet = true; m_listenerArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the listener.

*/ inline CreateRuleRequest& WithListenerArn(const Aws::String& value) { SetListenerArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the listener.

*/ inline CreateRuleRequest& WithListenerArn(Aws::String&& value) { SetListenerArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the listener.

*/ inline CreateRuleRequest& WithListenerArn(const char* value) { SetListenerArn(value); return *this;} /** *

The conditions. Each rule can optionally include up to one of each of the * following conditions: http-request-method, * host-header, path-pattern, and source-ip. * Each rule can also optionally include one or more of each of the following * conditions: http-header and query-string.

*/ inline const Aws::Vector& GetConditions() const{ return m_conditions; } /** *

The conditions. Each rule can optionally include up to one of each of the * following conditions: http-request-method, * host-header, path-pattern, and source-ip. * Each rule can also optionally include one or more of each of the following * conditions: http-header and query-string.

*/ inline bool ConditionsHasBeenSet() const { return m_conditionsHasBeenSet; } /** *

The conditions. Each rule can optionally include up to one of each of the * following conditions: http-request-method, * host-header, path-pattern, and source-ip. * Each rule can also optionally include one or more of each of the following * conditions: http-header and query-string.

*/ inline void SetConditions(const Aws::Vector& value) { m_conditionsHasBeenSet = true; m_conditions = value; } /** *

The conditions. Each rule can optionally include up to one of each of the * following conditions: http-request-method, * host-header, path-pattern, and source-ip. * Each rule can also optionally include one or more of each of the following * conditions: http-header and query-string.

*/ inline void SetConditions(Aws::Vector&& value) { m_conditionsHasBeenSet = true; m_conditions = std::move(value); } /** *

The conditions. Each rule can optionally include up to one of each of the * following conditions: http-request-method, * host-header, path-pattern, and source-ip. * Each rule can also optionally include one or more of each of the following * conditions: http-header and query-string.

*/ inline CreateRuleRequest& WithConditions(const Aws::Vector& value) { SetConditions(value); return *this;} /** *

The conditions. Each rule can optionally include up to one of each of the * following conditions: http-request-method, * host-header, path-pattern, and source-ip. * Each rule can also optionally include one or more of each of the following * conditions: http-header and query-string.

*/ inline CreateRuleRequest& WithConditions(Aws::Vector&& value) { SetConditions(std::move(value)); return *this;} /** *

The conditions. Each rule can optionally include up to one of each of the * following conditions: http-request-method, * host-header, path-pattern, and source-ip. * Each rule can also optionally include one or more of each of the following * conditions: http-header and query-string.

*/ inline CreateRuleRequest& AddConditions(const RuleCondition& value) { m_conditionsHasBeenSet = true; m_conditions.push_back(value); return *this; } /** *

The conditions. Each rule can optionally include up to one of each of the * following conditions: http-request-method, * host-header, path-pattern, and source-ip. * Each rule can also optionally include one or more of each of the following * conditions: http-header and query-string.

*/ inline CreateRuleRequest& AddConditions(RuleCondition&& value) { m_conditionsHasBeenSet = true; m_conditions.push_back(std::move(value)); return *this; } /** *

The rule priority. A listener can't have multiple rules with the same * priority.

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

The rule priority. A listener can't have multiple rules with the same * priority.

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

The rule priority. A listener can't have multiple rules with the same * priority.

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

The rule priority. A listener can't have multiple rules with the same * priority.

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

The actions. Each rule must include exactly one of the following types of * actions: forward, fixed-response, or * redirect, and it must be the last action to be performed.

If * the action type is forward, you specify one or more target groups. * The protocol of the target group must be HTTP or HTTPS for an Application Load * Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for * a Network Load Balancer.

[HTTPS listeners] If the action type is * authenticate-oidc, you authenticate users through an identity * provider that is OpenID Connect (OIDC) compliant.

[HTTPS listeners] If * the action type is authenticate-cognito, you authenticate users * through the user pools supported by Amazon Cognito.

[Application Load * Balancer] If the action type is redirect, you redirect specified * client requests from one URL to another.

[Application Load Balancer] If * the action type is fixed-response, you drop specified client * requests and return a custom HTTP response.

*/ inline const Aws::Vector& GetActions() const{ return m_actions; } /** *

The actions. Each rule must include exactly one of the following types of * actions: forward, fixed-response, or * redirect, and it must be the last action to be performed.

If * the action type is forward, you specify one or more target groups. * The protocol of the target group must be HTTP or HTTPS for an Application Load * Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for * a Network Load Balancer.

[HTTPS listeners] If the action type is * authenticate-oidc, you authenticate users through an identity * provider that is OpenID Connect (OIDC) compliant.

[HTTPS listeners] If * the action type is authenticate-cognito, you authenticate users * through the user pools supported by Amazon Cognito.

[Application Load * Balancer] If the action type is redirect, you redirect specified * client requests from one URL to another.

[Application Load Balancer] If * the action type is fixed-response, you drop specified client * requests and return a custom HTTP response.

*/ inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; } /** *

The actions. Each rule must include exactly one of the following types of * actions: forward, fixed-response, or * redirect, and it must be the last action to be performed.

If * the action type is forward, you specify one or more target groups. * The protocol of the target group must be HTTP or HTTPS for an Application Load * Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for * a Network Load Balancer.

[HTTPS listeners] If the action type is * authenticate-oidc, you authenticate users through an identity * provider that is OpenID Connect (OIDC) compliant.

[HTTPS listeners] If * the action type is authenticate-cognito, you authenticate users * through the user pools supported by Amazon Cognito.

[Application Load * Balancer] If the action type is redirect, you redirect specified * client requests from one URL to another.

[Application Load Balancer] If * the action type is fixed-response, you drop specified client * requests and return a custom HTTP response.

*/ inline void SetActions(const Aws::Vector& value) { m_actionsHasBeenSet = true; m_actions = value; } /** *

The actions. Each rule must include exactly one of the following types of * actions: forward, fixed-response, or * redirect, and it must be the last action to be performed.

If * the action type is forward, you specify one or more target groups. * The protocol of the target group must be HTTP or HTTPS for an Application Load * Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for * a Network Load Balancer.

[HTTPS listeners] If the action type is * authenticate-oidc, you authenticate users through an identity * provider that is OpenID Connect (OIDC) compliant.

[HTTPS listeners] If * the action type is authenticate-cognito, you authenticate users * through the user pools supported by Amazon Cognito.

[Application Load * Balancer] If the action type is redirect, you redirect specified * client requests from one URL to another.

[Application Load Balancer] If * the action type is fixed-response, you drop specified client * requests and return a custom HTTP response.

*/ inline void SetActions(Aws::Vector&& value) { m_actionsHasBeenSet = true; m_actions = std::move(value); } /** *

The actions. Each rule must include exactly one of the following types of * actions: forward, fixed-response, or * redirect, and it must be the last action to be performed.

If * the action type is forward, you specify one or more target groups. * The protocol of the target group must be HTTP or HTTPS for an Application Load * Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for * a Network Load Balancer.

[HTTPS listeners] If the action type is * authenticate-oidc, you authenticate users through an identity * provider that is OpenID Connect (OIDC) compliant.

[HTTPS listeners] If * the action type is authenticate-cognito, you authenticate users * through the user pools supported by Amazon Cognito.

[Application Load * Balancer] If the action type is redirect, you redirect specified * client requests from one URL to another.

[Application Load Balancer] If * the action type is fixed-response, you drop specified client * requests and return a custom HTTP response.

*/ inline CreateRuleRequest& WithActions(const Aws::Vector& value) { SetActions(value); return *this;} /** *

The actions. Each rule must include exactly one of the following types of * actions: forward, fixed-response, or * redirect, and it must be the last action to be performed.

If * the action type is forward, you specify one or more target groups. * The protocol of the target group must be HTTP or HTTPS for an Application Load * Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for * a Network Load Balancer.

[HTTPS listeners] If the action type is * authenticate-oidc, you authenticate users through an identity * provider that is OpenID Connect (OIDC) compliant.

[HTTPS listeners] If * the action type is authenticate-cognito, you authenticate users * through the user pools supported by Amazon Cognito.

[Application Load * Balancer] If the action type is redirect, you redirect specified * client requests from one URL to another.

[Application Load Balancer] If * the action type is fixed-response, you drop specified client * requests and return a custom HTTP response.

*/ inline CreateRuleRequest& WithActions(Aws::Vector&& value) { SetActions(std::move(value)); return *this;} /** *

The actions. Each rule must include exactly one of the following types of * actions: forward, fixed-response, or * redirect, and it must be the last action to be performed.

If * the action type is forward, you specify one or more target groups. * The protocol of the target group must be HTTP or HTTPS for an Application Load * Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for * a Network Load Balancer.

[HTTPS listeners] If the action type is * authenticate-oidc, you authenticate users through an identity * provider that is OpenID Connect (OIDC) compliant.

[HTTPS listeners] If * the action type is authenticate-cognito, you authenticate users * through the user pools supported by Amazon Cognito.

[Application Load * Balancer] If the action type is redirect, you redirect specified * client requests from one URL to another.

[Application Load Balancer] If * the action type is fixed-response, you drop specified client * requests and return a custom HTTP response.

*/ inline CreateRuleRequest& AddActions(const Action& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; } /** *

The actions. Each rule must include exactly one of the following types of * actions: forward, fixed-response, or * redirect, and it must be the last action to be performed.

If * the action type is forward, you specify one or more target groups. * The protocol of the target group must be HTTP or HTTPS for an Application Load * Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for * a Network Load Balancer.

[HTTPS listeners] If the action type is * authenticate-oidc, you authenticate users through an identity * provider that is OpenID Connect (OIDC) compliant.

[HTTPS listeners] If * the action type is authenticate-cognito, you authenticate users * through the user pools supported by Amazon Cognito.

[Application Load * Balancer] If the action type is redirect, you redirect specified * client requests from one URL to another.

[Application Load Balancer] If * the action type is fixed-response, you drop specified client * requests and return a custom HTTP response.

*/ inline CreateRuleRequest& AddActions(Action&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; } private: Aws::String m_listenerArn; bool m_listenerArnHasBeenSet; Aws::Vector m_conditions; bool m_conditionsHasBeenSet; int m_priority; bool m_priorityHasBeenSet; Aws::Vector m_actions; bool m_actionsHasBeenSet; }; } // namespace Model } // namespace ElasticLoadBalancingv2 } // namespace Aws