Class: AWSCDK::BedrockAgentCore::BrowserNetworkConfiguration

Inherits:
NetworkConfiguration
  • Object
show all
Defined in:
bedrock_agent_core/browser_network_configuration.rb

Overview

Network configuration for the Browser tool.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mode, scope = nil, vpc_config = nil) ⇒ BrowserNetworkConfiguration

Creates a new network configuration.

Parameters:



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

def initialize(mode, scope = nil, vpc_config = nil)
  vpc_config = vpc_config.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::VPCConfigProps.new(**vpc_config.transform_keys(&:to_sym)) : vpc_config
  Jsii::Type.check_type(mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mode")
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") unless scope.nil?
  Jsii::Type.check_type(vpc_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5WcGNDb25maWdQcm9wcyJ9")), "vpcConfig") unless vpc_config.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(mode, scope, vpc_config)
end

Class Method Details

.jsii_overridable_methodsObject



21
22
23
24
25
26
27
28
# File 'bedrock_agent_core/browser_network_configuration.rb', line 21

def self.jsii_overridable_methods
  {
    :network_mode => { kind: :property, name: "networkMode", is_optional: false },
    :connections => { kind: :property, name: "connections", is_optional: true },
    :scope => { kind: :property, name: "scope", is_optional: true },
    :vpc_subnets => { kind: :property, name: "vpcSubnets", is_optional: true },
  }
end

.using_public_networkAWSCDK::BedrockAgentCore::BrowserNetworkConfiguration

Creates a public network configuration.

PUBLIC is the default network mode.

Returns:

  • (AWSCDK::BedrockAgentCore::BrowserNetworkConfiguration)

    A BrowserNetworkConfiguration. Run this tool to operate in a public environment with internet access, suitable for less sensitive or open-use scenarios.



35
36
37
# File 'bedrock_agent_core/browser_network_configuration.rb', line 35

def self.using_public_network()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.BrowserNetworkConfiguration", "usingPublicNetwork", [])
end

.using_vpc(scope, vpc_config) ⇒ AWSCDK::BedrockAgentCore::BrowserNetworkConfiguration

Creates a network configuration from a VPC configuration.

Parameters:

Returns:

  • (AWSCDK::BedrockAgentCore::BrowserNetworkConfiguration)

    A BrowserNetworkConfiguration.



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

def self.using_vpc(scope, vpc_config)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  vpc_config = vpc_config.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::VPCConfigProps.new(**vpc_config.transform_keys(&:to_sym)) : vpc_config
  Jsii::Type.check_type(vpc_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5WcGNDb25maWdQcm9wcyJ9")), "vpcConfig")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.BrowserNetworkConfiguration", "usingVpc", [scope, vpc_config])
end

Instance Method Details

#connectionsAWSCDK::EC2::Connections?

The connections object to the network.

Returns:



64
65
66
# File 'bedrock_agent_core/browser_network_configuration.rb', line 64

def connections()
  jsii_get_property("connections")
end

#network_modeString

The network mode to use.

Configure the security level for agent execution to control access, isolate resources, and protect sensitive data.

Returns:

  • (String)


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

def network_mode()
  jsii_get_property("networkMode")
end

#scopeConstructs::Construct?

The scope to create the resource in.

Returns:

  • (Constructs::Construct, nil)


71
72
73
# File 'bedrock_agent_core/browser_network_configuration.rb', line 71

def scope()
  jsii_get_property("scope")
end

#vpc_subnetsAWSCDK::EC2::SubnetSelection?

The VPC subnets to use.



78
79
80
# File 'bedrock_agent_core/browser_network_configuration.rb', line 78

def vpc_subnets()
  jsii_get_property("vpcSubnets")
end