Class: AWSCDK::BedrockAgentCore::GatewayOAuth2IdentityBinding

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

Overview

Provider ARN, secret ARN, and OAuth scopes for wiring a Token Vault OAuth2 identity into a gateway target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider_arn:, scopes:, secret_arn:, custom_parameters: nil) ⇒ GatewayOAuth2IdentityBinding

Returns a new instance of GatewayOAuth2IdentityBinding.

Parameters:

  • provider_arn (String)

    OAuth2 credential provider ARN.

  • scopes (Array<String>)

    OAuth scopes to request when invoking through the gateway.

  • secret_arn (String)

    Secrets Manager secret ARN for OAuth2 client credentials.

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

    Optional custom parameters for the OAuth flow.



11
12
13
14
15
16
17
18
19
20
# File 'bedrock_agent_core/gateway_o_auth2_identity_binding.rb', line 11

def initialize(provider_arn:, scopes:, secret_arn:, custom_parameters: nil)
  @provider_arn = provider_arn
  Jsii::Type.check_type(@provider_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "providerArn")
  @scopes = scopes
  Jsii::Type.check_type(@scopes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "scopes")
  @secret_arn = secret_arn
  Jsii::Type.check_type(@secret_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretArn")
  @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: - no custom parameters

Optional custom parameters for the OAuth flow.

Returns:

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


38
39
40
# File 'bedrock_agent_core/gateway_o_auth2_identity_binding.rb', line 38

def custom_parameters
  @custom_parameters
end

#provider_arnString (readonly)

OAuth2 credential provider ARN.

Returns:

  • (String)


25
26
27
# File 'bedrock_agent_core/gateway_o_auth2_identity_binding.rb', line 25

def provider_arn
  @provider_arn
end

#scopesArray<String> (readonly)

OAuth scopes to request when invoking through the gateway.

Returns:

  • (Array<String>)


29
30
31
# File 'bedrock_agent_core/gateway_o_auth2_identity_binding.rb', line 29

def scopes
  @scopes
end

#secret_arnString (readonly)

Secrets Manager secret ARN for OAuth2 client credentials.

Returns:

  • (String)


33
34
35
# File 'bedrock_agent_core/gateway_o_auth2_identity_binding.rb', line 33

def secret_arn
  @secret_arn
end

Class Method Details

.jsii_propertiesObject



40
41
42
43
44
45
46
47
# File 'bedrock_agent_core/gateway_o_auth2_identity_binding.rb', line 40

def self.jsii_properties
  {
    :provider_arn => "providerArn",
    :scopes => "scopes",
    :secret_arn => "secretArn",
    :custom_parameters => "customParameters",
  }
end

Instance Method Details

#to_jsiiObject



49
50
51
52
53
54
55
56
57
58
# File 'bedrock_agent_core/gateway_o_auth2_identity_binding.rb', line 49

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