Class: AWSCDK::BedrockAgentCore::FromOauthIdentityOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock_agent_core/from_oauth_identity_options.rb

Overview

OAuth scopes (and optional custom parameters) when binding an IOAuth2CredentialProvider to a gateway target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scopes:, custom_parameters: nil) ⇒ FromOauthIdentityOptions

Returns a new instance of FromOauthIdentityOptions.

Parameters:

  • scopes (Array<String>)

    OAuth scopes the gateway should request for this target.

  • custom_parameters (Hash{String => String}, nil) (defaults to: nil)

    Additional OAuth parameters for the provider.



9
10
11
12
13
14
# File 'bedrock_agent_core/from_oauth_identity_options.rb', line 9

def initialize(scopes:, custom_parameters: nil)
  @scopes = scopes
  Jsii::Type.check_type(@scopes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "scopes")
  @custom_parameters = custom_parameters
  Jsii::Type.check_type(@custom_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "customParameters") unless @custom_parameters.nil?
end

Instance Attribute Details

#custom_parametersHash{String => String}? (readonly)

Note:

Default: - none

Additional OAuth parameters for the provider.

Returns:

  • (Hash{String => String}, nil)


24
25
26
# File 'bedrock_agent_core/from_oauth_identity_options.rb', line 24

def custom_parameters
  @custom_parameters
end

#scopesArray<String> (readonly)

OAuth scopes the gateway should request for this target.

Returns:

  • (Array<String>)


19
20
21
# File 'bedrock_agent_core/from_oauth_identity_options.rb', line 19

def scopes
  @scopes
end

Class Method Details

.jsii_propertiesObject



26
27
28
29
30
31
# File 'bedrock_agent_core/from_oauth_identity_options.rb', line 26

def self.jsii_properties
  {
    :scopes => "scopes",
    :custom_parameters => "customParameters",
  }
end

Instance Method Details

#to_jsiiObject



33
34
35
36
37
38
39
40
# File 'bedrock_agent_core/from_oauth_identity_options.rb', line 33

def to_jsii
  result = {}
  result.merge!({
    "scopes" => @scopes,
    "customParameters" => @custom_parameters,
  })
  result.compact
end