:doc:`Glue <../../glue>` / Client / get_catalogs

************
get_catalogs
************



.. py:method:: Glue.Client.get_catalogs(**kwargs)

  

  Retrieves all catalogs defined in a catalog in the Glue Data Catalog. For a Redshift-federated catalog use case, this operation returns the list of catalogs mapped to Redshift databases in the Redshift namespace catalog.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetCatalogs>`_  


  **Request Syntax**
  ::

    response = client.get_catalogs(
        ParentCatalogId='string',
        NextToken='string',
        MaxResults=123,
        Recursive=True|False,
        IncludeRoot=True|False
    )
    
  :type ParentCatalogId: string
  :param ParentCatalogId: 

    The ID of the parent catalog in which the catalog resides. If none is provided, the Amazon Web Services Account Number is used by default.

    

  
  :type NextToken: string
  :param NextToken: 

    A continuation token, if this is a continuation call.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of catalogs to return in one response.

    

  
  :type Recursive: boolean
  :param Recursive: 

    Whether to list all catalogs across the catalog hierarchy, starting from the ``ParentCatalogId``. Defaults to ``false`` . When ``true``, all catalog objects in the ``ParentCatalogID`` hierarchy are enumerated in the response.

    

  
  :type IncludeRoot: boolean
  :param IncludeRoot: 

    Whether to list the default catalog in the account and region in the response. Defaults to ``false``. When ``true`` and ``ParentCatalogId = NULL | Amazon Web Services Account ID``, all catalogs and the default catalog are enumerated in the response.

     

    When the ``ParentCatalogId`` is not equal to null, and this attribute is passed as ``false`` or ``true``, an ``InvalidInputException`` is thrown.

    

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

    
    ::

      {
          'CatalogList': [
              {
                  'CatalogId': 'string',
                  'Name': 'string',
                  'ResourceArn': 'string',
                  'Description': 'string',
                  'Parameters': {
                      'string': 'string'
                  },
                  'CreateTime': datetime(2015, 1, 1),
                  'UpdateTime': datetime(2015, 1, 1),
                  'TargetRedshiftCatalog': {
                      'CatalogArn': 'string'
                  },
                  'FederatedCatalog': {
                      'Identifier': 'string',
                      'ConnectionName': 'string',
                      'ConnectionType': 'string'
                  },
                  'CatalogProperties': {
                      'DataLakeAccessProperties': {
                          'DataLakeAccess': True|False,
                          'DataTransferRole': 'string',
                          'KmsKey': 'string',
                          'ManagedWorkgroupName': 'string',
                          'ManagedWorkgroupStatus': 'string',
                          'RedshiftDatabaseName': 'string',
                          'StatusMessage': 'string',
                          'CatalogType': 'string'
                      },
                      'IcebergOptimizationProperties': {
                          'RoleArn': 'string',
                          'Compaction': {
                              'string': 'string'
                          },
                          'Retention': {
                              'string': 'string'
                          },
                          'OrphanFileDeletion': {
                              'string': 'string'
                          },
                          'LastUpdatedTime': datetime(2015, 1, 1)
                      },
                      'CustomProperties': {
                          'string': 'string'
                      }
                  },
                  'CreateTableDefaultPermissions': [
                      {
                          'Principal': {
                              'DataLakePrincipalIdentifier': 'string'
                          },
                          'Permissions': [
                              'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS',
                          ]
                      },
                  ],
                  'CreateDatabaseDefaultPermissions': [
                      {
                          'Principal': {
                              'DataLakePrincipalIdentifier': 'string'
                          },
                          'Permissions': [
                              'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS',
                          ]
                      },
                  ],
                  'AllowFullTableExternalDataAccess': 'True'|'False'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **CatalogList** *(list) --* 

        An array of ``Catalog`` objects. A list of ``Catalog`` objects from the specified parent catalog.

        
        

        - *(dict) --* 

          The catalog object represents a logical grouping of databases in the Glue Data Catalog or a federated source. You can now create a Redshift-federated catalog or a catalog containing resource links to Redshift databases in another account or region.

          
          

          - **CatalogId** *(string) --* 

            The ID of the catalog. To grant access to the default catalog, this field should not be provided.

            
          

          - **Name** *(string) --* 

            The name of the catalog. Cannot be the same as the account ID.

            
          

          - **ResourceArn** *(string) --* 

            The Amazon Resource Name (ARN) assigned to the catalog resource.

            
          

          - **Description** *(string) --* 

            Description string, not more than 2048 bytes long, matching the URI address multi-line string pattern. A description of the catalog.

            
          

          - **Parameters** *(dict) --* 

            A map array of key-value pairs that define parameters and properties of the catalog.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
          

          - **CreateTime** *(datetime) --* 

            The time at which the catalog was created.

            
          

          - **UpdateTime** *(datetime) --* 

            The time at which the catalog was last updated.

            
          

          - **TargetRedshiftCatalog** *(dict) --* 

            A ``TargetRedshiftCatalog`` object that describes a target catalog for database resource linking.

            
            

            - **CatalogArn** *(string) --* 

              The Amazon Resource Name (ARN) of the catalog resource.

              
        
          

          - **FederatedCatalog** *(dict) --* 

            A ``FederatedCatalog`` object that points to an entity outside the Glue Data Catalog.

            
            

            - **Identifier** *(string) --* 

              A unique identifier for the federated catalog.

              
            

            - **ConnectionName** *(string) --* 

              The name of the connection to an external data source, for example a Redshift-federated catalog.

              
            

            - **ConnectionType** *(string) --* 

              The type of connection used to access the federated catalog, specifying the protocol or method for connection to the external data source.

              
        
          

          - **CatalogProperties** *(dict) --* 

            A ``CatalogProperties`` object that specifies data lake access properties and other custom properties.

            
            

            - **DataLakeAccessProperties** *(dict) --* 

              A ``DataLakeAccessProperties`` object with input properties to configure data lake access for your catalog resource in the Glue Data Catalog.

              
              

              - **DataLakeAccess** *(boolean) --* 

                Turns on or off data lake access for Apache Spark applications that access Amazon Redshift databases in the Data Catalog.

                
              

              - **DataTransferRole** *(string) --* 

                A role that will be assumed by Glue for transferring data into/out of the staging bucket during a query.

                
              

              - **KmsKey** *(string) --* 

                An encryption key that will be used for the staging bucket that will be created along with the catalog.

                
              

              - **ManagedWorkgroupName** *(string) --* 

                The managed Redshift Serverless compute name that is created for your catalog resource.

                
              

              - **ManagedWorkgroupStatus** *(string) --* 

                The managed Redshift Serverless compute status.

                
              

              - **RedshiftDatabaseName** *(string) --* 

                The default Redshift database resource name in the managed compute.

                
              

              - **StatusMessage** *(string) --* 

                A message that gives more detailed information about the managed workgroup status.

                
              

              - **CatalogType** *(string) --* 

                Specifies a federated catalog type for the native catalog resource. The currently supported type is ``aws:redshift``.

                
          
            

            - **IcebergOptimizationProperties** *(dict) --* 

              An ``IcebergOptimizationPropertiesOutput`` object that specifies Iceberg table optimization settings for the catalog, including configurations for compaction, retention, and orphan file deletion operations.

              
              

              - **RoleArn** *(string) --* 

                The Amazon Resource Name (ARN) of the IAM role that is used to perform Iceberg table optimization operations.

                
              

              - **Compaction** *(dict) --* 

                A map of key-value pairs that specify configuration parameters for Iceberg table compaction operations, which optimize the layout of data files to improve query performance.

                
                

                - *(string) --* 
                  

                  - *(string) --* 
            
          
              

              - **Retention** *(dict) --* 

                A map of key-value pairs that specify configuration parameters for Iceberg table retention operations, which manage the lifecycle of table snapshots to control storage costs.

                
                

                - *(string) --* 
                  

                  - *(string) --* 
            
          
              

              - **OrphanFileDeletion** *(dict) --* 

                A map of key-value pairs that specify configuration parameters for Iceberg orphan file deletion operations, which identify and remove files that are no longer referenced by the table metadata.

                
                

                - *(string) --* 
                  

                  - *(string) --* 
            
          
              

              - **LastUpdatedTime** *(datetime) --* 

                The timestamp when the Iceberg optimization properties were last updated.

                
          
            

            - **CustomProperties** *(dict) --* 

              Additional key-value properties for the catalog, such as column statistics optimizations.

              
              

              - *(string) --* 
                

                - *(string) --* 
          
        
        
          

          - **CreateTableDefaultPermissions** *(list) --* 

            An array of ``PrincipalPermissions`` objects. Creates a set of default permissions on the table(s) for principals. Used by Amazon Web Services Lake Formation. Not used in the normal course of Glue operations.

            
            

            - *(dict) --* 

              Permissions granted to a principal.

              
              

              - **Principal** *(dict) --* 

                The principal who is granted permissions.

                
                

                - **DataLakePrincipalIdentifier** *(string) --* 

                  An identifier for the Lake Formation principal.

                  
            
              

              - **Permissions** *(list) --* 

                The permissions that are granted to the principal.

                
                

                - *(string) --* 
            
          
        
          

          - **CreateDatabaseDefaultPermissions** *(list) --* 

            An array of ``PrincipalPermissions`` objects. Creates a set of default permissions on the database(s) for principals. Used by Amazon Web Services Lake Formation. Not used in the normal course of Glue operations.

            
            

            - *(dict) --* 

              Permissions granted to a principal.

              
              

              - **Principal** *(dict) --* 

                The principal who is granted permissions.

                
                

                - **DataLakePrincipalIdentifier** *(string) --* 

                  An identifier for the Lake Formation principal.

                  
            
              

              - **Permissions** *(list) --* 

                The permissions that are granted to the principal.

                
                

                - *(string) --* 
            
          
        
          

          - **AllowFullTableExternalDataAccess** *(string) --* 

            Allows third-party engines to access data in Amazon S3 locations that are registered with Lake Formation.

            
      
    
      

      - **NextToken** *(string) --* 

        A continuation token for paginating the returned list of tokens, returned if the current segment of the list is not the last.

        
  
  **Exceptions**
  
  *   :py:class:`Glue.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Glue.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Glue.Client.exceptions.OperationTimeoutException`

  
  *   :py:class:`Glue.Client.exceptions.GlueEncryptionException`

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

  
  *   :py:class:`Glue.Client.exceptions.EntityNotFoundException`

  
  *   :py:class:`Glue.Client.exceptions.FederationSourceException`

  
  *   :py:class:`Glue.Client.exceptions.FederationSourceRetryableException`

  