Class: AWSCDK::BedrockAgentCore::APIKeyCredentialProviderOptions

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

Overview

API key credential provider ARNs for gateway outbound auth (Token Vault identity).

Pass this to {@link GatewayCredentialProvider.fromApiKeyIdentityArn } or to ApiKeyCredentialProviderConfiguration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider_arn:, secret_arn:, credential_location: nil) ⇒ APIKeyCredentialProviderOptions

Returns a new instance of APIKeyCredentialProviderOptions.

Parameters:

  • provider_arn (String)

    The API key credential provider ARN.

  • secret_arn (String)

    The ARN of the Secrets Manager secret containing the API key.

  • credential_location (AWSCDK::BedrockAgentCore::APIKeyCredentialLocation, nil) (defaults to: nil)

    The location of the API key credential.



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

def initialize(provider_arn:, secret_arn:, credential_location: nil)
  @provider_arn = provider_arn
  Jsii::Type.check_type(@provider_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "providerArn")
  @secret_arn = secret_arn
  Jsii::Type.check_type(@secret_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretArn")
  @credential_location = credential_location
  Jsii::Type.check_type(@credential_location, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BcGlLZXlDcmVkZW50aWFsTG9jYXRpb24ifQ==")), "credentialLocation") unless @credential_location.nil?
end

Instance Attribute Details

#credential_locationAWSCDK::BedrockAgentCore::APIKeyCredentialLocation? (readonly)

Note:

Default: - HEADER

The location of the API key credential.

This field specifies where in the request the API key should be placed.



41
42
43
# File 'bedrock_agent_core/api_key_credential_provider_options.rb', line 41

def credential_location
  @credential_location
end

#provider_arnString (readonly)

The API key credential provider ARN.

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

Returns:

  • (String)


27
28
29
# File 'bedrock_agent_core/api_key_credential_provider_options.rb', line 27

def provider_arn
  @provider_arn
end

#secret_arnString (readonly)

The ARN of the Secrets Manager secret containing the API key.

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

Returns:

  • (String)


34
35
36
# File 'bedrock_agent_core/api_key_credential_provider_options.rb', line 34

def secret_arn
  @secret_arn
end

Class Method Details

.jsii_propertiesObject



43
44
45
46
47
48
49
# File 'bedrock_agent_core/api_key_credential_provider_options.rb', line 43

def self.jsii_properties
  {
    :provider_arn => "providerArn",
    :secret_arn => "secretArn",
    :credential_location => "credentialLocation",
  }
end

Instance Method Details

#to_jsiiObject



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

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