Class: AWSCDK::BedrockAgentCore::OAuth2ClientCredentials

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

Overview

OAuth2 client identifier and secret registered with the identity provider (all vendors).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client_id:, client_secret:) ⇒ OAuth2ClientCredentials

Returns a new instance of OAuth2ClientCredentials.

Parameters:

  • client_id (String)

    OAuth2 client identifier.

  • client_secret (AWSCDK::SecretValue)

    OAuth2 client secret.



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

def initialize(client_id:, client_secret:)
  @client_id = client_id
  Jsii::Type.check_type(@client_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientId")
  @client_secret = client_secret
  Jsii::Type.check_type(@client_secret, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TZWNyZXRWYWx1ZSJ9")), "clientSecret")
end

Instance Attribute Details

#client_idString (readonly)

OAuth2 client identifier.

Returns:

  • (String)


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

def client_id
  @client_id
end

#client_secretAWSCDK::SecretValue (readonly)

OAuth2 client secret.

NOTE: The client secret will be included in the CloudFormation template as part of synthesis. The service stores the secret in Secrets Manager after creation, but the value is visible in the template and deployment history. Use SecretValue.unsafePlainText() to explicitly acknowledge plaintext, or pass a reference from another construct to avoid embedding the literal value.

Returns:



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

def client_secret
  @client_secret
end

Class Method Details

.jsii_propertiesObject



31
32
33
34
35
36
# File 'bedrock_agent_core/o_auth2_client_credentials.rb', line 31

def self.jsii_properties
  {
    :client_id => "clientId",
    :client_secret => "clientSecret",
  }
end

Instance Method Details

#to_jsiiObject



38
39
40
41
42
43
44
45
# File 'bedrock_agent_core/o_auth2_client_credentials.rb', line 38

def to_jsii
  result = {}
  result.merge!({
    "clientId" => @client_id,
    "clientSecret" => @client_secret,
  })
  result.compact
end