Skip to content

batch_get_repository_scanning_configuration

batch_get_repository_scanning_configuration(
    repository_names: ScanningConfigurationRepositoryNameList,
    *,
    config_overrides: Optional[ECRClientConfig] = None,
) -> BatchGetRepositoryScanningConfigurationResponse

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/ecr.py
def batch_get_repository_scanning_configuration(
    self,
    repository_names: "capo_ecr.types.scanning_configuration_repository_name_list.ScanningConfigurationRepositoryNameList",
    *,
    config_overrides: Optional[ECRClientConfig] = 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.
    """

    def _handler(
        req: "OperationRequest[capo_ecr.types.batch_get_repository_scanning_configuration_request.BatchGetRepositoryScanningConfigurationRequest]",
    ) -> OperationResponse[
        "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 = (
            capo_ecr._operations.amazon_ec2_container_registry_v20150921.batch_get_repository_scanning_configuration.batch_get_repository_scanning_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output