:doc:`ECR <../../ecr>` / Client / start_lifecycle_policy_preview

******************************
start_lifecycle_policy_preview
******************************



.. py:method:: ECR.Client.start_lifecycle_policy_preview(**kwargs)

  

  Starts a preview of a lifecycle policy for the specified repository. This allows you to see the results before associating the lifecycle policy with the repository.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview>`_  


  **Request Syntax**
  ::

    response = client.start_lifecycle_policy_preview(
        registryId='string',
        repositoryName='string',
        lifecyclePolicyText='string'
    )
    
  :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 to be evaluated.

    

  
  :type lifecyclePolicyText: string
  :param lifecyclePolicyText: 

    The policy to be evaluated against. If you do not specify a policy, the current policy for the repository is used.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'registryId': 'string',
          'repositoryName': 'string',
          'lifecyclePolicyText': 'string',
          'status': 'IN_PROGRESS'|'COMPLETE'|'EXPIRED'|'FAILED'
      }
      
    **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 repository policy text.

        
      

      - **status** *(string) --* 

        The status of the lifecycle policy preview request.

        
  
  **Exceptions**
  
  *   :py:class:`ECR.Client.exceptions.ServerException`

  
  *   :py:class:`ECR.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`ECR.Client.exceptions.RepositoryNotFoundException`

  
  *   :py:class:`ECR.Client.exceptions.LifecyclePolicyNotFoundException`

  
  *   :py:class:`ECR.Client.exceptions.LifecyclePolicyPreviewInProgressException`

  
  *   :py:class:`ECR.Client.exceptions.ValidationException`

  