Class: AWSCDK::BedrockAgentCore::VPCConfigProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::BedrockAgentCore::VPCConfigProps
- Defined in:
- bedrock_agent_core/vpc_config_props.rb
Overview
VPC configuration properties.
Only used when network mode is VPC.
Instance Attribute Summary collapse
-
#allow_all_outbound ⇒ Boolean?
readonly
Whether to allow the resource to send all network traffic (except ipv6).
-
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>?
readonly
The list of security groups to associate with the resource's network interfaces.
-
#vpc ⇒ AWSCDK::EC2::IVPC
readonly
The VPC to deploy the resource to.
-
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Where to place the network interfaces within the VPC.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(vpc:, allow_all_outbound: nil, security_groups: nil, vpc_subnets: nil) ⇒ VPCConfigProps
constructor
A new instance of VPCConfigProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(vpc:, allow_all_outbound: nil, security_groups: nil, vpc_subnets: nil) ⇒ VPCConfigProps
Returns a new instance of VPCConfigProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'bedrock_agent_core/vpc_config_props.rb', line 13 def initialize(vpc:, allow_all_outbound: nil, security_groups: nil, vpc_subnets: nil) @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") @allow_all_outbound = allow_all_outbound Jsii::Type.check_type(@allow_all_outbound, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowAllOutbound") unless @allow_all_outbound.nil? @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil? @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil? end |
Instance Attribute Details
#allow_all_outbound ⇒ Boolean? (readonly)
Default: true
Whether to allow the resource to send all network traffic (except ipv6).
If set to false, you must individually add traffic rules to allow the resource to connect to network targets.
Do not specify this property if the security_groups property is set.
Instead, configure allow_all_outbound directly on the security group.
38 39 40 |
# File 'bedrock_agent_core/vpc_config_props.rb', line 38 def allow_all_outbound @allow_all_outbound end |
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>? (readonly)
Default: - If the resource is placed within a VPC and a security group is not specified by this prop, a dedicated security group will be created for this resource.
The list of security groups to associate with the resource's network interfaces.
Only used if 'vpc' is supplied.
45 46 47 |
# File 'bedrock_agent_core/vpc_config_props.rb', line 45 def security_groups @security_groups end |
#vpc ⇒ AWSCDK::EC2::IVPC (readonly)
The VPC to deploy the resource to.
27 28 29 |
# File 'bedrock_agent_core/vpc_config_props.rb', line 27 def vpc @vpc end |
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - the Vpc default strategy if not specified
Where to place the network interfaces within the VPC.
This requires vpc to be specified in order for interfaces to actually be
placed in the subnets. If vpc is not specify, this will raise an error.
53 54 55 |
# File 'bedrock_agent_core/vpc_config_props.rb', line 53 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'bedrock_agent_core/vpc_config_props.rb', line 55 def self.jsii_properties { :vpc => "vpc", :allow_all_outbound => "allowAllOutbound", :security_groups => "securityGroups", :vpc_subnets => "vpcSubnets", } end |
Instance Method Details
#to_jsii ⇒ Object
64 65 66 67 68 69 70 71 72 73 |
# File 'bedrock_agent_core/vpc_config_props.rb', line 64 def to_jsii result = {} result.merge!({ "vpc" => @vpc, "allowAllOutbound" => @allow_all_outbound, "securityGroups" => @security_groups, "vpcSubnets" => @vpc_subnets, }) result.compact end |