Lists data source packages in the behavior graph.
Parameters:
-
graph_arn
(GraphArn)
–
The ARN of the behavior graph.
-
next_token
(Optional[PaginationToken], default:
None
)
–
For requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.
-
max_results
(Optional[MemberResultsLimit], default:
None
)
–
The maximum number of results to return.
Raises:
Source code in docs_src/capo_detective/_services/detective.py
| def list_datasource_packages(
self,
graph_arn: "capo_detective.types.graph_arn.GraphArn",
*,
config_overrides: Optional[DetectiveClientConfig] = None,
next_token: Optional[
"capo_detective.types.pagination_token.PaginationToken"
] = None,
max_results: Optional[
"capo_detective.types.member_results_limit.MemberResultsLimit"
] = None,
) -> "capo_detective.types.list_datasource_packages_response.ListDatasourcePackagesResponse":
"""<p>Lists data source packages in the behavior graph.</p>
Args:
graph_arn: <p>The ARN of the behavior graph.</p>
next_token: <p>For requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.</p>
max_results: <p>The maximum number of results to return.</p>
Raises:
capo_detective.errors.access_denied_exception.AccessDeniedException: <p>The request issuer does not have permission to access this resource or perform this operation.</p>
capo_detective.errors.internal_server_exception.InternalServerException: <p>The request was valid but failed because of a problem with the service.</p>
capo_detective.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request refers to a nonexistent resource.</p>
capo_detective.errors.validation_exception.ValidationException: <p>The request parameters are invalid.</p>
capo_detective.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_detective.types.list_datasource_packages_request.ListDatasourcePackagesRequest]",
) -> OperationResponse[
"capo_detective.types.list_datasource_packages_response.ListDatasourcePackagesResponse"
]:
import capo_detective._operations.amazon_detective.list_datasource_packages
output, http_response = (
capo_detective._operations.amazon_detective.list_datasource_packages.list_datasource_packages(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListDatasourcePackages")
)
input_: capo_detective.types.list_datasource_packages_request.ListDatasourcePackagesRequest = {
"graph_arn": graph_arn
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|