1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cr
  5. Chain
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.cr.Chain

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    Provides a CR Chain resource.

    For information about CR Chain and how to use it, see What is Chain.

    NOTE: Available since v1.161.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") || "tf-example";
    const _default = new alicloud.cr.RegistryEnterpriseInstance("default", {
        paymentType: "Subscription",
        period: 1,
        renewPeriod: 0,
        renewalStatus: "ManualRenewal",
        instanceType: "Advanced",
        instanceName: name,
    });
    const defaultRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("default", {
        instanceId: _default.id,
        name: name,
        autoCreate: false,
        defaultVisibility: "PUBLIC",
    });
    const defaultRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("default", {
        instanceId: _default.id,
        namespace: defaultRegistryEnterpriseNamespace.name,
        name: name,
        summary: "this is summary of my new repo",
        repoType: "PUBLIC",
        detail: "this is a public repo",
    });
    const defaultChain = new alicloud.cr.Chain("default", {
        chainConfigs: [{
            nodes: [
                {
                    nodeConfigs: [{
                        denyPolicies: [{}],
                    }],
                    enable: true,
                    nodeName: "DOCKER_IMAGE_BUILD",
                },
                {
                    nodeConfigs: [{
                        denyPolicies: [{}],
                    }],
                    enable: true,
                    nodeName: "DOCKER_IMAGE_PUSH",
                },
                {
                    enable: true,
                    nodeName: "VULNERABILITY_SCANNING",
                    nodeConfigs: [{
                        denyPolicies: [{
                            issueLevel: "MEDIUM",
                            issueCount: "1",
                            action: "BLOCK_DELETE_TAG",
                            logic: "AND",
                        }],
                    }],
                },
                {
                    nodeConfigs: [{
                        denyPolicies: [{}],
                    }],
                    enable: true,
                    nodeName: "ACTIVATE_REPLICATION",
                },
                {
                    nodeConfigs: [{
                        denyPolicies: [{}],
                    }],
                    enable: true,
                    nodeName: "TRIGGER",
                },
                {
                    nodeConfigs: [{
                        denyPolicies: [{}],
                    }],
                    enable: false,
                    nodeName: "SNAPSHOT",
                },
                {
                    nodeConfigs: [{
                        denyPolicies: [{}],
                    }],
                    enable: false,
                    nodeName: "TRIGGER_SNAPSHOT",
                },
            ],
            routers: [
                {
                    froms: [{
                        nodeName: "DOCKER_IMAGE_BUILD",
                    }],
                    tos: [{
                        nodeName: "DOCKER_IMAGE_PUSH",
                    }],
                },
                {
                    froms: [{
                        nodeName: "DOCKER_IMAGE_PUSH",
                    }],
                    tos: [{
                        nodeName: "VULNERABILITY_SCANNING",
                    }],
                },
                {
                    froms: [{
                        nodeName: "VULNERABILITY_SCANNING",
                    }],
                    tos: [{
                        nodeName: "ACTIVATE_REPLICATION",
                    }],
                },
                {
                    froms: [{
                        nodeName: "ACTIVATE_REPLICATION",
                    }],
                    tos: [{
                        nodeName: "TRIGGER",
                    }],
                },
                {
                    froms: [{
                        nodeName: "VULNERABILITY_SCANNING",
                    }],
                    tos: [{
                        nodeName: "SNAPSHOT",
                    }],
                },
                {
                    froms: [{
                        nodeName: "SNAPSHOT",
                    }],
                    tos: [{
                        nodeName: "TRIGGER_SNAPSHOT",
                    }],
                },
            ],
        }],
        chainName: name,
        description: name,
        instanceId: defaultRegistryEnterpriseNamespace.instanceId,
        repoName: defaultRegistryEnterpriseRepo.name,
        repoNamespaceName: defaultRegistryEnterpriseNamespace.name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = alicloud.cr.RegistryEnterpriseInstance("default",
        payment_type="Subscription",
        period=1,
        renew_period=0,
        renewal_status="ManualRenewal",
        instance_type="Advanced",
        instance_name=name)
    default_registry_enterprise_namespace = alicloud.cs.RegistryEnterpriseNamespace("default",
        instance_id=default.id,
        name=name,
        auto_create=False,
        default_visibility="PUBLIC")
    default_registry_enterprise_repo = alicloud.cs.RegistryEnterpriseRepo("default",
        instance_id=default.id,
        namespace=default_registry_enterprise_namespace.name,
        name=name,
        summary="this is summary of my new repo",
        repo_type="PUBLIC",
        detail="this is a public repo")
    default_chain = alicloud.cr.Chain("default",
        chain_configs=[alicloud.cr.ChainChainConfigArgs(
            nodes=[
                alicloud.cr.ChainChainConfigNodeArgs(
                    node_configs=[alicloud.cr.ChainChainConfigNodeNodeConfigArgs(
                        deny_policies=[alicloud.cr.ChainChainConfigNodeNodeConfigDenyPolicyArgs()],
                    )],
                    enable=True,
                    node_name="DOCKER_IMAGE_BUILD",
                ),
                alicloud.cr.ChainChainConfigNodeArgs(
                    node_configs=[alicloud.cr.ChainChainConfigNodeNodeConfigArgs(
                        deny_policies=[alicloud.cr.ChainChainConfigNodeNodeConfigDenyPolicyArgs()],
                    )],
                    enable=True,
                    node_name="DOCKER_IMAGE_PUSH",
                ),
                alicloud.cr.ChainChainConfigNodeArgs(
                    enable=True,
                    node_name="VULNERABILITY_SCANNING",
                    node_configs=[alicloud.cr.ChainChainConfigNodeNodeConfigArgs(
                        deny_policies=[alicloud.cr.ChainChainConfigNodeNodeConfigDenyPolicyArgs(
                            issue_level="MEDIUM",
                            issue_count="1",
                            action="BLOCK_DELETE_TAG",
                            logic="AND",
                        )],
                    )],
                ),
                alicloud.cr.ChainChainConfigNodeArgs(
                    node_configs=[alicloud.cr.ChainChainConfigNodeNodeConfigArgs(
                        deny_policies=[alicloud.cr.ChainChainConfigNodeNodeConfigDenyPolicyArgs()],
                    )],
                    enable=True,
                    node_name="ACTIVATE_REPLICATION",
                ),
                alicloud.cr.ChainChainConfigNodeArgs(
                    node_configs=[alicloud.cr.ChainChainConfigNodeNodeConfigArgs(
                        deny_policies=[alicloud.cr.ChainChainConfigNodeNodeConfigDenyPolicyArgs()],
                    )],
                    enable=True,
                    node_name="TRIGGER",
                ),
                alicloud.cr.ChainChainConfigNodeArgs(
                    node_configs=[alicloud.cr.ChainChainConfigNodeNodeConfigArgs(
                        deny_policies=[alicloud.cr.ChainChainConfigNodeNodeConfigDenyPolicyArgs()],
                    )],
                    enable=False,
                    node_name="SNAPSHOT",
                ),
                alicloud.cr.ChainChainConfigNodeArgs(
                    node_configs=[alicloud.cr.ChainChainConfigNodeNodeConfigArgs(
                        deny_policies=[alicloud.cr.ChainChainConfigNodeNodeConfigDenyPolicyArgs()],
                    )],
                    enable=False,
                    node_name="TRIGGER_SNAPSHOT",
                ),
            ],
            routers=[
                alicloud.cr.ChainChainConfigRouterArgs(
                    froms=[alicloud.cr.ChainChainConfigRouterFromArgs(
                        node_name="DOCKER_IMAGE_BUILD",
                    )],
                    tos=[alicloud.cr.ChainChainConfigRouterToArgs(
                        node_name="DOCKER_IMAGE_PUSH",
                    )],
                ),
                alicloud.cr.ChainChainConfigRouterArgs(
                    froms=[alicloud.cr.ChainChainConfigRouterFromArgs(
                        node_name="DOCKER_IMAGE_PUSH",
                    )],
                    tos=[alicloud.cr.ChainChainConfigRouterToArgs(
                        node_name="VULNERABILITY_SCANNING",
                    )],
                ),
                alicloud.cr.ChainChainConfigRouterArgs(
                    froms=[alicloud.cr.ChainChainConfigRouterFromArgs(
                        node_name="VULNERABILITY_SCANNING",
                    )],
                    tos=[alicloud.cr.ChainChainConfigRouterToArgs(
                        node_name="ACTIVATE_REPLICATION",
                    )],
                ),
                alicloud.cr.ChainChainConfigRouterArgs(
                    froms=[alicloud.cr.ChainChainConfigRouterFromArgs(
                        node_name="ACTIVATE_REPLICATION",
                    )],
                    tos=[alicloud.cr.ChainChainConfigRouterToArgs(
                        node_name="TRIGGER",
                    )],
                ),
                alicloud.cr.ChainChainConfigRouterArgs(
                    froms=[alicloud.cr.ChainChainConfigRouterFromArgs(
                        node_name="VULNERABILITY_SCANNING",
                    )],
                    tos=[alicloud.cr.ChainChainConfigRouterToArgs(
                        node_name="SNAPSHOT",
                    )],
                ),
                alicloud.cr.ChainChainConfigRouterArgs(
                    froms=[alicloud.cr.ChainChainConfigRouterFromArgs(
                        node_name="SNAPSHOT",
                    )],
                    tos=[alicloud.cr.ChainChainConfigRouterToArgs(
                        node_name="TRIGGER_SNAPSHOT",
                    )],
                ),
            ],
        )],
        chain_name=name,
        description=name,
        instance_id=default_registry_enterprise_namespace.instance_id,
        repo_name=default_registry_enterprise_repo.name,
        repo_namespace_name=default_registry_enterprise_namespace.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 := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := cr.NewRegistryEnterpriseInstance(ctx, "default", &cr.RegistryEnterpriseInstanceArgs{
    			PaymentType:   pulumi.String("Subscription"),
    			Period:        pulumi.Int(1),
    			RenewPeriod:   pulumi.Int(0),
    			RenewalStatus: pulumi.String("ManualRenewal"),
    			InstanceType:  pulumi.String("Advanced"),
    			InstanceName:  pulumi.String(name),
    		})
    		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("PUBLIC"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultRegistryEnterpriseRepo, err := cs.NewRegistryEnterpriseRepo(ctx, "default", &cs.RegistryEnterpriseRepoArgs{
    			InstanceId: _default.ID(),
    			Namespace:  defaultRegistryEnterpriseNamespace.Name,
    			Name:       pulumi.String(name),
    			Summary:    pulumi.String("this is summary of my new repo"),
    			RepoType:   pulumi.String("PUBLIC"),
    			Detail:     pulumi.String("this is a public repo"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cr.NewChain(ctx, "default", &cr.ChainArgs{
    			ChainConfigs: cr.ChainChainConfigArray{
    				&cr.ChainChainConfigArgs{
    					Nodes: cr.ChainChainConfigNodeArray{
    						&cr.ChainChainConfigNodeArgs{
    							NodeConfigs: cr.ChainChainConfigNodeNodeConfigArray{
    								&cr.ChainChainConfigNodeNodeConfigArgs{
    									DenyPolicies: cr.ChainChainConfigNodeNodeConfigDenyPolicyArray{
    										nil,
    									},
    								},
    							},
    							Enable:   pulumi.Bool(true),
    							NodeName: pulumi.String("DOCKER_IMAGE_BUILD"),
    						},
    						&cr.ChainChainConfigNodeArgs{
    							NodeConfigs: cr.ChainChainConfigNodeNodeConfigArray{
    								&cr.ChainChainConfigNodeNodeConfigArgs{
    									DenyPolicies: cr.ChainChainConfigNodeNodeConfigDenyPolicyArray{
    										nil,
    									},
    								},
    							},
    							Enable:   pulumi.Bool(true),
    							NodeName: pulumi.String("DOCKER_IMAGE_PUSH"),
    						},
    						&cr.ChainChainConfigNodeArgs{
    							Enable:   pulumi.Bool(true),
    							NodeName: pulumi.String("VULNERABILITY_SCANNING"),
    							NodeConfigs: cr.ChainChainConfigNodeNodeConfigArray{
    								&cr.ChainChainConfigNodeNodeConfigArgs{
    									DenyPolicies: cr.ChainChainConfigNodeNodeConfigDenyPolicyArray{
    										&cr.ChainChainConfigNodeNodeConfigDenyPolicyArgs{
    											IssueLevel: pulumi.String("MEDIUM"),
    											IssueCount: pulumi.String("1"),
    											Action:     pulumi.String("BLOCK_DELETE_TAG"),
    											Logic:      pulumi.String("AND"),
    										},
    									},
    								},
    							},
    						},
    						&cr.ChainChainConfigNodeArgs{
    							NodeConfigs: cr.ChainChainConfigNodeNodeConfigArray{
    								&cr.ChainChainConfigNodeNodeConfigArgs{
    									DenyPolicies: cr.ChainChainConfigNodeNodeConfigDenyPolicyArray{
    										nil,
    									},
    								},
    							},
    							Enable:   pulumi.Bool(true),
    							NodeName: pulumi.String("ACTIVATE_REPLICATION"),
    						},
    						&cr.ChainChainConfigNodeArgs{
    							NodeConfigs: cr.ChainChainConfigNodeNodeConfigArray{
    								&cr.ChainChainConfigNodeNodeConfigArgs{
    									DenyPolicies: cr.ChainChainConfigNodeNodeConfigDenyPolicyArray{
    										nil,
    									},
    								},
    							},
    							Enable:   pulumi.Bool(true),
    							NodeName: pulumi.String("TRIGGER"),
    						},
    						&cr.ChainChainConfigNodeArgs{
    							NodeConfigs: cr.ChainChainConfigNodeNodeConfigArray{
    								&cr.ChainChainConfigNodeNodeConfigArgs{
    									DenyPolicies: cr.ChainChainConfigNodeNodeConfigDenyPolicyArray{
    										nil,
    									},
    								},
    							},
    							Enable:   pulumi.Bool(false),
    							NodeName: pulumi.String("SNAPSHOT"),
    						},
    						&cr.ChainChainConfigNodeArgs{
    							NodeConfigs: cr.ChainChainConfigNodeNodeConfigArray{
    								&cr.ChainChainConfigNodeNodeConfigArgs{
    									DenyPolicies: cr.ChainChainConfigNodeNodeConfigDenyPolicyArray{
    										nil,
    									},
    								},
    							},
    							Enable:   pulumi.Bool(false),
    							NodeName: pulumi.String("TRIGGER_SNAPSHOT"),
    						},
    					},
    					Routers: cr.ChainChainConfigRouterArray{
    						&cr.ChainChainConfigRouterArgs{
    							Froms: cr.ChainChainConfigRouterFromArray{
    								&cr.ChainChainConfigRouterFromArgs{
    									NodeName: pulumi.String("DOCKER_IMAGE_BUILD"),
    								},
    							},
    							Tos: cr.ChainChainConfigRouterToArray{
    								&cr.ChainChainConfigRouterToArgs{
    									NodeName: pulumi.String("DOCKER_IMAGE_PUSH"),
    								},
    							},
    						},
    						&cr.ChainChainConfigRouterArgs{
    							Froms: cr.ChainChainConfigRouterFromArray{
    								&cr.ChainChainConfigRouterFromArgs{
    									NodeName: pulumi.String("DOCKER_IMAGE_PUSH"),
    								},
    							},
    							Tos: cr.ChainChainConfigRouterToArray{
    								&cr.ChainChainConfigRouterToArgs{
    									NodeName: pulumi.String("VULNERABILITY_SCANNING"),
    								},
    							},
    						},
    						&cr.ChainChainConfigRouterArgs{
    							Froms: cr.ChainChainConfigRouterFromArray{
    								&cr.ChainChainConfigRouterFromArgs{
    									NodeName: pulumi.String("VULNERABILITY_SCANNING"),
    								},
    							},
    							Tos: cr.ChainChainConfigRouterToArray{
    								&cr.ChainChainConfigRouterToArgs{
    									NodeName: pulumi.String("ACTIVATE_REPLICATION"),
    								},
    							},
    						},
    						&cr.ChainChainConfigRouterArgs{
    							Froms: cr.ChainChainConfigRouterFromArray{
    								&cr.ChainChainConfigRouterFromArgs{
    									NodeName: pulumi.String("ACTIVATE_REPLICATION"),
    								},
    							},
    							Tos: cr.ChainChainConfigRouterToArray{
    								&cr.ChainChainConfigRouterToArgs{
    									NodeName: pulumi.String("TRIGGER"),
    								},
    							},
    						},
    						&cr.ChainChainConfigRouterArgs{
    							Froms: cr.ChainChainConfigRouterFromArray{
    								&cr.ChainChainConfigRouterFromArgs{
    									NodeName: pulumi.String("VULNERABILITY_SCANNING"),
    								},
    							},
    							Tos: cr.ChainChainConfigRouterToArray{
    								&cr.ChainChainConfigRouterToArgs{
    									NodeName: pulumi.String("SNAPSHOT"),
    								},
    							},
    						},
    						&cr.ChainChainConfigRouterArgs{
    							Froms: cr.ChainChainConfigRouterFromArray{
    								&cr.ChainChainConfigRouterFromArgs{
    									NodeName: pulumi.String("SNAPSHOT"),
    								},
    							},
    							Tos: cr.ChainChainConfigRouterToArray{
    								&cr.ChainChainConfigRouterToArgs{
    									NodeName: pulumi.String("TRIGGER_SNAPSHOT"),
    								},
    							},
    						},
    					},
    				},
    			},
    			ChainName:         pulumi.String(name),
    			Description:       pulumi.String(name),
    			InstanceId:        defaultRegistryEnterpriseNamespace.InstanceId,
    			RepoName:          defaultRegistryEnterpriseRepo.Name,
    			RepoNamespaceName: defaultRegistryEnterpriseNamespace.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") ?? "tf-example";
        var @default = new AliCloud.CR.RegistryEnterpriseInstance("default", new()
        {
            PaymentType = "Subscription",
            Period = 1,
            RenewPeriod = 0,
            RenewalStatus = "ManualRenewal",
            InstanceType = "Advanced",
            InstanceName = name,
        });
    
        var defaultRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("default", new()
        {
            InstanceId = @default.Id,
            Name = name,
            AutoCreate = false,
            DefaultVisibility = "PUBLIC",
        });
    
        var defaultRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("default", new()
        {
            InstanceId = @default.Id,
            Namespace = defaultRegistryEnterpriseNamespace.Name,
            Name = name,
            Summary = "this is summary of my new repo",
            RepoType = "PUBLIC",
            Detail = "this is a public repo",
        });
    
        var defaultChain = new AliCloud.CR.Chain("default", new()
        {
            ChainConfigs = new[]
            {
                new AliCloud.CR.Inputs.ChainChainConfigArgs
                {
                    Nodes = new[]
                    {
                        new AliCloud.CR.Inputs.ChainChainConfigNodeArgs
                        {
                            NodeConfigs = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigArgs
                                {
                                    DenyPolicies = new[]
                                    {
                                        null,
                                    },
                                },
                            },
                            Enable = true,
                            NodeName = "DOCKER_IMAGE_BUILD",
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigNodeArgs
                        {
                            NodeConfigs = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigArgs
                                {
                                    DenyPolicies = new[]
                                    {
                                        null,
                                    },
                                },
                            },
                            Enable = true,
                            NodeName = "DOCKER_IMAGE_PUSH",
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigNodeArgs
                        {
                            Enable = true,
                            NodeName = "VULNERABILITY_SCANNING",
                            NodeConfigs = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigArgs
                                {
                                    DenyPolicies = new[]
                                    {
                                        new AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigDenyPolicyArgs
                                        {
                                            IssueLevel = "MEDIUM",
                                            IssueCount = "1",
                                            Action = "BLOCK_DELETE_TAG",
                                            Logic = "AND",
                                        },
                                    },
                                },
                            },
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigNodeArgs
                        {
                            NodeConfigs = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigArgs
                                {
                                    DenyPolicies = new[]
                                    {
                                        null,
                                    },
                                },
                            },
                            Enable = true,
                            NodeName = "ACTIVATE_REPLICATION",
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigNodeArgs
                        {
                            NodeConfigs = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigArgs
                                {
                                    DenyPolicies = new[]
                                    {
                                        null,
                                    },
                                },
                            },
                            Enable = true,
                            NodeName = "TRIGGER",
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigNodeArgs
                        {
                            NodeConfigs = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigArgs
                                {
                                    DenyPolicies = new[]
                                    {
                                        null,
                                    },
                                },
                            },
                            Enable = false,
                            NodeName = "SNAPSHOT",
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigNodeArgs
                        {
                            NodeConfigs = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigArgs
                                {
                                    DenyPolicies = new[]
                                    {
                                        null,
                                    },
                                },
                            },
                            Enable = false,
                            NodeName = "TRIGGER_SNAPSHOT",
                        },
                    },
                    Routers = new[]
                    {
                        new AliCloud.CR.Inputs.ChainChainConfigRouterArgs
                        {
                            Froms = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterFromArgs
                                {
                                    NodeName = "DOCKER_IMAGE_BUILD",
                                },
                            },
                            Tos = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterToArgs
                                {
                                    NodeName = "DOCKER_IMAGE_PUSH",
                                },
                            },
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigRouterArgs
                        {
                            Froms = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterFromArgs
                                {
                                    NodeName = "DOCKER_IMAGE_PUSH",
                                },
                            },
                            Tos = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterToArgs
                                {
                                    NodeName = "VULNERABILITY_SCANNING",
                                },
                            },
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigRouterArgs
                        {
                            Froms = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterFromArgs
                                {
                                    NodeName = "VULNERABILITY_SCANNING",
                                },
                            },
                            Tos = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterToArgs
                                {
                                    NodeName = "ACTIVATE_REPLICATION",
                                },
                            },
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigRouterArgs
                        {
                            Froms = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterFromArgs
                                {
                                    NodeName = "ACTIVATE_REPLICATION",
                                },
                            },
                            Tos = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterToArgs
                                {
                                    NodeName = "TRIGGER",
                                },
                            },
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigRouterArgs
                        {
                            Froms = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterFromArgs
                                {
                                    NodeName = "VULNERABILITY_SCANNING",
                                },
                            },
                            Tos = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterToArgs
                                {
                                    NodeName = "SNAPSHOT",
                                },
                            },
                        },
                        new AliCloud.CR.Inputs.ChainChainConfigRouterArgs
                        {
                            Froms = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterFromArgs
                                {
                                    NodeName = "SNAPSHOT",
                                },
                            },
                            Tos = new[]
                            {
                                new AliCloud.CR.Inputs.ChainChainConfigRouterToArgs
                                {
                                    NodeName = "TRIGGER_SNAPSHOT",
                                },
                            },
                        },
                    },
                },
            },
            ChainName = name,
            Description = name,
            InstanceId = defaultRegistryEnterpriseNamespace.InstanceId,
            RepoName = defaultRegistryEnterpriseRepo.Name,
            RepoNamespaceName = defaultRegistryEnterpriseNamespace.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.Chain;
    import com.pulumi.alicloud.cr.ChainArgs;
    import com.pulumi.alicloud.cr.inputs.ChainChainConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            var default_ = new RegistryEnterpriseInstance("default", RegistryEnterpriseInstanceArgs.builder()        
                .paymentType("Subscription")
                .period(1)
                .renewPeriod(0)
                .renewalStatus("ManualRenewal")
                .instanceType("Advanced")
                .instanceName(name)
                .build());
    
            var defaultRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("defaultRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()        
                .instanceId(default_.id())
                .name(name)
                .autoCreate(false)
                .defaultVisibility("PUBLIC")
                .build());
    
            var defaultRegistryEnterpriseRepo = new RegistryEnterpriseRepo("defaultRegistryEnterpriseRepo", RegistryEnterpriseRepoArgs.builder()        
                .instanceId(default_.id())
                .namespace(defaultRegistryEnterpriseNamespace.name())
                .name(name)
                .summary("this is summary of my new repo")
                .repoType("PUBLIC")
                .detail("this is a public repo")
                .build());
    
            var defaultChain = new Chain("defaultChain", ChainArgs.builder()        
                .chainConfigs(ChainChainConfigArgs.builder()
                    .nodes(                
                        ChainChainConfigNodeArgs.builder()
                            .nodeConfigs(ChainChainConfigNodeNodeConfigArgs.builder()
                                .denyPolicies()
                                .build())
                            .enable(true)
                            .nodeName("DOCKER_IMAGE_BUILD")
                            .build(),
                        ChainChainConfigNodeArgs.builder()
                            .nodeConfigs(ChainChainConfigNodeNodeConfigArgs.builder()
                                .denyPolicies()
                                .build())
                            .enable(true)
                            .nodeName("DOCKER_IMAGE_PUSH")
                            .build(),
                        ChainChainConfigNodeArgs.builder()
                            .enable(true)
                            .nodeName("VULNERABILITY_SCANNING")
                            .nodeConfigs(ChainChainConfigNodeNodeConfigArgs.builder()
                                .denyPolicies(ChainChainConfigNodeNodeConfigDenyPolicyArgs.builder()
                                    .issueLevel("MEDIUM")
                                    .issueCount(1)
                                    .action("BLOCK_DELETE_TAG")
                                    .logic("AND")
                                    .build())
                                .build())
                            .build(),
                        ChainChainConfigNodeArgs.builder()
                            .nodeConfigs(ChainChainConfigNodeNodeConfigArgs.builder()
                                .denyPolicies()
                                .build())
                            .enable(true)
                            .nodeName("ACTIVATE_REPLICATION")
                            .build(),
                        ChainChainConfigNodeArgs.builder()
                            .nodeConfigs(ChainChainConfigNodeNodeConfigArgs.builder()
                                .denyPolicies()
                                .build())
                            .enable(true)
                            .nodeName("TRIGGER")
                            .build(),
                        ChainChainConfigNodeArgs.builder()
                            .nodeConfigs(ChainChainConfigNodeNodeConfigArgs.builder()
                                .denyPolicies()
                                .build())
                            .enable(false)
                            .nodeName("SNAPSHOT")
                            .build(),
                        ChainChainConfigNodeArgs.builder()
                            .nodeConfigs(ChainChainConfigNodeNodeConfigArgs.builder()
                                .denyPolicies()
                                .build())
                            .enable(false)
                            .nodeName("TRIGGER_SNAPSHOT")
                            .build())
                    .routers(                
                        ChainChainConfigRouterArgs.builder()
                            .froms(ChainChainConfigRouterFromArgs.builder()
                                .nodeName("DOCKER_IMAGE_BUILD")
                                .build())
                            .tos(ChainChainConfigRouterToArgs.builder()
                                .nodeName("DOCKER_IMAGE_PUSH")
                                .build())
                            .build(),
                        ChainChainConfigRouterArgs.builder()
                            .froms(ChainChainConfigRouterFromArgs.builder()
                                .nodeName("DOCKER_IMAGE_PUSH")
                                .build())
                            .tos(ChainChainConfigRouterToArgs.builder()
                                .nodeName("VULNERABILITY_SCANNING")
                                .build())
                            .build(),
                        ChainChainConfigRouterArgs.builder()
                            .froms(ChainChainConfigRouterFromArgs.builder()
                                .nodeName("VULNERABILITY_SCANNING")
                                .build())
                            .tos(ChainChainConfigRouterToArgs.builder()
                                .nodeName("ACTIVATE_REPLICATION")
                                .build())
                            .build(),
                        ChainChainConfigRouterArgs.builder()
                            .froms(ChainChainConfigRouterFromArgs.builder()
                                .nodeName("ACTIVATE_REPLICATION")
                                .build())
                            .tos(ChainChainConfigRouterToArgs.builder()
                                .nodeName("TRIGGER")
                                .build())
                            .build(),
                        ChainChainConfigRouterArgs.builder()
                            .froms(ChainChainConfigRouterFromArgs.builder()
                                .nodeName("VULNERABILITY_SCANNING")
                                .build())
                            .tos(ChainChainConfigRouterToArgs.builder()
                                .nodeName("SNAPSHOT")
                                .build())
                            .build(),
                        ChainChainConfigRouterArgs.builder()
                            .froms(ChainChainConfigRouterFromArgs.builder()
                                .nodeName("SNAPSHOT")
                                .build())
                            .tos(ChainChainConfigRouterToArgs.builder()
                                .nodeName("TRIGGER_SNAPSHOT")
                                .build())
                            .build())
                    .build())
                .chainName(name)
                .description(name)
                .instanceId(defaultRegistryEnterpriseNamespace.instanceId())
                .repoName(defaultRegistryEnterpriseRepo.name())
                .repoNamespaceName(defaultRegistryEnterpriseNamespace.name())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      default:
        type: alicloud:cr:RegistryEnterpriseInstance
        properties:
          paymentType: Subscription
          period: 1
          renewPeriod: 0
          renewalStatus: ManualRenewal
          instanceType: Advanced
          instanceName: ${name}
      defaultRegistryEnterpriseNamespace:
        type: alicloud:cs:RegistryEnterpriseNamespace
        name: default
        properties:
          instanceId: ${default.id}
          name: ${name}
          autoCreate: false
          defaultVisibility: PUBLIC
      defaultRegistryEnterpriseRepo:
        type: alicloud:cs:RegistryEnterpriseRepo
        name: default
        properties:
          instanceId: ${default.id}
          namespace: ${defaultRegistryEnterpriseNamespace.name}
          name: ${name}
          summary: this is summary of my new repo
          repoType: PUBLIC
          detail: this is a public repo
      defaultChain:
        type: alicloud:cr:Chain
        name: default
        properties:
          chainConfigs:
            - nodes:
                - nodeConfigs:
                    - denyPolicies:
                        - {}
                  enable: true
                  nodeName: DOCKER_IMAGE_BUILD
                - nodeConfigs:
                    - denyPolicies:
                        - {}
                  enable: true
                  nodeName: DOCKER_IMAGE_PUSH
                - enable: true
                  nodeName: VULNERABILITY_SCANNING
                  nodeConfigs:
                    - denyPolicies:
                        - issueLevel: MEDIUM
                          issueCount: 1
                          action: BLOCK_DELETE_TAG
                          logic: AND
                - nodeConfigs:
                    - denyPolicies:
                        - {}
                  enable: true
                  nodeName: ACTIVATE_REPLICATION
                - nodeConfigs:
                    - denyPolicies:
                        - {}
                  enable: true
                  nodeName: TRIGGER
                - nodeConfigs:
                    - denyPolicies:
                        - {}
                  enable: false
                  nodeName: SNAPSHOT
                - nodeConfigs:
                    - denyPolicies:
                        - {}
                  enable: false
                  nodeName: TRIGGER_SNAPSHOT
              routers:
                - froms:
                    - nodeName: DOCKER_IMAGE_BUILD
                  tos:
                    - nodeName: DOCKER_IMAGE_PUSH
                - froms:
                    - nodeName: DOCKER_IMAGE_PUSH
                  tos:
                    - nodeName: VULNERABILITY_SCANNING
                - froms:
                    - nodeName: VULNERABILITY_SCANNING
                  tos:
                    - nodeName: ACTIVATE_REPLICATION
                - froms:
                    - nodeName: ACTIVATE_REPLICATION
                  tos:
                    - nodeName: TRIGGER
                - froms:
                    - nodeName: VULNERABILITY_SCANNING
                  tos:
                    - nodeName: SNAPSHOT
                - froms:
                    - nodeName: SNAPSHOT
                  tos:
                    - nodeName: TRIGGER_SNAPSHOT
          chainName: ${name}
          description: ${name}
          instanceId: ${defaultRegistryEnterpriseNamespace.instanceId}
          repoName: ${defaultRegistryEnterpriseRepo.name}
          repoNamespaceName: ${defaultRegistryEnterpriseNamespace.name}
    

    Create Chain Resource

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

    Constructor syntax

    new Chain(name: string, args: ChainArgs, opts?: CustomResourceOptions);
    @overload
    def Chain(resource_name: str,
              args: ChainArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Chain(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              chain_name: Optional[str] = None,
              instance_id: Optional[str] = None,
              chain_configs: Optional[Sequence[ChainChainConfigArgs]] = None,
              description: Optional[str] = None,
              repo_name: Optional[str] = None,
              repo_namespace_name: Optional[str] = None)
    func NewChain(ctx *Context, name string, args ChainArgs, opts ...ResourceOption) (*Chain, error)
    public Chain(string name, ChainArgs args, CustomResourceOptions? opts = null)
    public Chain(String name, ChainArgs args)
    public Chain(String name, ChainArgs args, CustomResourceOptions options)
    
    type: alicloud:cr:Chain
    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 ChainArgs
    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 ChainArgs
    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 ChainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ChainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ChainArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var chainResource = new AliCloud.CR.Chain("chainResource", new()
    {
        ChainName = "string",
        InstanceId = "string",
        ChainConfigs = new[]
        {
            new AliCloud.CR.Inputs.ChainChainConfigArgs
            {
                Nodes = new[]
                {
                    new AliCloud.CR.Inputs.ChainChainConfigNodeArgs
                    {
                        Enable = false,
                        NodeConfigs = new[]
                        {
                            new AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigArgs
                            {
                                DenyPolicies = new[]
                                {
                                    new AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigDenyPolicyArgs
                                    {
                                        Action = "string",
                                        IssueCount = "string",
                                        IssueLevel = "string",
                                        Logic = "string",
                                    },
                                },
                            },
                        },
                        NodeName = "string",
                    },
                },
                Routers = new[]
                {
                    new AliCloud.CR.Inputs.ChainChainConfigRouterArgs
                    {
                        Froms = new[]
                        {
                            new AliCloud.CR.Inputs.ChainChainConfigRouterFromArgs
                            {
                                NodeName = "string",
                            },
                        },
                        Tos = new[]
                        {
                            new AliCloud.CR.Inputs.ChainChainConfigRouterToArgs
                            {
                                NodeName = "string",
                            },
                        },
                    },
                },
            },
        },
        Description = "string",
        RepoName = "string",
        RepoNamespaceName = "string",
    });
    
    example, err := cr.NewChain(ctx, "chainResource", &cr.ChainArgs{
    	ChainName:  pulumi.String("string"),
    	InstanceId: pulumi.String("string"),
    	ChainConfigs: cr.ChainChainConfigArray{
    		&cr.ChainChainConfigArgs{
    			Nodes: cr.ChainChainConfigNodeArray{
    				&cr.ChainChainConfigNodeArgs{
    					Enable: pulumi.Bool(false),
    					NodeConfigs: cr.ChainChainConfigNodeNodeConfigArray{
    						&cr.ChainChainConfigNodeNodeConfigArgs{
    							DenyPolicies: cr.ChainChainConfigNodeNodeConfigDenyPolicyArray{
    								&cr.ChainChainConfigNodeNodeConfigDenyPolicyArgs{
    									Action:     pulumi.String("string"),
    									IssueCount: pulumi.String("string"),
    									IssueLevel: pulumi.String("string"),
    									Logic:      pulumi.String("string"),
    								},
    							},
    						},
    					},
    					NodeName: pulumi.String("string"),
    				},
    			},
    			Routers: cr.ChainChainConfigRouterArray{
    				&cr.ChainChainConfigRouterArgs{
    					Froms: cr.ChainChainConfigRouterFromArray{
    						&cr.ChainChainConfigRouterFromArgs{
    							NodeName: pulumi.String("string"),
    						},
    					},
    					Tos: cr.ChainChainConfigRouterToArray{
    						&cr.ChainChainConfigRouterToArgs{
    							NodeName: pulumi.String("string"),
    						},
    					},
    				},
    			},
    		},
    	},
    	Description:       pulumi.String("string"),
    	RepoName:          pulumi.String("string"),
    	RepoNamespaceName: pulumi.String("string"),
    })
    
    var chainResource = new Chain("chainResource", ChainArgs.builder()        
        .chainName("string")
        .instanceId("string")
        .chainConfigs(ChainChainConfigArgs.builder()
            .nodes(ChainChainConfigNodeArgs.builder()
                .enable(false)
                .nodeConfigs(ChainChainConfigNodeNodeConfigArgs.builder()
                    .denyPolicies(ChainChainConfigNodeNodeConfigDenyPolicyArgs.builder()
                        .action("string")
                        .issueCount("string")
                        .issueLevel("string")
                        .logic("string")
                        .build())
                    .build())
                .nodeName("string")
                .build())
            .routers(ChainChainConfigRouterArgs.builder()
                .froms(ChainChainConfigRouterFromArgs.builder()
                    .nodeName("string")
                    .build())
                .tos(ChainChainConfigRouterToArgs.builder()
                    .nodeName("string")
                    .build())
                .build())
            .build())
        .description("string")
        .repoName("string")
        .repoNamespaceName("string")
        .build());
    
    chain_resource = alicloud.cr.Chain("chainResource",
        chain_name="string",
        instance_id="string",
        chain_configs=[alicloud.cr.ChainChainConfigArgs(
            nodes=[alicloud.cr.ChainChainConfigNodeArgs(
                enable=False,
                node_configs=[alicloud.cr.ChainChainConfigNodeNodeConfigArgs(
                    deny_policies=[alicloud.cr.ChainChainConfigNodeNodeConfigDenyPolicyArgs(
                        action="string",
                        issue_count="string",
                        issue_level="string",
                        logic="string",
                    )],
                )],
                node_name="string",
            )],
            routers=[alicloud.cr.ChainChainConfigRouterArgs(
                froms=[alicloud.cr.ChainChainConfigRouterFromArgs(
                    node_name="string",
                )],
                tos=[alicloud.cr.ChainChainConfigRouterToArgs(
                    node_name="string",
                )],
            )],
        )],
        description="string",
        repo_name="string",
        repo_namespace_name="string")
    
    const chainResource = new alicloud.cr.Chain("chainResource", {
        chainName: "string",
        instanceId: "string",
        chainConfigs: [{
            nodes: [{
                enable: false,
                nodeConfigs: [{
                    denyPolicies: [{
                        action: "string",
                        issueCount: "string",
                        issueLevel: "string",
                        logic: "string",
                    }],
                }],
                nodeName: "string",
            }],
            routers: [{
                froms: [{
                    nodeName: "string",
                }],
                tos: [{
                    nodeName: "string",
                }],
            }],
        }],
        description: "string",
        repoName: "string",
        repoNamespaceName: "string",
    });
    
    type: alicloud:cr:Chain
    properties:
        chainConfigs:
            - nodes:
                - enable: false
                  nodeConfigs:
                    - denyPolicies:
                        - action: string
                          issueCount: string
                          issueLevel: string
                          logic: string
                  nodeName: string
              routers:
                - froms:
                    - nodeName: string
                  tos:
                    - nodeName: string
        chainName: string
        description: string
        instanceId: string
        repoName: string
        repoNamespaceName: string
    

    Chain Resource Properties

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

    Inputs

    The Chain resource accepts the following input properties:

    ChainName string
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    InstanceId string
    The ID of CR Enterprise Edition instance.
    ChainConfigs List<Pulumi.AliCloud.CR.Inputs.ChainChainConfig>
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    Description string
    The description delivery chain.
    RepoName string
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    RepoNamespaceName string
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    ChainName string
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    InstanceId string
    The ID of CR Enterprise Edition instance.
    ChainConfigs []ChainChainConfigArgs
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    Description string
    The description delivery chain.
    RepoName string
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    RepoNamespaceName string
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chainName String
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    instanceId String
    The ID of CR Enterprise Edition instance.
    chainConfigs List<ChainChainConfig>
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    description String
    The description delivery chain.
    repoName String
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    repoNamespaceName String
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chainName string
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    instanceId string
    The ID of CR Enterprise Edition instance.
    chainConfigs ChainChainConfig[]
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    description string
    The description delivery chain.
    repoName string
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    repoNamespaceName string
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chain_name str
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    instance_id str
    The ID of CR Enterprise Edition instance.
    chain_configs Sequence[ChainChainConfigArgs]
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    description str
    The description delivery chain.
    repo_name str
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    repo_namespace_name str
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chainName String
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    instanceId String
    The ID of CR Enterprise Edition instance.
    chainConfigs List<Property Map>
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    description String
    The description delivery chain.
    repoName String
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    repoNamespaceName String
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.

    Outputs

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

    ChainId string
    Delivery chain ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    ChainId string
    Delivery chain ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    chainId String
    Delivery chain ID.
    id String
    The provider-assigned unique ID for this managed resource.
    chainId string
    Delivery chain ID.
    id string
    The provider-assigned unique ID for this managed resource.
    chain_id str
    Delivery chain ID.
    id str
    The provider-assigned unique ID for this managed resource.
    chainId String
    Delivery chain ID.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Chain Resource

    Get an existing Chain 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?: ChainState, opts?: CustomResourceOptions): Chain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            chain_configs: Optional[Sequence[ChainChainConfigArgs]] = None,
            chain_id: Optional[str] = None,
            chain_name: Optional[str] = None,
            description: Optional[str] = None,
            instance_id: Optional[str] = None,
            repo_name: Optional[str] = None,
            repo_namespace_name: Optional[str] = None) -> Chain
    func GetChain(ctx *Context, name string, id IDInput, state *ChainState, opts ...ResourceOption) (*Chain, error)
    public static Chain Get(string name, Input<string> id, ChainState? state, CustomResourceOptions? opts = null)
    public static Chain get(String name, Output<String> id, ChainState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    ChainConfigs List<Pulumi.AliCloud.CR.Inputs.ChainChainConfig>
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    ChainId string
    Delivery chain ID.
    ChainName string
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    Description string
    The description delivery chain.
    InstanceId string
    The ID of CR Enterprise Edition instance.
    RepoName string
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    RepoNamespaceName string
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    ChainConfigs []ChainChainConfigArgs
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    ChainId string
    Delivery chain ID.
    ChainName string
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    Description string
    The description delivery chain.
    InstanceId string
    The ID of CR Enterprise Edition instance.
    RepoName string
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    RepoNamespaceName string
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chainConfigs List<ChainChainConfig>
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chainId String
    Delivery chain ID.
    chainName String
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    description String
    The description delivery chain.
    instanceId String
    The ID of CR Enterprise Edition instance.
    repoName String
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    repoNamespaceName String
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chainConfigs ChainChainConfig[]
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chainId string
    Delivery chain ID.
    chainName string
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    description string
    The description delivery chain.
    instanceId string
    The ID of CR Enterprise Edition instance.
    repoName string
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    repoNamespaceName string
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chain_configs Sequence[ChainChainConfigArgs]
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chain_id str
    Delivery chain ID.
    chain_name str
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    description str
    The description delivery chain.
    instance_id str
    The ID of CR Enterprise Edition instance.
    repo_name str
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    repo_namespace_name str
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chainConfigs List<Property Map>
    The configuration of delivery chain. See chain_config below. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.
    chainId String
    Delivery chain ID.
    chainName String
    The name of delivery chain. The length of the name is 1-64 characters, lowercase English letters and numbers, and the separators "_", "-", "." can be used, noted that the separator cannot be at the first or last position.
    description String
    The description delivery chain.
    instanceId String
    The ID of CR Enterprise Edition instance.
    repoName String
    The name of CR Enterprise Edition repository. NOTE: This parameter must specify a correct value, otherwise the created resource will be incorrect.
    repoNamespaceName String
    The name of CR Enterprise Edition namespace. NOTE: This parameter must specify the correct value, otherwise the created resource will be incorrect.

    Supporting Types

    ChainChainConfig, ChainChainConfigArgs

    Nodes List<Pulumi.AliCloud.CR.Inputs.ChainChainConfigNode>

    Each node in the delivery chain. See nodes below.

    NOTE: The from and to fields are all fixed, and their structure and the value of node_name are fixed. You can refer to the template given in the example for configuration.

    Routers List<Pulumi.AliCloud.CR.Inputs.ChainChainConfigRouter>
    Execution sequence relationship between delivery chain nodes. See routers below.
    Nodes []ChainChainConfigNode

    Each node in the delivery chain. See nodes below.

    NOTE: The from and to fields are all fixed, and their structure and the value of node_name are fixed. You can refer to the template given in the example for configuration.

    Routers []ChainChainConfigRouter
    Execution sequence relationship between delivery chain nodes. See routers below.
    nodes List<ChainChainConfigNode>

    Each node in the delivery chain. See nodes below.

    NOTE: The from and to fields are all fixed, and their structure and the value of node_name are fixed. You can refer to the template given in the example for configuration.

    routers List<ChainChainConfigRouter>
    Execution sequence relationship between delivery chain nodes. See routers below.
    nodes ChainChainConfigNode[]

    Each node in the delivery chain. See nodes below.

    NOTE: The from and to fields are all fixed, and their structure and the value of node_name are fixed. You can refer to the template given in the example for configuration.

    routers ChainChainConfigRouter[]
    Execution sequence relationship between delivery chain nodes. See routers below.
    nodes Sequence[ChainChainConfigNode]

    Each node in the delivery chain. See nodes below.

    NOTE: The from and to fields are all fixed, and their structure and the value of node_name are fixed. You can refer to the template given in the example for configuration.

    routers Sequence[ChainChainConfigRouter]
    Execution sequence relationship between delivery chain nodes. See routers below.
    nodes List<Property Map>

    Each node in the delivery chain. See nodes below.

    NOTE: The from and to fields are all fixed, and their structure and the value of node_name are fixed. You can refer to the template given in the example for configuration.

    routers List<Property Map>
    Execution sequence relationship between delivery chain nodes. See routers below.

    ChainChainConfigNode, ChainChainConfigNodeArgs

    Enable bool
    Whether to enable the delivery chain node. Valid values: true, false.
    NodeConfigs List<Pulumi.AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfig>
    The configuration of delivery chain node. See node_config below.
    NodeName string
    The name of delivery chain node.
    Enable bool
    Whether to enable the delivery chain node. Valid values: true, false.
    NodeConfigs []ChainChainConfigNodeNodeConfig
    The configuration of delivery chain node. See node_config below.
    NodeName string
    The name of delivery chain node.
    enable Boolean
    Whether to enable the delivery chain node. Valid values: true, false.
    nodeConfigs List<ChainChainConfigNodeNodeConfig>
    The configuration of delivery chain node. See node_config below.
    nodeName String
    The name of delivery chain node.
    enable boolean
    Whether to enable the delivery chain node. Valid values: true, false.
    nodeConfigs ChainChainConfigNodeNodeConfig[]
    The configuration of delivery chain node. See node_config below.
    nodeName string
    The name of delivery chain node.
    enable bool
    Whether to enable the delivery chain node. Valid values: true, false.
    node_configs Sequence[ChainChainConfigNodeNodeConfig]
    The configuration of delivery chain node. See node_config below.
    node_name str
    The name of delivery chain node.
    enable Boolean
    Whether to enable the delivery chain node. Valid values: true, false.
    nodeConfigs List<Property Map>
    The configuration of delivery chain node. See node_config below.
    nodeName String
    The name of delivery chain node.

    ChainChainConfigNodeNodeConfig, ChainChainConfigNodeNodeConfigArgs

    DenyPolicies List<Pulumi.AliCloud.CR.Inputs.ChainChainConfigNodeNodeConfigDenyPolicy>
    Blocking rules for scanning nodes in delivery chain nodes. See deny_policy below. Note: When node_name is VULNERABILITY_SCANNING, the parameters in deny_policy need to be filled in.
    DenyPolicies []ChainChainConfigNodeNodeConfigDenyPolicy
    Blocking rules for scanning nodes in delivery chain nodes. See deny_policy below. Note: When node_name is VULNERABILITY_SCANNING, the parameters in deny_policy need to be filled in.
    denyPolicies List<ChainChainConfigNodeNodeConfigDenyPolicy>
    Blocking rules for scanning nodes in delivery chain nodes. See deny_policy below. Note: When node_name is VULNERABILITY_SCANNING, the parameters in deny_policy need to be filled in.
    denyPolicies ChainChainConfigNodeNodeConfigDenyPolicy[]
    Blocking rules for scanning nodes in delivery chain nodes. See deny_policy below. Note: When node_name is VULNERABILITY_SCANNING, the parameters in deny_policy need to be filled in.
    deny_policies Sequence[ChainChainConfigNodeNodeConfigDenyPolicy]
    Blocking rules for scanning nodes in delivery chain nodes. See deny_policy below. Note: When node_name is VULNERABILITY_SCANNING, the parameters in deny_policy need to be filled in.
    denyPolicies List<Property Map>
    Blocking rules for scanning nodes in delivery chain nodes. See deny_policy below. Note: When node_name is VULNERABILITY_SCANNING, the parameters in deny_policy need to be filled in.

    ChainChainConfigNodeNodeConfigDenyPolicy, ChainChainConfigNodeNodeConfigDenyPolicyArgs

    Action string
    The action of trigger blocking. Valid values: BLOCK, BLOCK_RETAG, BLOCK_DELETE_TAG. While Block means block the delivery chain from continuing to execute, BLOCK_RETAG means block overwriting push image tag, BLOCK_DELETE_TAG means block deletion of mirror tags.
    IssueCount string
    The count of scanning vulnerabilities that triggers blocking.
    IssueLevel string
    The level of scanning vulnerability that triggers blocking. Valid values: LOW, MEDIUM, HIGH, UNKNOWN.
    Logic string
    The logic of trigger blocking. Valid values: AND, OR.
    Action string
    The action of trigger blocking. Valid values: BLOCK, BLOCK_RETAG, BLOCK_DELETE_TAG. While Block means block the delivery chain from continuing to execute, BLOCK_RETAG means block overwriting push image tag, BLOCK_DELETE_TAG means block deletion of mirror tags.
    IssueCount string
    The count of scanning vulnerabilities that triggers blocking.
    IssueLevel string
    The level of scanning vulnerability that triggers blocking. Valid values: LOW, MEDIUM, HIGH, UNKNOWN.
    Logic string
    The logic of trigger blocking. Valid values: AND, OR.
    action String
    The action of trigger blocking. Valid values: BLOCK, BLOCK_RETAG, BLOCK_DELETE_TAG. While Block means block the delivery chain from continuing to execute, BLOCK_RETAG means block overwriting push image tag, BLOCK_DELETE_TAG means block deletion of mirror tags.
    issueCount String
    The count of scanning vulnerabilities that triggers blocking.
    issueLevel String
    The level of scanning vulnerability that triggers blocking. Valid values: LOW, MEDIUM, HIGH, UNKNOWN.
    logic String
    The logic of trigger blocking. Valid values: AND, OR.
    action string
    The action of trigger blocking. Valid values: BLOCK, BLOCK_RETAG, BLOCK_DELETE_TAG. While Block means block the delivery chain from continuing to execute, BLOCK_RETAG means block overwriting push image tag, BLOCK_DELETE_TAG means block deletion of mirror tags.
    issueCount string
    The count of scanning vulnerabilities that triggers blocking.
    issueLevel string
    The level of scanning vulnerability that triggers blocking. Valid values: LOW, MEDIUM, HIGH, UNKNOWN.
    logic string
    The logic of trigger blocking. Valid values: AND, OR.
    action str
    The action of trigger blocking. Valid values: BLOCK, BLOCK_RETAG, BLOCK_DELETE_TAG. While Block means block the delivery chain from continuing to execute, BLOCK_RETAG means block overwriting push image tag, BLOCK_DELETE_TAG means block deletion of mirror tags.
    issue_count str
    The count of scanning vulnerabilities that triggers blocking.
    issue_level str
    The level of scanning vulnerability that triggers blocking. Valid values: LOW, MEDIUM, HIGH, UNKNOWN.
    logic str
    The logic of trigger blocking. Valid values: AND, OR.
    action String
    The action of trigger blocking. Valid values: BLOCK, BLOCK_RETAG, BLOCK_DELETE_TAG. While Block means block the delivery chain from continuing to execute, BLOCK_RETAG means block overwriting push image tag, BLOCK_DELETE_TAG means block deletion of mirror tags.
    issueCount String
    The count of scanning vulnerabilities that triggers blocking.
    issueLevel String
    The level of scanning vulnerability that triggers blocking. Valid values: LOW, MEDIUM, HIGH, UNKNOWN.
    logic String
    The logic of trigger blocking. Valid values: AND, OR.

    ChainChainConfigRouter, ChainChainConfigRouterArgs

    Froms []ChainChainConfigRouterFrom
    Source node. See from below.
    Tos []ChainChainConfigRouterTo
    Destination node. See to below.
    froms List<ChainChainConfigRouterFrom>
    Source node. See from below.
    tos List<ChainChainConfigRouterTo>
    Destination node. See to below.
    froms ChainChainConfigRouterFrom[]
    Source node. See from below.
    tos ChainChainConfigRouterTo[]
    Destination node. See to below.
    froms Sequence[ChainChainConfigRouterFrom]
    Source node. See from below.
    tos Sequence[ChainChainConfigRouterTo]
    Destination node. See to below.
    froms List<Property Map>
    Source node. See from below.
    tos List<Property Map>
    Destination node. See to below.

    ChainChainConfigRouterFrom, ChainChainConfigRouterFromArgs

    NodeName string
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.
    NodeName string
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.
    nodeName String
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.
    nodeName string
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.
    node_name str
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.
    nodeName String
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.

    ChainChainConfigRouterTo, ChainChainConfigRouterToArgs

    NodeName string
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.
    NodeName string
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.
    nodeName String
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.
    nodeName string
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.
    node_name str
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.
    nodeName String
    The name of node. Valid values: DOCKER_IMAGE_BUILD, DOCKER_IMAGE_PUSH, VULNERABILITY_SCANNING, ACTIVATE_REPLICATION, TRIGGER, SNAPSHOT, TRIGGER_SNAPSHOT.

    Import

    CR Chain can be imported using the id, e.g.

    $ pulumi import alicloud:cr/chain:Chain example <instance_id>:<chain_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
    Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi