Returns a list of keywords that are pre-mapped to the specified control data source.
Parameters:
-
source
(DataSourceType)
–
The control mapping data source that the keywords apply to.
-
next_token
(Optional[Token], default:
None
)
–
The pagination token that's used to fetch the next set of results.
-
max_results
(Optional[MaxResults], default:
None
)
–
Represents the maximum number of results on a page or for an API request call.
Raises:
-
AccessDeniedException
–
Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again.
-
InternalServerException
–
An internal service error occurred during the processing of your request. Try again later.
-
ValidationException
–
The request has invalid or missing parameters.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_auditmanager/_services/audit_manager.py
| def list_keywords_for_data_source(
self,
source: "capo_auditmanager.types.data_source_type.DataSourceType",
*,
config_overrides: Optional[AuditManagerClientConfig] = None,
next_token: Optional["capo_auditmanager.types.token.Token"] = None,
max_results: Optional["capo_auditmanager.types.max_results.MaxResults"] = None,
) -> "capo_auditmanager.types.list_keywords_for_data_source_response.ListKeywordsForDataSourceResponse":
"""<p>Returns a list of keywords that are pre-mapped to the specified control data source.</p>
Args:
source: <p>The control mapping data source that the keywords apply to. </p>
next_token: <p> The pagination token that's used to fetch the next set of results. </p>
max_results: <p> Represents the maximum number of results on a page or for an API request call. </p>
Raises:
capo_auditmanager.errors.access_denied_exception.AccessDeniedException: <p> Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again. </p>
capo_auditmanager.errors.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </p>
capo_auditmanager.errors.validation_exception.ValidationException: <p> The request has invalid or missing parameters. </p>
capo_auditmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_auditmanager.types.list_keywords_for_data_source_request.ListKeywordsForDataSourceRequest]",
) -> OperationResponse[
"capo_auditmanager.types.list_keywords_for_data_source_response.ListKeywordsForDataSourceResponse"
]:
import capo_auditmanager._operations.bedrock_assessment_manager_lambda.list_keywords_for_data_source
output, http_response = (
capo_auditmanager._operations.bedrock_assessment_manager_lambda.list_keywords_for_data_source.list_keywords_for_data_source(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListKeywordsForDataSource")
)
input_: capo_auditmanager.types.list_keywords_for_data_source_request.ListKeywordsForDataSourceRequest = {
"source": source
}
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
|