get_query_results
async
¶
get_query_results(
query_id: UUID,
*,
config_overrides: Optional[AsyncCloudTrailClientConfig] = None,
event_data_store: Optional[EventDataStoreArn] = None,
next_token: Optional[PaginationToken] = None,
max_query_results: Optional[MaxQueryResults] = None,
event_data_store_owner_account_id: Optional[AccountId] = None,
) -> GetQueryResultsResponse
CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see CloudTrail Lake availability change.
Gets event data results of a query. You must specify the QueryID value returned by the StartQuery operation.
Parameters:
-
event_data_store(Optional[EventDataStoreArn], default:None) –The ARN (or ID suffix of the ARN) of the event data store against which the query was run.
-
query_id(UUID) –The ID of the query for which you want to get results.
-
next_token(Optional[PaginationToken], default:None) –A token you can use to get the next page of query results.
-
max_query_results(Optional[MaxQueryResults], default:None) –The maximum number of query results to display on a single page.
-
event_data_store_owner_account_id(Optional[AccountId], default:None) –The account ID of the event data store owner.
Raises:
-
EventDataStoreARNInvalidException–The specified event data store ARN is not valid or does not map to an event data store in your account.
-
EventDataStoreNotFoundException–The specified event data store was not found.
-
InactiveEventDataStoreException–The event data store is inactive.
-
InsufficientEncryptionPolicyException–For the
CreateTrailPutInsightSelectors,UpdateTrail,StartQuery, andStartImportoperations, this exception is thrown when the policy on the S3 bucket or KMS key does not have sufficient permissions for the operation.For all other operations, this exception is thrown when the policy for the KMS key does not have sufficient permissions for the operation.
-
InvalidMaxResultsException–This exception is thrown if the limit specified is not valid.
-
InvalidNextTokenException–A token that is not valid, or a token that was previously used in a request with different parameters. This exception is thrown if the token is not valid.
-
InvalidParameterException–The request includes a parameter that is not valid.
-
NoManagementAccountSLRExistsException–This exception is thrown when the management account does not have a service-linked role.
-
OperationNotPermittedException–This exception is thrown when the requested operation is not permitted.
-
QueryIdNotFoundException–The query ID does not exist or does not map to a query.
-
UnsupportedOperationException–This exception is thrown when the requested operation is not supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudtrail/_services/async_cloud_trail.py
1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 | |