1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cs
  5. RegistryEnterpriseSyncRule
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.cs.RegistryEnterpriseSyncRule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 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 source = new alicloud.cr.RegistryEnterpriseInstance("source", {
        paymentType: "Subscription",
        period: 1,
        renewPeriod: 0,
        renewalStatus: "ManualRenewal",
        instanceType: "Advanced",
        instanceName: `${name}-source`,
    });
    const target = new alicloud.cr.RegistryEnterpriseInstance("target", {
        paymentType: "Subscription",
        period: 1,
        renewPeriod: 0,
        renewalStatus: "ManualRenewal",
        instanceType: "Advanced",
        instanceName: `${name}-target`,
    });
    const sourceRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("source", {
        instanceId: source.id,
        name: name,
        autoCreate: false,
        defaultVisibility: "PUBLIC",
    });
    const targetRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("target", {
        instanceId: target.id,
        name: name,
        autoCreate: false,
        defaultVisibility: "PUBLIC",
    });
    const sourceRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("source", {
        instanceId: source.id,
        namespace: sourceRegistryEnterpriseNamespace.name,
        name: name,
        summary: "this is summary of my new repo",
        repoType: "PUBLIC",
        detail: "this is a public repo",
    });
    const targetRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("target", {
        instanceId: target.id,
        namespace: targetRegistryEnterpriseNamespace.name,
        name: name,
        summary: "this is summary of my new repo",
        repoType: "PUBLIC",
        detail: "this is a public repo",
    });
    const default = alicloud.getRegions({
        current: true,
    });
    const defaultRegistryEnterpriseSyncRule = new alicloud.cs.RegistryEnterpriseSyncRule("default", {
        instanceId: source.id,
        namespaceName: sourceRegistryEnterpriseNamespace.name,
        name: name,
        targetRegionId: _default.then(_default => _default.regions?.[0]?.id),
        targetInstanceId: target.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 = alicloud.cr.RegistryEnterpriseInstance("source",
        payment_type="Subscription",
        period=1,
        renew_period=0,
        renewal_status="ManualRenewal",
        instance_type="Advanced",
        instance_name=f"{name}-source")
    target = alicloud.cr.RegistryEnterpriseInstance("target",
        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("source",
        instance_id=source.id,
        name=name,
        auto_create=False,
        default_visibility="PUBLIC")
    target_registry_enterprise_namespace = alicloud.cs.RegistryEnterpriseNamespace("target",
        instance_id=target.id,
        name=name,
        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=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("target",
        instance_id=target.id,
        namespace=target_registry_enterprise_namespace.name,
        name=name,
        summary="this is summary of my new repo",
        repo_type="PUBLIC",
        detail="this is a public repo")
    default = alicloud.get_regions(current=True)
    default_registry_enterprise_sync_rule = alicloud.cs.RegistryEnterpriseSyncRule("default",
        instance_id=source.id,
        namespace_name=source_registry_enterprise_namespace.name,
        name=name,
        target_region_id=default.regions[0].id,
        target_instance_id=target.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
    		}
    		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.String(fmt.Sprintf("%v-source", name)),
    		})
    		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.String(fmt.Sprintf("%v-target", name)),
    		})
    		if err != nil {
    			return err
    		}
    		sourceRegistryEnterpriseNamespace, err := cs.NewRegistryEnterpriseNamespace(ctx, "source", &cs.RegistryEnterpriseNamespaceArgs{
    			InstanceId:        source.ID(),
    			Name:              pulumi.String(name),
    			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.String(name),
    			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.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
    		}
    		targetRegistryEnterpriseRepo, err := cs.NewRegistryEnterpriseRepo(ctx, "target", &cs.RegistryEnterpriseRepoArgs{
    			InstanceId: target.ID(),
    			Namespace:  targetRegistryEnterpriseNamespace.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
    		}
    		_default, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
    			Current: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = cs.NewRegistryEnterpriseSyncRule(ctx, "default", &cs.RegistryEnterpriseSyncRuleArgs{
    			InstanceId:          source.ID(),
    			NamespaceName:       sourceRegistryEnterpriseNamespace.Name,
    			Name:                pulumi.String(name),
    			TargetRegionId:      pulumi.String(_default.Regions[0].Id),
    			TargetInstanceId:    target.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 source = new AliCloud.CR.RegistryEnterpriseInstance("source", new()
        {
            PaymentType = "Subscription",
            Period = 1,
            RenewPeriod = 0,
            RenewalStatus = "ManualRenewal",
            InstanceType = "Advanced",
            InstanceName = $"{name}-source",
        });
    
        var target = new AliCloud.CR.RegistryEnterpriseInstance("target", new()
        {
            PaymentType = "Subscription",
            Period = 1,
            RenewPeriod = 0,
            RenewalStatus = "ManualRenewal",
            InstanceType = "Advanced",
            InstanceName = $"{name}-target",
        });
    
        var sourceRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("source", new()
        {
            InstanceId = source.Id,
            Name = name,
            AutoCreate = false,
            DefaultVisibility = "PUBLIC",
        });
    
        var targetRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("target", new()
        {
            InstanceId = target.Id,
            Name = name,
            AutoCreate = false,
            DefaultVisibility = "PUBLIC",
        });
    
        var sourceRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("source", new()
        {
            InstanceId = source.Id,
            Namespace = sourceRegistryEnterpriseNamespace.Name,
            Name = name,
            Summary = "this is summary of my new repo",
            RepoType = "PUBLIC",
            Detail = "this is a public repo",
        });
    
        var targetRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("target", new()
        {
            InstanceId = target.Id,
            Namespace = targetRegistryEnterpriseNamespace.Name,
            Name = name,
            Summary = "this is summary of my new repo",
            RepoType = "PUBLIC",
            Detail = "this is a public repo",
        });
    
        var @default = AliCloud.GetRegions.Invoke(new()
        {
            Current = true,
        });
    
        var defaultRegistryEnterpriseSyncRule = new AliCloud.CS.RegistryEnterpriseSyncRule("default", new()
        {
            InstanceId = source.Id,
            NamespaceName = sourceRegistryEnterpriseNamespace.Name,
            Name = name,
            TargetRegionId = @default.Apply(@default => @default.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)),
            TargetInstanceId = target.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 source = new RegistryEnterpriseInstance("source", RegistryEnterpriseInstanceArgs.builder()
                .paymentType("Subscription")
                .period(1)
                .renewPeriod(0)
                .renewalStatus("ManualRenewal")
                .instanceType("Advanced")
                .instanceName(String.format("%s-source", name))
                .build());
    
            var target = new RegistryEnterpriseInstance("target", 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(source.id())
                .name(name)
                .autoCreate(false)
                .defaultVisibility("PUBLIC")
                .build());
    
            var targetRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("targetRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()
                .instanceId(target.id())
                .name(name)
                .autoCreate(false)
                .defaultVisibility("PUBLIC")
                .build());
    
            var sourceRegistryEnterpriseRepo = new RegistryEnterpriseRepo("sourceRegistryEnterpriseRepo", RegistryEnterpriseRepoArgs.builder()
                .instanceId(source.id())
                .namespace(sourceRegistryEnterpriseNamespace.name())
                .name(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(target.id())
                .namespace(targetRegistryEnterpriseNamespace.name())
                .name(name)
                .summary("this is summary of my new repo")
                .repoType("PUBLIC")
                .detail("this is a public repo")
                .build());
    
            final var default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
                .current(true)
                .build());
    
            var defaultRegistryEnterpriseSyncRule = new RegistryEnterpriseSyncRule("defaultRegistryEnterpriseSyncRule", RegistryEnterpriseSyncRuleArgs.builder()
                .instanceId(source.id())
                .namespaceName(sourceRegistryEnterpriseNamespace.name())
                .name(name)
                .targetRegionId(default_.regions()[0].id())
                .targetInstanceId(target.id())
                .targetNamespaceName(targetRegistryEnterpriseNamespace.name())
                .tagFilter(".*")
                .repoName(sourceRegistryEnterpriseRepo.name())
                .targetRepoName(targetRegistryEnterpriseRepo.name())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      source:
        type: alicloud:cr:RegistryEnterpriseInstance
        properties:
          paymentType: Subscription
          period: 1
          renewPeriod: 0
          renewalStatus: ManualRenewal
          instanceType: Advanced
          instanceName: ${name}-source
      target:
        type: alicloud:cr:RegistryEnterpriseInstance
        properties:
          paymentType: Subscription
          period: 1
          renewPeriod: 0
          renewalStatus: ManualRenewal
          instanceType: Advanced
          instanceName: ${name}-target
      sourceRegistryEnterpriseNamespace:
        type: alicloud:cs:RegistryEnterpriseNamespace
        name: source
        properties:
          instanceId: ${source.id}
          name: ${name}
          autoCreate: false
          defaultVisibility: PUBLIC
      targetRegistryEnterpriseNamespace:
        type: alicloud:cs:RegistryEnterpriseNamespace
        name: target
        properties:
          instanceId: ${target.id}
          name: ${name}
          autoCreate: false
          defaultVisibility: PUBLIC
      sourceRegistryEnterpriseRepo:
        type: alicloud:cs:RegistryEnterpriseRepo
        name: source
        properties:
          instanceId: ${source.id}
          namespace: ${sourceRegistryEnterpriseNamespace.name}
          name: ${name}
          summary: this is summary of my new repo
          repoType: PUBLIC
          detail: this is a public repo
      targetRegistryEnterpriseRepo:
        type: alicloud:cs:RegistryEnterpriseRepo
        name: target
        properties:
          instanceId: ${target.id}
          namespace: ${targetRegistryEnterpriseNamespace.name}
          name: ${name}
          summary: this is summary of my new repo
          repoType: PUBLIC
          detail: this is a public repo
      defaultRegistryEnterpriseSyncRule:
        type: alicloud:cs:RegistryEnterpriseSyncRule
        name: default
        properties:
          instanceId: ${source.id}
          namespaceName: ${sourceRegistryEnterpriseNamespace.name}
          name: ${name}
          targetRegionId: ${default.regions[0].id}
          targetInstanceId: ${target.id}
          targetNamespaceName: ${targetRegistryEnterpriseNamespace.name}
          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
    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi