put_image_scanning_configuration

ECR.Client.put_image_scanning_configuration(**kwargs)

Warning

The PutImageScanningConfiguration API is being deprecated, in favor of specifying the image scanning configuration at the registry level. For more information, see PutRegistryScanningConfiguration.

Updates the image scanning configuration for the specified repository.

See also: AWS API Documentation

Request Syntax

response = client.put_image_scanning_configuration(
    registryId='string',
    repositoryName='string',
    imageScanningConfiguration={
        'scanOnPush': True|False
    }
)
Parameters
  • registryId (string) -- The Amazon Web Services account ID associated with the registry that contains the repository in which to update the image scanning configuration setting. If you do not specify a registry, the default registry is assumed.
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository in which to update the image scanning configuration setting.

  • imageScanningConfiguration (dict) --

    [REQUIRED]

    The image scanning configuration for the repository. This setting determines whether images are scanned for known vulnerabilities after being pushed to the repository.

    • scanOnPush (boolean) --

      The setting that determines whether images are scanned after being pushed to a repository. If set to true , images will be scanned after being pushed. If this parameter is not specified, it will default to false and images will not be scanned unless a scan is manually started with the API_StartImageScan API.

Return type

dict

Returns

Response Syntax

{
    'registryId': 'string',
    'repositoryName': 'string',
    'imageScanningConfiguration': {
        'scanOnPush': True|False
    }
}

Response Structure

  • (dict) --

    • registryId (string) --

      The registry ID associated with the request.

    • repositoryName (string) --

      The repository name associated with the request.

    • imageScanningConfiguration (dict) --

      The image scanning configuration setting for the repository.

      • scanOnPush (boolean) --

        The setting that determines whether images are scanned after being pushed to a repository. If set to true , images will be scanned after being pushed. If this parameter is not specified, it will default to false and images will not be scanned unless a scan is manually started with the API_StartImageScan API.

Exceptions

  • ECR.Client.exceptions.ServerException
  • ECR.Client.exceptions.InvalidParameterException
  • ECR.Client.exceptions.RepositoryNotFoundException
  • ECR.Client.exceptions.ValidationException