:doc:`S3Vectors <../../s3vectors>` / Client / get_vectors

***********
get_vectors
***********



.. py:method:: S3Vectors.Client.get_vectors(**kwargs)

  

  Returns vector attributes. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).

    Permissions  

  You must have the ``s3vectors:GetVectors`` permission to use this operation.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/GetVectors>`_  


  **Request Syntax**
  ::

    response = client.get_vectors(
        vectorBucketName='string',
        indexName='string',
        indexArn='string',
        keys=[
            'string',
        ],
        returnData=True|False,
        returnMetadata=True|False
    )
    
  :type vectorBucketName: string
  :param vectorBucketName: 

    The name of the vector bucket that contains the vector index.

    

  
  :type indexName: string
  :param indexName: 

    The name of the vector index.

    

  
  :type indexArn: string
  :param indexArn: 

    The ARN of the vector index.

    

  
  :type keys: list
  :param keys: **[REQUIRED]** 

    The names of the vectors you want to return attributes for.

    

  
    - *(string) --* 

    

  :type returnData: boolean
  :param returnData: 

    Indicates whether to include the vector data in the response. The default value is ``false``.

    

  
  :type returnMetadata: boolean
  :param returnMetadata: 

    Indicates whether to include metadata in the response. The default value is ``false``.

    

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

    
    ::

      {
          'vectors': [
              {
                  'key': 'string',
                  'data': {
                      'float32': [
                          ...,
                      ]
                  },
                  'metadata': {...}|[...]|123|123.4|'string'|True|None
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **vectors** *(list) --* 

        The attributes of the vectors.

        
        

        - *(dict) --* 

          The attributes of a vector returned by the ``GetVectors`` operation.

          
          

          - **key** *(string) --* 

            The name of the vector.

            
          

          - **data** *(dict) --* 

            The vector data of the vector.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``float32``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **float32** *(list) --* 

              The vector data as 32-bit floating point numbers. The number of elements in this array must exactly match the dimension of the vector index where the operation is being performed.

              
              

              - *(float) --* 
          
        
          

          - **metadata** (:ref:`document<document>`) -- 

            Metadata about the vector.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`S3Vectors.Client.exceptions.ValidationException`

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

  
  *   :py:class:`S3Vectors.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`S3Vectors.Client.exceptions.KmsInvalidKeyUsageException`

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

  
  *   :py:class:`S3Vectors.Client.exceptions.KmsInvalidStateException`

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

  
  *   :py:class:`S3Vectors.Client.exceptions.KmsNotFoundException`

  
  *   :py:class:`S3Vectors.Client.exceptions.RequestTimeoutException`

  
  *   :py:class:`S3Vectors.Client.exceptions.NotFoundException`

  
  *   :py:class:`S3Vectors.Client.exceptions.KmsDisabledException`

  