:doc:`BedrockRuntime <../../bedrock-runtime>` / Client / start_async_invoke

******************
start_async_invoke
******************



.. py:method:: BedrockRuntime.Client.start_async_invoke(**kwargs)

  

  Starts an asynchronous invocation.

   

  This operation requires permission for the ``bedrock:InvokeModel`` action.

   

  .. warning::

     

    To deny all inference access to resources that you specify in the modelId field, you need to deny access to the ``bedrock:InvokeModel`` and ``bedrock:InvokeModelWithResponseStream`` actions. Doing this also denies access to the resource through the Converse API actions ( `Converse <https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html>`__ and `ConverseStream <https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html>`__). For more information see `Deny access for inference on specific models <https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference>`__.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/StartAsyncInvoke>`_  


  **Request Syntax**
  ::

    response = client.start_async_invoke(
        clientRequestToken='string',
        modelId='string',
        modelInput={...}|[...]|123|123.4|'string'|True|None,
        outputDataConfig={
            's3OutputDataConfig': {
                's3Uri': 'string',
                'kmsKeyId': 'string',
                'bucketOwner': 'string'
            }
        },
        tags=[
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    )
    
  :type clientRequestToken: string
  :param clientRequestToken: 

    Specify idempotency token to ensure that requests are not duplicated.

    This field is autopopulated if not provided.

  
  :type modelId: string
  :param modelId: **[REQUIRED]** 

    The model to invoke.

    

  
  :type modelInput: :ref:`document<document>`
  :param modelInput: **[REQUIRED]** 

    Input to send to the model.

    

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

    Where to store the output.

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

  
    - **s3OutputDataConfig** *(dict) --* 

      A storage location for the output data in an S3 bucket

      

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

        An object URI starting with ``s3://``.

        

      
      - **kmsKeyId** *(string) --* 

        A KMS encryption key ID.

        

      
      - **bucketOwner** *(string) --* 

        If the bucket belongs to another AWS account, specify that account's ID.

        

      
    
  
  :type tags: list
  :param tags: 

    Tags to apply to the invocation.

    

  
    - *(dict) --* 

      A tag.

      

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

        The tag's key.

        

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

        The tag's value.

        

      
    

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

    
    ::

      {
          'invocationArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **invocationArn** *(string) --* 

        The ARN of the invocation.

        
  
  **Exceptions**
  
  *   :py:class:`BedrockRuntime.Client.exceptions.AccessDeniedException`

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

  
  *   :py:class:`BedrockRuntime.Client.exceptions.ResourceNotFoundException`

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

  
  *   :py:class:`BedrockRuntime.Client.exceptions.ServiceUnavailableException`

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

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

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

  