list_databases
async
¶
list_databases(
catalog_name: CatalogNameString,
*,
config_overrides: Optional[AsyncAthenaClientConfig] = None,
next_token: Optional[Token] = None,
max_results: Optional[MaxDatabasesCount] = None,
work_group: Optional[WorkGroupName] = None,
attributes_to_get: Optional[DatabaseAttributesList] = None,
) -> ListDatabasesOutput
Lists the databases in the specified data catalog.
Parameters:
-
catalog_name(CatalogNameString) –The name of the data catalog that contains the databases to return.
-
next_token(Optional[Token], default:None) –A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextTokenfrom the response object of the previous page call. -
max_results(Optional[MaxDatabasesCount], default:None) –Specifies the maximum number of results to return.
-
work_group(Optional[WorkGroupName], default:None) –The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
-
attributes_to_get(Optional[DatabaseAttributesList], default:None) –Specifies the database properties returned by the
ListDatabasescall. The only valid value isNAME, which returns only the name of each database and omits the remaining properties. If you omit this parameter or specify an empty list, all database properties are returned.Requesting only names can reduce response time for catalogs that contain many databases, especially resource links to databases shared from other accounts.
This parameter applies only to the Glue Data Catalog. For other data catalog types, it is ignored.
Raises:
-
InternalServerException–Indicates a platform issue, which may be due to a transient condition or outage.
-
InvalidRequestException–Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.
-
MetadataException–An exception that Athena received when it called a custom metastore. Occurs if the error is not caused by user input (
InvalidRequestException) or from the Athena platform (InternalServerException). For example, if a user-created Lambda function is missing permissions, the Lambda4XXexception is returned in aMetadataException. -
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_athena/_services/async_athena.py
2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 | |