1. Packages
  2. Alicloud Provider
  3. API Docs
  4. cs
  5. RegistryEnterpriseSyncRule
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.cs.RegistryEnterpriseSyncRule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a Container Registry Enterprise Edition Sync Rule resource.

    For information about Container Registry Enterprise Edition Sync Rule and how to use it, see What is 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";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const default = alicloud.getRegions({
        current: true,
    });
    const defaultInteger = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const source = new alicloud.cr.RegistryEnterpriseInstance("source", {
        paymentType: "Subscription",
        period: 1,
        renewPeriod: 0,
        renewalStatus: "ManualRenewal",
        instanceType: "Advanced",
        instanceName: `${name}-source-${defaultInteger.result}`,
    });
    const target = new alicloud.cr.RegistryEnterpriseInstance("target", {
        paymentType: "Subscription",
        period: 1,
        renewPeriod: 0,
        renewalStatus: "ManualRenewal",
        instanceType: "Advanced",
        instanceName: `${name}-target-${defaultInteger.result}`,
    });
    const sourceRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("source", {
        instanceId: source.id,
        name: `${name}-${defaultInteger.result}`,
        autoCreate: false,
        defaultVisibility: "PUBLIC",
    });
    const targetRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("target", {
        instanceId: target.id,
        name: `${name}-${defaultInteger.result}`,
        autoCreate: false,
        defaultVisibility: "PUBLIC",
    });
    const sourceRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("source", {
        instanceId: source.id,
        namespace: sourceRegistryEnterpriseNamespace.name,
        name: `${name}-${defaultInteger.result}`,
        summary: "this is summary of my new repo",
        repoType: "PUBLIC",
    });
    const targetRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("target", {
        instanceId: target.id,
        namespace: targetRegistryEnterpriseNamespace.name,
        name: `${name}-${defaultInteger.result}`,
        summary: "this is summary of my new repo",
        repoType: "PUBLIC",
    });
    const defaultRegistryEnterpriseSyncRule = new alicloud.cs.RegistryEnterpriseSyncRule("default", {
        instanceId: source.id,
        namespaceName: sourceRegistryEnterpriseNamespace.name,
        name: `${name}-${defaultInteger.result}`,
        targetInstanceId: target.id,
        targetNamespaceName: targetRegistryEnterpriseNamespace.name,
        targetRegionId: _default.then(_default => _default.regions?.[0]?.id),
        tagFilter: ".*",
        repoName: sourceRegistryEnterpriseRepo.name,
        targetRepoName: targetRegistryEnterpriseRepo.name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.get_regions(current=True)
    default_integer = random.index.Integer("default",
        min=10000,
        max=99999)
    source = alicloud.cr.RegistryEnterpriseInstance("source",
        payment_type="Subscription",
        period=1,
        renew_period=0,
        renewal_status="ManualRenewal",
        instance_type="Advanced",
        instance_name=f"{name}-source-{default_integer['result']}")
    target = alicloud.cr.RegistryEnterpriseInstance("target",
        payment_type="Subscription",
        period=1,
        renew_period=0,
        renewal_status="ManualRenewal",
        instance_type="Advanced",
        instance_name=f"{name}-target-{default_integer['result']}")
    source_registry_enterprise_namespace = alicloud.cs.RegistryEnterpriseNamespace("source",
        instance_id=source.id,
        name=f"{name}-{default_integer['result']}",
        auto_create=False,
        default_visibility="PUBLIC")
    target_registry_enterprise_namespace = alicloud.cs.RegistryEnterpriseNamespace("target",
        instance_id=target.id,
        name=f"{name}-{default_integer['result']}",
        auto_create=False,
        default_visibility="PUBLIC")
    source_registry_enterprise_repo = alicloud.cs.RegistryEnterpriseRepo("source",
        instance_id=source.id,
        namespace=source_registry_enterprise_namespace.name,
        name=f"{name}-{default_integer['result']}",
        summary="this is summary of my new repo",
        repo_type="PUBLIC")
    target_registry_enterprise_repo = alicloud.cs.RegistryEnterpriseRepo("target",
        instance_id=target.id,
        namespace=target_registry_enterprise_namespace.name,
        name=f"{name}-{default_integer['result']}",
        summary="this is summary of my new repo",
        repo_type="PUBLIC")
    default_registry_enterprise_sync_rule = alicloud.cs.RegistryEnterpriseSyncRule("default",
        instance_id=source.id,
        namespace_name=source_registry_enterprise_namespace.name,
        name=f"{name}-{default_integer['result']}",
        target_instance_id=target.id,
        target_namespace_name=target_registry_enterprise_namespace.name,
        target_region_id=default.regions[0].id,
        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-random/sdk/v4/go/random"
    	"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 := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
    			Current: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		source, err := cr.NewRegistryEnterpriseInstance(ctx, "source", &cr.RegistryEnterpriseInstanceArgs{
    			PaymentType:   pulumi.String("Subscription"),
    			Period:        pulumi.Int(1),
    			RenewPeriod:   pulumi.Int(0),
    			RenewalStatus: pulumi.String("ManualRenewal"),
    			InstanceType:  pulumi.String("Advanced"),
    			InstanceName:  pulumi.Sprintf("%v-source-%v", name, defaultInteger.Result),
    		})
    		if err != nil {
    			return err
    		}
    		target, err := cr.NewRegistryEnterpriseInstance(ctx, "target", &cr.RegistryEnterpriseInstanceArgs{
    			PaymentType:   pulumi.String("Subscription"),
    			Period:        pulumi.Int(1),
    			RenewPeriod:   pulumi.Int(0),
    			RenewalStatus: pulumi.String("ManualRenewal"),
    			InstanceType:  pulumi.String("Advanced"),
    			InstanceName:  pulumi.Sprintf("%v-target-%v", name, defaultInteger.Result),
    		})
    		if err != nil {
    			return err
    		}
    		sourceRegistryEnterpriseNamespace, err := cs.NewRegistryEnterpriseNamespace(ctx, "source", &cs.RegistryEnterpriseNamespaceArgs{
    			InstanceId:        source.ID(),
    			Name:              pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
    			AutoCreate:        pulumi.Bool(false),
    			DefaultVisibility: pulumi.String("PUBLIC"),
    		})
    		if err != nil {
    			return err
    		}
    		targetRegistryEnterpriseNamespace, err := cs.NewRegistryEnterpriseNamespace(ctx, "target", &cs.RegistryEnterpriseNamespaceArgs{
    			InstanceId:        target.ID(),
    			Name:              pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
    			AutoCreate:        pulumi.Bool(false),
    			DefaultVisibility: pulumi.String("PUBLIC"),
    		})
    		if err != nil {
    			return err
    		}
    		sourceRegistryEnterpriseRepo, err := cs.NewRegistryEnterpriseRepo(ctx, "source", &cs.RegistryEnterpriseRepoArgs{
    			InstanceId: source.ID(),
    			Namespace:  sourceRegistryEnterpriseNamespace.Name,
    			Name:       pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
    			Summary:    pulumi.String("this is summary of my new repo"),
    			RepoType:   pulumi.String("PUBLIC"),
    		})
    		if err != nil {
    			return err
    		}
    		targetRegistryEnterpriseRepo, err := cs.NewRegistryEnterpriseRepo(ctx, "target", &cs.RegistryEnterpriseRepoArgs{
    			InstanceId: target.ID(),
    			Namespace:  targetRegistryEnterpriseNamespace.Name,
    			Name:       pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
    			Summary:    pulumi.String("this is summary of my new repo"),
    			RepoType:   pulumi.String("PUBLIC"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cs.NewRegistryEnterpriseSyncRule(ctx, "default", &cs.RegistryEnterpriseSyncRuleArgs{
    			InstanceId:          source.ID(),
    			NamespaceName:       sourceRegistryEnterpriseNamespace.Name,
    			Name:                pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
    			TargetInstanceId:    target.ID(),
    			TargetNamespaceName: targetRegistryEnterpriseNamespace.Name,
    			TargetRegionId:      pulumi.String(_default.Regions[0].Id),
    			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;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = AliCloud.GetRegions.Invoke(new()
        {
            Current = true,
        });
    
        var defaultInteger = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var source = new AliCloud.CR.RegistryEnterpriseInstance("source", new()
        {
            PaymentType = "Subscription",
            Period = 1,
            RenewPeriod = 0,
            RenewalStatus = "ManualRenewal",
            InstanceType = "Advanced",
            InstanceName = $"{name}-source-{defaultInteger.Result}",
        });
    
        var target = new AliCloud.CR.RegistryEnterpriseInstance("target", new()
        {
            PaymentType = "Subscription",
            Period = 1,
            RenewPeriod = 0,
            RenewalStatus = "ManualRenewal",
            InstanceType = "Advanced",
            InstanceName = $"{name}-target-{defaultInteger.Result}",
        });
    
        var sourceRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("source", new()
        {
            InstanceId = source.Id,
            Name = $"{name}-{defaultInteger.Result}",
            AutoCreate = false,
            DefaultVisibility = "PUBLIC",
        });
    
        var targetRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("target", new()
        {
            InstanceId = target.Id,
            Name = $"{name}-{defaultInteger.Result}",
            AutoCreate = false,
            DefaultVisibility = "PUBLIC",
        });
    
        var sourceRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("source", new()
        {
            InstanceId = source.Id,
            Namespace = sourceRegistryEnterpriseNamespace.Name,
            Name = $"{name}-{defaultInteger.Result}",
            Summary = "this is summary of my new repo",
            RepoType = "PUBLIC",
        });
    
        var targetRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("target", new()
        {
            InstanceId = target.Id,
            Namespace = targetRegistryEnterpriseNamespace.Name,
            Name = $"{name}-{defaultInteger.Result}",
            Summary = "this is summary of my new repo",
            RepoType = "PUBLIC",
        });
    
        var defaultRegistryEnterpriseSyncRule = new AliCloud.CS.RegistryEnterpriseSyncRule("default", new()
        {
            InstanceId = source.Id,
            NamespaceName = sourceRegistryEnterpriseNamespace.Name,
            Name = $"{name}-{defaultInteger.Result}",
            TargetInstanceId = target.Id,
            TargetNamespaceName = targetRegistryEnterpriseNamespace.Name,
            TargetRegionId = @default.Apply(@default => @default.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)),
            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.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetRegionsArgs;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    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.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("terraform-example");
            final var default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
                .current(true)
                .build());
    
            var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var source = new RegistryEnterpriseInstance("source", RegistryEnterpriseInstanceArgs.builder()
                .paymentType("Subscription")
                .period(1)
                .renewPeriod(0)
                .renewalStatus("ManualRenewal")
                .instanceType("Advanced")
                .instanceName(String.format("%s-source-%s", name,defaultInteger.result()))
                .build());
    
            var target = new RegistryEnterpriseInstance("target", RegistryEnterpriseInstanceArgs.builder()
                .paymentType("Subscription")
                .period(1)
                .renewPeriod(0)
                .renewalStatus("ManualRenewal")
                .instanceType("Advanced")
                .instanceName(String.format("%s-target-%s", name,defaultInteger.result()))
                .build());
    
            var sourceRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("sourceRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()
                .instanceId(source.id())
                .name(String.format("%s-%s", name,defaultInteger.result()))
                .autoCreate(false)
                .defaultVisibility("PUBLIC")
                .build());
    
            var targetRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("targetRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()
                .instanceId(target.id())
                .name(String.format("%s-%s", name,defaultInteger.result()))
                .autoCreate(false)
                .defaultVisibility("PUBLIC")
                .build());
    
            var sourceRegistryEnterpriseRepo = new RegistryEnterpriseRepo("sourceRegistryEnterpriseRepo", RegistryEnterpriseRepoArgs.builder()
                .instanceId(source.id())
                .namespace(sourceRegistryEnterpriseNamespace.name())
                .name(String.format("%s-%s", name,defaultInteger.result()))
                .summary("this is summary of my new repo")
                .repoType("PUBLIC")
                .build());
    
            var targetRegistryEnterpriseRepo = new RegistryEnterpriseRepo("targetRegistryEnterpriseRepo", RegistryEnterpriseRepoArgs.builder()
                .instanceId(target.id())
                .namespace(targetRegistryEnterpriseNamespace.name())
                .name(String.format("%s-%s", name,defaultInteger.result()))
                .summary("this is summary of my new repo")
                .repoType("PUBLIC")
                .build());
    
            var defaultRegistryEnterpriseSyncRule = new RegistryEnterpriseSyncRule("defaultRegistryEnterpriseSyncRule", RegistryEnterpriseSyncRuleArgs.builder()
                .instanceId(source.id())
                .namespaceName(sourceRegistryEnterpriseNamespace.name())
                .name(String.format("%s-%s", name,defaultInteger.result()))
                .targetInstanceId(target.id())
                .targetNamespaceName(targetRegistryEnterpriseNamespace.name())
                .targetRegionId(default_.regions()[0].id())
                .tagFilter(".*")
                .repoName(sourceRegistryEnterpriseRepo.name())
                .targetRepoName(targetRegistryEnterpriseRepo.name())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultInteger:
        type: random:integer
        name: default
        properties:
          min: 10000
          max: 99999
      source:
        type: alicloud:cr:RegistryEnterpriseInstance
        properties:
          paymentType: Subscription
          period: 1
          renewPeriod: 0
          renewalStatus: ManualRenewal
          instanceType: Advanced
          instanceName: ${name}-source-${defaultInteger.result}
      target:
        type: alicloud:cr:RegistryEnterpriseInstance
        properties:
          paymentType: Subscription
          period: 1
          renewPeriod: 0
          renewalStatus: ManualRenewal
          instanceType: Advanced
          instanceName: ${name}-target-${defaultInteger.result}
      sourceRegistryEnterpriseNamespace:
        type: alicloud:cs:RegistryEnterpriseNamespace
        name: source
        properties:
          instanceId: ${source.id}
          name: ${name}-${defaultInteger.result}
          autoCreate: false
          defaultVisibility: PUBLIC
      targetRegistryEnterpriseNamespace:
        type: alicloud:cs:RegistryEnterpriseNamespace
        name: target
        properties:
          instanceId: ${target.id}
          name: ${name}-${defaultInteger.result}
          autoCreate: false
          defaultVisibility: PUBLIC
      sourceRegistryEnterpriseRepo:
        type: alicloud:cs:RegistryEnterpriseRepo
        name: source
        properties:
          instanceId: ${source.id}
          namespace: ${sourceRegistryEnterpriseNamespace.name}
          name: ${name}-${defaultInteger.result}
          summary: this is summary of my new repo
          repoType: PUBLIC
      targetRegistryEnterpriseRepo:
        type: alicloud:cs:RegistryEnterpriseRepo
        name: target
        properties:
          instanceId: ${target.id}
          namespace: ${targetRegistryEnterpriseNamespace.name}
          name: ${name}-${defaultInteger.result}
          summary: this is summary of my new repo
          repoType: PUBLIC
      defaultRegistryEnterpriseSyncRule:
        type: alicloud:cs:RegistryEnterpriseSyncRule
        name: default
        properties:
          instanceId: ${source.id}
          namespaceName: ${sourceRegistryEnterpriseNamespace.name}
          name: ${name}-${defaultInteger.result}
          targetInstanceId: ${target.id}
          targetNamespaceName: ${targetRegistryEnterpriseNamespace.name}
          targetRegionId: ${default.regions[0].id}
          tagFilter: .*
          repoName: ${sourceRegistryEnterpriseRepo.name}
          targetRepoName: ${targetRegistryEnterpriseRepo.name}
    variables:
      default:
        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.

    Constructor 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
    The ID of the Container Registry Enterprise Edition source instance.
    NamespaceName string
    The namespace name of the source instance.
    TagFilter string
    The regular expression used to filter image tags.
    TargetInstanceId string
    The ID of the destination instance.
    TargetNamespaceName string
    The namespace name of the destination instance.
    TargetRegionId string
    The region ID of the destination instance.
    Name string
    The name of the sync rule.
    RepoName string
    The image repository name of the source instance.
    TargetRepoName string
    The image repository name of the destination instance.
    InstanceId string
    The ID of the Container Registry Enterprise Edition source instance.
    NamespaceName string
    The namespace name of the source instance.
    TagFilter string
    The regular expression used to filter image tags.
    TargetInstanceId string
    The ID of the destination instance.
    TargetNamespaceName string
    The namespace name of the destination instance.
    TargetRegionId string
    The region ID of the destination instance.
    Name string
    The name of the sync rule.
    RepoName string
    The image repository name of the source instance.
    TargetRepoName string
    The image repository name of the destination instance.
    instanceId String
    The ID of the Container Registry Enterprise Edition source instance.
    namespaceName String
    The namespace name of the source instance.
    tagFilter String
    The regular expression used to filter image tags.
    targetInstanceId String
    The ID of the destination instance.
    targetNamespaceName String
    The namespace name of the destination instance.
    targetRegionId String
    The region ID of the destination instance.
    name String
    The name of the sync rule.
    repoName String
    The image repository name of the source instance.
    targetRepoName String
    The image repository name of the destination instance.
    instanceId string
    The ID of the Container Registry Enterprise Edition source instance.
    namespaceName string
    The namespace name of the source instance.
    tagFilter string
    The regular expression used to filter image tags.
    targetInstanceId string
    The ID of the destination instance.
    targetNamespaceName string
    The namespace name of the destination instance.
    targetRegionId string
    The region ID of the destination instance.
    name string
    The name of the sync rule.
    repoName string
    The image repository name of the source instance.
    targetRepoName string
    The image repository name of the destination instance.
    instance_id str
    The ID of the Container Registry Enterprise Edition source instance.
    namespace_name str
    The namespace name of the source instance.
    tag_filter str
    The regular expression used to filter image tags.
    target_instance_id str
    The ID of the destination instance.
    target_namespace_name str
    The namespace name of the destination instance.
    target_region_id str
    The region ID of the destination instance.
    name str
    The name of the sync rule.
    repo_name str
    The image repository name of the source instance.
    target_repo_name str
    The image repository name of the destination instance.
    instanceId String
    The ID of the Container Registry Enterprise Edition source instance.
    namespaceName String
    The namespace name of the source instance.
    tagFilter String
    The regular expression used to filter image tags.
    targetInstanceId String
    The ID of the destination instance.
    targetNamespaceName String
    The namespace name of the destination instance.
    targetRegionId String
    The region ID of the destination instance.
    name String
    The name of the sync rule.
    repoName String
    The image repository name of the source instance.
    targetRepoName String
    The image repository name of the destination instance.

    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 ID of the sync rule.
    SyncDirection string
    The synchronization direction.
    SyncScope string
    The synchronization scope.
    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId string
    The ID of the sync rule.
    SyncDirection string
    The synchronization direction.
    SyncScope string
    The synchronization scope.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId String
    The ID of the sync rule.
    syncDirection String
    The synchronization direction.
    syncScope String
    The synchronization scope.
    id string
    The provider-assigned unique ID for this managed resource.
    ruleId string
    The ID of the sync rule.
    syncDirection string
    The synchronization direction.
    syncScope string
    The synchronization scope.
    id str
    The provider-assigned unique ID for this managed resource.
    rule_id str
    The ID of the sync rule.
    sync_direction str
    The synchronization direction.
    sync_scope str
    The synchronization scope.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId String
    The ID of the sync rule.
    syncDirection String
    The synchronization direction.
    syncScope String
    The synchronization scope.

    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
    The ID of the Container Registry Enterprise Edition source instance.
    Name string
    The name of the sync rule.
    NamespaceName string
    The namespace name of the source instance.
    RepoName string
    The image repository name of the source instance.
    RuleId string
    The ID of the sync rule.
    SyncDirection string
    The synchronization direction.
    SyncScope string
    The synchronization scope.
    TagFilter string
    The regular expression used to filter image tags.
    TargetInstanceId string
    The ID of the destination instance.
    TargetNamespaceName string
    The namespace name of the destination instance.
    TargetRegionId string
    The region ID of the destination instance.
    TargetRepoName string
    The image repository name of the destination instance.
    InstanceId string
    The ID of the Container Registry Enterprise Edition source instance.
    Name string
    The name of the sync rule.
    NamespaceName string
    The namespace name of the source instance.
    RepoName string
    The image repository name of the source instance.
    RuleId string
    The ID of the sync rule.
    SyncDirection string
    The synchronization direction.
    SyncScope string
    The synchronization scope.
    TagFilter string
    The regular expression used to filter image tags.
    TargetInstanceId string
    The ID of the destination instance.
    TargetNamespaceName string
    The namespace name of the destination instance.
    TargetRegionId string
    The region ID of the destination instance.
    TargetRepoName string
    The image repository name of the destination instance.
    instanceId String
    The ID of the Container Registry Enterprise Edition source instance.
    name String
    The name of the sync rule.
    namespaceName String
    The namespace name of the source instance.
    repoName String
    The image repository name of the source instance.
    ruleId String
    The ID of the sync rule.
    syncDirection String
    The synchronization direction.
    syncScope String
    The synchronization scope.
    tagFilter String
    The regular expression used to filter image tags.
    targetInstanceId String
    The ID of the destination instance.
    targetNamespaceName String
    The namespace name of the destination instance.
    targetRegionId String
    The region ID of the destination instance.
    targetRepoName String
    The image repository name of the destination instance.
    instanceId string
    The ID of the Container Registry Enterprise Edition source instance.
    name string
    The name of the sync rule.
    namespaceName string
    The namespace name of the source instance.
    repoName string
    The image repository name of the source instance.
    ruleId string
    The ID of the sync rule.
    syncDirection string
    The synchronization direction.
    syncScope string
    The synchronization scope.
    tagFilter string
    The regular expression used to filter image tags.
    targetInstanceId string
    The ID of the destination instance.
    targetNamespaceName string
    The namespace name of the destination instance.
    targetRegionId string
    The region ID of the destination instance.
    targetRepoName string
    The image repository name of the destination instance.
    instance_id str
    The ID of the Container Registry Enterprise Edition source instance.
    name str
    The name of the sync rule.
    namespace_name str
    The namespace name of the source instance.
    repo_name str
    The image repository name of the source instance.
    rule_id str
    The ID of the sync rule.
    sync_direction str
    The synchronization direction.
    sync_scope str
    The synchronization scope.
    tag_filter str
    The regular expression used to filter image tags.
    target_instance_id str
    The ID of the destination instance.
    target_namespace_name str
    The namespace name of the destination instance.
    target_region_id str
    The region ID of the destination instance.
    target_repo_name str
    The image repository name of the destination instance.
    instanceId String
    The ID of the Container Registry Enterprise Edition source instance.
    name String
    The name of the sync rule.
    namespaceName String
    The namespace name of the source instance.
    repoName String
    The image repository name of the source instance.
    ruleId String
    The ID of the sync rule.
    syncDirection String
    The synchronization direction.
    syncScope String
    The synchronization scope.
    tagFilter String
    The regular expression used to filter image tags.
    targetInstanceId String
    The ID of the destination instance.
    targetNamespaceName String
    The namespace name of the destination instance.
    targetRegionId String
    The region ID of the destination instance.
    targetRepoName String
    The image repository name of the destination instance.

    Import

    Container Registry Enterprise Edition Sync Rule can be imported using the id, e.g.

    $ pulumi import alicloud:cs/registryEnterpriseSyncRule:RegistryEnterpriseSyncRule example <instance_id>:<namespace_name>:<rule_id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi