Class: AWSCDK::BedrockAgentCore::BrowserCustomProps

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

Overview

Properties for creating a Browser resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(browser_custom_name: nil, browser_signing: nil, description: nil, execution_role: nil, network_configuration: nil, recording_config: nil, tags: nil) ⇒ BrowserCustomProps

Returns a new instance of BrowserCustomProps.

Parameters:

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

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

  • browser_signing (AWSCDK::BedrockAgentCore::BrowserSigning, nil) (defaults to: nil)

    Specifies whether browser signing is enabled.

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

    Optional description for the browser Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.

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

    The IAM role that provides permissions for the browser to access AWS services.

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

    Network configuration for browser.

  • recording_config (AWSCDK::BedrockAgentCore::RecordingConfig, nil) (defaults to: nil)

    Recording configuration for browser.

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

    Tags (optional) A list of key:value pairs of tags to apply to this Browser resource.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'bedrock_agent_core/browser_custom_props.rb', line 14

def initialize(browser_custom_name: nil, browser_signing: nil, description: nil, execution_role: nil, network_configuration: nil, recording_config: nil, tags: nil)
  @browser_custom_name = browser_custom_name
  Jsii::Type.check_type(@browser_custom_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "browserCustomName") unless @browser_custom_name.nil?
  @browser_signing = browser_signing
  Jsii::Type.check_type(@browser_signing, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5Ccm93c2VyU2lnbmluZyJ9")), "browserSigning") unless @browser_signing.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @execution_role = execution_role
  Jsii::Type.check_type(@execution_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "executionRole") unless @execution_role.nil?
  @network_configuration = network_configuration
  Jsii::Type.check_type(@network_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5Ccm93c2VyTmV0d29ya0NvbmZpZ3VyYXRpb24ifQ==")), "networkConfiguration") unless @network_configuration.nil?
  @recording_config = recording_config.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::RecordingConfig.new(**recording_config.transform_keys(&:to_sym)) : recording_config
  Jsii::Type.check_type(@recording_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5SZWNvcmRpbmdDb25maWcifQ==")), "recordingConfig") unless @recording_config.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#browser_custom_nameString? (readonly)

Note:

Default: - auto generate

The name of the browser custom tool Valid characters are a-z, A-Z, 0-9, _ (underscore) The name 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)


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

def browser_custom_name
  @browser_custom_name
end

#browser_signingAWSCDK::BedrockAgentCore::BrowserSigning? (readonly)

Note:

Default: - BrowserSigning.DISABLED

Specifies whether browser signing is enabled.

When enabled, the browser will cryptographically sign HTTP requests to identify itself as an AI agent to bot control vendors.



43
44
45
# File 'bedrock_agent_core/browser_custom_props.rb', line 43

def browser_signing
  @browser_signing
end

#descriptionString? (readonly)

Note:

Default: - No description

Optional description for the browser Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.

Returns:

  • (String, nil)


48
49
50
# File 'bedrock_agent_core/browser_custom_props.rb', line 48

def description
  @description
end

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

Note:

Default: - A new role will be created

The IAM role that provides permissions for the browser to access AWS services.

Returns:



53
54
55
# File 'bedrock_agent_core/browser_custom_props.rb', line 53

def execution_role
  @execution_role
end

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

Note:

Default: - PUBLIC network mode

Network configuration for browser.



58
59
60
# File 'bedrock_agent_core/browser_custom_props.rb', line 58

def network_configuration
  @network_configuration
end

#recording_configAWSCDK::BedrockAgentCore::RecordingConfig? (readonly)

Note:

Default: - No recording configuration

Recording configuration for browser.



63
64
65
# File 'bedrock_agent_core/browser_custom_props.rb', line 63

def recording_config
  @recording_config
end

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

Note:

Default: {} - no tags

Tags (optional) A list of key:value pairs of tags to apply to this Browser resource.

Returns:

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


68
69
70
# File 'bedrock_agent_core/browser_custom_props.rb', line 68

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



70
71
72
73
74
75
76
77
78
79
80
# File 'bedrock_agent_core/browser_custom_props.rb', line 70

def self.jsii_properties
  {
    :browser_custom_name => "browserCustomName",
    :browser_signing => "browserSigning",
    :description => "description",
    :execution_role => "executionRole",
    :network_configuration => "networkConfiguration",
    :recording_config => "recordingConfig",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'bedrock_agent_core/browser_custom_props.rb', line 82

def to_jsii
  result = {}
  result.merge!({
    "browserCustomName" => @browser_custom_name,
    "browserSigning" => @browser_signing,
    "description" => @description,
    "executionRole" => @execution_role,
    "networkConfiguration" => @network_configuration,
    "recordingConfig" => @recording_config,
    "tags" => @tags,
  })
  result.compact
end