:doc:`Bedrock <../../bedrock>` / Client / create_inference_profile

************************
create_inference_profile
************************



.. py:method:: Bedrock.Client.create_inference_profile(**kwargs)

  

  Creates an application inference profile to track metrics and costs when invoking a model. To create an application inference profile for a foundation model in one region, specify the ARN of the model in that region. To create an application inference profile for a foundation model across multiple regions, specify the ARN of the system-defined inference profile that contains the regions that you want to route requests to. For more information, see `Increase throughput and resilience with cross-region inference in Amazon Bedrock <https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html>`__. in the Amazon Bedrock User Guide.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CreateInferenceProfile>`_  


  **Request Syntax**
  ::

    response = client.create_inference_profile(
        inferenceProfileName='string',
        description='string',
        clientRequestToken='string',
        modelSource={
            'copyFrom': 'string'
        },
        tags=[
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    )
    
  :type inferenceProfileName: string
  :param inferenceProfileName: **[REQUIRED]** 

    A name for the inference profile.

    

  
  :type description: string
  :param description: 

    A description for the inference profile.

    

  
  :type clientRequestToken: string
  :param clientRequestToken: 

    A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see `Ensuring idempotency <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`__.

    This field is autopopulated if not provided.

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

    The foundation model or system-defined inference profile that the inference profile will track metrics and costs for.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``copyFrom``. 

  
    - **copyFrom** *(string) --* 

      The ARN of the model or system-defined inference profile that is the source for the inference profile.

      

    
  
  :type tags: list
  :param tags: 

    An array of objects, each of which contains a tag and its value. For more information, see `Tagging resources <https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html>`__ in the `Amazon Bedrock User Guide <https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html>`__.

    

  
    - *(dict) --* 

      Definition of the key/value pair for a tag.

      

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

        Key for the tag.

        

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

        Value for the tag.

        

      
    

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

    
    ::

      {
          'inferenceProfileArn': 'string',
          'status': 'ACTIVE'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **inferenceProfileArn** *(string) --* 

        The ARN of the inference profile that you created.

        
      

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

        The status of the inference profile. ``ACTIVE`` means that the inference profile is ready to be used.

        
  
  **Exceptions**
  
  *   :py:class:`Bedrock.Client.exceptions.ResourceNotFoundException`

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

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

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

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

  
  *   :py:class:`Bedrock.Client.exceptions.TooManyTagsException`

  
  *   :py:class:`Bedrock.Client.exceptions.ServiceQuotaExceededException`

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

  