list_databases
¶
list_databases(
catalog_name: CatalogNameString,
*,
config_overrides: Optional[AthenaClientConfig] = 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/athena.py
2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 | |