Class: Aws::ElasticLoadBalancingV2::Types::CreateRuleInput

Inherits:
Struct
  • Object
show all
Includes:
Structure
Defined in:
lib/aws-sdk-elasticloadbalancingv2/types.rb

Overview

Note:

When making an API call, you may pass CreateRuleInput data as a hash:

{
  listener_arn: "ListenerArn", # required
  conditions: [ # required
    {
      field: "ConditionFieldName",
      values: ["StringValue"],
      host_header_config: {
        values: ["StringValue"],
      },
      path_pattern_config: {
        values: ["StringValue"],
      },
      http_header_config: {
        http_header_name: "HttpHeaderConditionName",
        values: ["StringValue"],
      },
      query_string_config: {
        values: [
          {
            key: "StringValue",
            value: "StringValue",
          },
        ],
      },
      http_request_method_config: {
        values: ["StringValue"],
      },
      source_ip_config: {
        values: ["StringValue"],
      },
    },
  ],
  priority: 1, # required
  actions: [ # required
    {
      type: "forward", # required, accepts forward, authenticate-oidc, authenticate-cognito, redirect, fixed-response
      target_group_arn: "TargetGroupArn",
      authenticate_oidc_config: {
        issuer: "AuthenticateOidcActionIssuer", # required
        authorization_endpoint: "AuthenticateOidcActionAuthorizationEndpoint", # required
        token_endpoint: "AuthenticateOidcActionTokenEndpoint", # required
        user_info_endpoint: "AuthenticateOidcActionUserInfoEndpoint", # required
        client_id: "AuthenticateOidcActionClientId", # required
        client_secret: "AuthenticateOidcActionClientSecret",
        session_cookie_name: "AuthenticateOidcActionSessionCookieName",
        scope: "AuthenticateOidcActionScope",
        session_timeout: 1,
        authentication_request_extra_params: {
          "AuthenticateOidcActionAuthenticationRequestParamName" => "AuthenticateOidcActionAuthenticationRequestParamValue",
        },
        on_unauthenticated_request: "deny", # accepts deny, allow, authenticate
        use_existing_client_secret: false,
      },
      authenticate_cognito_config: {
        user_pool_arn: "AuthenticateCognitoActionUserPoolArn", # required
        user_pool_client_id: "AuthenticateCognitoActionUserPoolClientId", # required
        user_pool_domain: "AuthenticateCognitoActionUserPoolDomain", # required
        session_cookie_name: "AuthenticateCognitoActionSessionCookieName",
        scope: "AuthenticateCognitoActionScope",
        session_timeout: 1,
        authentication_request_extra_params: {
          "AuthenticateCognitoActionAuthenticationRequestParamName" => "AuthenticateCognitoActionAuthenticationRequestParamValue",
        },
        on_unauthenticated_request: "deny", # accepts deny, allow, authenticate
      },
      order: 1,
      redirect_config: {
        protocol: "RedirectActionProtocol",
        port: "RedirectActionPort",
        host: "RedirectActionHost",
        path: "RedirectActionPath",
        query: "RedirectActionQuery",
        status_code: "HTTP_301", # required, accepts HTTP_301, HTTP_302
      },
      fixed_response_config: {
        message_body: "FixedResponseActionMessage",
        status_code: "FixedResponseActionStatusCode", # required
        content_type: "FixedResponseActionContentType",
      },
      forward_config: {
        target_groups: [
          {
            target_group_arn: "TargetGroupArn",
            weight: 1,
          },
        ],
        target_group_stickiness_config: {
          enabled: false,
          duration_seconds: 1,
        },
      },
    },
  ],
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#actionsArray<Types::Action>

The actions.

Returns:


987
988
989
990
991
992
993
994
995
# File 'lib/aws-sdk-elasticloadbalancingv2/types.rb', line 987

class CreateRuleInput < Struct.new(
  :listener_arn,
  :conditions,
  :priority,
  :actions,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end

#conditionsArray<Types::RuleCondition>

The conditions.

Returns:


987
988
989
990
991
992
993
994
995
# File 'lib/aws-sdk-elasticloadbalancingv2/types.rb', line 987

class CreateRuleInput < Struct.new(
  :listener_arn,
  :conditions,
  :priority,
  :actions,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end

#listener_arnString

The Amazon Resource Name (ARN) of the listener.

Returns:

  • (String)

987
988
989
990
991
992
993
994
995
# File 'lib/aws-sdk-elasticloadbalancingv2/types.rb', line 987

class CreateRuleInput < Struct.new(
  :listener_arn,
  :conditions,
  :priority,
  :actions,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end

#priorityInteger

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

Returns:

  • (Integer)

987
988
989
990
991
992
993
994
995
# File 'lib/aws-sdk-elasticloadbalancingv2/types.rb', line 987

class CreateRuleInput < Struct.new(
  :listener_arn,
  :conditions,
  :priority,
  :actions,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end

#tagsArray<Types::Tag>

The tags to assign to the rule.

Returns:


987
988
989
990
991
992
993
994
995
# File 'lib/aws-sdk-elasticloadbalancingv2/types.rb', line 987

class CreateRuleInput < Struct.new(
  :listener_arn,
  :conditions,
  :priority,
  :actions,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end