1. Packages
  2. AWS
  3. API Docs
  4. ecr
  5. getLifecyclePolicyDocument
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
aws logo
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi

    Generates an ECR lifecycle policy document in JSON format. Can be used with resources such as the aws.ecr.LifecyclePolicy resource.

    For more information about building AWS ECR lifecycle policy documents, see the AWS ECR Lifecycle Policy Document Guide.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ecr.getLifecyclePolicyDocument({
        rules: [{
            priority: 1,
            description: "This is a test.",
            selection: {
                tagStatus: "tagged",
                tagPrefixLists: ["prod"],
                countType: "imageCountMoreThan",
                countNumber: 100,
            },
        }],
    });
    const exampleLifecyclePolicy = new aws.ecr.LifecyclePolicy("example", {
        repository: exampleAwsEcrRepository.name,
        policy: example.then(example => example.json),
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ecr.get_lifecycle_policy_document(rules=[{
        "priority": 1,
        "description": "This is a test.",
        "selection": {
            "tag_status": "tagged",
            "tag_prefix_lists": ["prod"],
            "count_type": "imageCountMoreThan",
            "count_number": 100,
        },
    }])
    example_lifecycle_policy = aws.ecr.LifecyclePolicy("example",
        repository=example_aws_ecr_repository["name"],
        policy=example.json)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ecr.GetLifecyclePolicyDocument(ctx, &ecr.GetLifecyclePolicyDocumentArgs{
    			Rules: []ecr.GetLifecyclePolicyDocumentRule{
    				{
    					Priority:    1,
    					Description: pulumi.StringRef("This is a test."),
    					Selection: {
    						TagStatus: "tagged",
    						TagPrefixLists: []string{
    							"prod",
    						},
    						CountType:   "imageCountMoreThan",
    						CountNumber: 100,
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ecr.NewLifecyclePolicy(ctx, "example", &ecr.LifecyclePolicyArgs{
    			Repository: pulumi.Any(exampleAwsEcrRepository.Name),
    			Policy:     pulumi.String(example.Json),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Ecr.GetLifecyclePolicyDocument.Invoke(new()
        {
            Rules = new[]
            {
                new Aws.Ecr.Inputs.GetLifecyclePolicyDocumentRuleInputArgs
                {
                    Priority = 1,
                    Description = "This is a test.",
                    Selection = new Aws.Ecr.Inputs.GetLifecyclePolicyDocumentRuleSelectionInputArgs
                    {
                        TagStatus = "tagged",
                        TagPrefixLists = new[]
                        {
                            "prod",
                        },
                        CountType = "imageCountMoreThan",
                        CountNumber = 100,
                    },
                },
            },
        });
    
        var exampleLifecyclePolicy = new Aws.Ecr.LifecyclePolicy("example", new()
        {
            Repository = exampleAwsEcrRepository.Name,
            Policy = example.Apply(getLifecyclePolicyDocumentResult => getLifecyclePolicyDocumentResult.Json),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ecr.EcrFunctions;
    import com.pulumi.aws.ecr.inputs.GetLifecyclePolicyDocumentArgs;
    import com.pulumi.aws.ecr.LifecyclePolicy;
    import com.pulumi.aws.ecr.LifecyclePolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = EcrFunctions.getLifecyclePolicyDocument(GetLifecyclePolicyDocumentArgs.builder()
                .rules(GetLifecyclePolicyDocumentRuleArgs.builder()
                    .priority(1)
                    .description("This is a test.")
                    .selection(GetLifecyclePolicyDocumentRuleSelectionArgs.builder()
                        .tagStatus("tagged")
                        .tagPrefixLists("prod")
                        .countType("imageCountMoreThan")
                        .countNumber(100)
                        .build())
                    .build())
                .build());
    
            var exampleLifecyclePolicy = new LifecyclePolicy("exampleLifecyclePolicy", LifecyclePolicyArgs.builder()
                .repository(exampleAwsEcrRepository.name())
                .policy(example.json())
                .build());
    
        }
    }
    
    resources:
      exampleLifecyclePolicy:
        type: aws:ecr:LifecyclePolicy
        name: example
        properties:
          repository: ${exampleAwsEcrRepository.name}
          policy: ${example.json}
    variables:
      example:
        fn::invoke:
          function: aws:ecr:getLifecyclePolicyDocument
          arguments:
            rules:
              - priority: 1
                description: This is a test.
                selection:
                  tagStatus: tagged
                  tagPrefixLists:
                    - prod
                  countType: imageCountMoreThan
                  countNumber: 100
    

    Using getLifecyclePolicyDocument

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getLifecyclePolicyDocument(args: GetLifecyclePolicyDocumentArgs, opts?: InvokeOptions): Promise<GetLifecyclePolicyDocumentResult>
    function getLifecyclePolicyDocumentOutput(args: GetLifecyclePolicyDocumentOutputArgs, opts?: InvokeOptions): Output<GetLifecyclePolicyDocumentResult>
    def get_lifecycle_policy_document(rules: Optional[Sequence[GetLifecyclePolicyDocumentRule]] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetLifecyclePolicyDocumentResult
    def get_lifecycle_policy_document_output(rules: Optional[pulumi.Input[Sequence[pulumi.Input[GetLifecyclePolicyDocumentRuleArgs]]]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetLifecyclePolicyDocumentResult]
    func GetLifecyclePolicyDocument(ctx *Context, args *GetLifecyclePolicyDocumentArgs, opts ...InvokeOption) (*GetLifecyclePolicyDocumentResult, error)
    func GetLifecyclePolicyDocumentOutput(ctx *Context, args *GetLifecyclePolicyDocumentOutputArgs, opts ...InvokeOption) GetLifecyclePolicyDocumentResultOutput

    > Note: This function is named GetLifecyclePolicyDocument in the Go SDK.

    public static class GetLifecyclePolicyDocument 
    {
        public static Task<GetLifecyclePolicyDocumentResult> InvokeAsync(GetLifecyclePolicyDocumentArgs args, InvokeOptions? opts = null)
        public static Output<GetLifecyclePolicyDocumentResult> Invoke(GetLifecyclePolicyDocumentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLifecyclePolicyDocumentResult> getLifecyclePolicyDocument(GetLifecyclePolicyDocumentArgs args, InvokeOptions options)
    public static Output<GetLifecyclePolicyDocumentResult> getLifecyclePolicyDocument(GetLifecyclePolicyDocumentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:ecr/getLifecyclePolicyDocument:getLifecyclePolicyDocument
      arguments:
        # arguments dictionary

    The following arguments are supported:

    getLifecyclePolicyDocument Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Json string
    The above arguments serialized as a standard JSON policy document.
    Rules List<GetLifecyclePolicyDocumentRule>
    Id string
    The provider-assigned unique ID for this managed resource.
    Json string
    The above arguments serialized as a standard JSON policy document.
    Rules []GetLifecyclePolicyDocumentRule
    id String
    The provider-assigned unique ID for this managed resource.
    json String
    The above arguments serialized as a standard JSON policy document.
    rules List<GetLifecyclePolicyDocumentRule>
    id string
    The provider-assigned unique ID for this managed resource.
    json string
    The above arguments serialized as a standard JSON policy document.
    rules GetLifecyclePolicyDocumentRule[]
    id str
    The provider-assigned unique ID for this managed resource.
    json str
    The above arguments serialized as a standard JSON policy document.
    rules Sequence[GetLifecyclePolicyDocumentRule]
    id String
    The provider-assigned unique ID for this managed resource.
    json String
    The above arguments serialized as a standard JSON policy document.
    rules List<Property Map>

    Supporting Types

    GetLifecyclePolicyDocumentRule

    Priority int
    Sets the order in which rules are evaluated, lowest to highest. When you add rules to a lifecycle policy, you must give them each a unique value for priority. Values do not need to be sequential across rules in a policy. A rule with a tag_status value of any must have the highest value for priority and be evaluated last.
    Selection GetLifecyclePolicyDocumentRuleSelection
    Collects parameters describing the selection criteria for the ECR lifecycle policy:
    Action GetLifecyclePolicyDocumentRuleAction
    Specifies the action to take.
    Description string
    Describes the purpose of a rule within a lifecycle policy.
    Priority int
    Sets the order in which rules are evaluated, lowest to highest. When you add rules to a lifecycle policy, you must give them each a unique value for priority. Values do not need to be sequential across rules in a policy. A rule with a tag_status value of any must have the highest value for priority and be evaluated last.
    Selection GetLifecyclePolicyDocumentRuleSelection
    Collects parameters describing the selection criteria for the ECR lifecycle policy:
    Action GetLifecyclePolicyDocumentRuleAction
    Specifies the action to take.
    Description string
    Describes the purpose of a rule within a lifecycle policy.
    priority Integer
    Sets the order in which rules are evaluated, lowest to highest. When you add rules to a lifecycle policy, you must give them each a unique value for priority. Values do not need to be sequential across rules in a policy. A rule with a tag_status value of any must have the highest value for priority and be evaluated last.
    selection GetLifecyclePolicyDocumentRuleSelection
    Collects parameters describing the selection criteria for the ECR lifecycle policy:
    action GetLifecyclePolicyDocumentRuleAction
    Specifies the action to take.
    description String
    Describes the purpose of a rule within a lifecycle policy.
    priority number
    Sets the order in which rules are evaluated, lowest to highest. When you add rules to a lifecycle policy, you must give them each a unique value for priority. Values do not need to be sequential across rules in a policy. A rule with a tag_status value of any must have the highest value for priority and be evaluated last.
    selection GetLifecyclePolicyDocumentRuleSelection
    Collects parameters describing the selection criteria for the ECR lifecycle policy:
    action GetLifecyclePolicyDocumentRuleAction
    Specifies the action to take.
    description string
    Describes the purpose of a rule within a lifecycle policy.
    priority int
    Sets the order in which rules are evaluated, lowest to highest. When you add rules to a lifecycle policy, you must give them each a unique value for priority. Values do not need to be sequential across rules in a policy. A rule with a tag_status value of any must have the highest value for priority and be evaluated last.
    selection GetLifecyclePolicyDocumentRuleSelection
    Collects parameters describing the selection criteria for the ECR lifecycle policy:
    action GetLifecyclePolicyDocumentRuleAction
    Specifies the action to take.
    description str
    Describes the purpose of a rule within a lifecycle policy.
    priority Number
    Sets the order in which rules are evaluated, lowest to highest. When you add rules to a lifecycle policy, you must give them each a unique value for priority. Values do not need to be sequential across rules in a policy. A rule with a tag_status value of any must have the highest value for priority and be evaluated last.
    selection Property Map
    Collects parameters describing the selection criteria for the ECR lifecycle policy:
    action Property Map
    Specifies the action to take.
    description String
    Describes the purpose of a rule within a lifecycle policy.

    GetLifecyclePolicyDocumentRuleAction

    Type string
    Specify an action type. The supported values are expire (to delete images) and transition (to move images to archive storage).
    TargetStorageClass string
    The storage class you want the lifecycle policy to transition the image to. archive is the only supported value.
    Type string
    Specify an action type. The supported values are expire (to delete images) and transition (to move images to archive storage).
    TargetStorageClass string
    The storage class you want the lifecycle policy to transition the image to. archive is the only supported value.
    type String
    Specify an action type. The supported values are expire (to delete images) and transition (to move images to archive storage).
    targetStorageClass String
    The storage class you want the lifecycle policy to transition the image to. archive is the only supported value.
    type string
    Specify an action type. The supported values are expire (to delete images) and transition (to move images to archive storage).
    targetStorageClass string
    The storage class you want the lifecycle policy to transition the image to. archive is the only supported value.
    type str
    Specify an action type. The supported values are expire (to delete images) and transition (to move images to archive storage).
    target_storage_class str
    The storage class you want the lifecycle policy to transition the image to. archive is the only supported value.
    type String
    Specify an action type. The supported values are expire (to delete images) and transition (to move images to archive storage).
    targetStorageClass String
    The storage class you want the lifecycle policy to transition the image to. archive is the only supported value.

    GetLifecyclePolicyDocumentRuleSelection

    CountNumber int
    Specify a count number. If the count_type used is imageCountMoreThan, then the value is the maximum number of images that you want to retain in your repository. If the count_type used is sinceImagePushed, then the value is the maximum age limit for your images. If the count_type used is sinceImagePulled, then the value is the maximum number of days since the image was last pulled. If the count_type used is sinceImageTransitioned, then the value is the maximum number of days since the image was archived.
    CountType string
    Specify a count type to apply to the images. If count_type is set to imageCountMoreThan, you also specify count_number to create a rule that sets a limit on the number of images that exist in your repository. If count_type is set to sinceImagePushed, sinceImagePulled, or sinceImageTransitioned, you also specify count_unit and count_number to specify a time limit on the images that exist in your repository.
    TagStatus string
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tag_prefix_list value or a tag_pattern_list value. If you specify untagged, then you must omit both tag_prefix_list and tag_pattern_list.
    CountUnit string
    Specify a count unit of days to indicate that as the unit of time, in addition to count_number, which is the number of days.
    StorageClass string
    The rule will only select images of this storage class. When using a count_type of imageCountMoreThan, sinceImagePushed, or sinceImagePulled, the only supported value is standard. When using a count_type of sinceImageTransitioned, this is required, and the only supported value is archive. If you omit this, the value of standard will be used.
    TagPatternLists List<string>
    You must specify a comma-separated list of image tag patterns that may contain wildcards (*) on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag pattern list ["prod\*"] to specify all of them. If you specify multiple tags, only the images with all specified tags are selected. There is a maximum limit of four wildcards (*) per string. For example, ["*test*1*2*3", "test*1*2*3*"] is valid but ["test*1*2*3*4*5*6"] is invalid.
    TagPrefixLists List<string>
    You must specify a comma-separated list of image tag prefixes on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix "prod" to specify all of them. If you specify multiple tags, only images with all specified tags are selected.
    CountNumber int
    Specify a count number. If the count_type used is imageCountMoreThan, then the value is the maximum number of images that you want to retain in your repository. If the count_type used is sinceImagePushed, then the value is the maximum age limit for your images. If the count_type used is sinceImagePulled, then the value is the maximum number of days since the image was last pulled. If the count_type used is sinceImageTransitioned, then the value is the maximum number of days since the image was archived.
    CountType string
    Specify a count type to apply to the images. If count_type is set to imageCountMoreThan, you also specify count_number to create a rule that sets a limit on the number of images that exist in your repository. If count_type is set to sinceImagePushed, sinceImagePulled, or sinceImageTransitioned, you also specify count_unit and count_number to specify a time limit on the images that exist in your repository.
    TagStatus string
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tag_prefix_list value or a tag_pattern_list value. If you specify untagged, then you must omit both tag_prefix_list and tag_pattern_list.
    CountUnit string
    Specify a count unit of days to indicate that as the unit of time, in addition to count_number, which is the number of days.
    StorageClass string
    The rule will only select images of this storage class. When using a count_type of imageCountMoreThan, sinceImagePushed, or sinceImagePulled, the only supported value is standard. When using a count_type of sinceImageTransitioned, this is required, and the only supported value is archive. If you omit this, the value of standard will be used.
    TagPatternLists []string
    You must specify a comma-separated list of image tag patterns that may contain wildcards (*) on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag pattern list ["prod\*"] to specify all of them. If you specify multiple tags, only the images with all specified tags are selected. There is a maximum limit of four wildcards (*) per string. For example, ["*test*1*2*3", "test*1*2*3*"] is valid but ["test*1*2*3*4*5*6"] is invalid.
    TagPrefixLists []string
    You must specify a comma-separated list of image tag prefixes on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix "prod" to specify all of them. If you specify multiple tags, only images with all specified tags are selected.
    countNumber Integer
    Specify a count number. If the count_type used is imageCountMoreThan, then the value is the maximum number of images that you want to retain in your repository. If the count_type used is sinceImagePushed, then the value is the maximum age limit for your images. If the count_type used is sinceImagePulled, then the value is the maximum number of days since the image was last pulled. If the count_type used is sinceImageTransitioned, then the value is the maximum number of days since the image was archived.
    countType String
    Specify a count type to apply to the images. If count_type is set to imageCountMoreThan, you also specify count_number to create a rule that sets a limit on the number of images that exist in your repository. If count_type is set to sinceImagePushed, sinceImagePulled, or sinceImageTransitioned, you also specify count_unit and count_number to specify a time limit on the images that exist in your repository.
    tagStatus String
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tag_prefix_list value or a tag_pattern_list value. If you specify untagged, then you must omit both tag_prefix_list and tag_pattern_list.
    countUnit String
    Specify a count unit of days to indicate that as the unit of time, in addition to count_number, which is the number of days.
    storageClass String
    The rule will only select images of this storage class. When using a count_type of imageCountMoreThan, sinceImagePushed, or sinceImagePulled, the only supported value is standard. When using a count_type of sinceImageTransitioned, this is required, and the only supported value is archive. If you omit this, the value of standard will be used.
    tagPatternLists List<String>
    You must specify a comma-separated list of image tag patterns that may contain wildcards (*) on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag pattern list ["prod\*"] to specify all of them. If you specify multiple tags, only the images with all specified tags are selected. There is a maximum limit of four wildcards (*) per string. For example, ["*test*1*2*3", "test*1*2*3*"] is valid but ["test*1*2*3*4*5*6"] is invalid.
    tagPrefixLists List<String>
    You must specify a comma-separated list of image tag prefixes on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix "prod" to specify all of them. If you specify multiple tags, only images with all specified tags are selected.
    countNumber number
    Specify a count number. If the count_type used is imageCountMoreThan, then the value is the maximum number of images that you want to retain in your repository. If the count_type used is sinceImagePushed, then the value is the maximum age limit for your images. If the count_type used is sinceImagePulled, then the value is the maximum number of days since the image was last pulled. If the count_type used is sinceImageTransitioned, then the value is the maximum number of days since the image was archived.
    countType string
    Specify a count type to apply to the images. If count_type is set to imageCountMoreThan, you also specify count_number to create a rule that sets a limit on the number of images that exist in your repository. If count_type is set to sinceImagePushed, sinceImagePulled, or sinceImageTransitioned, you also specify count_unit and count_number to specify a time limit on the images that exist in your repository.
    tagStatus string
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tag_prefix_list value or a tag_pattern_list value. If you specify untagged, then you must omit both tag_prefix_list and tag_pattern_list.
    countUnit string
    Specify a count unit of days to indicate that as the unit of time, in addition to count_number, which is the number of days.
    storageClass string
    The rule will only select images of this storage class. When using a count_type of imageCountMoreThan, sinceImagePushed, or sinceImagePulled, the only supported value is standard. When using a count_type of sinceImageTransitioned, this is required, and the only supported value is archive. If you omit this, the value of standard will be used.
    tagPatternLists string[]
    You must specify a comma-separated list of image tag patterns that may contain wildcards (*) on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag pattern list ["prod\*"] to specify all of them. If you specify multiple tags, only the images with all specified tags are selected. There is a maximum limit of four wildcards (*) per string. For example, ["*test*1*2*3", "test*1*2*3*"] is valid but ["test*1*2*3*4*5*6"] is invalid.
    tagPrefixLists string[]
    You must specify a comma-separated list of image tag prefixes on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix "prod" to specify all of them. If you specify multiple tags, only images with all specified tags are selected.
    count_number int
    Specify a count number. If the count_type used is imageCountMoreThan, then the value is the maximum number of images that you want to retain in your repository. If the count_type used is sinceImagePushed, then the value is the maximum age limit for your images. If the count_type used is sinceImagePulled, then the value is the maximum number of days since the image was last pulled. If the count_type used is sinceImageTransitioned, then the value is the maximum number of days since the image was archived.
    count_type str
    Specify a count type to apply to the images. If count_type is set to imageCountMoreThan, you also specify count_number to create a rule that sets a limit on the number of images that exist in your repository. If count_type is set to sinceImagePushed, sinceImagePulled, or sinceImageTransitioned, you also specify count_unit and count_number to specify a time limit on the images that exist in your repository.
    tag_status str
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tag_prefix_list value or a tag_pattern_list value. If you specify untagged, then you must omit both tag_prefix_list and tag_pattern_list.
    count_unit str
    Specify a count unit of days to indicate that as the unit of time, in addition to count_number, which is the number of days.
    storage_class str
    The rule will only select images of this storage class. When using a count_type of imageCountMoreThan, sinceImagePushed, or sinceImagePulled, the only supported value is standard. When using a count_type of sinceImageTransitioned, this is required, and the only supported value is archive. If you omit this, the value of standard will be used.
    tag_pattern_lists Sequence[str]
    You must specify a comma-separated list of image tag patterns that may contain wildcards (*) on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag pattern list ["prod\*"] to specify all of them. If you specify multiple tags, only the images with all specified tags are selected. There is a maximum limit of four wildcards (*) per string. For example, ["*test*1*2*3", "test*1*2*3*"] is valid but ["test*1*2*3*4*5*6"] is invalid.
    tag_prefix_lists Sequence[str]
    You must specify a comma-separated list of image tag prefixes on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix "prod" to specify all of them. If you specify multiple tags, only images with all specified tags are selected.
    countNumber Number
    Specify a count number. If the count_type used is imageCountMoreThan, then the value is the maximum number of images that you want to retain in your repository. If the count_type used is sinceImagePushed, then the value is the maximum age limit for your images. If the count_type used is sinceImagePulled, then the value is the maximum number of days since the image was last pulled. If the count_type used is sinceImageTransitioned, then the value is the maximum number of days since the image was archived.
    countType String
    Specify a count type to apply to the images. If count_type is set to imageCountMoreThan, you also specify count_number to create a rule that sets a limit on the number of images that exist in your repository. If count_type is set to sinceImagePushed, sinceImagePulled, or sinceImageTransitioned, you also specify count_unit and count_number to specify a time limit on the images that exist in your repository.
    tagStatus String
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tag_prefix_list value or a tag_pattern_list value. If you specify untagged, then you must omit both tag_prefix_list and tag_pattern_list.
    countUnit String
    Specify a count unit of days to indicate that as the unit of time, in addition to count_number, which is the number of days.
    storageClass String
    The rule will only select images of this storage class. When using a count_type of imageCountMoreThan, sinceImagePushed, or sinceImagePulled, the only supported value is standard. When using a count_type of sinceImageTransitioned, this is required, and the only supported value is archive. If you omit this, the value of standard will be used.
    tagPatternLists List<String>
    You must specify a comma-separated list of image tag patterns that may contain wildcards (*) on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag pattern list ["prod\*"] to specify all of them. If you specify multiple tags, only the images with all specified tags are selected. There is a maximum limit of four wildcards (*) per string. For example, ["*test*1*2*3", "test*1*2*3*"] is valid but ["test*1*2*3*4*5*6"] is invalid.
    tagPrefixLists List<String>
    You must specify a comma-separated list of image tag prefixes on which to take action with your lifecycle policy. For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix "prod" to specify all of them. If you specify multiple tags, only images with all specified tags are selected.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate