Class: AWSCDK::BedrockAgentCore::OAuth2ClientCredentials
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::BedrockAgentCore::OAuth2ClientCredentials
- 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
-
#client_id ⇒ String
readonly
OAuth2 client identifier.
-
#client_secret ⇒ AWSCDK::SecretValue
readonly
OAuth2 client secret.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client_id:, client_secret:) ⇒ OAuth2ClientCredentials
constructor
A new instance of OAuth2ClientCredentials.
- #to_jsii ⇒ Object
Constructor Details
#initialize(client_id:, client_secret:) ⇒ OAuth2ClientCredentials
Returns a new instance of OAuth2ClientCredentials.
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_id ⇒ String (readonly)
OAuth2 client identifier.
19 20 21 |
# File 'bedrock_agent_core/o_auth2_client_credentials.rb', line 19 def client_id @client_id end |
#client_secret ⇒ AWSCDK::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.
29 30 31 |
# File 'bedrock_agent_core/o_auth2_client_credentials.rb', line 29 def client_secret @client_secret end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |