1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. cr
  6. getArtifactSubscriptionRules
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

    This data source provides Cr Artifact Subscription Rule available to the user.What is Artifact Subscription Rule

    NOTE: Available since v1.287.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.cr.getArtifactSubscriptionRules({
        instanceId: "cri-xxx",
        enableDetails: true,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.cr.get_artifact_subscription_rules(instance_id="cri-xxx",
        enable_details=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cr.GetArtifactSubscriptionRules(ctx, &cr.GetArtifactSubscriptionRulesArgs{
    			InstanceId:    "cri-xxx",
    			EnableDetails: pulumi.BoolRef(true),
    		}, nil)
    		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 = AliCloud.CR.GetArtifactSubscriptionRules.Invoke(new()
        {
            InstanceId = "cri-xxx",
            EnableDetails = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cr.CrFunctions;
    import com.pulumi.alicloud.cr.inputs.GetArtifactSubscriptionRulesArgs;
    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 example = CrFunctions.getArtifactSubscriptionRules(GetArtifactSubscriptionRulesArgs.builder()
                .instanceId("cri-xxx")
                .enableDetails(true)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: alicloud:cr:getArtifactSubscriptionRules
          arguments:
            instanceId: cri-xxx
            enableDetails: true
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    data "alicloud_cr_getartifactsubscriptionrules" "example" {
      instance_id    = "cri-xxx"
      enable_details = true
    }
    

    Using getArtifactSubscriptionRules

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

    function getArtifactSubscriptionRules(args: GetArtifactSubscriptionRulesArgs, opts?: InvokeOptions): Promise<GetArtifactSubscriptionRulesResult>
    function getArtifactSubscriptionRulesOutput(args: GetArtifactSubscriptionRulesOutputArgs, opts?: InvokeOutputOptions): Output<GetArtifactSubscriptionRulesResult>
    def get_artifact_subscription_rules(enable_details: Optional[bool] = None,
                                        ids: Optional[Sequence[str]] = None,
                                        instance_id: Optional[str] = None,
                                        namespace_name: Optional[str] = None,
                                        output_file: Optional[str] = None,
                                        repo_name: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetArtifactSubscriptionRulesResult
    def get_artifact_subscription_rules_output(enable_details: pulumi.Input[Optional[bool]] = None,
                                        ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                                        instance_id: pulumi.Input[Optional[str]] = None,
                                        namespace_name: pulumi.Input[Optional[str]] = None,
                                        output_file: pulumi.Input[Optional[str]] = None,
                                        repo_name: pulumi.Input[Optional[str]] = None,
                                        opts: Optional[InvokeOutputOptions] = None) -> Output[GetArtifactSubscriptionRulesResult]
    func GetArtifactSubscriptionRules(ctx *Context, args *GetArtifactSubscriptionRulesArgs, opts ...InvokeOption) (*GetArtifactSubscriptionRulesResult, error)
    func GetArtifactSubscriptionRulesOutput(ctx *Context, args *GetArtifactSubscriptionRulesOutputArgs, opts ...InvokeOption) GetArtifactSubscriptionRulesResultOutput

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

    public static class GetArtifactSubscriptionRules 
    {
        public static Task<GetArtifactSubscriptionRulesResult> InvokeAsync(GetArtifactSubscriptionRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetArtifactSubscriptionRulesResult> Invoke(GetArtifactSubscriptionRulesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetArtifactSubscriptionRulesResult> Invoke(GetArtifactSubscriptionRulesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetArtifactSubscriptionRulesResult> getArtifactSubscriptionRules(GetArtifactSubscriptionRulesArgs args, InvokeOptions options)
    public static Output<GetArtifactSubscriptionRulesResult> getArtifactSubscriptionRules(GetArtifactSubscriptionRulesArgs args, InvokeOptions options)
    public static Output<GetArtifactSubscriptionRulesResult> getArtifactSubscriptionRules(GetArtifactSubscriptionRulesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: alicloud:cr/getArtifactSubscriptionRules:getArtifactSubscriptionRules
      arguments:
        # arguments dictionary
    data "alicloud_cr_get_artifact_subscription_rules" "name" {
        # arguments
    }

    The following arguments are supported:

    InstanceId string
    Instance ID
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids List<string>
    A list of Artifact Subscription Rule IDs. The value is formulated as <instance_id>:<artifact_subscription_rule_id>.
    NamespaceName string
    Namespace name
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    RepoName string
    Repository name
    InstanceId string
    Instance ID
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids []string
    A list of Artifact Subscription Rule IDs. The value is formulated as <instance_id>:<artifact_subscription_rule_id>.
    NamespaceName string
    Namespace name
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    RepoName string
    Repository name
    instance_id string
    Instance ID
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    ids list(string)
    A list of Artifact Subscription Rule IDs. The value is formulated as <instance_id>:<artifact_subscription_rule_id>.
    namespace_name string
    Namespace name
    output_file string
    File name where to save data source results (after running pulumi preview).
    repo_name string
    Repository name
    instanceId String
    Instance ID
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Artifact Subscription Rule IDs. The value is formulated as <instance_id>:<artifact_subscription_rule_id>.
    namespaceName String
    Namespace name
    outputFile String
    File name where to save data source results (after running pulumi preview).
    repoName String
    Repository name
    instanceId string
    Instance ID
    enableDetails boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids string[]
    A list of Artifact Subscription Rule IDs. The value is formulated as <instance_id>:<artifact_subscription_rule_id>.
    namespaceName string
    Namespace name
    outputFile string
    File name where to save data source results (after running pulumi preview).
    repoName string
    Repository name
    instance_id str
    Instance ID
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    ids Sequence[str]
    A list of Artifact Subscription Rule IDs. The value is formulated as <instance_id>:<artifact_subscription_rule_id>.
    namespace_name str
    Namespace name
    output_file str
    File name where to save data source results (after running pulumi preview).
    repo_name str
    Repository name
    instanceId String
    Instance ID
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Artifact Subscription Rule IDs. The value is formulated as <instance_id>:<artifact_subscription_rule_id>.
    namespaceName String
    Namespace name
    outputFile String
    File name where to save data source results (after running pulumi preview).
    repoName String
    Repository name

    getArtifactSubscriptionRules Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of Artifact Subscription Rule IDs.
    InstanceId string
    Instance ID.
    Rules List<Pulumi.AliCloud.CR.Outputs.GetArtifactSubscriptionRulesRule>
    A list of Artifact Subscription Rule Entries. Each element contains the following attributes:
    EnableDetails bool
    NamespaceName string
    Namespace name.
    OutputFile string
    RepoName string
    Repository name.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of Artifact Subscription Rule IDs.
    InstanceId string
    Instance ID.
    Rules []GetArtifactSubscriptionRulesRule
    A list of Artifact Subscription Rule Entries. Each element contains the following attributes:
    EnableDetails bool
    NamespaceName string
    Namespace name.
    OutputFile string
    RepoName string
    Repository name.
    id string
    The provider-assigned unique ID for this managed resource.
    ids list(string)
    A list of Artifact Subscription Rule IDs.
    instance_id string
    Instance ID.
    rules list(object)
    A list of Artifact Subscription Rule Entries. Each element contains the following attributes:
    enable_details bool
    namespace_name string
    Namespace name.
    output_file string
    repo_name string
    Repository name.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Artifact Subscription Rule IDs.
    instanceId String
    Instance ID.
    rules List<GetArtifactSubsiptionRulesRule>
    A list of Artifact Subscription Rule Entries. Each element contains the following attributes:
    enableDetails Boolean
    namespaceName String
    Namespace name.
    outputFile String
    repoName String
    Repository name.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of Artifact Subscription Rule IDs.
    instanceId string
    Instance ID.
    rules GetArtifactSubscriptionRulesRule[]
    A list of Artifact Subscription Rule Entries. Each element contains the following attributes:
    enableDetails boolean
    namespaceName string
    Namespace name.
    outputFile string
    repoName string
    Repository name.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of Artifact Subscription Rule IDs.
    instance_id str
    Instance ID.
    rules Sequence[GetArtifactSubscriptionRulesRule]
    A list of Artifact Subscription Rule Entries. Each element contains the following attributes:
    enable_details bool
    namespace_name str
    Namespace name.
    output_file str
    repo_name str
    Repository name.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Artifact Subscription Rule IDs.
    instanceId String
    Instance ID.
    rules List<Property Map>
    A list of Artifact Subscription Rule Entries. Each element contains the following attributes:
    enableDetails Boolean
    namespaceName String
    Namespace name.
    outputFile String
    repoName String
    Repository name.

    Supporting Types

    GetArtifactSubscriptionRulesRule

    Accelerate bool
    Whether to enable acceleration.
    ArtifactSubscriptionRuleId string
    The first ID of the resource.
    CreateTime string
    Creation time.
    Id string
    The ID of the resource supplied above.
    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.
    RegionId string
    NOTE: This field is only available when enableDetails is true. The region ID of the resource.
    RepoName string
    Repository name
    SourceDomain string
    Source domain.
    SourceNamespaceName string
    Source namespace name.
    SourceProvider string
    Source image registry provider, e.
    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.
    Id string
    The ID of the resource supplied above.
    InstanceId string
    Instance ID
    ModifiedTime string
    Modification time.
    NamespaceName string
    Namespace name
    Override bool
    Whether to override existing tags.
    Platforms []string
    Subscription platform list.
    RegionId string
    NOTE: This field is only available when enableDetails is true. The region ID of the resource.
    RepoName string
    Repository name
    SourceDomain string
    Source domain.
    SourceNamespaceName string
    Source namespace name.
    SourceProvider string
    Source image registry provider, e.
    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.
    id string
    The ID of the resource supplied above.
    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.
    region_id string
    NOTE: This field is only available when enableDetails is true. The region ID of the resource.
    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.
    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.
    id String
    The ID of the resource supplied above.
    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.
    regionId String
    NOTE: This field is only available when enableDetails is true. The region ID of the resource.
    repoName String
    Repository name
    sourceDomain String
    Source domain.
    sourceNamespaceName String
    Source namespace name.
    sourceProvider String
    Source image registry provider, e.
    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.
    id string
    The ID of the resource supplied above.
    instanceId string
    Instance ID
    modifiedTime string
    Modification time.
    namespaceName string
    Namespace name
    override boolean
    Whether to override existing tags.
    platforms string[]
    Subscription platform list.
    regionId string
    NOTE: This field is only available when enableDetails is true. The region ID of the resource.
    repoName string
    Repository name
    sourceDomain string
    Source domain.
    sourceNamespaceName string
    Source namespace name.
    sourceProvider string
    Source image registry provider, e.
    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.
    id str
    The ID of the resource supplied above.
    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.
    region_id str
    NOTE: This field is only available when enableDetails is true. The region ID of the resource.
    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.
    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.
    id String
    The ID of the resource supplied above.
    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.
    regionId String
    NOTE: This field is only available when enableDetails is true. The region ID of the resource.
    repoName String
    Repository name
    sourceDomain String
    Source domain.
    sourceNamespaceName String
    Source namespace name.
    sourceProvider String
    Source image registry provider, e.
    sourceRepoName String
    Source repository name.
    tagCount Number
    Number of tags to subscribe.
    tagRegexp String
    Regular expression for subscribing tags.

    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