Class: AWSCDK::BedrockAgentCore::OAuthConfiguration

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

Overview

OAuth configuration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of OAuthConfiguration.

Parameters:

  • provider_arn (String)

    The OAuth credential provider ARN.

  • scopes (Array<String>)

    The OAuth scopes for the credential provider. These scopes define the level of access requested from the OAuth provider.

  • secret_arn (String)

    The ARN of the Secrets Manager secret containing OAuth credentials (client ID and secret).

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

    Custom parameters for the OAuth flow.



11
12
13
14
15
16
17
18
19
20
# File 'bedrock_agent_core/o_auth_configuration.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

Custom parameters for the OAuth flow.

Returns:

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


50
51
52
# File 'bedrock_agent_core/o_auth_configuration.rb', line 50

def custom_parameters
  @custom_parameters
end

#provider_arnString (readonly)

The OAuth credential provider ARN.

This is returned when creating the OAuth credential provider via Console or API. Format: arn:aws:bedrock-agentcore:region:account:token-vault/id/oauth2credentialprovider/name Required: Yes

Returns:

  • (String)


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

def provider_arn
  @provider_arn
end

#scopesArray<String> (readonly)

The OAuth scopes for the credential provider. These scopes define the level of access requested from the OAuth provider.

Array Members: Minimum number of 0 items. Maximum number of 100 items. Length Constraints: Minimum length of 1. Maximum length of 64. Required: Yes

Returns:

  • (Array<String>)


37
38
39
# File 'bedrock_agent_core/o_auth_configuration.rb', line 37

def scopes
  @scopes
end

#secret_arnString (readonly)

The ARN of the Secrets Manager secret containing OAuth credentials (client ID and secret).

This is returned when creating the OAuth credential provider via Console or API. Format: arn:aws:secretsmanager:region:account:secret:name Required: Yes

Returns:

  • (String)


45
46
47
# File 'bedrock_agent_core/o_auth_configuration.rb', line 45

def secret_arn
  @secret_arn
end

Class Method Details

.jsii_propertiesObject



52
53
54
55
56
57
58
59
# File 'bedrock_agent_core/o_auth_configuration.rb', line 52

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

Instance Method Details

#to_jsiiObject



61
62
63
64
65
66
67
68
69
70
# File 'bedrock_agent_core/o_auth_configuration.rb', line 61

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