1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cs
  5. RegistryEnterpriseSyncRule
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.cs.RegistryEnterpriseSyncRule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    This resource will help you to manager Container Registry Enterprise Edition sync rules.

    For information about Container Registry Enterprise Edition sync rules and how to use it, see Create a Sync Rule

    NOTE: Available since v1.90.0.

    NOTE: You need to set your registry password in Container Registry Enterprise Edition console before use this resource.

    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 sourceRegistryEnterpriseInstance = new alicloud.cr.RegistryEnterpriseInstance("sourceRegistryEnterpriseInstance", {
        paymentType: "Subscription",
        period: 1,
        renewPeriod: 0,
        renewalStatus: "ManualRenewal",
        instanceType: "Advanced",
        instanceName: `${name}-source`,
    });
    const targetRegistryEnterpriseInstance = new alicloud.cr.RegistryEnterpriseInstance("targetRegistryEnterpriseInstance", {
        paymentType: "Subscription",
        period: 1,
        renewPeriod: 0,
        renewalStatus: "ManualRenewal",
        instanceType: "Advanced",
        instanceName: `${name}-target`,
    });
    const sourceRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("sourceRegistryEnterpriseNamespace", {
        instanceId: sourceRegistryEnterpriseInstance.id,
        autoCreate: false,
        defaultVisibility: "PUBLIC",
    });
    const targetRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("targetRegistryEnterpriseNamespace", {
        instanceId: targetRegistryEnterpriseInstance.id,
        autoCreate: false,
        defaultVisibility: "PUBLIC",
    });
    const sourceRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("sourceRegistryEnterpriseRepo", {
        instanceId: sourceRegistryEnterpriseInstance.id,
        namespace: sourceRegistryEnterpriseNamespace.name,
        summary: "this is summary of my new repo",
        repoType: "PUBLIC",
        detail: "this is a public repo",
    });
    const targetRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("targetRegistryEnterpriseRepo", {
        instanceId: targetRegistryEnterpriseInstance.id,
        namespace: targetRegistryEnterpriseNamespace.name,
        summary: "this is summary of my new repo",
        repoType: "PUBLIC",
        detail: "this is a public repo",
    });
    const defaultRegions = alicloud.getRegions({
        current: true,
    });
    const defaultRegistryEnterpriseSyncRule = new alicloud.cs.RegistryEnterpriseSyncRule("defaultRegistryEnterpriseSyncRule", {
        instanceId: sourceRegistryEnterpriseInstance.id,
        namespaceName: sourceRegistryEnterpriseNamespace.name,
        targetRegionId: defaultRegions.then(defaultRegions => defaultRegions.regions?.[0]?.id),
        targetInstanceId: targetRegistryEnterpriseInstance.id,
        targetNamespaceName: targetRegistryEnterpriseNamespace.name,
        tagFilter: ".*",
        repoName: sourceRegistryEnterpriseRepo.name,
        targetRepoName: targetRegistryEnterpriseRepo.name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    source_registry_enterprise_instance = alicloud.cr.RegistryEnterpriseInstance("sourceRegistryEnterpriseInstance",
        payment_type="Subscription",
        period=1,
        renew_period=0,
        renewal_status="ManualRenewal",
        instance_type="Advanced",
        instance_name=f"{name}-source")
    target_registry_enterprise_instance = alicloud.cr.RegistryEnterpriseInstance("targetRegistryEnterpriseInstance",
        payment_type="Subscription",
        period=1,
        renew_period=0,
        renewal_status="ManualRenewal",
        instance_type="Advanced",
        instance_name=f"{name}-target")
    source_registry_enterprise_namespace = alicloud.cs.RegistryEnterpriseNamespace("sourceRegistryEnterpriseNamespace",
        instance_id=source_registry_enterprise_instance.id,
        auto_create=False,
        default_visibility="PUBLIC")
    target_registry_enterprise_namespace = alicloud.cs.RegistryEnterpriseNamespace("targetRegistryEnterpriseNamespace",
        instance_id=target_registry_enterprise_instance.id,
        auto_create=False,
        default_visibility="PUBLIC")
    source_registry_enterprise_repo = alicloud.cs.RegistryEnterpriseRepo("sourceRegistryEnterpriseRepo",
        instance_id=source_registry_enterprise_instance.id,
        namespace=source_registry_enterprise_namespace.name,
        summary="this is summary of my new repo",
        repo_type="PUBLIC",
        detail="this is a public repo")
    target_registry_enterprise_repo = alicloud.cs.RegistryEnterpriseRepo("targetRegistryEnterpriseRepo",
        instance_id=target_registry_enterprise_instance.id,
        namespace=target_registry_enterprise_namespace.name,
        summary="this is summary of my new repo",
        repo_type="PUBLIC",
        detail="this is a public repo")
    default_regions = alicloud.get_regions(current=True)
    default_registry_enterprise_sync_rule = alicloud.cs.RegistryEnterpriseSyncRule("defaultRegistryEnterpriseSyncRule",
        instance_id=source_registry_enterprise_instance.id,
        namespace_name=source_registry_enterprise_namespace.name,
        target_region_id=default_regions.regions[0].id,
        target_instance_id=target_registry_enterprise_instance.id,
        target_namespace_name=target_registry_enterprise_namespace.name,
        tag_filter=".*",
        repo_name=source_registry_enterprise_repo.name,
        target_repo_name=target_registry_enterprise_repo.name)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"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
    		}
    		sourceRegistryEnterpriseInstance, err := cr.NewRegistryEnterpriseInstance(ctx, "sourceRegistryEnterpriseInstance", &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(fmt.Sprintf("%v-source", name)),
    		})
    		if err != nil {
    			return err
    		}
    		targetRegistryEnterpriseInstance, err := cr.NewRegistryEnterpriseInstance(ctx, "targetRegistryEnterpriseInstance", &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(fmt.Sprintf("%v-target", name)),
    		})
    		if err != nil {
    			return err
    		}
    		sourceRegistryEnterpriseNamespace, err := cs.NewRegistryEnterpriseNamespace(ctx, "sourceRegistryEnterpriseNamespace", &cs.RegistryEnterpriseNamespaceArgs{
    			InstanceId:        sourceRegistryEnterpriseInstance.ID(),
    			AutoCreate:        pulumi.Bool(false),
    			DefaultVisibility: pulumi.String("PUBLIC"),
    		})
    		if err != nil {
    			return err
    		}
    		targetRegistryEnterpriseNamespace, err := cs.NewRegistryEnterpriseNamespace(ctx, "targetRegistryEnterpriseNamespace", &cs.RegistryEnterpriseNamespaceArgs{
    			InstanceId:        targetRegistryEnterpriseInstance.ID(),
    			AutoCreate:        pulumi.Bool(false),
    			DefaultVisibility: pulumi.String("PUBLIC"),
    		})
    		if err != nil {
    			return err
    		}
    		sourceRegistryEnterpriseRepo, err := cs.NewRegistryEnterpriseRepo(ctx, "sourceRegistryEnterpriseRepo", &cs.RegistryEnterpriseRepoArgs{
    			InstanceId: sourceRegistryEnterpriseInstance.ID(),
    			Namespace:  sourceRegistryEnterpriseNamespace.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
    		}
    		targetRegistryEnterpriseRepo, err := cs.NewRegistryEnterpriseRepo(ctx, "targetRegistryEnterpriseRepo", &cs.RegistryEnterpriseRepoArgs{
    			InstanceId: targetRegistryEnterpriseInstance.ID(),
    			Namespace:  targetRegistryEnterpriseNamespace.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
    		}
    		defaultRegions, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
    			Current: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = cs.NewRegistryEnterpriseSyncRule(ctx, "defaultRegistryEnterpriseSyncRule", &cs.RegistryEnterpriseSyncRuleArgs{
    			InstanceId:          sourceRegistryEnterpriseInstance.ID(),
    			NamespaceName:       sourceRegistryEnterpriseNamespace.Name,
    			TargetRegionId:      pulumi.String(defaultRegions.Regions[0].Id),
    			TargetInstanceId:    targetRegistryEnterpriseInstance.ID(),
    			TargetNamespaceName: targetRegistryEnterpriseNamespace.Name,
    			TagFilter:           pulumi.String(".*"),
    			RepoName:            sourceRegistryEnterpriseRepo.Name,
    			TargetRepoName:      targetRegistryEnterpriseRepo.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 sourceRegistryEnterpriseInstance = new AliCloud.CR.RegistryEnterpriseInstance("sourceRegistryEnterpriseInstance", new()
        {
            PaymentType = "Subscription",
            Period = 1,
            RenewPeriod = 0,
            RenewalStatus = "ManualRenewal",
            InstanceType = "Advanced",
            InstanceName = $"{name}-source",
        });
    
        var targetRegistryEnterpriseInstance = new AliCloud.CR.RegistryEnterpriseInstance("targetRegistryEnterpriseInstance", new()
        {
            PaymentType = "Subscription",
            Period = 1,
            RenewPeriod = 0,
            RenewalStatus = "ManualRenewal",
            InstanceType = "Advanced",
            InstanceName = $"{name}-target",
        });
    
        var sourceRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("sourceRegistryEnterpriseNamespace", new()
        {
            InstanceId = sourceRegistryEnterpriseInstance.Id,
            AutoCreate = false,
            DefaultVisibility = "PUBLIC",
        });
    
        var targetRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("targetRegistryEnterpriseNamespace", new()
        {
            InstanceId = targetRegistryEnterpriseInstance.Id,
            AutoCreate = false,
            DefaultVisibility = "PUBLIC",
        });
    
        var sourceRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("sourceRegistryEnterpriseRepo", new()
        {
            InstanceId = sourceRegistryEnterpriseInstance.Id,
            Namespace = sourceRegistryEnterpriseNamespace.Name,
            Summary = "this is summary of my new repo",
            RepoType = "PUBLIC",
            Detail = "this is a public repo",
        });
    
        var targetRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("targetRegistryEnterpriseRepo", new()
        {
            InstanceId = targetRegistryEnterpriseInstance.Id,
            Namespace = targetRegistryEnterpriseNamespace.Name,
            Summary = "this is summary of my new repo",
            RepoType = "PUBLIC",
            Detail = "this is a public repo",
        });
    
        var defaultRegions = AliCloud.GetRegions.Invoke(new()
        {
            Current = true,
        });
    
        var defaultRegistryEnterpriseSyncRule = new AliCloud.CS.RegistryEnterpriseSyncRule("defaultRegistryEnterpriseSyncRule", new()
        {
            InstanceId = sourceRegistryEnterpriseInstance.Id,
            NamespaceName = sourceRegistryEnterpriseNamespace.Name,
            TargetRegionId = defaultRegions.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id),
            TargetInstanceId = targetRegistryEnterpriseInstance.Id,
            TargetNamespaceName = targetRegistryEnterpriseNamespace.Name,
            TagFilter = ".*",
            RepoName = sourceRegistryEnterpriseRepo.Name,
            TargetRepoName = targetRegistryEnterpriseRepo.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.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetRegionsArgs;
    import com.pulumi.alicloud.cs.RegistryEnterpriseSyncRule;
    import com.pulumi.alicloud.cs.RegistryEnterpriseSyncRuleArgs;
    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 sourceRegistryEnterpriseInstance = new RegistryEnterpriseInstance("sourceRegistryEnterpriseInstance", RegistryEnterpriseInstanceArgs.builder()        
                .paymentType("Subscription")
                .period(1)
                .renewPeriod(0)
                .renewalStatus("ManualRenewal")
                .instanceType("Advanced")
                .instanceName(String.format("%s-source", name))
                .build());
    
            var targetRegistryEnterpriseInstance = new RegistryEnterpriseInstance("targetRegistryEnterpriseInstance", RegistryEnterpriseInstanceArgs.builder()        
                .paymentType("Subscription")
                .period(1)
                .renewPeriod(0)
                .renewalStatus("ManualRenewal")
                .instanceType("Advanced")
                .instanceName(String.format("%s-target", name))
                .build());
    
            var sourceRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("sourceRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()        
                .instanceId(sourceRegistryEnterpriseInstance.id())
                .autoCreate(false)
                .defaultVisibility("PUBLIC")
                .build());
    
            var targetRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("targetRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()        
                .instanceId(targetRegistryEnterpriseInstance.id())
                .autoCreate(false)
                .defaultVisibility("PUBLIC")
                .build());
    
            var sourceRegistryEnterpriseRepo = new RegistryEnterpriseRepo("sourceRegistryEnterpriseRepo", RegistryEnterpriseRepoArgs.builder()        
                .instanceId(sourceRegistryEnterpriseInstance.id())
                .namespace(sourceRegistryEnterpriseNamespace.name())
                .summary("this is summary of my new repo")
                .repoType("PUBLIC")
                .detail("this is a public repo")
                .build());
    
            var targetRegistryEnterpriseRepo = new RegistryEnterpriseRepo("targetRegistryEnterpriseRepo", RegistryEnterpriseRepoArgs.builder()        
                .instanceId(targetRegistryEnterpriseInstance.id())
                .namespace(targetRegistryEnterpriseNamespace.name())
                .summary("this is summary of my new repo")
                .repoType("PUBLIC")
                .detail("this is a public repo")
                .build());
    
            final var defaultRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
                .current(true)
                .build());
    
            var defaultRegistryEnterpriseSyncRule = new RegistryEnterpriseSyncRule("defaultRegistryEnterpriseSyncRule", RegistryEnterpriseSyncRuleArgs.builder()        
                .instanceId(sourceRegistryEnterpriseInstance.id())
                .namespaceName(sourceRegistryEnterpriseNamespace.name())
                .targetRegionId(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id()))
                .targetInstanceId(targetRegistryEnterpriseInstance.id())
                .targetNamespaceName(targetRegistryEnterpriseNamespace.name())
                .tagFilter(".*")
                .repoName(sourceRegistryEnterpriseRepo.name())
                .targetRepoName(targetRegistryEnterpriseRepo.name())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      sourceRegistryEnterpriseInstance:
        type: alicloud:cr:RegistryEnterpriseInstance
        properties:
          paymentType: Subscription
          period: 1
          renewPeriod: 0
          renewalStatus: ManualRenewal
          instanceType: Advanced
          instanceName: ${name}-source
      targetRegistryEnterpriseInstance:
        type: alicloud:cr:RegistryEnterpriseInstance
        properties:
          paymentType: Subscription
          period: 1
          renewPeriod: 0
          renewalStatus: ManualRenewal
          instanceType: Advanced
          instanceName: ${name}-target
      sourceRegistryEnterpriseNamespace:
        type: alicloud:cs:RegistryEnterpriseNamespace
        properties:
          instanceId: ${sourceRegistryEnterpriseInstance.id}
          autoCreate: false
          defaultVisibility: PUBLIC
      targetRegistryEnterpriseNamespace:
        type: alicloud:cs:RegistryEnterpriseNamespace
        properties:
          instanceId: ${targetRegistryEnterpriseInstance.id}
          autoCreate: false
          defaultVisibility: PUBLIC
      sourceRegistryEnterpriseRepo:
        type: alicloud:cs:RegistryEnterpriseRepo
        properties:
          instanceId: ${sourceRegistryEnterpriseInstance.id}
          namespace: ${sourceRegistryEnterpriseNamespace.name}
          summary: this is summary of my new repo
          repoType: PUBLIC
          detail: this is a public repo
      targetRegistryEnterpriseRepo:
        type: alicloud:cs:RegistryEnterpriseRepo
        properties:
          instanceId: ${targetRegistryEnterpriseInstance.id}
          namespace: ${targetRegistryEnterpriseNamespace.name}
          summary: this is summary of my new repo
          repoType: PUBLIC
          detail: this is a public repo
      defaultRegistryEnterpriseSyncRule:
        type: alicloud:cs:RegistryEnterpriseSyncRule
        properties:
          instanceId: ${sourceRegistryEnterpriseInstance.id}
          namespaceName: ${sourceRegistryEnterpriseNamespace.name}
          targetRegionId: ${defaultRegions.regions[0].id}
          targetInstanceId: ${targetRegistryEnterpriseInstance.id}
          targetNamespaceName: ${targetRegistryEnterpriseNamespace.name}
          tagFilter: .*
          repoName: ${sourceRegistryEnterpriseRepo.name}
          targetRepoName: ${targetRegistryEnterpriseRepo.name}
    variables:
      defaultRegions:
        fn::invoke:
          Function: alicloud:getRegions
          Arguments:
            current: true
    

    Create RegistryEnterpriseSyncRule Resource

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

    Constructor syntax

    new RegistryEnterpriseSyncRule(name: string, args: RegistryEnterpriseSyncRuleArgs, opts?: CustomResourceOptions);
    @overload
    def RegistryEnterpriseSyncRule(resource_name: str,
                                   args: RegistryEnterpriseSyncRuleArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def RegistryEnterpriseSyncRule(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   instance_id: Optional[str] = None,
                                   namespace_name: Optional[str] = None,
                                   tag_filter: Optional[str] = None,
                                   target_instance_id: Optional[str] = None,
                                   target_namespace_name: Optional[str] = None,
                                   target_region_id: Optional[str] = None,
                                   name: Optional[str] = None,
                                   repo_name: Optional[str] = None,
                                   target_repo_name: Optional[str] = None)
    func NewRegistryEnterpriseSyncRule(ctx *Context, name string, args RegistryEnterpriseSyncRuleArgs, opts ...ResourceOption) (*RegistryEnterpriseSyncRule, error)
    public RegistryEnterpriseSyncRule(string name, RegistryEnterpriseSyncRuleArgs args, CustomResourceOptions? opts = null)
    public RegistryEnterpriseSyncRule(String name, RegistryEnterpriseSyncRuleArgs args)
    public RegistryEnterpriseSyncRule(String name, RegistryEnterpriseSyncRuleArgs args, CustomResourceOptions options)
    
    type: alicloud:cs:RegistryEnterpriseSyncRule
    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 RegistryEnterpriseSyncRuleArgs
    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 RegistryEnterpriseSyncRuleArgs
    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 RegistryEnterpriseSyncRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RegistryEnterpriseSyncRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RegistryEnterpriseSyncRuleArgs
    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 registryEnterpriseSyncRuleResource = new AliCloud.CS.RegistryEnterpriseSyncRule("registryEnterpriseSyncRuleResource", new()
    {
        InstanceId = "string",
        NamespaceName = "string",
        TagFilter = "string",
        TargetInstanceId = "string",
        TargetNamespaceName = "string",
        TargetRegionId = "string",
        Name = "string",
        RepoName = "string",
        TargetRepoName = "string",
    });
    
    example, err := cs.NewRegistryEnterpriseSyncRule(ctx, "registryEnterpriseSyncRuleResource", &cs.RegistryEnterpriseSyncRuleArgs{
    	InstanceId:          pulumi.String("string"),
    	NamespaceName:       pulumi.String("string"),
    	TagFilter:           pulumi.String("string"),
    	TargetInstanceId:    pulumi.String("string"),
    	TargetNamespaceName: pulumi.String("string"),
    	TargetRegionId:      pulumi.String("string"),
    	Name:                pulumi.String("string"),
    	RepoName:            pulumi.String("string"),
    	TargetRepoName:      pulumi.String("string"),
    })
    
    var registryEnterpriseSyncRuleResource = new RegistryEnterpriseSyncRule("registryEnterpriseSyncRuleResource", RegistryEnterpriseSyncRuleArgs.builder()        
        .instanceId("string")
        .namespaceName("string")
        .tagFilter("string")
        .targetInstanceId("string")
        .targetNamespaceName("string")
        .targetRegionId("string")
        .name("string")
        .repoName("string")
        .targetRepoName("string")
        .build());
    
    registry_enterprise_sync_rule_resource = alicloud.cs.RegistryEnterpriseSyncRule("registryEnterpriseSyncRuleResource",
        instance_id="string",
        namespace_name="string",
        tag_filter="string",
        target_instance_id="string",
        target_namespace_name="string",
        target_region_id="string",
        name="string",
        repo_name="string",
        target_repo_name="string")
    
    const registryEnterpriseSyncRuleResource = new alicloud.cs.RegistryEnterpriseSyncRule("registryEnterpriseSyncRuleResource", {
        instanceId: "string",
        namespaceName: "string",
        tagFilter: "string",
        targetInstanceId: "string",
        targetNamespaceName: "string",
        targetRegionId: "string",
        name: "string",
        repoName: "string",
        targetRepoName: "string",
    });
    
    type: alicloud:cs:RegistryEnterpriseSyncRule
    properties:
        instanceId: string
        name: string
        namespaceName: string
        repoName: string
        tagFilter: string
        targetInstanceId: string
        targetNamespaceName: string
        targetRegionId: string
        targetRepoName: string
    

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

    InstanceId string
    ID of Container Registry Enterprise Edition source instance.
    NamespaceName string
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    TagFilter string
    The regular expression used to filter image tags for synchronization in the source repository.
    TargetInstanceId string
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    TargetNamespaceName string
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    TargetRegionId string
    The target region to be synchronized.
    Name string
    Name of Container Registry Enterprise Edition sync rule.
    RepoName string
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    TargetRepoName string
    Name of the target repository.
    InstanceId string
    ID of Container Registry Enterprise Edition source instance.
    NamespaceName string
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    TagFilter string
    The regular expression used to filter image tags for synchronization in the source repository.
    TargetInstanceId string
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    TargetNamespaceName string
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    TargetRegionId string
    The target region to be synchronized.
    Name string
    Name of Container Registry Enterprise Edition sync rule.
    RepoName string
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    TargetRepoName string
    Name of the target repository.
    instanceId String
    ID of Container Registry Enterprise Edition source instance.
    namespaceName String
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    tagFilter String
    The regular expression used to filter image tags for synchronization in the source repository.
    targetInstanceId String
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    targetNamespaceName String
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    targetRegionId String
    The target region to be synchronized.
    name String
    Name of Container Registry Enterprise Edition sync rule.
    repoName String
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    targetRepoName String
    Name of the target repository.
    instanceId string
    ID of Container Registry Enterprise Edition source instance.
    namespaceName string
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    tagFilter string
    The regular expression used to filter image tags for synchronization in the source repository.
    targetInstanceId string
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    targetNamespaceName string
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    targetRegionId string
    The target region to be synchronized.
    name string
    Name of Container Registry Enterprise Edition sync rule.
    repoName string
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    targetRepoName string
    Name of the target repository.
    instance_id str
    ID of Container Registry Enterprise Edition source instance.
    namespace_name str
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    tag_filter str
    The regular expression used to filter image tags for synchronization in the source repository.
    target_instance_id str
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    target_namespace_name str
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    target_region_id str
    The target region to be synchronized.
    name str
    Name of Container Registry Enterprise Edition sync rule.
    repo_name str
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    target_repo_name str
    Name of the target repository.
    instanceId String
    ID of Container Registry Enterprise Edition source instance.
    namespaceName String
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    tagFilter String
    The regular expression used to filter image tags for synchronization in the source repository.
    targetInstanceId String
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    targetNamespaceName String
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    targetRegionId String
    The target region to be synchronized.
    name String
    Name of Container Registry Enterprise Edition sync rule.
    repoName String
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    targetRepoName String
    Name of the target repository.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId string
    The uuid of Container Registry Enterprise Edition sync rule.
    SyncDirection string
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    SyncScope string
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId string
    The uuid of Container Registry Enterprise Edition sync rule.
    SyncDirection string
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    SyncScope string
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId String
    The uuid of Container Registry Enterprise Edition sync rule.
    syncDirection String
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    syncScope String
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    id string
    The provider-assigned unique ID for this managed resource.
    ruleId string
    The uuid of Container Registry Enterprise Edition sync rule.
    syncDirection string
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    syncScope string
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    id str
    The provider-assigned unique ID for this managed resource.
    rule_id str
    The uuid of Container Registry Enterprise Edition sync rule.
    sync_direction str
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    sync_scope str
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId String
    The uuid of Container Registry Enterprise Edition sync rule.
    syncDirection String
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    syncScope String
    REPO or NAMESPACE,the scope that the synchronization rule applies.

    Look up Existing RegistryEnterpriseSyncRule Resource

    Get an existing RegistryEnterpriseSyncRule 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?: RegistryEnterpriseSyncRuleState, opts?: CustomResourceOptions): RegistryEnterpriseSyncRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            instance_id: Optional[str] = None,
            name: Optional[str] = None,
            namespace_name: Optional[str] = None,
            repo_name: Optional[str] = None,
            rule_id: Optional[str] = None,
            sync_direction: Optional[str] = None,
            sync_scope: Optional[str] = None,
            tag_filter: Optional[str] = None,
            target_instance_id: Optional[str] = None,
            target_namespace_name: Optional[str] = None,
            target_region_id: Optional[str] = None,
            target_repo_name: Optional[str] = None) -> RegistryEnterpriseSyncRule
    func GetRegistryEnterpriseSyncRule(ctx *Context, name string, id IDInput, state *RegistryEnterpriseSyncRuleState, opts ...ResourceOption) (*RegistryEnterpriseSyncRule, error)
    public static RegistryEnterpriseSyncRule Get(string name, Input<string> id, RegistryEnterpriseSyncRuleState? state, CustomResourceOptions? opts = null)
    public static RegistryEnterpriseSyncRule get(String name, Output<String> id, RegistryEnterpriseSyncRuleState 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:
    InstanceId string
    ID of Container Registry Enterprise Edition source instance.
    Name string
    Name of Container Registry Enterprise Edition sync rule.
    NamespaceName string
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    RepoName string
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    RuleId string
    The uuid of Container Registry Enterprise Edition sync rule.
    SyncDirection string
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    SyncScope string
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    TagFilter string
    The regular expression used to filter image tags for synchronization in the source repository.
    TargetInstanceId string
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    TargetNamespaceName string
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    TargetRegionId string
    The target region to be synchronized.
    TargetRepoName string
    Name of the target repository.
    InstanceId string
    ID of Container Registry Enterprise Edition source instance.
    Name string
    Name of Container Registry Enterprise Edition sync rule.
    NamespaceName string
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    RepoName string
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    RuleId string
    The uuid of Container Registry Enterprise Edition sync rule.
    SyncDirection string
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    SyncScope string
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    TagFilter string
    The regular expression used to filter image tags for synchronization in the source repository.
    TargetInstanceId string
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    TargetNamespaceName string
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    TargetRegionId string
    The target region to be synchronized.
    TargetRepoName string
    Name of the target repository.
    instanceId String
    ID of Container Registry Enterprise Edition source instance.
    name String
    Name of Container Registry Enterprise Edition sync rule.
    namespaceName String
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    repoName String
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    ruleId String
    The uuid of Container Registry Enterprise Edition sync rule.
    syncDirection String
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    syncScope String
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    tagFilter String
    The regular expression used to filter image tags for synchronization in the source repository.
    targetInstanceId String
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    targetNamespaceName String
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    targetRegionId String
    The target region to be synchronized.
    targetRepoName String
    Name of the target repository.
    instanceId string
    ID of Container Registry Enterprise Edition source instance.
    name string
    Name of Container Registry Enterprise Edition sync rule.
    namespaceName string
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    repoName string
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    ruleId string
    The uuid of Container Registry Enterprise Edition sync rule.
    syncDirection string
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    syncScope string
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    tagFilter string
    The regular expression used to filter image tags for synchronization in the source repository.
    targetInstanceId string
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    targetNamespaceName string
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    targetRegionId string
    The target region to be synchronized.
    targetRepoName string
    Name of the target repository.
    instance_id str
    ID of Container Registry Enterprise Edition source instance.
    name str
    Name of Container Registry Enterprise Edition sync rule.
    namespace_name str
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    repo_name str
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    rule_id str
    The uuid of Container Registry Enterprise Edition sync rule.
    sync_direction str
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    sync_scope str
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    tag_filter str
    The regular expression used to filter image tags for synchronization in the source repository.
    target_instance_id str
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    target_namespace_name str
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    target_region_id str
    The target region to be synchronized.
    target_repo_name str
    Name of the target repository.
    instanceId String
    ID of Container Registry Enterprise Edition source instance.
    name String
    Name of Container Registry Enterprise Edition sync rule.
    namespaceName String
    Name of Container Registry Enterprise Edition source namespace. It can contain 2 to 30 characters.
    repoName String
    Name of the source repository which should be set together with target_repo_name, if empty means that the synchronization scope is the entire namespace level.
    ruleId String
    The uuid of Container Registry Enterprise Edition sync rule.
    syncDirection String
    FROM or TO, the direction of synchronization. FROM means source instance, TO means target instance.
    syncScope String
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    tagFilter String
    The regular expression used to filter image tags for synchronization in the source repository.
    targetInstanceId String
    ID of Container Registry Enterprise Edition target instance to be synchronized.
    targetNamespaceName String
    Name of Container Registry Enterprise Edition target namespace to be synchronized. It can contain 2 to 30 characters.
    targetRegionId String
    The target region to be synchronized.
    targetRepoName String
    Name of the target repository.

    Import

    Container Registry Enterprise Edition sync rule can be imported using the id. Format to {instance_id}:{namespace_name}:{rule_id}, e.g.

    $ pulumi import alicloud:cs/registryEnterpriseSyncRule:RegistryEnterpriseSyncRule default `cri-xxx:my-namespace:crsr-yyy`
    

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi