Class: AWSCDK::BedrockAgentCore::CfnOAuth2CredentialProvider::CustomOauth2ProviderConfigInputProperty

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

Overview

Input configuration for a custom OAuth2 provider.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(oauth_discovery:, client_authentication_method: nil, client_id: nil, client_secret: nil, client_secret_config: nil, client_secret_source: nil, on_behalf_of_token_exchange_config: nil) ⇒ CustomOauth2ProviderConfigInputProperty

Returns a new instance of CustomOauth2ProviderConfigInputProperty.

Parameters:



702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
# File 'bedrock_agent_core/cfn_o_auth2_credential_provider.rb', line 702

def initialize(oauth_discovery:, client_authentication_method: nil, client_id: nil, client_secret: nil, client_secret_config: nil, client_secret_source: nil, on_behalf_of_token_exchange_config: nil)
  @oauth_discovery = oauth_discovery.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnOAuth2CredentialProvider::Oauth2DiscoveryProperty.new(**oauth_discovery.transform_keys(&:to_sym)) : oauth_discovery
  Jsii::Type.check_type(@oauth_discovery, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbk9BdXRoMkNyZWRlbnRpYWxQcm92aWRlci5PYXV0aDJEaXNjb3ZlcnlQcm9wZXJ0eSJ9XX19")), "oauthDiscovery")
  @client_authentication_method = client_authentication_method
  Jsii::Type.check_type(@client_authentication_method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientAuthenticationMethod") unless @client_authentication_method.nil?
  @client_id = client_id
  Jsii::Type.check_type(@client_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientId") unless @client_id.nil?
  @client_secret = client_secret
  Jsii::Type.check_type(@client_secret, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientSecret") unless @client_secret.nil?
  @client_secret_config = client_secret_config.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnOAuth2CredentialProvider::SecretReferenceProperty.new(**client_secret_config.transform_keys(&:to_sym)) : client_secret_config
  Jsii::Type.check_type(@client_secret_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbk9BdXRoMkNyZWRlbnRpYWxQcm92aWRlci5TZWNyZXRSZWZlcmVuY2VQcm9wZXJ0eSJ9XX19")), "clientSecretConfig") unless @client_secret_config.nil?
  @client_secret_source = client_secret_source
  Jsii::Type.check_type(@client_secret_source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientSecretSource") unless @client_secret_source.nil?
  @on_behalf_of_token_exchange_config = on_behalf_of_token_exchange_config.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::CfnOAuth2CredentialProvider::OnBehalfOfTokenExchangeConfigProperty.new(**on_behalf_of_token_exchange_config.transform_keys(&:to_sym)) : on_behalf_of_token_exchange_config
  Jsii::Type.check_type(@on_behalf_of_token_exchange_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkNmbk9BdXRoMkNyZWRlbnRpYWxQcm92aWRlci5PbkJlaGFsZk9mVG9rZW5FeGNoYW5nZUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "onBehalfOfTokenExchangeConfig") unless @on_behalf_of_token_exchange_config.nil?
end

Instance Attribute Details

#client_authentication_methodString? (readonly)

The client authentication method to use when authenticating with the token endpoint.



728
729
730
# File 'bedrock_agent_core/cfn_o_auth2_credential_provider.rb', line 728

def client_authentication_method
  @client_authentication_method
end

#client_idString? (readonly)

The client ID for the custom OAuth2 provider.



733
734
735
# File 'bedrock_agent_core/cfn_o_auth2_credential_provider.rb', line 733

def client_id
  @client_id
end

#client_secretString? (readonly)

The client secret for the custom OAuth2 provider.



738
739
740
# File 'bedrock_agent_core/cfn_o_auth2_credential_provider.rb', line 738

def client_secret
  @client_secret
end

#client_secret_configAWSCDK::IResolvable, ... (readonly)

A reference to a customer-provided secret stored in AWS Secrets Manager.



743
744
745
# File 'bedrock_agent_core/cfn_o_auth2_credential_provider.rb', line 743

def client_secret_config
  @client_secret_config
end

#client_secret_sourceString? (readonly)

The source of the client secret.



748
749
750
# File 'bedrock_agent_core/cfn_o_auth2_credential_provider.rb', line 748

def client_secret_source
  @client_secret_source
end

#on_behalf_of_token_exchange_configAWSCDK::IResolvable, ... (readonly)

Configuration for on-behalf-of token exchange.



753
754
755
# File 'bedrock_agent_core/cfn_o_auth2_credential_provider.rb', line 753

def on_behalf_of_token_exchange_config
  @on_behalf_of_token_exchange_config
end

Class Method Details

.jsii_propertiesObject



755
756
757
758
759
760
761
762
763
764
765
# File 'bedrock_agent_core/cfn_o_auth2_credential_provider.rb', line 755

def self.jsii_properties
  {
    :oauth_discovery => "oauthDiscovery",
    :client_authentication_method => "clientAuthenticationMethod",
    :client_id => "clientId",
    :client_secret => "clientSecret",
    :client_secret_config => "clientSecretConfig",
    :client_secret_source => "clientSecretSource",
    :on_behalf_of_token_exchange_config => "onBehalfOfTokenExchangeConfig",
  }
end

Instance Method Details

#to_jsiiObject



767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'bedrock_agent_core/cfn_o_auth2_credential_provider.rb', line 767

def to_jsii
  result = {}
  result.merge!({
    "oauthDiscovery" => @oauth_discovery,
    "clientAuthenticationMethod" => @client_authentication_method,
    "clientId" => @client_id,
    "clientSecret" => @client_secret,
    "clientSecretConfig" => @client_secret_config,
    "clientSecretSource" => @client_secret_source,
    "onBehalfOfTokenExchangeConfig" => @on_behalf_of_token_exchange_config,
  })
  result.compact
end