Class: AWSCDK::BedrockAgentCore::RuntimeProps

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

Overview

Properties for creating a Bedrock Agent Core Runtime resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(agent_runtime_artifact:, authorizer_configuration: nil, description: nil, environment_variables: nil, execution_role: nil, lifecycle_configuration: nil, logging_configs: nil, network_configuration: nil, protocol_configuration: nil, request_header_configuration: nil, runtime_name: nil, tags: nil, tracing_enabled: nil) ⇒ RuntimeProps

Returns a new instance of RuntimeProps.

Parameters:

  • agent_runtime_artifact (AWSCDK::BedrockAgentCore::AgentRuntimeArtifact)

    The artifact configuration for the agent runtime Contains the container configuration with ECR URI.

  • authorizer_configuration (AWSCDK::BedrockAgentCore::RuntimeAuthorizerConfiguration, nil) (defaults to: nil)

    Authorizer configuration for the agent runtime Use RuntimeAuthorizerConfiguration static methods to create the configuration.

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

    Optional description for the agent runtime.

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

    Environment variables for the agent runtime - Maximum 50 environment variables - Key: Must be 1-100 characters, start with letter or underscore, contain only letters, numbers, and underscores - Value: Must be 0-2048 characters (per CloudFormation specification).

  • execution_role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The IAM role that provides permissions for the agent runtime If not provided, a role will be created automatically.

  • lifecycle_configuration (AWSCDK::BedrockAgentCore::LifecycleConfiguration, nil) (defaults to: nil)

    The life cycle configuration for the AgentCore Runtime.

  • logging_configs (Array<AWSCDK::BedrockAgentCore::LoggingConfig>, nil) (defaults to: nil)

    Logging configuration for the runtime.

  • network_configuration (AWSCDK::BedrockAgentCore::RuntimeNetworkConfiguration, nil) (defaults to: nil)

    Network configuration for the agent runtime.

  • protocol_configuration (AWSCDK::BedrockAgentCore::ProtocolType, nil) (defaults to: nil)

    Protocol configuration for the agent runtime.

  • request_header_configuration (AWSCDK::BedrockAgentCore::RequestHeaderConfiguration, nil) (defaults to: nil)

    Configuration for HTTP request headers that will be passed through to the runtime.

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

    The name of the agent runtime Valid characters are a-z, A-Z, 0-9, _ (underscore) Must start with a letter and can be up to 48 characters long Pattern: ^[a-zA-Z][a-zA-Z0-9_]0,47$.

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

    Tags for the agent runtime A list of key:value pairs of tags to apply to this Runtime resource.

  • tracing_enabled (Boolean, nil) (defaults to: nil)

    Whether to enable X-Ray tracing for this runtime.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'bedrock_agent_core/runtime_props.rb', line 20

def initialize(agent_runtime_artifact:, authorizer_configuration: nil, description: nil, environment_variables: nil, execution_role: nil, lifecycle_configuration: nil, logging_configs: nil, network_configuration: nil, protocol_configuration: nil, request_header_configuration: nil, runtime_name: nil, tags: nil, tracing_enabled: nil)
  @agent_runtime_artifact = agent_runtime_artifact
  Jsii::Type.check_type(@agent_runtime_artifact, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BZ2VudFJ1bnRpbWVBcnRpZmFjdCJ9")), "agentRuntimeArtifact")
  @authorizer_configuration = authorizer_configuration
  Jsii::Type.check_type(@authorizer_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5SdW50aW1lQXV0aG9yaXplckNvbmZpZ3VyYXRpb24ifQ==")), "authorizerConfiguration") unless @authorizer_configuration.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @environment_variables = environment_variables
  Jsii::Type.check_type(@environment_variables, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "environmentVariables") unless @environment_variables.nil?
  @execution_role = execution_role
  Jsii::Type.check_type(@execution_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "executionRole") unless @execution_role.nil?
  @lifecycle_configuration = lifecycle_configuration.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::LifecycleConfiguration.new(**lifecycle_configuration.transform_keys(&:to_sym)) : lifecycle_configuration
  Jsii::Type.check_type(@lifecycle_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5MaWZlY3ljbGVDb25maWd1cmF0aW9uIn0=")), "lifecycleConfiguration") unless @lifecycle_configuration.nil?
  @logging_configs = logging_configs.is_a?(Array) ? logging_configs.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::LoggingConfig.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : logging_configs
  Jsii::Type.check_type(@logging_configs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkxvZ2dpbmdDb25maWcifSwia2luZCI6ImFycmF5In19")), "loggingConfigs") unless @logging_configs.nil?
  @network_configuration = network_configuration
  Jsii::Type.check_type(@network_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5SdW50aW1lTmV0d29ya0NvbmZpZ3VyYXRpb24ifQ==")), "networkConfiguration") unless @network_configuration.nil?
  @protocol_configuration = protocol_configuration
  Jsii::Type.check_type(@protocol_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5Qcm90b2NvbFR5cGUifQ==")), "protocolConfiguration") unless @protocol_configuration.nil?
  @request_header_configuration = request_header_configuration.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::RequestHeaderConfiguration.new(**request_header_configuration.transform_keys(&:to_sym)) : request_header_configuration
  Jsii::Type.check_type(@request_header_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5SZXF1ZXN0SGVhZGVyQ29uZmlndXJhdGlvbiJ9")), "requestHeaderConfiguration") unless @request_header_configuration.nil?
  @runtime_name = runtime_name
  Jsii::Type.check_type(@runtime_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "runtimeName") unless @runtime_name.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
  @tracing_enabled = tracing_enabled
  Jsii::Type.check_type(@tracing_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "tracingEnabled") unless @tracing_enabled.nil?
end

Instance Attribute Details

#agent_runtime_artifactAWSCDK::BedrockAgentCore::AgentRuntimeArtifact (readonly)

The artifact configuration for the agent runtime Contains the container configuration with ECR URI.



52
53
54
# File 'bedrock_agent_core/runtime_props.rb', line 52

def agent_runtime_artifact
  @agent_runtime_artifact
end

#authorizer_configurationAWSCDK::BedrockAgentCore::RuntimeAuthorizerConfiguration? (readonly)

Note:

Default: - RuntimeAuthorizerConfiguration.iam() (IAM authentication)

Authorizer configuration for the agent runtime Use RuntimeAuthorizerConfiguration static methods to create the configuration.



57
58
59
# File 'bedrock_agent_core/runtime_props.rb', line 57

def authorizer_configuration
  @authorizer_configuration
end

#descriptionString? (readonly)

Note:

Default: - No description Length Minimum: 1 , Maximum: 1200

Optional description for the agent runtime.

Returns:

  • (String, nil)


62
63
64
# File 'bedrock_agent_core/runtime_props.rb', line 62

def description
  @description
end

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

Note:

Default: - No environment variables

Environment variables for the agent runtime - Maximum 50 environment variables - Key: Must be 1-100 characters, start with letter or underscore, contain only letters, numbers, and underscores - Value: Must be 0-2048 characters (per CloudFormation specification).

Returns:

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


67
68
69
# File 'bedrock_agent_core/runtime_props.rb', line 67

def environment_variables
  @environment_variables
end

#execution_roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - A new role will be created

The IAM role that provides permissions for the agent runtime If not provided, a role will be created automatically.

Returns:



72
73
74
# File 'bedrock_agent_core/runtime_props.rb', line 72

def execution_role
  @execution_role
end

#lifecycle_configurationAWSCDK::BedrockAgentCore::LifecycleConfiguration? (readonly)

Note:

Default: - No lifecycle configuration

The life cycle configuration for the AgentCore Runtime.



77
78
79
# File 'bedrock_agent_core/runtime_props.rb', line 77

def lifecycle_configuration
  @lifecycle_configuration
end

#logging_configsArray<AWSCDK::BedrockAgentCore::LoggingConfig>? (readonly)

Note:

Default: - No logging configured

Logging configuration for the runtime.

Allows sending APPLICATION_LOGS and USAGE_LOGS to CloudWatch Logs, S3, or Kinesis Data Firehose.



85
86
87
# File 'bedrock_agent_core/runtime_props.rb', line 85

def logging_configs
  @logging_configs
end

#network_configurationAWSCDK::BedrockAgentCore::RuntimeNetworkConfiguration? (readonly)

Note:

Default: - RuntimeNetworkConfiguration.usingPublicNetwork()

Network configuration for the agent runtime.



90
91
92
# File 'bedrock_agent_core/runtime_props.rb', line 90

def network_configuration
  @network_configuration
end

#protocol_configurationAWSCDK::BedrockAgentCore::ProtocolType? (readonly)

Note:

Default: - ProtocolType.HTTP

Protocol configuration for the agent runtime.



95
96
97
# File 'bedrock_agent_core/runtime_props.rb', line 95

def protocol_configuration
  @protocol_configuration
end

#request_header_configurationAWSCDK::BedrockAgentCore::RequestHeaderConfiguration? (readonly)

Note:

Default: - No request headers configured

Configuration for HTTP request headers that will be passed through to the runtime.



100
101
102
# File 'bedrock_agent_core/runtime_props.rb', line 100

def request_header_configuration
  @request_header_configuration
end

#runtime_nameString? (readonly)

Note:

Default: - auto generate

The name of the agent runtime Valid characters are a-z, A-Z, 0-9, _ (underscore) Must start with a letter and can be up to 48 characters long Pattern: ^[a-zA-Z][a-zA-Z0-9_]0,47$.

Returns:

  • (String, nil)


105
106
107
# File 'bedrock_agent_core/runtime_props.rb', line 105

def runtime_name
  @runtime_name
end

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

Note:

Default: {} - no tags

Tags for the agent runtime A list of key:value pairs of tags to apply to this Runtime resource.

Returns:

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


110
111
112
# File 'bedrock_agent_core/runtime_props.rb', line 110

def tags
  @tags
end

#tracing_enabledBoolean? (readonly)

Note:

Default: false

Whether to enable X-Ray tracing for this runtime.

When enabled, traces will be delivered to AWS X-Ray.



118
119
120
# File 'bedrock_agent_core/runtime_props.rb', line 118

def tracing_enabled
  @tracing_enabled
end

Class Method Details

.jsii_propertiesObject



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'bedrock_agent_core/runtime_props.rb', line 120

def self.jsii_properties
  {
    :agent_runtime_artifact => "agentRuntimeArtifact",
    :authorizer_configuration => "authorizerConfiguration",
    :description => "description",
    :environment_variables => "environmentVariables",
    :execution_role => "executionRole",
    :lifecycle_configuration => "lifecycleConfiguration",
    :logging_configs => "loggingConfigs",
    :network_configuration => "networkConfiguration",
    :protocol_configuration => "protocolConfiguration",
    :request_header_configuration => "requestHeaderConfiguration",
    :runtime_name => "runtimeName",
    :tags => "tags",
    :tracing_enabled => "tracingEnabled",
  }
end

Instance Method Details

#to_jsiiObject



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'bedrock_agent_core/runtime_props.rb', line 138

def to_jsii
  result = {}
  result.merge!({
    "agentRuntimeArtifact" => @agent_runtime_artifact,
    "authorizerConfiguration" => @authorizer_configuration,
    "description" => @description,
    "environmentVariables" => @environment_variables,
    "executionRole" => @execution_role,
    "lifecycleConfiguration" => @lifecycle_configuration,
    "loggingConfigs" => @logging_configs,
    "networkConfiguration" => @network_configuration,
    "protocolConfiguration" => @protocol_configuration,
    "requestHeaderConfiguration" => @request_header_configuration,
    "runtimeName" => @runtime_name,
    "tags" => @tags,
    "tracingEnabled" => @tracing_enabled,
  })
  result.compact
end