---
title: "POST /#X-Amz-Target=AmazonEC2ContainerRegistry_V20150921.PutImageScanningConfiguration"
method: POST
path: "/#X-Amz-Target=AmazonEC2ContainerRegistry_V20150921.PutImageScanningConfiguration"
---

# POST /#X-Amz-Target=AmazonEC2ContainerRegistry_V20150921.PutImageScanningConfiguration

`POST /#X-Amz-Target=AmazonEC2ContainerRegistry_V20150921.PutImageScanningConfiguration`

<important> <p>The <code>PutImageScanningConfiguration</code> API is being deprecated, in favor of specifying the image scanning configuration at the registry level. For more information, see <a>PutRegistryScanningConfiguration</a>.</p> </important> <p>Updates the image scanning configuration for the specified repository.</p>

## Headers

- `X-Amz-Target` 'AmazonEC2ContainerRegistry_V20150921.PutImageScanningConfiguration', required

## Request body

- PutImageScanningConfigurationRequest
  - `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` object, 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 <code>true</code>, images will be scanned after being pushed. If this parameter is not specified, it will default to <code>false</code> and images will not be scanned unless a scan is manually started with the <a href="https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_StartImageScan.html">API_StartImageScan</a> API.

## Response `200`

Success

- PutImageScanningConfigurationResponse
  - `registryId` string — The registry ID associated with the request.
  - `repositoryName` string — The repository name associated with the request.
  - `imageScanningConfiguration` object — 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 <code>true</code>, images will be scanned after being pushed. If this parameter is not specified, it will default to <code>false</code> and images will not be scanned unless a scan is manually started with the <a href="https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_StartImageScan.html">API_StartImageScan</a> API.

## Other responses

- `480` — ServerException
- `481` — InvalidParameterException
- `482` — RepositoryNotFoundException
- `483` — ValidationException

---

[API](https://skmtc.net/aws/apis/ecr.md) · [All operations](https://skmtc.net/aws/apis/ecr/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/ecr/revisions/965cbb14e137/schema)
