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

***************
list_guardrails
***************



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

  

  Lists details about all the guardrails in an account. To list the ``DRAFT`` version of all your guardrails, don't specify the ``guardrailIdentifier`` field. To list all versions of a guardrail, specify the ARN of the guardrail in the ``guardrailIdentifier`` field.

   

  You can set the maximum number of results to return in a response in the ``maxResults`` field. If there are more results than the number you set, the response returns a ``nextToken`` that you can send in another ``ListGuardrails`` request to see the next batch of results.

  

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


  **Request Syntax**
  ::

    response = client.list_guardrails(
        guardrailIdentifier='string',
        maxResults=123,
        nextToken='string'
    )
    
  :type guardrailIdentifier: string
  :param guardrailIdentifier: 

    The unique identifier of the guardrail. This can be an ID or the ARN.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return in the response.

    

  
  :type nextToken: string
  :param nextToken: 

    If there are more results than were returned in the response, the response returns a ``nextToken`` that you can send in another ``ListGuardrails`` request to see the next batch of results.

    

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

    
    ::

      {
          'guardrails': [
              {
                  'id': 'string',
                  'arn': 'string',
                  'status': 'CREATING'|'UPDATING'|'VERSIONING'|'READY'|'FAILED'|'DELETING',
                  'name': 'string',
                  'description': 'string',
                  'version': 'string',
                  'createdAt': datetime(2015, 1, 1),
                  'updatedAt': datetime(2015, 1, 1),
                  'crossRegionDetails': {
                      'guardrailProfileId': 'string',
                      'guardrailProfileArn': 'string'
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **guardrails** *(list) --* 

        A list of objects, each of which contains details about a guardrail.

        
        

        - *(dict) --* 

          Contains details about a guardrail.

           

          This data type is used in the following API operations:

           

          
          * `ListGuardrails response body <https://docs.aws.amazon.com/bedrock/latest/APIReference/API_ListGuardrails.html#API_ListGuardrails_ResponseSyntax>`__
          

          
          

          - **id** *(string) --* 

            The unique identifier of the guardrail.

            
          

          - **arn** *(string) --* 

            The ARN of the guardrail.

            
          

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

            The status of the guardrail.

            
          

          - **name** *(string) --* 

            The name of the guardrail.

            
          

          - **description** *(string) --* 

            A description of the guardrail.

            
          

          - **version** *(string) --* 

            The version of the guardrail.

            
          

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

            The date and time at which the guardrail was created.

            
          

          - **updatedAt** *(datetime) --* 

            The date and time at which the guardrail was last updated.

            
          

          - **crossRegionDetails** *(dict) --* 

            Details about the system-defined guardrail profile that you're using with your guardrail, including the guardrail profile ID and Amazon Resource Name (ARN).

            
            

            - **guardrailProfileId** *(string) --* 

              The ID of the guardrail profile that your guardrail is using. Profile availability depends on your current Amazon Web Services Region. For more information, see the `Amazon Bedrock User Guide <https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-cross-region-support.html>`__.

              
            

            - **guardrailProfileArn** *(string) --* 

              The Amazon Resource Name (ARN) of the guardrail profile that you're using with your guardrail.

              
        
      
    
      

      - **nextToken** *(string) --* 

        If there are more results than were returned in the response, the response returns a ``nextToken`` that you can send in another ``ListGuardrails`` request to see the next batch of results.

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

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

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

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

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

  