Class: AWSCDK::ElasticLoadBalancingv2Actions::AuthenticateCognitoAction

Inherits:
AWSCDK::ElasticLoadBalancingv2::ListenerAction
  • Object
show all
Defined in:
elastic_load_balancingv2_actions/authenticate_cognito_action.rb

Overview

A Listener Action to authenticate with Cognito.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ AuthenticateCognitoAction

Authenticate using an identity provide (IdP) that is compliant with OpenID Connect (OIDC).



11
12
13
14
15
# File 'elastic_load_balancingv2_actions/authenticate_cognito_action.rb', line 11

def initialize(options)
  options = options.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2Actions::AuthenticateCognitoActionProps.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Ml9hY3Rpb25zLkF1dGhlbnRpY2F0ZUNvZ25pdG9BY3Rpb25Qcm9wcyJ9")), "options")
  Jsii::Object.instance_method(:initialize).bind(self).call(options)
end

Class Method Details

.jsii_overridable_methodsObject



17
18
19
20
21
22
23
24
25
26
# File 'elastic_load_balancingv2_actions/authenticate_cognito_action.rb', line 17

def self.jsii_overridable_methods
  {
    :_next => { kind: :property, name: "next", is_optional: true },
    :add_rule_action => { kind: :method, name: "addRuleAction", is_optional: false },
    :bind => { kind: :method, name: "bind", is_optional: false },
    :render_actions => { kind: :method, name: "renderActions", is_optional: false },
    :render_rule_actions => { kind: :method, name: "renderRuleActions", is_optional: false },
    :renumber => { kind: :method, name: "renumber", is_optional: false },
  }
end

Instance Method Details

#_nextAWSCDK::ElasticLoadBalancingv2::ListenerAction?



29
30
31
# File 'elastic_load_balancingv2_actions/authenticate_cognito_action.rb', line 29

def _next()
  jsii_get_property("next")
end

#add_rule_action(action_json) ⇒ void

This method returns an undefined value.

Sets the Action for the ListenerRule.

This method is required to set a dedicated Action to a ListenerRule when the Action for the CfnListener and the Action for the CfnListenerRule have different structures. (e.g. AuthenticateOidcConfig)

Parameters:



41
42
43
44
45
# File 'elastic_load_balancingv2_actions/authenticate_cognito_action.rb', line 41

def add_rule_action(action_json)
  action_json = action_json.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::CfnListenerRule::ActionProperty.new(**action_json.transform_keys(&:to_sym)) : action_json
  Jsii::Type.check_type(action_json, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5DZm5MaXN0ZW5lclJ1bGUuQWN0aW9uUHJvcGVydHkifQ==")), "actionJson")
  jsii_call_method("addRuleAction", [action_json])
end

#bind(scope, listener, associating_construct = nil) ⇒ void

This method returns an undefined value.

Called when the action is being used in a listener.

Parameters:



53
54
55
56
57
58
# File 'elastic_load_balancingv2_actions/authenticate_cognito_action.rb', line 53

def bind(scope, listener, associating_construct = nil)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(listener, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5JQXBwbGljYXRpb25MaXN0ZW5lciJ9")), "listener")
  Jsii::Type.check_type(associating_construct, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "associatingConstruct") unless associating_construct.nil?
  jsii_call_method("bind", [scope, listener, associating_construct])
end

#render_actionsArray<AWSCDK::ElasticLoadBalancingv2::CfnListener::ActionProperty>

Render the listener default actions in this chain.



63
64
65
# File 'elastic_load_balancingv2_actions/authenticate_cognito_action.rb', line 63

def render_actions()
  jsii_call_method("renderActions", [])
end

#render_rule_actionsArray<AWSCDK::ElasticLoadBalancingv2::CfnListenerRule::ActionProperty>

Render the listener rule actions in this chain.



70
71
72
# File 'elastic_load_balancingv2_actions/authenticate_cognito_action.rb', line 70

def render_rule_actions()
  jsii_call_method("renderRuleActions", [])
end

#renumber(actions) ⇒ Array<AWSCDK::ElasticLoadBalancingv2::CfnListener::ActionProperty>

Renumber the "order" fields in the actions array.

We don't number for 0 or 1 elements, but otherwise number them 1...#actions so ELB knows about the right order.

Do this in ListenerAction instead of in Listener so that we give users the opportunity to override by subclassing and overriding render_actions.



84
85
86
87
88
# File 'elastic_load_balancingv2_actions/authenticate_cognito_action.rb', line 84

def renumber(actions)
  actions = actions.is_a?(Array) ? actions.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::CfnListener::ActionProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : actions
  Jsii::Type.check_type(actions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljbG9hZGJhbGFuY2luZ3YyLkNmbkxpc3RlbmVyLkFjdGlvblByb3BlcnR5In0sImtpbmQiOiJhcnJheSJ9fQ==")), "actions")
  jsii_call_method("renumber", [actions])
end