1. Packages
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. cr
  6. ArtifactLifecycleRule
Viewing docs for Alibaba Cloud v3.105.0
published on Thursday, Jul 16, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.105.0
published on Thursday, Jul 16, 2026 by Pulumi

    Provides a CR Artifact Lifecycle Rule resource.

    Retention policies for versions in the warehouse.

    For information about CR Artifact Lifecycle Rule and how to use it, see What is Artifact Lifecycle Rule.

    NOTE: Available since v1.285.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new alicloud.cr.RegistryEnterpriseInstance("default", {
        defaultOssBucket: "true",
        instanceName: name,
        renewalStatus: "ManualRenewal",
        imageScanner: "DISABLE",
        period: 1,
        paymentType: "Subscription",
        instanceType: "Economy",
    });
    const defaultRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("default", {
        instanceId: _default.id,
        name: name,
        autoCreate: false,
        defaultVisibility: "PRIVATE",
    });
    const defaultRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("default", {
        instanceId: _default.id,
        namespace: defaultRegistryEnterpriseNamespace.name,
        name: name,
        repoType: "PRIVATE",
        summary: "example repository for lifecycle rule",
    });
    const defaultArtifactLifecycleRule = new alicloud.cr.ArtifactLifecycleRule("default", {
        auto: true,
        namespaceName: defaultRegistryEnterpriseNamespace.name,
        retentionTagCount: 30,
        scheduleTime: "WEEK",
        scope: "REPO",
        instanceId: _default.id,
        tagRegexp: ".*",
        repoName: defaultRegistryEnterpriseRepo.name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.cr.RegistryEnterpriseInstance("default",
        default_oss_bucket="true",
        instance_name=name,
        renewal_status="ManualRenewal",
        image_scanner="DISABLE",
        period=1,
        payment_type="Subscription",
        instance_type="Economy")
    default_registry_enterprise_namespace = alicloud.cs.RegistryEnterpriseNamespace("default",
        instance_id=default.id,
        name=name,
        auto_create=False,
        default_visibility="PRIVATE")
    default_registry_enterprise_repo = alicloud.cs.RegistryEnterpriseRepo("default",
        instance_id=default.id,
        namespace=default_registry_enterprise_namespace.name,
        name=name,
        repo_type="PRIVATE",
        summary="example repository for lifecycle rule")
    default_artifact_lifecycle_rule = alicloud.cr.ArtifactLifecycleRule("default",
        auto=True,
        namespace_name=default_registry_enterprise_namespace.name,
        retention_tag_count=30,
        schedule_time="WEEK",
        scope="REPO",
        instance_id=default.id,
        tag_regexp=".*",
        repo_name=default_registry_enterprise_repo.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cr"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := cr.NewRegistryEnterpriseInstance(ctx, "default", &cr.RegistryEnterpriseInstanceArgs{
    			DefaultOssBucket: pulumi.String("true"),
    			InstanceName:     pulumi.String(name),
    			RenewalStatus:    pulumi.String("ManualRenewal"),
    			ImageScanner:     pulumi.String("DISABLE"),
    			Period:           pulumi.Int(1),
    			PaymentType:      pulumi.String("Subscription"),
    			InstanceType:     pulumi.String("Economy"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultRegistryEnterpriseNamespace, err := cs.NewRegistryEnterpriseNamespace(ctx, "default", &cs.RegistryEnterpriseNamespaceArgs{
    			InstanceId:        _default.ID(),
    			Name:              pulumi.String(name),
    			AutoCreate:        pulumi.Bool(false),
    			DefaultVisibility: pulumi.String("PRIVATE"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultRegistryEnterpriseRepo, err := cs.NewRegistryEnterpriseRepo(ctx, "default", &cs.RegistryEnterpriseRepoArgs{
    			InstanceId: _default.ID(),
    			Namespace:  defaultRegistryEnterpriseNamespace.Name,
    			Name:       pulumi.String(name),
    			RepoType:   pulumi.String("PRIVATE"),
    			Summary:    pulumi.String("example repository for lifecycle rule"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cr.NewArtifactLifecycleRule(ctx, "default", &cr.ArtifactLifecycleRuleArgs{
    			Auto:              pulumi.Bool(true),
    			NamespaceName:     defaultRegistryEnterpriseNamespace.Name,
    			RetentionTagCount: pulumi.Int(30),
    			ScheduleTime:      pulumi.String("WEEK"),
    			Scope:             pulumi.String("REPO"),
    			InstanceId:        _default.ID(),
    			TagRegexp:         pulumi.String(".*"),
    			RepoName:          defaultRegistryEnterpriseRepo.Name,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new AliCloud.CR.RegistryEnterpriseInstance("default", new()
        {
            DefaultOssBucket = "true",
            InstanceName = name,
            RenewalStatus = "ManualRenewal",
            ImageScanner = "DISABLE",
            Period = 1,
            PaymentType = "Subscription",
            InstanceType = "Economy",
        });
    
        var defaultRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("default", new()
        {
            InstanceId = @default.Id,
            Name = name,
            AutoCreate = false,
            DefaultVisibility = "PRIVATE",
        });
    
        var defaultRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("default", new()
        {
            InstanceId = @default.Id,
            Namespace = defaultRegistryEnterpriseNamespace.Name,
            Name = name,
            RepoType = "PRIVATE",
            Summary = "example repository for lifecycle rule",
        });
    
        var defaultArtifactLifecycleRule = new AliCloud.CR.ArtifactLifecycleRule("default", new()
        {
            Auto = true,
            NamespaceName = defaultRegistryEnterpriseNamespace.Name,
            RetentionTagCount = 30,
            ScheduleTime = "WEEK",
            Scope = "REPO",
            InstanceId = @default.Id,
            TagRegexp = ".*",
            RepoName = defaultRegistryEnterpriseRepo.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cr.RegistryEnterpriseInstance;
    import com.pulumi.alicloud.cr.RegistryEnterpriseInstanceArgs;
    import com.pulumi.alicloud.cs.RegistryEnterpriseNamespace;
    import com.pulumi.alicloud.cs.RegistryEnterpriseNamespaceArgs;
    import com.pulumi.alicloud.cs.RegistryEnterpriseRepo;
    import com.pulumi.alicloud.cs.RegistryEnterpriseRepoArgs;
    import com.pulumi.alicloud.cr.ArtifactLifecycleRule;
    import com.pulumi.alicloud.cr.ArtifactLifecycleRuleArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default_ = new RegistryEnterpriseInstance("default", RegistryEnterpriseInstanceArgs.builder()
                .defaultOssBucket("true")
                .instanceName(name)
                .renewalStatus("ManualRenewal")
                .imageScanner("DISABLE")
                .period(1)
                .paymentType("Subscription")
                .instanceType("Economy")
                .build());
    
            var defaultRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("defaultRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()
                .instanceId(default_.id())
                .name(name)
                .autoCreate(false)
                .defaultVisibility("PRIVATE")
                .build());
    
            var defaultRegistryEnterpriseRepo = new RegistryEnterpriseRepo("defaultRegistryEnterpriseRepo", RegistryEnterpriseRepoArgs.builder()
                .instanceId(default_.id())
                .namespace(defaultRegistryEnterpriseNamespace.name())
                .name(name)
                .repoType("PRIVATE")
                .summary("example repository for lifecycle rule")
                .build());
    
            var defaultArtifactLifecycleRule = new ArtifactLifecycleRule("defaultArtifactLifecycleRule", ArtifactLifecycleRuleArgs.builder()
                .auto(true)
                .namespaceName(defaultRegistryEnterpriseNamespace.name())
                .retentionTagCount(30)
                .scheduleTime("WEEK")
                .scope("REPO")
                .instanceId(default_.id())
                .tagRegexp(".*")
                .repoName(defaultRegistryEnterpriseRepo.name())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: alicloud:cr:RegistryEnterpriseInstance
        properties:
          defaultOssBucket: 'true'
          instanceName: ${name}
          renewalStatus: ManualRenewal
          imageScanner: DISABLE
          period: '1'
          paymentType: Subscription
          instanceType: Economy
      defaultRegistryEnterpriseNamespace:
        type: alicloud:cs:RegistryEnterpriseNamespace
        name: default
        properties:
          instanceId: ${default.id}
          name: ${name}
          autoCreate: false
          defaultVisibility: PRIVATE
      defaultRegistryEnterpriseRepo:
        type: alicloud:cs:RegistryEnterpriseRepo
        name: default
        properties:
          instanceId: ${default.id}
          namespace: ${defaultRegistryEnterpriseNamespace.name}
          name: ${name}
          repoType: PRIVATE
          summary: example repository for lifecycle rule
      defaultArtifactLifecycleRule:
        type: alicloud:cr:ArtifactLifecycleRule
        name: default
        properties:
          auto: true
          namespaceName: ${defaultRegistryEnterpriseNamespace.name}
          retentionTagCount: '30'
          scheduleTime: WEEK
          scope: REPO
          instanceId: ${default.id}
          tagRegexp: .*
          repoName: ${defaultRegistryEnterpriseRepo.name}
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    resource "alicloud_cr_registryenterpriseinstance" "default" {
      default_oss_bucket = "true"
      instance_name      = var.name
      renewal_status     = "ManualRenewal"
      image_scanner      = "DISABLE"
      period             = "1"
      payment_type       = "Subscription"
      instance_type      = "Economy"
    }
    resource "alicloud_cs_registryenterprisenamespace" "default" {
      instance_id        = alicloud_cr_registryenterpriseinstance.default.id
      name               = var.name
      auto_create        = false
      default_visibility = "PRIVATE"
    }
    resource "alicloud_cs_registryenterpriserepo" "default" {
      instance_id = alicloud_cr_registryenterpriseinstance.default.id
      namespace   = alicloud_cs_registryenterprisenamespace.default.name
      name        = var.name
      repo_type   = "PRIVATE"
      summary     = "example repository for lifecycle rule"
    }
    resource "alicloud_cr_artifactlifecyclerule" "default" {
      auto                = true
      namespace_name      = alicloud_cs_registryenterprisenamespace.default.name
      retention_tag_count = "30"
      schedule_time       = "WEEK"
      scope               = "REPO"
      instance_id         = alicloud_cr_registryenterpriseinstance.default.id
      tag_regexp          = ".*"
      repo_name           = alicloud_cs_registryenterpriserepo.default.name
    }
    variable "name" {
      type    = string
      default = "terraform-example"
    }
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create ArtifactLifecycleRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ArtifactLifecycleRule(name: string, args: ArtifactLifecycleRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ArtifactLifecycleRule(resource_name: str,
                              args: ArtifactLifecycleRuleArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ArtifactLifecycleRule(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              auto: Optional[bool] = None,
                              instance_id: Optional[str] = None,
                              namespace_name: Optional[str] = None,
                              repo_name: Optional[str] = None,
                              retention_tag_count: Optional[int] = None,
                              schedule_time: Optional[str] = None,
                              scope: Optional[str] = None,
                              tag_regexp: Optional[str] = None)
    func NewArtifactLifecycleRule(ctx *Context, name string, args ArtifactLifecycleRuleArgs, opts ...ResourceOption) (*ArtifactLifecycleRule, error)
    public ArtifactLifecycleRule(string name, ArtifactLifecycleRuleArgs args, CustomResourceOptions? opts = null)
    public ArtifactLifecycleRule(String name, ArtifactLifecycleRuleArgs args)
    public ArtifactLifecycleRule(String name, ArtifactLifecycleRuleArgs args, CustomResourceOptions options)
    
    type: alicloud:cr:ArtifactLifecycleRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "alicloud_cr_artifact_lifecycle_rule" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ArtifactLifecycleRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ArtifactLifecycleRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ArtifactLifecycleRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ArtifactLifecycleRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ArtifactLifecycleRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var artifactLifecycleRuleResource = new AliCloud.CR.ArtifactLifecycleRule("artifactLifecycleRuleResource", new()
    {
        Auto = false,
        InstanceId = "string",
        NamespaceName = "string",
        RepoName = "string",
        RetentionTagCount = 0,
        ScheduleTime = "string",
        Scope = "string",
        TagRegexp = "string",
    });
    
    example, err := cr.NewArtifactLifecycleRule(ctx, "artifactLifecycleRuleResource", &cr.ArtifactLifecycleRuleArgs{
    	Auto:              pulumi.Bool(false),
    	InstanceId:        pulumi.String("string"),
    	NamespaceName:     pulumi.String("string"),
    	RepoName:          pulumi.String("string"),
    	RetentionTagCount: pulumi.Int(0),
    	ScheduleTime:      pulumi.String("string"),
    	Scope:             pulumi.String("string"),
    	TagRegexp:         pulumi.String("string"),
    })
    
    resource "alicloud_cr_artifact_lifecycle_rule" "artifactLifecycleRuleResource" {
      lifecycle {
        create_before_destroy = true
      }
      auto                = false
      instance_id         = "string"
      namespace_name      = "string"
      repo_name           = "string"
      retention_tag_count = 0
      schedule_time       = "string"
      scope               = "string"
      tag_regexp          = "string"
    }
    
    var artifactLifecycleRuleResource = new ArtifactLifecycleRule("artifactLifecycleRuleResource", ArtifactLifecycleRuleArgs.builder()
        .auto(false)
        .instanceId("string")
        .namespaceName("string")
        .repoName("string")
        .retentionTagCount(0)
        .scheduleTime("string")
        .scope("string")
        .tagRegexp("string")
        .build());
    
    artifact_lifecycle_rule_resource = alicloud.cr.ArtifactLifecycleRule("artifactLifecycleRuleResource",
        auto=False,
        instance_id="string",
        namespace_name="string",
        repo_name="string",
        retention_tag_count=0,
        schedule_time="string",
        scope="string",
        tag_regexp="string")
    
    const artifactLifecycleRuleResource = new alicloud.cr.ArtifactLifecycleRule("artifactLifecycleRuleResource", {
        auto: false,
        instanceId: "string",
        namespaceName: "string",
        repoName: "string",
        retentionTagCount: 0,
        scheduleTime: "string",
        scope: "string",
        tagRegexp: "string",
    });
    
    type: alicloud:cr:ArtifactLifecycleRule
    properties:
        auto: false
        instanceId: string
        namespaceName: string
        repoName: string
        retentionTagCount: 0
        scheduleTime: string
        scope: string
        tagRegexp: string
    

    ArtifactLifecycleRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ArtifactLifecycleRule resource accepts the following input properties:

    Auto bool
    Whether to execute automatically
    InstanceId string
    Instance ID
    NamespaceName string
    Namespace name
    RepoName string
    Repository Name
    RetentionTagCount int
    Number of Retention Tags
    ScheduleTime string
    Execution cycle
    Scope string
    Scope of cleaning
    TagRegexp string
    Retain regular expressions for mirrored versions
    Auto bool
    Whether to execute automatically
    InstanceId string
    Instance ID
    NamespaceName string
    Namespace name
    RepoName string
    Repository Name
    RetentionTagCount int
    Number of Retention Tags
    ScheduleTime string
    Execution cycle
    Scope string
    Scope of cleaning
    TagRegexp string
    Retain regular expressions for mirrored versions
    auto bool
    Whether to execute automatically
    instance_id string
    Instance ID
    namespace_name string
    Namespace name
    repo_name string
    Repository Name
    retention_tag_count number
    Number of Retention Tags
    schedule_time string
    Execution cycle
    scope string
    Scope of cleaning
    tag_regexp string
    Retain regular expressions for mirrored versions
    auto Boolean
    Whether to execute automatically
    instanceId String
    Instance ID
    namespaceName String
    Namespace name
    repoName String
    Repository Name
    retentionTagCount Integer
    Number of Retention Tags
    scheduleTime String
    Execution cycle
    scope String
    Scope of cleaning
    tagRegexp String
    Retain regular expressions for mirrored versions
    auto boolean
    Whether to execute automatically
    instanceId string
    Instance ID
    namespaceName string
    Namespace name
    repoName string
    Repository Name
    retentionTagCount number
    Number of Retention Tags
    scheduleTime string
    Execution cycle
    scope string
    Scope of cleaning
    tagRegexp string
    Retain regular expressions for mirrored versions
    auto bool
    Whether to execute automatically
    instance_id str
    Instance ID
    namespace_name str
    Namespace name
    repo_name str
    Repository Name
    retention_tag_count int
    Number of Retention Tags
    schedule_time str
    Execution cycle
    scope str
    Scope of cleaning
    tag_regexp str
    Retain regular expressions for mirrored versions
    auto Boolean
    Whether to execute automatically
    instanceId String
    Instance ID
    namespaceName String
    Namespace name
    repoName String
    Repository Name
    retentionTagCount Number
    Number of Retention Tags
    scheduleTime String
    Execution cycle
    scope String
    Scope of cleaning
    tagRegexp String
    Retain regular expressions for mirrored versions

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ArtifactLifecycleRule resource produces the following output properties:

    ArtifactLifecycleRuleId string
    The first ID of the resource.
    CreateTime int
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedTime int
    Change time.
    ArtifactLifecycleRuleId string
    The first ID of the resource.
    CreateTime int
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedTime int
    Change time.
    artifact_lifecycle_rule_id string
    The first ID of the resource.
    create_time number
    Creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    modified_time number
    Change time.
    artifactLifecycleRuleId String
    The first ID of the resource.
    createTime Integer
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedTime Integer
    Change time.
    artifactLifecycleRuleId string
    The first ID of the resource.
    createTime number
    Creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedTime number
    Change time.
    artifact_lifecycle_rule_id str
    The first ID of the resource.
    create_time int
    Creation time.
    id str
    The provider-assigned unique ID for this managed resource.
    modified_time int
    Change time.
    artifactLifecycleRuleId String
    The first ID of the resource.
    createTime Number
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedTime Number
    Change time.

    Look up Existing ArtifactLifecycleRule Resource

    Get an existing ArtifactLifecycleRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ArtifactLifecycleRuleState, opts?: CustomResourceOptions): ArtifactLifecycleRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            artifact_lifecycle_rule_id: Optional[str] = None,
            auto: Optional[bool] = None,
            create_time: Optional[int] = None,
            instance_id: Optional[str] = None,
            modified_time: Optional[int] = None,
            namespace_name: Optional[str] = None,
            repo_name: Optional[str] = None,
            retention_tag_count: Optional[int] = None,
            schedule_time: Optional[str] = None,
            scope: Optional[str] = None,
            tag_regexp: Optional[str] = None) -> ArtifactLifecycleRule
    func GetArtifactLifecycleRule(ctx *Context, name string, id IDInput, state *ArtifactLifecycleRuleState, opts ...ResourceOption) (*ArtifactLifecycleRule, error)
    public static ArtifactLifecycleRule Get(string name, Input<string> id, ArtifactLifecycleRuleState? state, CustomResourceOptions? opts = null)
    public static ArtifactLifecycleRule get(String name, Output<String> id, ArtifactLifecycleRuleState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:cr:ArtifactLifecycleRule    get:      id: ${id}
    import {
      to = alicloud_cr_artifact_lifecycle_rule.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ArtifactLifecycleRuleId string
    The first ID of the resource.
    Auto bool
    Whether to execute automatically
    CreateTime int
    Creation time.
    InstanceId string
    Instance ID
    ModifiedTime int
    Change time.
    NamespaceName string
    Namespace name
    RepoName string
    Repository Name
    RetentionTagCount int
    Number of Retention Tags
    ScheduleTime string
    Execution cycle
    Scope string
    Scope of cleaning
    TagRegexp string
    Retain regular expressions for mirrored versions
    ArtifactLifecycleRuleId string
    The first ID of the resource.
    Auto bool
    Whether to execute automatically
    CreateTime int
    Creation time.
    InstanceId string
    Instance ID
    ModifiedTime int
    Change time.
    NamespaceName string
    Namespace name
    RepoName string
    Repository Name
    RetentionTagCount int
    Number of Retention Tags
    ScheduleTime string
    Execution cycle
    Scope string
    Scope of cleaning
    TagRegexp string
    Retain regular expressions for mirrored versions
    artifact_lifecycle_rule_id string
    The first ID of the resource.
    auto bool
    Whether to execute automatically
    create_time number
    Creation time.
    instance_id string
    Instance ID
    modified_time number
    Change time.
    namespace_name string
    Namespace name
    repo_name string
    Repository Name
    retention_tag_count number
    Number of Retention Tags
    schedule_time string
    Execution cycle
    scope string
    Scope of cleaning
    tag_regexp string
    Retain regular expressions for mirrored versions
    artifactLifecycleRuleId String
    The first ID of the resource.
    auto Boolean
    Whether to execute automatically
    createTime Integer
    Creation time.
    instanceId String
    Instance ID
    modifiedTime Integer
    Change time.
    namespaceName String
    Namespace name
    repoName String
    Repository Name
    retentionTagCount Integer
    Number of Retention Tags
    scheduleTime String
    Execution cycle
    scope String
    Scope of cleaning
    tagRegexp String
    Retain regular expressions for mirrored versions
    artifactLifecycleRuleId string
    The first ID of the resource.
    auto boolean
    Whether to execute automatically
    createTime number
    Creation time.
    instanceId string
    Instance ID
    modifiedTime number
    Change time.
    namespaceName string
    Namespace name
    repoName string
    Repository Name
    retentionTagCount number
    Number of Retention Tags
    scheduleTime string
    Execution cycle
    scope string
    Scope of cleaning
    tagRegexp string
    Retain regular expressions for mirrored versions
    artifact_lifecycle_rule_id str
    The first ID of the resource.
    auto bool
    Whether to execute automatically
    create_time int
    Creation time.
    instance_id str
    Instance ID
    modified_time int
    Change time.
    namespace_name str
    Namespace name
    repo_name str
    Repository Name
    retention_tag_count int
    Number of Retention Tags
    schedule_time str
    Execution cycle
    scope str
    Scope of cleaning
    tag_regexp str
    Retain regular expressions for mirrored versions
    artifactLifecycleRuleId String
    The first ID of the resource.
    auto Boolean
    Whether to execute automatically
    createTime Number
    Creation time.
    instanceId String
    Instance ID
    modifiedTime Number
    Change time.
    namespaceName String
    Namespace name
    repoName String
    Repository Name
    retentionTagCount Number
    Number of Retention Tags
    scheduleTime String
    Execution cycle
    scope String
    Scope of cleaning
    tagRegexp String
    Retain regular expressions for mirrored versions

    Import

    CR Artifact Lifecycle Rule can be imported using the id, e.g.

    $ pulumi import alicloud:cr/artifactLifecycleRule:ArtifactLifecycleRule example <instance_id>:<artifact_lifecycle_rule_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Viewing docs for Alibaba Cloud v3.105.0
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial