1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. TcrTagRetentionRule
Viewing docs for tencentcloud 1.82.73
published on Friday, Mar 6, 2026 by tencentcloudstack
tencentcloud logo
Viewing docs for tencentcloud 1.82.73
published on Friday, Mar 6, 2026 by tencentcloudstack

    Provides a resource to create a TCR tag retention rule.

    Example Usage

    Create and enable a tcr tag retention rule instance

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.TcrInstance("example", {
        name: "tf-example",
        instanceType: "standard",
        deleteBucket: true,
        tags: {
            createdBy: "Terraform",
        },
    });
    const exampleTcrNamespace = new tencentcloud.TcrNamespace("example", {
        instanceId: example.tcrInstanceId,
        name: "tf_example",
        severity: "medium",
    });
    const exampleTcrTagRetentionRule = new tencentcloud.TcrTagRetentionRule("example", {
        registryId: example.tcrInstanceId,
        namespaceName: exampleTcrNamespace.name,
        advancedRuleItems: [{
            repositoryFilter: {
                decoration: "repoMatches",
                pattern: "**",
            },
            retentionPolicy: {
                key: "nDaysSinceLastPush",
                value: 2,
            },
            tagFilter: {
                decoration: "matches",
                pattern: "**",
            },
        }],
        cronSetting: "daily",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.TcrInstance("example",
        name="tf-example",
        instance_type="standard",
        delete_bucket=True,
        tags={
            "createdBy": "Terraform",
        })
    example_tcr_namespace = tencentcloud.TcrNamespace("example",
        instance_id=example.tcr_instance_id,
        name="tf_example",
        severity="medium")
    example_tcr_tag_retention_rule = tencentcloud.TcrTagRetentionRule("example",
        registry_id=example.tcr_instance_id,
        namespace_name=example_tcr_namespace.name,
        advanced_rule_items=[{
            "repository_filter": {
                "decoration": "repoMatches",
                "pattern": "**",
            },
            "retention_policy": {
                "key": "nDaysSinceLastPush",
                "value": 2,
            },
            "tag_filter": {
                "decoration": "matches",
                "pattern": "**",
            },
        }],
        cron_setting="daily")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := tencentcloud.NewTcrInstance(ctx, "example", &tencentcloud.TcrInstanceArgs{
    			Name:         pulumi.String("tf-example"),
    			InstanceType: pulumi.String("standard"),
    			DeleteBucket: pulumi.Bool(true),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("Terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleTcrNamespace, err := tencentcloud.NewTcrNamespace(ctx, "example", &tencentcloud.TcrNamespaceArgs{
    			InstanceId: example.TcrInstanceId,
    			Name:       pulumi.String("tf_example"),
    			Severity:   pulumi.String("medium"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewTcrTagRetentionRule(ctx, "example", &tencentcloud.TcrTagRetentionRuleArgs{
    			RegistryId:    example.TcrInstanceId,
    			NamespaceName: exampleTcrNamespace.Name,
    			AdvancedRuleItems: tencentcloud.TcrTagRetentionRuleAdvancedRuleItemArray{
    				&tencentcloud.TcrTagRetentionRuleAdvancedRuleItemArgs{
    					RepositoryFilter: &tencentcloud.TcrTagRetentionRuleAdvancedRuleItemRepositoryFilterArgs{
    						Decoration: pulumi.String("repoMatches"),
    						Pattern:    pulumi.String("**"),
    					},
    					RetentionPolicy: &tencentcloud.TcrTagRetentionRuleAdvancedRuleItemRetentionPolicyArgs{
    						Key:   pulumi.String("nDaysSinceLastPush"),
    						Value: pulumi.Float64(2),
    					},
    					TagFilter: &tencentcloud.TcrTagRetentionRuleAdvancedRuleItemTagFilterArgs{
    						Decoration: pulumi.String("matches"),
    						Pattern:    pulumi.String("**"),
    					},
    				},
    			},
    			CronSetting: pulumi.String("daily"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.TcrInstance("example", new()
        {
            Name = "tf-example",
            InstanceType = "standard",
            DeleteBucket = true,
            Tags = 
            {
                { "createdBy", "Terraform" },
            },
        });
    
        var exampleTcrNamespace = new Tencentcloud.TcrNamespace("example", new()
        {
            InstanceId = example.TcrInstanceId,
            Name = "tf_example",
            Severity = "medium",
        });
    
        var exampleTcrTagRetentionRule = new Tencentcloud.TcrTagRetentionRule("example", new()
        {
            RegistryId = example.TcrInstanceId,
            NamespaceName = exampleTcrNamespace.Name,
            AdvancedRuleItems = new[]
            {
                new Tencentcloud.Inputs.TcrTagRetentionRuleAdvancedRuleItemArgs
                {
                    RepositoryFilter = new Tencentcloud.Inputs.TcrTagRetentionRuleAdvancedRuleItemRepositoryFilterArgs
                    {
                        Decoration = "repoMatches",
                        Pattern = "**",
                    },
                    RetentionPolicy = new Tencentcloud.Inputs.TcrTagRetentionRuleAdvancedRuleItemRetentionPolicyArgs
                    {
                        Key = "nDaysSinceLastPush",
                        Value = 2,
                    },
                    TagFilter = new Tencentcloud.Inputs.TcrTagRetentionRuleAdvancedRuleItemTagFilterArgs
                    {
                        Decoration = "matches",
                        Pattern = "**",
                    },
                },
            },
            CronSetting = "daily",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TcrInstance;
    import com.pulumi.tencentcloud.TcrInstanceArgs;
    import com.pulumi.tencentcloud.TcrNamespace;
    import com.pulumi.tencentcloud.TcrNamespaceArgs;
    import com.pulumi.tencentcloud.TcrTagRetentionRule;
    import com.pulumi.tencentcloud.TcrTagRetentionRuleArgs;
    import com.pulumi.tencentcloud.inputs.TcrTagRetentionRuleAdvancedRuleItemArgs;
    import com.pulumi.tencentcloud.inputs.TcrTagRetentionRuleAdvancedRuleItemRepositoryFilterArgs;
    import com.pulumi.tencentcloud.inputs.TcrTagRetentionRuleAdvancedRuleItemRetentionPolicyArgs;
    import com.pulumi.tencentcloud.inputs.TcrTagRetentionRuleAdvancedRuleItemTagFilterArgs;
    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) {
            var example = new TcrInstance("example", TcrInstanceArgs.builder()
                .name("tf-example")
                .instanceType("standard")
                .deleteBucket(true)
                .tags(Map.of("createdBy", "Terraform"))
                .build());
    
            var exampleTcrNamespace = new TcrNamespace("exampleTcrNamespace", TcrNamespaceArgs.builder()
                .instanceId(example.tcrInstanceId())
                .name("tf_example")
                .severity("medium")
                .build());
    
            var exampleTcrTagRetentionRule = new TcrTagRetentionRule("exampleTcrTagRetentionRule", TcrTagRetentionRuleArgs.builder()
                .registryId(example.tcrInstanceId())
                .namespaceName(exampleTcrNamespace.name())
                .advancedRuleItems(TcrTagRetentionRuleAdvancedRuleItemArgs.builder()
                    .repositoryFilter(TcrTagRetentionRuleAdvancedRuleItemRepositoryFilterArgs.builder()
                        .decoration("repoMatches")
                        .pattern("**")
                        .build())
                    .retentionPolicy(TcrTagRetentionRuleAdvancedRuleItemRetentionPolicyArgs.builder()
                        .key("nDaysSinceLastPush")
                        .value(2.0)
                        .build())
                    .tagFilter(TcrTagRetentionRuleAdvancedRuleItemTagFilterArgs.builder()
                        .decoration("matches")
                        .pattern("**")
                        .build())
                    .build())
                .cronSetting("daily")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:TcrInstance
        properties:
          name: tf-example
          instanceType: standard
          deleteBucket: true
          tags:
            createdBy: Terraform
      exampleTcrNamespace:
        type: tencentcloud:TcrNamespace
        name: example
        properties:
          instanceId: ${example.tcrInstanceId}
          name: tf_example
          severity: medium
      exampleTcrTagRetentionRule:
        type: tencentcloud:TcrTagRetentionRule
        name: example
        properties:
          registryId: ${example.tcrInstanceId}
          namespaceName: ${exampleTcrNamespace.name}
          advancedRuleItems:
            - repositoryFilter:
                decoration: repoMatches
                pattern: '**'
              retentionPolicy:
                key: nDaysSinceLastPush
                value: 2
              tagFilter:
                decoration: matches
                pattern: '**'
          cronSetting: daily
    

    Create TcrTagRetentionRule Resource

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

    Constructor syntax

    new TcrTagRetentionRule(name: string, args: TcrTagRetentionRuleArgs, opts?: CustomResourceOptions);
    @overload
    def TcrTagRetentionRule(resource_name: str,
                            args: TcrTagRetentionRuleArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def TcrTagRetentionRule(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            cron_setting: Optional[str] = None,
                            namespace_name: Optional[str] = None,
                            registry_id: Optional[str] = None,
                            advanced_rule_items: Optional[Sequence[TcrTagRetentionRuleAdvancedRuleItemArgs]] = None,
                            disabled: Optional[bool] = None,
                            retention_rule: Optional[TcrTagRetentionRuleRetentionRuleArgs] = None,
                            tcr_tag_retention_rule_id: Optional[str] = None)
    func NewTcrTagRetentionRule(ctx *Context, name string, args TcrTagRetentionRuleArgs, opts ...ResourceOption) (*TcrTagRetentionRule, error)
    public TcrTagRetentionRule(string name, TcrTagRetentionRuleArgs args, CustomResourceOptions? opts = null)
    public TcrTagRetentionRule(String name, TcrTagRetentionRuleArgs args)
    public TcrTagRetentionRule(String name, TcrTagRetentionRuleArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TcrTagRetentionRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TcrTagRetentionRuleArgs
    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 TcrTagRetentionRuleArgs
    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 TcrTagRetentionRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TcrTagRetentionRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TcrTagRetentionRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TcrTagRetentionRule 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 TcrTagRetentionRule resource accepts the following input properties:

    CronSetting string
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    NamespaceName string
    The Name of the namespace.
    RegistryId string
    The main instance ID.
    AdvancedRuleItems List<TcrTagRetentionRuleAdvancedRuleItem>
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    Disabled bool
    Whether to disable the rule, with the default value of false.
    RetentionRule TcrTagRetentionRuleRetentionRule
    Retention Policy.
    TcrTagRetentionRuleId string
    ID of the resource.
    CronSetting string
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    NamespaceName string
    The Name of the namespace.
    RegistryId string
    The main instance ID.
    AdvancedRuleItems []TcrTagRetentionRuleAdvancedRuleItemArgs
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    Disabled bool
    Whether to disable the rule, with the default value of false.
    RetentionRule TcrTagRetentionRuleRetentionRuleArgs
    Retention Policy.
    TcrTagRetentionRuleId string
    ID of the resource.
    cronSetting String
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    namespaceName String
    The Name of the namespace.
    registryId String
    The main instance ID.
    advancedRuleItems List<TcrTagRetentionRuleAdvancedRuleItem>
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    disabled Boolean
    Whether to disable the rule, with the default value of false.
    retentionRule TcrTagRetentionRuleRetentionRule
    Retention Policy.
    tcrTagRetentionRuleId String
    ID of the resource.
    cronSetting string
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    namespaceName string
    The Name of the namespace.
    registryId string
    The main instance ID.
    advancedRuleItems TcrTagRetentionRuleAdvancedRuleItem[]
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    disabled boolean
    Whether to disable the rule, with the default value of false.
    retentionRule TcrTagRetentionRuleRetentionRule
    Retention Policy.
    tcrTagRetentionRuleId string
    ID of the resource.
    cron_setting str
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    namespace_name str
    The Name of the namespace.
    registry_id str
    The main instance ID.
    advanced_rule_items Sequence[TcrTagRetentionRuleAdvancedRuleItemArgs]
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    disabled bool
    Whether to disable the rule, with the default value of false.
    retention_rule TcrTagRetentionRuleRetentionRuleArgs
    Retention Policy.
    tcr_tag_retention_rule_id str
    ID of the resource.
    cronSetting String
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    namespaceName String
    The Name of the namespace.
    registryId String
    The main instance ID.
    advancedRuleItems List<Property Map>
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    disabled Boolean
    Whether to disable the rule, with the default value of false.
    retentionRule Property Map
    Retention Policy.
    tcrTagRetentionRuleId String
    ID of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RetentionId double
    The ID of the retention task.
    Id string
    The provider-assigned unique ID for this managed resource.
    RetentionId float64
    The ID of the retention task.
    id String
    The provider-assigned unique ID for this managed resource.
    retentionId Double
    The ID of the retention task.
    id string
    The provider-assigned unique ID for this managed resource.
    retentionId number
    The ID of the retention task.
    id str
    The provider-assigned unique ID for this managed resource.
    retention_id float
    The ID of the retention task.
    id String
    The provider-assigned unique ID for this managed resource.
    retentionId Number
    The ID of the retention task.

    Look up Existing TcrTagRetentionRule Resource

    Get an existing TcrTagRetentionRule 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?: TcrTagRetentionRuleState, opts?: CustomResourceOptions): TcrTagRetentionRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            advanced_rule_items: Optional[Sequence[TcrTagRetentionRuleAdvancedRuleItemArgs]] = None,
            cron_setting: Optional[str] = None,
            disabled: Optional[bool] = None,
            namespace_name: Optional[str] = None,
            registry_id: Optional[str] = None,
            retention_id: Optional[float] = None,
            retention_rule: Optional[TcrTagRetentionRuleRetentionRuleArgs] = None,
            tcr_tag_retention_rule_id: Optional[str] = None) -> TcrTagRetentionRule
    func GetTcrTagRetentionRule(ctx *Context, name string, id IDInput, state *TcrTagRetentionRuleState, opts ...ResourceOption) (*TcrTagRetentionRule, error)
    public static TcrTagRetentionRule Get(string name, Input<string> id, TcrTagRetentionRuleState? state, CustomResourceOptions? opts = null)
    public static TcrTagRetentionRule get(String name, Output<String> id, TcrTagRetentionRuleState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TcrTagRetentionRule    get:      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:
    AdvancedRuleItems List<TcrTagRetentionRuleAdvancedRuleItem>
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    CronSetting string
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    Disabled bool
    Whether to disable the rule, with the default value of false.
    NamespaceName string
    The Name of the namespace.
    RegistryId string
    The main instance ID.
    RetentionId double
    The ID of the retention task.
    RetentionRule TcrTagRetentionRuleRetentionRule
    Retention Policy.
    TcrTagRetentionRuleId string
    ID of the resource.
    AdvancedRuleItems []TcrTagRetentionRuleAdvancedRuleItemArgs
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    CronSetting string
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    Disabled bool
    Whether to disable the rule, with the default value of false.
    NamespaceName string
    The Name of the namespace.
    RegistryId string
    The main instance ID.
    RetentionId float64
    The ID of the retention task.
    RetentionRule TcrTagRetentionRuleRetentionRuleArgs
    Retention Policy.
    TcrTagRetentionRuleId string
    ID of the resource.
    advancedRuleItems List<TcrTagRetentionRuleAdvancedRuleItem>
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    cronSetting String
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    disabled Boolean
    Whether to disable the rule, with the default value of false.
    namespaceName String
    The Name of the namespace.
    registryId String
    The main instance ID.
    retentionId Double
    The ID of the retention task.
    retentionRule TcrTagRetentionRuleRetentionRule
    Retention Policy.
    tcrTagRetentionRuleId String
    ID of the resource.
    advancedRuleItems TcrTagRetentionRuleAdvancedRuleItem[]
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    cronSetting string
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    disabled boolean
    Whether to disable the rule, with the default value of false.
    namespaceName string
    The Name of the namespace.
    registryId string
    The main instance ID.
    retentionId number
    The ID of the retention task.
    retentionRule TcrTagRetentionRuleRetentionRule
    Retention Policy.
    tcrTagRetentionRuleId string
    ID of the resource.
    advanced_rule_items Sequence[TcrTagRetentionRuleAdvancedRuleItemArgs]
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    cron_setting str
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    disabled bool
    Whether to disable the rule, with the default value of false.
    namespace_name str
    The Name of the namespace.
    registry_id str
    The main instance ID.
    retention_id float
    The ID of the retention task.
    retention_rule TcrTagRetentionRuleRetentionRuleArgs
    Retention Policy.
    tcr_tag_retention_rule_id str
    ID of the resource.
    advancedRuleItems List<Property Map>
    The advanced retention policy takes precedence; when both the basic and advanced retention policies are configured, the advanced retention policy will be used.
    cronSetting String
    Execution cycle, currently only available selections are: manual; daily; weekly; monthly.
    disabled Boolean
    Whether to disable the rule, with the default value of false.
    namespaceName String
    The Name of the namespace.
    registryId String
    The main instance ID.
    retentionId Number
    The ID of the retention task.
    retentionRule Property Map
    Retention Policy.
    tcrTagRetentionRuleId String
    ID of the resource.

    Supporting Types

    TcrTagRetentionRuleAdvancedRuleItem, TcrTagRetentionRuleAdvancedRuleItemArgs

    repositoryFilter Property Map
    Warehouse filter.
    retentionPolicy Property Map
    Version retention rules.
    tagFilter Property Map
    Tag filter.

    TcrTagRetentionRuleAdvancedRuleItemRepositoryFilter, TcrTagRetentionRuleAdvancedRuleItemRepositoryFilterArgs

    Decoration string
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    Pattern string
    Filter expression.
    Decoration string
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    Pattern string
    Filter expression.
    decoration String
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    pattern String
    Filter expression.
    decoration string
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    pattern string
    Filter expression.
    decoration str
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    pattern str
    Filter expression.
    decoration String
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    pattern String
    Filter expression.

    TcrTagRetentionRuleAdvancedRuleItemRetentionPolicy, TcrTagRetentionRuleAdvancedRuleItemRetentionPolicyArgs

    Key string
    Supported strategies, with possible values: latestPushedK (retain the latest K pushed versions), nDaysSinceLastPush (retain versions pushed within the last n days).
    Value double
    Corresponding values under the rule settings.
    Key string
    Supported strategies, with possible values: latestPushedK (retain the latest K pushed versions), nDaysSinceLastPush (retain versions pushed within the last n days).
    Value float64
    Corresponding values under the rule settings.
    key String
    Supported strategies, with possible values: latestPushedK (retain the latest K pushed versions), nDaysSinceLastPush (retain versions pushed within the last n days).
    value Double
    Corresponding values under the rule settings.
    key string
    Supported strategies, with possible values: latestPushedK (retain the latest K pushed versions), nDaysSinceLastPush (retain versions pushed within the last n days).
    value number
    Corresponding values under the rule settings.
    key str
    Supported strategies, with possible values: latestPushedK (retain the latest K pushed versions), nDaysSinceLastPush (retain versions pushed within the last n days).
    value float
    Corresponding values under the rule settings.
    key String
    Supported strategies, with possible values: latestPushedK (retain the latest K pushed versions), nDaysSinceLastPush (retain versions pushed within the last n days).
    value Number
    Corresponding values under the rule settings.

    TcrTagRetentionRuleAdvancedRuleItemTagFilter, TcrTagRetentionRuleAdvancedRuleItemTagFilterArgs

    Decoration string
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    Pattern string
    Filter expression.
    Decoration string
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    Pattern string
    Filter expression.
    decoration String
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    pattern String
    Filter expression.
    decoration string
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    pattern string
    Filter expression.
    decoration str
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    pattern str
    Filter expression.
    decoration String
    Filter rule types: In tag filtering, the available options are matches (match) and excludes (exclude). In repository filtering, the available options are repoMatches (repository match) and repoExcludes (repository exclude).
    pattern String
    Filter expression.

    TcrTagRetentionRuleRetentionRule, TcrTagRetentionRuleRetentionRuleArgs

    Key string
    The supported policies are latestPushedK (retain the latest k pushed versions) and nDaysSinceLastPush (retain pushed versions within the last n days).
    Value double
    corresponding values for rule settings.
    Key string
    The supported policies are latestPushedK (retain the latest k pushed versions) and nDaysSinceLastPush (retain pushed versions within the last n days).
    Value float64
    corresponding values for rule settings.
    key String
    The supported policies are latestPushedK (retain the latest k pushed versions) and nDaysSinceLastPush (retain pushed versions within the last n days).
    value Double
    corresponding values for rule settings.
    key string
    The supported policies are latestPushedK (retain the latest k pushed versions) and nDaysSinceLastPush (retain pushed versions within the last n days).
    value number
    corresponding values for rule settings.
    key str
    The supported policies are latestPushedK (retain the latest k pushed versions) and nDaysSinceLastPush (retain pushed versions within the last n days).
    value float
    corresponding values for rule settings.
    key String
    The supported policies are latestPushedK (retain the latest k pushed versions) and nDaysSinceLastPush (retain pushed versions within the last n days).
    value Number
    corresponding values for rule settings.

    Import

    TCR tag retention rule can be imported using the registryId#namespaceName#retentionId, e.g.

    $ pulumi import tencentcloud:index/tcrTagRetentionRule:TcrTagRetentionRule example tcr-s1jud21h#tf_example#3
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    Viewing docs for tencentcloud 1.82.73
    published on Friday, Mar 6, 2026 by tencentcloudstack
      Try Pulumi Cloud free. Your team will thank you.