Class: AWSCDK::BedrockAgentCore::GatewayTargetProps

Inherits:
GatewayTargetCommonProps
  • Object
show all
Defined in:
bedrock_agent_core/gateway_target_props.rb

Overview

Properties for creating a Gateway Target resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description: nil, gateway_target_name: nil, gateway:, target_configuration:, credential_provider_configurations: nil) ⇒ GatewayTargetProps

Returns a new instance of GatewayTargetProps.

Parameters:

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

    Optional description for the gateway target The description can have up to 200 characters.

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

    The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?)1,100$.

  • gateway (AWSCDK::BedrockAgentCore::IGateway)

    The gateway this target belongs to.

  • target_configuration (AWSCDK::BedrockAgentCore::ITargetConfiguration)

    The target configuration (Lambda, OpenAPI, or Smithy) Use one of the configuration helper classes: - LambdaTargetConfiguration.create() - OpenApiTargetConfiguration.create() - SmithyTargetConfiguration.create().

  • credential_provider_configurations (Array<AWSCDK::BedrockAgentCore::ICredentialProviderConfig>, nil) (defaults to: nil)

    Credential providers for authentication.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'bedrock_agent_core/gateway_target_props.rb', line 12

def initialize(description: nil, gateway_target_name: nil, gateway:, target_configuration:, credential_provider_configurations: nil)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @gateway_target_name = gateway_target_name
  Jsii::Type.check_type(@gateway_target_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "gatewayTargetName") unless @gateway_target_name.nil?
  @gateway = gateway
  Jsii::Type.check_type(@gateway, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5JR2F0ZXdheSJ9")), "gateway")
  @target_configuration = target_configuration
  Jsii::Type.check_type(@target_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5JVGFyZ2V0Q29uZmlndXJhdGlvbiJ9")), "targetConfiguration")
  @credential_provider_configurations = credential_provider_configurations
  Jsii::Type.check_type(@credential_provider_configurations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLklDcmVkZW50aWFsUHJvdmlkZXJDb25maWcifSwia2luZCI6ImFycmF5In19")), "credentialProviderConfigurations") unless @credential_provider_configurations.nil?
end

Instance Attribute Details

#credential_provider_configurationsArray<AWSCDK::BedrockAgentCore::ICredentialProviderConfig>? (readonly)

Note:

Default: - [GatewayCredentialProvider.fromIamRole()]

Credential providers for authentication.



47
48
49
# File 'bedrock_agent_core/gateway_target_props.rb', line 47

def credential_provider_configurations
  @credential_provider_configurations
end

#descriptionString? (readonly)

Note:

Default: - No description

Optional description for the gateway target The description can have up to 200 characters.

Returns:

  • (String, nil)


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

def description
  @description
end

#gatewayAWSCDK::BedrockAgentCore::IGateway (readonly)

The gateway this target belongs to.



38
39
40
# File 'bedrock_agent_core/gateway_target_props.rb', line 38

def gateway
  @gateway
end

#gateway_target_nameString? (readonly)

Note:

Default: - auto generate

The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?)1,100$.

Returns:

  • (String, nil)


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

def gateway_target_name
  @gateway_target_name
end

#target_configurationAWSCDK::BedrockAgentCore::ITargetConfiguration (readonly)

The target configuration (Lambda, OpenAPI, or Smithy) Use one of the configuration helper classes: - LambdaTargetConfiguration.create() - OpenApiTargetConfiguration.create() - SmithyTargetConfiguration.create().



42
43
44
# File 'bedrock_agent_core/gateway_target_props.rb', line 42

def target_configuration
  @target_configuration
end

Class Method Details

.jsii_propertiesObject



49
50
51
52
53
54
55
56
57
# File 'bedrock_agent_core/gateway_target_props.rb', line 49

def self.jsii_properties
  {
    :description => "description",
    :gateway_target_name => "gatewayTargetName",
    :gateway => "gateway",
    :target_configuration => "targetConfiguration",
    :credential_provider_configurations => "credentialProviderConfigurations",
  }
end

Instance Method Details

#to_jsiiObject



59
60
61
62
63
64
65
66
67
68
69
70
# File 'bedrock_agent_core/gateway_target_props.rb', line 59

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "description" => @description,
    "gatewayTargetName" => @gateway_target_name,
    "gateway" => @gateway,
    "targetConfiguration" => @target_configuration,
    "credentialProviderConfigurations" => @credential_provider_configurations,
  })
  result.compact
end