ECR / Client / get_lifecycle_policy_preview
get_lifecycle_policy_preview¶
- ECR.Client.get_lifecycle_policy_preview(**kwargs)¶
Retrieves the results of the lifecycle policy preview request for the specified repository.
See also: AWS API Documentation
Request Syntax
response = client.get_lifecycle_policy_preview( registryId='string', repositoryName='string', imageIds=[ { 'imageDigest': 'string', 'imageTag': 'string' }, ], nextToken='string', maxResults=123, filter={ 'tagStatus': 'TAGGED'|'UNTAGGED'|'ANY' } )
- type registryId:
string
- param registryId:
The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
- type repositoryName:
string
- param repositoryName:
[REQUIRED]
The name of the repository.
- type imageIds:
list
- param imageIds:
The list of imageIDs to be included.
(dict) –
An object with identifying information for an image in an Amazon ECR repository.
imageDigest (string) –
The
sha256digest of the image manifest.imageTag (string) –
The tag used for the image.
- type nextToken:
string
- param nextToken:
The
nextTokenvalue returned from a previous paginated
GetLifecyclePolicyPreviewRequestrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue. This value isnullwhen there are no more results to return. This option cannot be used when you specify images withimageIds.- type maxResults:
integer
- param maxResults:
The maximum number of repository results returned by
GetLifecyclePolicyPreviewRequestin paginated output. When this parameter is used,GetLifecyclePolicyPreviewRequestonly returns
maxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherGetLifecyclePolicyPreviewRequestrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter is not used, thenGetLifecyclePolicyPreviewRequestreturns up to 100 results and anextTokenvalue, if applicable. This option cannot be used when you specify images withimageIds.- type filter:
dict
- param filter:
An optional parameter that filters results based on image tag status and all tags, if tagged.
tagStatus (string) –
The tag status of the image.
- rtype:
dict
- returns:
Response Syntax
{ 'registryId': 'string', 'repositoryName': 'string', 'lifecyclePolicyText': 'string', 'status': 'IN_PROGRESS'|'COMPLETE'|'EXPIRED'|'FAILED', 'nextToken': 'string', 'previewResults': [ { 'imageTags': [ 'string', ], 'imageDigest': 'string', 'imagePushedAt': datetime(2015, 1, 1), 'action': { 'type': 'EXPIRE' }, 'appliedRulePriority': 123 }, ], 'summary': { 'expiringImageTotalCount': 123 } }
Response Structure
(dict) –
registryId (string) –
The registry ID associated with the request.
repositoryName (string) –
The repository name associated with the request.
lifecyclePolicyText (string) –
The JSON lifecycle policy text.
status (string) –
The status of the lifecycle policy preview request.
nextToken (string) –
The
nextTokenvalue to include in a futureGetLifecyclePolicyPreviewrequest. When the results of aGetLifecyclePolicyPreviewrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.previewResults (list) –
The results of the lifecycle policy preview request.
(dict) –
The result of the lifecycle policy preview.
imageTags (list) –
The list of tags associated with this image.
(string) –
imageDigest (string) –
The
sha256digest of the image manifest.imagePushedAt (datetime) –
The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the repository.
action (dict) –
The type of action to be taken.
type (string) –
The type of action to be taken.
appliedRulePriority (integer) –
The priority of the applied rule.
summary (dict) –
The list of images that is returned as a result of the action.
expiringImageTotalCount (integer) –
The number of expiring images.
Exceptions