CodeInterpreterCustomProps
- class aws_cdk.aws_bedrockagentcore.CodeInterpreterCustomProps(*, code_interpreter_custom_name=None, description=None, execution_role=None, network_configuration=None, tags=None)
Bases:
objectProperties for creating a CodeInterpreter resource.
- Parameters:
code_interpreter_custom_name (
Optional[str]) – The name of the code interpreter 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}. Default: - auto generatedescription (
Optional[str]) – Optional description for the code interpreter Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters. Default: - No descriptionexecution_role (
Optional[IRole]) – The IAM role that provides permissions for the code interpreter to access AWS services. Default: - A new role will be created.network_configuration (
Optional[CodeInterpreterNetworkConfiguration]) – Network configuration for code interpreter. Default: - PUBLIC network modetags (
Optional[Mapping[str,str]]) – Tags (optional) A list of key:value pairs of tags to apply to this Code Interpreter resource. Default: {} - no tags
- 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 )
Attributes
- code_interpreter_custom_name
[a-zA-Z][a-zA-Z0-9_]{0,47}.
- Default:
auto generate
- Type:
The name of the code interpreter 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
- description
Optional description for the code interpreter Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.
- Default:
No description
- Required:
No
- execution_role
The IAM role that provides permissions for the code interpreter to access AWS services.
- Default:
A new role will be created.
- Required:
No
- network_configuration
Network configuration for code interpreter.
- Default:
PUBLIC network mode
- Required:
No