CodeInterpreterNetworkConfiguration
- class aws_cdk.aws_bedrock_agentcore_alpha.CodeInterpreterNetworkConfiguration(mode, scope=None, *, vpc, allow_all_outbound=None, security_groups=None, vpc_subnets=None)
Bases:
NetworkConfiguration(experimental) Network configuration for the Code Interpreter tool.
- Stability:
experimental
- ExampleMetadata:
fixture=default infused
Example:
# Create a custom execution role execution_role = iam.Role(self, "CodeInterpreterExecutionRole", assumed_by=iam.ServicePrincipal("bedrock-agentcore.amazonaws.com") ) # Create code interpreter with custom execution role code_interpreter = agentcore.CodeInterpreterCustom(self, "MyCodeInterpreter", code_interpreter_custom_name="my_code_interpreter", description="Code interpreter with custom execution role", network_configuration=agentcore.CodeInterpreterNetworkConfiguration.using_public_network(), execution_role=execution_role )
(experimental) Creates a new network configuration.
- Parameters:
mode (
str) –the network mode to use for the tool.
scope (
Optional[Construct])vpc (
IVpc) – (experimental) The VPC to deploy the resource to.allow_all_outbound (
Optional[bool]) – (experimental) 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 thesecurityGroupsproperty is set. Instead, configureallowAllOutbounddirectly on the security group. Default: truesecurity_groups (
Optional[Sequence[ISecurityGroup]]) – (experimental) The list of security groups to associate with the resource’s network interfaces. Only used if ‘vpc’ is supplied. 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.vpc_subnets (
Union[SubnetSelection,Dict[str,Any],None]) – (experimental) Where to place the network interfaces within the VPC. This requiresvpcto be specified in order for interfaces to actually be placed in the subnets. Ifvpcis not specify, this will raise an error. Default: - the Vpc default strategy if not specified
- Stability:
experimental
Attributes
- connections
(experimental) The connections object to the network.
- Stability:
experimental
- network_mode
(experimental) The network mode to use.
Configure the security level for agent execution to control access, isolate resources, and protect sensitive data.
- Stability:
experimental
- scope
(experimental) The scope to create the resource in.
- Stability:
experimental
- vpc_subnets
(experimental) The VPC subnets to use.
- Stability:
experimental
Static Methods
- classmethod using_public_network()
(experimental) Creates a public network configuration.
- Return type:
- Returns:
A CodeInterpreterNetworkConfiguration. Run this tool to operate in a public environment with internet access, suitable for less sensitive or open-use scenarios.
- Stability:
experimental
- classmethod using_sandbox_network()
(experimental) Creates a sandbox network configuration.
- Return type:
- Returns:
A CodeInterpreterNetworkConfiguration. Run this tool in a restricted environment with limited Permissions and Encryption to enhance safety and reduce potential risks.
- Stability:
experimental
- classmethod using_vpc(scope, *, vpc, allow_all_outbound=None, security_groups=None, vpc_subnets=None)
(experimental) Creates a network configuration from a VPC configuration.
- Parameters:
scope (
Construct)vpc (
IVpc) – (experimental) The VPC to deploy the resource to.allow_all_outbound (
Optional[bool]) – (experimental) 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 thesecurityGroupsproperty is set. Instead, configureallowAllOutbounddirectly on the security group. Default: truesecurity_groups (
Optional[Sequence[ISecurityGroup]]) – (experimental) The list of security groups to associate with the resource’s network interfaces. Only used if ‘vpc’ is supplied. 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.vpc_subnets (
Union[SubnetSelection,Dict[str,Any],None]) – (experimental) Where to place the network interfaces within the VPC. This requiresvpcto be specified in order for interfaces to actually be placed in the subnets. Ifvpcis not specify, this will raise an error. Default: - the Vpc default strategy if not specified
- Return type:
- Returns:
A CodeInterpreterNetworkConfiguration.
- Stability:
experimental