Gets the scanning configuration for one or more repositories.
Parameters:
Raises:
-
InvalidParameterException
–
The specified parameter is invalid. Review the available parameters for the API request.
-
RepositoryNotFoundException
–
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
ServerException
–
These errors are usually caused by a server-side issue.
-
ValidationException
–
There was an exception validating this request.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_ecr/_services/async_ecr.py
| async def batch_get_repository_scanning_configuration(
self,
repository_names: "capo_ecr.types.scanning_configuration_repository_name_list.ScanningConfigurationRepositoryNameList",
*,
config_overrides: Optional[AsyncECRClientConfig] = None,
) -> "capo_ecr.types.batch_get_repository_scanning_configuration_response.BatchGetRepositoryScanningConfigurationResponse":
"""<p>Gets the scanning configuration for one or more repositories.</p>
Args:
repository_names: <p>One or more repository names to get the scanning configuration for.</p>
Raises:
capo_ecr.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter is invalid. Review the available parameters for the API request.</p>
capo_ecr.errors.repository_not_found_exception.RepositoryNotFoundException: <p>The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.</p>
capo_ecr.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
capo_ecr.errors.validation_exception.ValidationException: <p>There was an exception validating this request.</p>
capo_ecr.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_ecr.types.batch_get_repository_scanning_configuration_request.BatchGetRepositoryScanningConfigurationRequest]",
) -> AsyncOperationResponse[
"capo_ecr.types.batch_get_repository_scanning_configuration_response.BatchGetRepositoryScanningConfigurationResponse"
]:
import capo_ecr._operations.amazon_ec2_container_registry_v20150921.batch_get_repository_scanning_configuration
(
output,
http_response,
) = await capo_ecr._operations.amazon_ec2_container_registry_v20150921.batch_get_repository_scanning_configuration.async_batch_get_repository_scanning_configuration(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("BatchGetRepositoryScanningConfiguration"),
)
input_: capo_ecr.types.batch_get_repository_scanning_configuration_request.BatchGetRepositoryScanningConfigurationRequest = {
"repository_names": repository_names
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|