1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. cr
  6. ArtifactSubscriptionRule
Viewing docs for Alibaba Cloud v3.106.0
published on Monday, Aug 24, 2026 by Pulumi
alicloud logo alicloud logo
Viewing docs for Alibaba Cloud v3.106.0
published on Monday, Aug 24, 2026 by Pulumi

    Provides a cr Artifact Subscription Rule resource.

    Artifact subscription rule.

    For information about cr Artifact Subscription Rule and how to use it, see What is Artifact Subscription Rule.

    NOTE: Available since v1.287.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = new alicloud.cr.RegistryEnterpriseInstance("example", {
        defaultOssBucket: "true",
        instanceName: "tf-demo-cr-instance",
        renewalStatus: "ManualRenewal",
        imageScanner: "DISABLE",
        period: 1,
        paymentType: "Subscription",
        instanceType: "Economy",
    });
    const exampleRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("example", {
        instanceId: example.id,
        name: "tf-demo-cr-namespace",
        autoCreate: false,
        defaultVisibility: "PRIVATE",
    });
    const exampleRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("example", {
        instanceId: example.id,
        namespace: exampleRegistryEnterpriseNamespace.name,
        name: "tf-demo-cr-repo",
        repoType: "PRIVATE",
        summary: "demo repository",
    });
    const exampleArtifactSubscriptionRule = new alicloud.cr.ArtifactSubscriptionRule("example", {
        instanceId: example.id,
        sourceProvider: "DOCKER_HUB",
        sourceNamespaceName: "library",
        sourceRepoName: "alpine",
        namespaceName: exampleRegistryEnterpriseNamespace.name,
        repoName: exampleRegistryEnterpriseRepo.name,
        tagRegexp: ".*",
        tagCount: 10,
        override: true,
        accelerate: false,
        platforms: [
            "linux/amd64",
            "linux/arm64",
        ],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.cr.RegistryEnterpriseInstance("example",
        default_oss_bucket="true",
        instance_name="tf-demo-cr-instance",
        renewal_status="ManualRenewal",
        image_scanner="DISABLE",
        period=1,
        payment_type="Subscription",
        instance_type="Economy")
    example_registry_enterprise_namespace = alicloud.cs.RegistryEnterpriseNamespace("example",
        instance_id=example.id,
        name="tf-demo-cr-namespace",
        auto_create=False,
        default_visibility="PRIVATE")
    example_registry_enterprise_repo = alicloud.cs.RegistryEnterpriseRepo("example",
        instance_id=example.id,
        namespace=example_registry_enterprise_namespace.name,
        name="tf-demo-cr-repo",
        repo_type="PRIVATE",
        summary="demo repository")
    example_artifact_subscription_rule = alicloud.cr.ArtifactSubscriptionRule("example",
        instance_id=example.id,
        source_provider="DOCKER_HUB",
        source_namespace_name="library",
        source_repo_name="alpine",
        namespace_name=example_registry_enterprise_namespace.name,
        repo_name=example_registry_enterprise_repo.name,
        tag_regexp=".*",
        tag_count=10,
        override=True,
        accelerate=False,
        platforms=[
            "linux/amd64",
            "linux/arm64",
        ])
    
    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"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := cr.NewRegistryEnterpriseInstance(ctx, "example", &cr.RegistryEnterpriseInstanceArgs{
    			DefaultOssBucket: pulumi.String("true"),
    			InstanceName:     pulumi.String("tf-demo-cr-instance"),
    			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
    		}
    		exampleRegistryEnterpriseNamespace, err := cs.NewRegistryEnterpriseNamespace(ctx, "example", &cs.RegistryEnterpriseNamespaceArgs{
    			InstanceId:        example.ID().ToIDOutput().ToStringOutput(),
    			Name:              pulumi.String("tf-demo-cr-namespace"),
    			AutoCreate:        pulumi.Bool(false),
    			DefaultVisibility: pulumi.String("PRIVATE"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleRegistryEnterpriseRepo, err := cs.NewRegistryEnterpriseRepo(ctx, "example", &cs.RegistryEnterpriseRepoArgs{
    			InstanceId: example.ID().ToIDOutput().ToStringOutput(),
    			Namespace:  exampleRegistryEnterpriseNamespace.Name,
    			Name:       pulumi.String("tf-demo-cr-repo"),
    			RepoType:   pulumi.String("PRIVATE"),
    			Summary:    pulumi.String("demo repository"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cr.NewArtifactSubscriptionRule(ctx, "example", &cr.ArtifactSubscriptionRuleArgs{
    			InstanceId:          example.ID().ToIDOutput().ToStringOutput(),
    			SourceProvider:      pulumi.String("DOCKER_HUB"),
    			SourceNamespaceName: pulumi.String("library"),
    			SourceRepoName:      pulumi.String("alpine"),
    			NamespaceName:       exampleRegistryEnterpriseNamespace.Name,
    			RepoName:            exampleRegistryEnterpriseRepo.Name,
    			TagRegexp:           pulumi.String(".*"),
    			TagCount:            pulumi.Int(10),
    			Override:            pulumi.Bool(true),
    			Accelerate:          pulumi.Bool(false),
    			Platforms: pulumi.StringArray{
    				pulumi.String("linux/amd64"),
    				pulumi.String("linux/arm64"),
    			},
    		})
    		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 example = new AliCloud.CR.RegistryEnterpriseInstance("example", new()
        {
            DefaultOssBucket = "true",
            InstanceName = "tf-demo-cr-instance",
            RenewalStatus = "ManualRenewal",
            ImageScanner = "DISABLE",
            Period = 1,
            PaymentType = "Subscription",
            InstanceType = "Economy",
        });
    
        var exampleRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("example", new()
        {
            InstanceId = example.Id,
            Name = "tf-demo-cr-namespace",
            AutoCreate = false,
            DefaultVisibility = "PRIVATE",
        });
    
        var exampleRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("example", new()
        {
            InstanceId = example.Id,
            Namespace = exampleRegistryEnterpriseNamespace.Name,
            Name = "tf-demo-cr-repo",
            RepoType = "PRIVATE",
            Summary = "demo repository",
        });
    
        var exampleArtifactSubscriptionRule = new AliCloud.CR.ArtifactSubscriptionRule("example", new()
        {
            InstanceId = example.Id,
            SourceProvider = "DOCKER_HUB",
            SourceNamespaceName = "library",
            SourceRepoName = "alpine",
            NamespaceName = exampleRegistryEnterpriseNamespace.Name,
            RepoName = exampleRegistryEnterpriseRepo.Name,
            TagRegexp = ".*",
            TagCount = 10,
            Override = true,
            Accelerate = false,
            Platforms = new[]
            {
                "linux/amd64",
                "linux/arm64",
            },
        });
    
    });
    
    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.ArtifactSubscriptionRule;
    import com.pulumi.alicloud.cr.ArtifactSubscriptionRuleArgs;
    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) {
            var example = new RegistryEnterpriseInstance("example", RegistryEnterpriseInstanceArgs.builder()
                .defaultOssBucket("true")
                .instanceName("tf-demo-cr-instance")
                .renewalStatus("ManualRenewal")
                .imageScanner("DISABLE")
                .period(1)
                .paymentType("Subscription")
                .instanceType("Economy")
                .build());
    
            var exampleRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("exampleRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()
                .instanceId(example.id())
                .name("tf-demo-cr-namespace")
                .autoCreate(false)
                .defaultVisibility("PRIVATE")
                .build());
    
            var exampleRegistryEnterpriseRepo = new RegistryEnterpriseRepo("exampleRegistryEnterpriseRepo", RegistryEnterpriseRepoArgs.builder()
                .instanceId(example.id())
                .namespace(exampleRegistryEnterpriseNamespace.name())
                .name("tf-demo-cr-repo")
                .repoType("PRIVATE")
                .summary("demo repository")
                .build());
    
            var exampleArtifactSubscriptionRule = new ArtifactSubscriptionRule("exampleArtifactSubscriptionRule", ArtifactSubscriptionRuleArgs.builder()
                .instanceId(example.id())
                .sourceProvider("DOCKER_HUB")
                .sourceNamespaceName("library")
                .sourceRepoName("alpine")
                .namespaceName(exampleRegistryEnterpriseNamespace.name())
                .repoName(exampleRegistryEnterpriseRepo.name())
                .tagRegexp(".*")
                .tagCount(10)
                .override(true)
                .accelerate(false)
                .platforms(            
                    "linux/amd64",
                    "linux/arm64")
                .build());
    
        }
    }
    
    resources:
      example:
        type: alicloud:cr:RegistryEnterpriseInstance
        properties:
          defaultOssBucket: 'true'
          instanceName: tf-demo-cr-instance
          renewalStatus: ManualRenewal
          imageScanner: DISABLE
          period: '1'
          paymentType: Subscription
          instanceType: Economy
      exampleRegistryEnterpriseNamespace:
        type: alicloud:cs:RegistryEnterpriseNamespace
        name: example
        properties:
          instanceId: ${example.id}
          name: tf-demo-cr-namespace
          autoCreate: false
          defaultVisibility: PRIVATE
      exampleRegistryEnterpriseRepo:
        type: alicloud:cs:RegistryEnterpriseRepo
        name: example
        properties:
          instanceId: ${example.id}
          namespace: ${exampleRegistryEnterpriseNamespace.name}
          name: tf-demo-cr-repo
          repoType: PRIVATE
          summary: demo repository
      exampleArtifactSubscriptionRule:
        type: alicloud:cr:ArtifactSubscriptionRule
        name: example
        properties:
          instanceId: ${example.id}
          sourceProvider: DOCKER_HUB
          sourceNamespaceName: library
          sourceRepoName: alpine
          namespaceName: ${exampleRegistryEnterpriseNamespace.name}
          repoName: ${exampleRegistryEnterpriseRepo.name}
          tagRegexp: .*
          tagCount: 10
          override: true
          accelerate: false
          platforms:
            - linux/amd64
            - linux/arm64
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    resource "alicloud_cr_registryenterpriseinstance" "example" {
      default_oss_bucket = "true"
      instance_name      = "tf-demo-cr-instance"
      renewal_status     = "ManualRenewal"
      image_scanner      = "DISABLE"
      period             = "1"
      payment_type       = "Subscription"
      instance_type      = "Economy"
    }
    resource "alicloud_cs_registryenterprisenamespace" "example" {
      instance_id        = alicloud_cr_registryenterpriseinstance.example.id
      name               = "tf-demo-cr-namespace"
      auto_create        = false
      default_visibility = "PRIVATE"
    }
    resource "alicloud_cs_registryenterpriserepo" "example" {
      instance_id = alicloud_cr_registryenterpriseinstance.example.id
      namespace   = alicloud_cs_registryenterprisenamespace.example.name
      name        = "tf-demo-cr-repo"
      repo_type   = "PRIVATE"
      summary     = "demo repository"
    }
    resource "alicloud_cr_artifactsubscriptionrule" "example" {
      instance_id           = alicloud_cr_registryenterpriseinstance.example.id
      source_provider       = "DOCKER_HUB"
      source_namespace_name = "library"
      source_repo_name      = "alpine"
      namespace_name        = alicloud_cs_registryenterprisenamespace.example.name
      repo_name             = alicloud_cs_registryenterpriserepo.example.name
      tag_regexp            = ".*"
      tag_count             = 10
      override              = true
      accelerate            = false
      platforms             = ["linux/amd64", "linux/arm64"]
    }
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create ArtifactSubscriptionRule Resource

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

    Constructor syntax

    new ArtifactSubscriptionRule(name: string, args: ArtifactSubscriptionRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ArtifactSubscriptionRule(resource_name: str,
                                 args: ArtifactSubscriptionRuleArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ArtifactSubscriptionRule(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 instance_id: Optional[str] = None,
                                 namespace_name: Optional[str] = None,
                                 platforms: Optional[Sequence[str]] = None,
                                 repo_name: Optional[str] = None,
                                 source_provider: Optional[str] = None,
                                 source_repo_name: Optional[str] = None,
                                 tag_count: Optional[int] = None,
                                 tag_regexp: Optional[str] = None,
                                 accelerate: Optional[bool] = None,
                                 override: Optional[bool] = None,
                                 source_namespace_name: Optional[str] = None)
    func NewArtifactSubscriptionRule(ctx *Context, name string, args ArtifactSubscriptionRuleArgs, opts ...ResourceOption) (*ArtifactSubscriptionRule, error)
    public ArtifactSubscriptionRule(string name, ArtifactSubscriptionRuleArgs args, CustomResourceOptions? opts = null)
    public ArtifactSubscriptionRule(String name, ArtifactSubscriptionRuleArgs args)
    public ArtifactSubscriptionRule(String name, ArtifactSubscriptionRuleArgs args, CustomResourceOptions options)
    
    type: alicloud:cr:ArtifactSubscriptionRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "alicloud_cr_artifact_subscription_rule" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ArtifactSubscriptionRuleArgs
    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 ArtifactSubscriptionRuleArgs
    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 ArtifactSubscriptionRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ArtifactSubscriptionRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ArtifactSubscriptionRuleArgs
    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 artifactSubscriptionRuleResource = new AliCloud.CR.ArtifactSubscriptionRule("artifactSubscriptionRuleResource", new()
    {
        InstanceId = "string",
        NamespaceName = "string",
        Platforms = new[]
        {
            "string",
        },
        RepoName = "string",
        SourceProvider = "string",
        SourceRepoName = "string",
        TagCount = 0,
        TagRegexp = "string",
        Accelerate = false,
        Override = false,
        SourceNamespaceName = "string",
    });
    
    example, err := cr.NewArtifactSubscriptionRule(ctx, "artifactSubscriptionRuleResource", &cr.ArtifactSubscriptionRuleArgs{
    	InstanceId:    pulumi.String("string"),
    	NamespaceName: pulumi.String("string"),
    	Platforms: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RepoName:            pulumi.String("string"),
    	SourceProvider:      pulumi.String("string"),
    	SourceRepoName:      pulumi.String("string"),
    	TagCount:            pulumi.Int(0),
    	TagRegexp:           pulumi.String("string"),
    	Accelerate:          pulumi.Bool(false),
    	Override:            pulumi.Bool(false),
    	SourceNamespaceName: pulumi.String("string"),
    })
    
    resource "alicloud_cr_artifact_subscription_rule" "artifactSubscriptionRuleResource" {
      lifecycle {
        create_before_destroy = true
      }
      instance_id           = "string"
      namespace_name        = "string"
      platforms             = ["string"]
      repo_name             = "string"
      source_provider       = "string"
      source_repo_name      = "string"
      tag_count             = 0
      tag_regexp            = "string"
      accelerate            = false
      override              = false
      source_namespace_name = "string"
    }
    
    var artifactSubscriptionRuleResource = new ArtifactSubscriptionRule("artifactSubscriptionRuleResource", ArtifactSubscriptionRuleArgs.builder()
        .instanceId("string")
        .namespaceName("string")
        .platforms("string")
        .repoName("string")
        .sourceProvider("string")
        .sourceRepoName("string")
        .tagCount(0)
        .tagRegexp("string")
        .accelerate(false)
        .override(false)
        .sourceNamespaceName("string")
        .build());
    
    artifact_subscription_rule_resource = alicloud.cr.ArtifactSubscriptionRule("artifactSubscriptionRuleResource",
        instance_id="string",
        namespace_name="string",
        platforms=["string"],
        repo_name="string",
        source_provider="string",
        source_repo_name="string",
        tag_count=0,
        tag_regexp="string",
        accelerate=False,
        override=False,
        source_namespace_name="string")
    
    const artifactSubscriptionRuleResource = new alicloud.cr.ArtifactSubscriptionRule("artifactSubscriptionRuleResource", {
        instanceId: "string",
        namespaceName: "string",
        platforms: ["string"],
        repoName: "string",
        sourceProvider: "string",
        sourceRepoName: "string",
        tagCount: 0,
        tagRegexp: "string",
        accelerate: false,
        override: false,
        sourceNamespaceName: "string",
    });
    
    type: alicloud:cr:ArtifactSubscriptionRule
    properties:
        accelerate: false
        instanceId: string
        namespaceName: string
        override: false
        platforms:
            - string
        repoName: string
        sourceNamespaceName: string
        sourceProvider: string
        sourceRepoName: string
        tagCount: 0
        tagRegexp: string
    

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

    InstanceId string
    Instance ID
    NamespaceName string
    Namespace name
    Platforms List<string>
    Subscription platform list
    RepoName string
    Repository name
    SourceProvider string
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    SourceRepoName string
    Source repository name
    TagCount int
    Number of tags to subscribe
    TagRegexp string
    Regular expression for subscribing tags
    Accelerate bool
    Whether to enable acceleration
    Override bool
    Whether to override existing tags
    SourceNamespaceName string
    Source namespace name
    InstanceId string
    Instance ID
    NamespaceName string
    Namespace name
    Platforms []string
    Subscription platform list
    RepoName string
    Repository name
    SourceProvider string
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    SourceRepoName string
    Source repository name
    TagCount int
    Number of tags to subscribe
    TagRegexp string
    Regular expression for subscribing tags
    Accelerate bool
    Whether to enable acceleration
    Override bool
    Whether to override existing tags
    SourceNamespaceName string
    Source namespace name
    instance_id string
    Instance ID
    namespace_name string
    Namespace name
    platforms list(string)
    Subscription platform list
    repo_name string
    Repository name
    source_provider string
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    source_repo_name string
    Source repository name
    tag_count number
    Number of tags to subscribe
    tag_regexp string
    Regular expression for subscribing tags
    accelerate bool
    Whether to enable acceleration
    override bool
    Whether to override existing tags
    source_namespace_name string
    Source namespace name
    instanceId String
    Instance ID
    namespaceName String
    Namespace name
    platforms List<String>
    Subscription platform list
    repoName String
    Repository name
    sourceProvider String
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    sourceRepoName String
    Source repository name
    tagCount Integer
    Number of tags to subscribe
    tagRegexp String
    Regular expression for subscribing tags
    accelerate Boolean
    Whether to enable acceleration
    override Boolean
    Whether to override existing tags
    sourceNamespaceName String
    Source namespace name
    instanceId string
    Instance ID
    namespaceName string
    Namespace name
    platforms string[]
    Subscription platform list
    repoName string
    Repository name
    sourceProvider string
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    sourceRepoName string
    Source repository name
    tagCount number
    Number of tags to subscribe
    tagRegexp string
    Regular expression for subscribing tags
    accelerate boolean
    Whether to enable acceleration
    override boolean
    Whether to override existing tags
    sourceNamespaceName string
    Source namespace name
    instance_id str
    Instance ID
    namespace_name str
    Namespace name
    platforms Sequence[str]
    Subscription platform list
    repo_name str
    Repository name
    source_provider str
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    source_repo_name str
    Source repository name
    tag_count int
    Number of tags to subscribe
    tag_regexp str
    Regular expression for subscribing tags
    accelerate bool
    Whether to enable acceleration
    override bool
    Whether to override existing tags
    source_namespace_name str
    Source namespace name
    instanceId String
    Instance ID
    namespaceName String
    Namespace name
    platforms List<String>
    Subscription platform list
    repoName String
    Repository name
    sourceProvider String
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    sourceRepoName String
    Source repository name
    tagCount Number
    Number of tags to subscribe
    tagRegexp String
    Regular expression for subscribing tags
    accelerate Boolean
    Whether to enable acceleration
    override Boolean
    Whether to override existing tags
    sourceNamespaceName String
    Source namespace name

    Outputs

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

    ArtifactSubscriptionRuleId string
    The first ID of the resource.
    CreateTime string
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedTime string
    Modification time.
    SourceDomain string
    Source domain.
    ArtifactSubscriptionRuleId string
    The first ID of the resource.
    CreateTime string
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedTime string
    Modification time.
    SourceDomain string
    Source domain.
    artifact_subscription_rule_id string
    The first ID of the resource.
    create_time string
    Creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    modified_time string
    Modification time.
    source_domain string
    Source domain.
    artifactSubscriptionRuleId String
    The first ID of the resource.
    createTime String
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedTime String
    Modification time.
    sourceDomain String
    Source domain.
    artifactSubscriptionRuleId string
    The first ID of the resource.
    createTime string
    Creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedTime string
    Modification time.
    sourceDomain string
    Source domain.
    artifact_subscription_rule_id str
    The first ID of the resource.
    create_time str
    Creation time.
    id str
    The provider-assigned unique ID for this managed resource.
    modified_time str
    Modification time.
    source_domain str
    Source domain.
    artifactSubscriptionRuleId String
    The first ID of the resource.
    createTime String
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedTime String
    Modification time.
    sourceDomain String
    Source domain.

    Look up Existing ArtifactSubscriptionRule Resource

    Get an existing ArtifactSubscriptionRule 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?: ArtifactSubscriptionRuleState, opts?: CustomResourceOptions): ArtifactSubscriptionRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accelerate: Optional[bool] = None,
            artifact_subscription_rule_id: Optional[str] = None,
            create_time: Optional[str] = None,
            instance_id: Optional[str] = None,
            modified_time: Optional[str] = None,
            namespace_name: Optional[str] = None,
            override: Optional[bool] = None,
            platforms: Optional[Sequence[str]] = None,
            repo_name: Optional[str] = None,
            source_domain: Optional[str] = None,
            source_namespace_name: Optional[str] = None,
            source_provider: Optional[str] = None,
            source_repo_name: Optional[str] = None,
            tag_count: Optional[int] = None,
            tag_regexp: Optional[str] = None) -> ArtifactSubscriptionRule
    func GetArtifactSubscriptionRule(ctx *Context, name string, id IDInput, state *ArtifactSubscriptionRuleState, opts ...ResourceOption) (*ArtifactSubscriptionRule, error)
    public static ArtifactSubscriptionRule Get(string name, Input<string> id, ArtifactSubscriptionRuleState? state, CustomResourceOptions? opts = null)
    public static ArtifactSubscriptionRule get(String name, Output<String> id, ArtifactSubscriptionRuleState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:cr:ArtifactSubscriptionRule    get:      id: ${id}
    import {
      to = alicloud_cr_artifact_subscription_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:
    Accelerate bool
    Whether to enable acceleration
    ArtifactSubscriptionRuleId string
    The first ID of the resource.
    CreateTime string
    Creation time.
    InstanceId string
    Instance ID
    ModifiedTime string
    Modification time.
    NamespaceName string
    Namespace name
    Override bool
    Whether to override existing tags
    Platforms List<string>
    Subscription platform list
    RepoName string
    Repository name
    SourceDomain string
    Source domain.
    SourceNamespaceName string
    Source namespace name
    SourceProvider string
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    SourceRepoName string
    Source repository name
    TagCount int
    Number of tags to subscribe
    TagRegexp string
    Regular expression for subscribing tags
    Accelerate bool
    Whether to enable acceleration
    ArtifactSubscriptionRuleId string
    The first ID of the resource.
    CreateTime string
    Creation time.
    InstanceId string
    Instance ID
    ModifiedTime string
    Modification time.
    NamespaceName string
    Namespace name
    Override bool
    Whether to override existing tags
    Platforms []string
    Subscription platform list
    RepoName string
    Repository name
    SourceDomain string
    Source domain.
    SourceNamespaceName string
    Source namespace name
    SourceProvider string
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    SourceRepoName string
    Source repository name
    TagCount int
    Number of tags to subscribe
    TagRegexp string
    Regular expression for subscribing tags
    accelerate bool
    Whether to enable acceleration
    artifact_subscription_rule_id string
    The first ID of the resource.
    create_time string
    Creation time.
    instance_id string
    Instance ID
    modified_time string
    Modification time.
    namespace_name string
    Namespace name
    override bool
    Whether to override existing tags
    platforms list(string)
    Subscription platform list
    repo_name string
    Repository name
    source_domain string
    Source domain.
    source_namespace_name string
    Source namespace name
    source_provider string
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    source_repo_name string
    Source repository name
    tag_count number
    Number of tags to subscribe
    tag_regexp string
    Regular expression for subscribing tags
    accelerate Boolean
    Whether to enable acceleration
    artifactSubscriptionRuleId String
    The first ID of the resource.
    createTime String
    Creation time.
    instanceId String
    Instance ID
    modifiedTime String
    Modification time.
    namespaceName String
    Namespace name
    override Boolean
    Whether to override existing tags
    platforms List<String>
    Subscription platform list
    repoName String
    Repository name
    sourceDomain String
    Source domain.
    sourceNamespaceName String
    Source namespace name
    sourceProvider String
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    sourceRepoName String
    Source repository name
    tagCount Integer
    Number of tags to subscribe
    tagRegexp String
    Regular expression for subscribing tags
    accelerate boolean
    Whether to enable acceleration
    artifactSubscriptionRuleId string
    The first ID of the resource.
    createTime string
    Creation time.
    instanceId string
    Instance ID
    modifiedTime string
    Modification time.
    namespaceName string
    Namespace name
    override boolean
    Whether to override existing tags
    platforms string[]
    Subscription platform list
    repoName string
    Repository name
    sourceDomain string
    Source domain.
    sourceNamespaceName string
    Source namespace name
    sourceProvider string
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    sourceRepoName string
    Source repository name
    tagCount number
    Number of tags to subscribe
    tagRegexp string
    Regular expression for subscribing tags
    accelerate bool
    Whether to enable acceleration
    artifact_subscription_rule_id str
    The first ID of the resource.
    create_time str
    Creation time.
    instance_id str
    Instance ID
    modified_time str
    Modification time.
    namespace_name str
    Namespace name
    override bool
    Whether to override existing tags
    platforms Sequence[str]
    Subscription platform list
    repo_name str
    Repository name
    source_domain str
    Source domain.
    source_namespace_name str
    Source namespace name
    source_provider str
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    source_repo_name str
    Source repository name
    tag_count int
    Number of tags to subscribe
    tag_regexp str
    Regular expression for subscribing tags
    accelerate Boolean
    Whether to enable acceleration
    artifactSubscriptionRuleId String
    The first ID of the resource.
    createTime String
    Creation time.
    instanceId String
    Instance ID
    modifiedTime String
    Modification time.
    namespaceName String
    Namespace name
    override Boolean
    Whether to override existing tags
    platforms List<String>
    Subscription platform list
    repoName String
    Repository name
    sourceDomain String
    Source domain.
    sourceNamespaceName String
    Source namespace name
    sourceProvider String
    Source image registry provider, e.g. DOCKER_HUB, GCR, QUAY
    sourceRepoName String
    Source repository name
    tagCount Number
    Number of tags to subscribe
    tagRegexp String
    Regular expression for subscribing tags

    Import

    cr Artifact Subscription Rule can be imported using the id, e.g.

    $ pulumi import alicloud:cr/artifactSubscriptionRule:ArtifactSubscriptionRule example <instance_id>:<artifact_subscription_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 alicloud logo
    Viewing docs for Alibaba Cloud v3.106.0
    published on Monday, Aug 24, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial