:doc:`BedrockAgentCoreControl <../../bedrock-agentcore-control>` / Client / create_code_interpreter

***********************
create_code_interpreter
***********************



.. py:method:: BedrockAgentCoreControl.Client.create_code_interpreter(**kwargs)

  

  Creates a custom code interpreter.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-control-2023-06-05/CreateCodeInterpreter>`_  


  **Request Syntax**
  ::

    response = client.create_code_interpreter(
        name='string',
        description='string',
        executionRoleArn='string',
        networkConfiguration={
            'networkMode': 'PUBLIC'|'SANDBOX'|'VPC',
            'vpcConfig': {
                'securityGroups': [
                    'string',
                ],
                'subnets': [
                    'string',
                ]
            }
        },
        clientToken='string',
        tags={
            'string': 'string'
        }
    )
    
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the code interpreter. The name must be unique within your account.

    

  
  :type description: string
  :param description: 

    The description of the code interpreter.

    

  
  :type executionRoleArn: string
  :param executionRoleArn: 

    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the code interpreter to access Amazon Web Services services.

    

  
  :type networkConfiguration: dict
  :param networkConfiguration: **[REQUIRED]** 

    The network configuration for the code interpreter. This configuration specifies the network mode for the code interpreter.

    

  
    - **networkMode** *(string) --* **[REQUIRED]** 

      The network mode for the code interpreter. This field specifies how the code interpreter connects to the network.

      

    
    - **vpcConfig** *(dict) --* 

      VpcConfig for the Agent.

      

    
      - **securityGroups** *(list) --* **[REQUIRED]** 

        The security groups associated with the VPC configuration.

        

      
        - *(string) --* 

        
    
      - **subnets** *(list) --* **[REQUIRED]** 

        The subnets associated with the VPC configuration.

        

      
        - *(string) --* 

        
    
    
  
  :type clientToken: string
  :param clientToken: 

    A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock AgentCore ignores the request but does not return an error.

    This field is autopopulated if not provided.

  
  :type tags: dict
  :param tags: 

    A map of tag keys and values to assign to the code interpreter. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'codeInterpreterId': 'string',
          'codeInterpreterArn': 'string',
          'createdAt': datetime(2015, 1, 1),
          'status': 'CREATING'|'CREATE_FAILED'|'READY'|'DELETING'|'DELETE_FAILED'|'DELETED'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **codeInterpreterId** *(string) --* 

        The unique identifier of the created code interpreter.

        
      

      - **codeInterpreterArn** *(string) --* 

        The Amazon Resource Name (ARN) of the created code interpreter.

        
      

      - **createdAt** *(datetime) --* 

        The timestamp when the code interpreter was created.

        
      

      - **status** *(string) --* 

        The current status of the code interpreter.

        
  
  **Exceptions**
  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ConflictException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ValidationException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ThrottlingException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.InternalServerException`

  