Class: AWSCDK::BedrockAgentCore::APIKeyCredentialProviderProps

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

Overview

Properties for a new ApiKeyCredentialProvider (Token Vault resource).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key: nil, api_key_credential_provider_name: nil, tags: nil) ⇒ APIKeyCredentialProviderProps

Returns a new instance of APIKeyCredentialProviderProps.

Parameters:

  • api_key (AWSCDK::SecretValue, nil) (defaults to: nil)

    The API key value.

  • api_key_credential_provider_name (String, nil) (defaults to: nil)

    Name of the credential provider.

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

    Tags for this credential provider.



10
11
12
13
14
15
16
17
# File 'bedrock_agent_core/api_key_credential_provider_props.rb', line 10

def initialize(api_key: nil, api_key_credential_provider_name: nil, tags: nil)
  @api_key = api_key
  Jsii::Type.check_type(@api_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TZWNyZXRWYWx1ZSJ9")), "apiKey") unless @api_key.nil?
  @api_key_credential_provider_name = api_key_credential_provider_name
  Jsii::Type.check_type(@api_key_credential_provider_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiKeyCredentialProviderName") unless @api_key_credential_provider_name.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#api_keyAWSCDK::SecretValue? (readonly)

Note:

Default: - no key in template (provider may still be created depending on service behavior)

The API key value.

NOTE: The API key will be included in the CloudFormation template as part of synthesis. The service stores the key 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.

If omitted, you can supply the key through another mechanism supported by the service.

Returns:



31
32
33
# File 'bedrock_agent_core/api_key_credential_provider_props.rb', line 31

def api_key
  @api_key
end

#api_key_credential_provider_nameString? (readonly)

Note:

Default: a name generated by CDK

Name of the credential provider.

Returns:

  • (String, nil)


36
37
38
# File 'bedrock_agent_core/api_key_credential_provider_props.rb', line 36

def api_key_credential_provider_name
  @api_key_credential_provider_name
end

#tagsHash{String => String}? (readonly)

Note:

Default: - no tags

Tags for this credential provider.

Returns:

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


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

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :api_key => "apiKey",
    :api_key_credential_provider_name => "apiKeyCredentialProviderName",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "apiKey" => @api_key,
    "apiKeyCredentialProviderName" => @api_key_credential_provider_name,
    "tags" => @tags,
  })
  result.compact
end