1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cs
  5. getRegistryEnterpriseSyncRules
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.cs.getRegistryEnterpriseSyncRules

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides a list Container Registry Enterprise Edition sync rules on Alibaba Cloud.

    NOTE: Available in v1.90.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    // Declare the data source
    const mySyncRules = alicloud.cs.getRegistryEnterpriseSyncRules({
        instanceId: "cri-xxx",
        namespaceName: "test-namespace",
        repoName: "test-repo",
        targetInstanceId: "cri-yyy",
        nameRegex: "test-rule",
    });
    export const output = mySyncRules.then(mySyncRules => mySyncRules.rules.map(__item => __item.id));
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    # Declare the data source
    my_sync_rules = alicloud.cs.get_registry_enterprise_sync_rules(instance_id="cri-xxx",
        namespace_name="test-namespace",
        repo_name="test-repo",
        target_instance_id="cri-yyy",
        name_regex="test-rule")
    pulumi.export("output", [__item.id for __item in my_sync_rules.rules])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    // Declare the data source
    mySyncRules, err := cs.GetRegistryEnterpriseSyncRules(ctx, &cs.GetRegistryEnterpriseSyncRulesArgs{
    InstanceId: "cri-xxx",
    NamespaceName: pulumi.StringRef("test-namespace"),
    RepoName: pulumi.StringRef("test-repo"),
    TargetInstanceId: pulumi.StringRef("cri-yyy"),
    NameRegex: pulumi.StringRef("test-rule"),
    }, nil);
    if err != nil {
    return err
    }
    ctx.Export("output", pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:10,11-34)))
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // Declare the data source
        var mySyncRules = AliCloud.CS.GetRegistryEnterpriseSyncRules.Invoke(new()
        {
            InstanceId = "cri-xxx",
            NamespaceName = "test-namespace",
            RepoName = "test-repo",
            TargetInstanceId = "cri-yyy",
            NameRegex = "test-rule",
        });
    
        return new Dictionary<string, object?>
        {
            ["output"] = mySyncRules.Apply(getRegistryEnterpriseSyncRulesResult => getRegistryEnterpriseSyncRulesResult.Rules).Select(__item => __item.Id).ToList(),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cs.CsFunctions;
    import com.pulumi.alicloud.cs.inputs.GetRegistryEnterpriseSyncRulesArgs;
    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) {
            // Declare the data source
            final var mySyncRules = CsFunctions.getRegistryEnterpriseSyncRules(GetRegistryEnterpriseSyncRulesArgs.builder()
                .instanceId("cri-xxx")
                .namespaceName("test-namespace")
                .repoName("test-repo")
                .targetInstanceId("cri-yyy")
                .nameRegex("test-rule")
                .build());
    
            ctx.export("output", mySyncRules.applyValue(getRegistryEnterpriseSyncRulesResult -> getRegistryEnterpriseSyncRulesResult.rules()).stream().map(element -> element.id()).collect(toList()));
        }
    }
    
    Coming soon!
    

    Using getRegistryEnterpriseSyncRules

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

    function getRegistryEnterpriseSyncRules(args: GetRegistryEnterpriseSyncRulesArgs, opts?: InvokeOptions): Promise<GetRegistryEnterpriseSyncRulesResult>
    function getRegistryEnterpriseSyncRulesOutput(args: GetRegistryEnterpriseSyncRulesOutputArgs, opts?: InvokeOptions): Output<GetRegistryEnterpriseSyncRulesResult>
    def get_registry_enterprise_sync_rules(ids: Optional[Sequence[str]] = None,
                                           instance_id: Optional[str] = None,
                                           name_regex: Optional[str] = None,
                                           namespace_name: Optional[str] = None,
                                           output_file: Optional[str] = None,
                                           repo_name: Optional[str] = None,
                                           target_instance_id: Optional[str] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetRegistryEnterpriseSyncRulesResult
    def get_registry_enterprise_sync_rules_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                           instance_id: Optional[pulumi.Input[str]] = None,
                                           name_regex: Optional[pulumi.Input[str]] = None,
                                           namespace_name: Optional[pulumi.Input[str]] = None,
                                           output_file: Optional[pulumi.Input[str]] = None,
                                           repo_name: Optional[pulumi.Input[str]] = None,
                                           target_instance_id: Optional[pulumi.Input[str]] = None,
                                           opts: Optional[InvokeOptions] = None) -> Output[GetRegistryEnterpriseSyncRulesResult]
    func GetRegistryEnterpriseSyncRules(ctx *Context, args *GetRegistryEnterpriseSyncRulesArgs, opts ...InvokeOption) (*GetRegistryEnterpriseSyncRulesResult, error)
    func GetRegistryEnterpriseSyncRulesOutput(ctx *Context, args *GetRegistryEnterpriseSyncRulesOutputArgs, opts ...InvokeOption) GetRegistryEnterpriseSyncRulesResultOutput

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

    public static class GetRegistryEnterpriseSyncRules 
    {
        public static Task<GetRegistryEnterpriseSyncRulesResult> InvokeAsync(GetRegistryEnterpriseSyncRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetRegistryEnterpriseSyncRulesResult> Invoke(GetRegistryEnterpriseSyncRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRegistryEnterpriseSyncRulesResult> getRegistryEnterpriseSyncRules(GetRegistryEnterpriseSyncRulesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cs/getRegistryEnterpriseSyncRules:getRegistryEnterpriseSyncRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    ID of Container Registry Enterprise Edition local instance.
    Ids List<string>
    A list of ids to filter results by sync rule id.
    NameRegex string
    A regex string to filter results by sync rule name.
    NamespaceName string
    Name of Container Registry Enterprise Edition local namespace.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    RepoName string
    Name of Container Registry Enterprise Edition local repo.
    TargetInstanceId string
    ID of Container Registry Enterprise Edition target instance.
    InstanceId string
    ID of Container Registry Enterprise Edition local instance.
    Ids []string
    A list of ids to filter results by sync rule id.
    NameRegex string
    A regex string to filter results by sync rule name.
    NamespaceName string
    Name of Container Registry Enterprise Edition local namespace.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    RepoName string
    Name of Container Registry Enterprise Edition local repo.
    TargetInstanceId string
    ID of Container Registry Enterprise Edition target instance.
    instanceId String
    ID of Container Registry Enterprise Edition local instance.
    ids List<String>
    A list of ids to filter results by sync rule id.
    nameRegex String
    A regex string to filter results by sync rule name.
    namespaceName String
    Name of Container Registry Enterprise Edition local namespace.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    repoName String
    Name of Container Registry Enterprise Edition local repo.
    targetInstanceId String
    ID of Container Registry Enterprise Edition target instance.
    instanceId string
    ID of Container Registry Enterprise Edition local instance.
    ids string[]
    A list of ids to filter results by sync rule id.
    nameRegex string
    A regex string to filter results by sync rule name.
    namespaceName string
    Name of Container Registry Enterprise Edition local namespace.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    repoName string
    Name of Container Registry Enterprise Edition local repo.
    targetInstanceId string
    ID of Container Registry Enterprise Edition target instance.
    instance_id str
    ID of Container Registry Enterprise Edition local instance.
    ids Sequence[str]
    A list of ids to filter results by sync rule id.
    name_regex str
    A regex string to filter results by sync rule name.
    namespace_name str
    Name of Container Registry Enterprise Edition local namespace.
    output_file str
    File name where to save data source results (after running pulumi preview).
    repo_name str
    Name of Container Registry Enterprise Edition local repo.
    target_instance_id str
    ID of Container Registry Enterprise Edition target instance.
    instanceId String
    ID of Container Registry Enterprise Edition local instance.
    ids List<String>
    A list of ids to filter results by sync rule id.
    nameRegex String
    A regex string to filter results by sync rule name.
    namespaceName String
    Name of Container Registry Enterprise Edition local namespace.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    repoName String
    Name of Container Registry Enterprise Edition local repo.
    targetInstanceId String
    ID of Container Registry Enterprise Edition target instance.

    getRegistryEnterpriseSyncRules Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of matched Container Registry Enterprise Edition sync rules. Its element is a sync rule uuid.
    InstanceId string
    ID of Container Registry Enterprise Edition local instance.
    Names List<string>
    A list of sync rule names.
    Rules List<Pulumi.AliCloud.CS.Outputs.GetRegistryEnterpriseSyncRulesRule>
    A list of matched Container Registry Enterprise Edition sync rules. Each element contains the following attributes:
    NameRegex string
    NamespaceName string
    Name of Container Registry Enterprise Edition local namespace.
    OutputFile string
    RepoName string
    Name of Container Registry Enterprise Edition local repo.
    TargetInstanceId string
    ID of Container Registry Enterprise Edition target instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of matched Container Registry Enterprise Edition sync rules. Its element is a sync rule uuid.
    InstanceId string
    ID of Container Registry Enterprise Edition local instance.
    Names []string
    A list of sync rule names.
    Rules []GetRegistryEnterpriseSyncRulesRule
    A list of matched Container Registry Enterprise Edition sync rules. Each element contains the following attributes:
    NameRegex string
    NamespaceName string
    Name of Container Registry Enterprise Edition local namespace.
    OutputFile string
    RepoName string
    Name of Container Registry Enterprise Edition local repo.
    TargetInstanceId string
    ID of Container Registry Enterprise Edition target instance.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of matched Container Registry Enterprise Edition sync rules. Its element is a sync rule uuid.
    instanceId String
    ID of Container Registry Enterprise Edition local instance.
    names List<String>
    A list of sync rule names.
    rules List<GetRegistryEnterpriseSyncRulesRule>
    A list of matched Container Registry Enterprise Edition sync rules. Each element contains the following attributes:
    nameRegex String
    namespaceName String
    Name of Container Registry Enterprise Edition local namespace.
    outputFile String
    repoName String
    Name of Container Registry Enterprise Edition local repo.
    targetInstanceId String
    ID of Container Registry Enterprise Edition target instance.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of matched Container Registry Enterprise Edition sync rules. Its element is a sync rule uuid.
    instanceId string
    ID of Container Registry Enterprise Edition local instance.
    names string[]
    A list of sync rule names.
    rules GetRegistryEnterpriseSyncRulesRule[]
    A list of matched Container Registry Enterprise Edition sync rules. Each element contains the following attributes:
    nameRegex string
    namespaceName string
    Name of Container Registry Enterprise Edition local namespace.
    outputFile string
    repoName string
    Name of Container Registry Enterprise Edition local repo.
    targetInstanceId string
    ID of Container Registry Enterprise Edition target instance.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of matched Container Registry Enterprise Edition sync rules. Its element is a sync rule uuid.
    instance_id str
    ID of Container Registry Enterprise Edition local instance.
    names Sequence[str]
    A list of sync rule names.
    rules Sequence[GetRegistryEnterpriseSyncRulesRule]
    A list of matched Container Registry Enterprise Edition sync rules. Each element contains the following attributes:
    name_regex str
    namespace_name str
    Name of Container Registry Enterprise Edition local namespace.
    output_file str
    repo_name str
    Name of Container Registry Enterprise Edition local repo.
    target_instance_id str
    ID of Container Registry Enterprise Edition target instance.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of matched Container Registry Enterprise Edition sync rules. Its element is a sync rule uuid.
    instanceId String
    ID of Container Registry Enterprise Edition local instance.
    names List<String>
    A list of sync rule names.
    rules List<Property Map>
    A list of matched Container Registry Enterprise Edition sync rules. Each element contains the following attributes:
    nameRegex String
    namespaceName String
    Name of Container Registry Enterprise Edition local namespace.
    outputFile String
    repoName String
    Name of Container Registry Enterprise Edition local repo.
    targetInstanceId String
    ID of Container Registry Enterprise Edition target instance.

    Supporting Types

    GetRegistryEnterpriseSyncRulesRule

    Id string
    ID of Container Registry Enterprise Edition sync rule.
    InstanceId string
    ID of Container Registry Enterprise Edition local instance.
    Name string
    Name of Container Registry Enterprise Edition sync rule.
    NamespaceName string
    Name of Container Registry Enterprise Edition local namespace.
    RegionId string
    Region of Container Registry Enterprise Edition local instance.
    RepoName string
    Name of Container Registry Enterprise Edition local repo.
    SyncDirection string
    FROM or TO, the direction of synchronization. FROM indicates that the local instance is the source instance. TO indicates that the local instance is the target instance to be synchronized.
    SyncScope string
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    SyncTrigger string
    PASSIVE or INITIATIVE, the policy configured to trigger the synchronization rule.
    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.
    TargetNamespaceName string
    Name of Container Registry Enterprise Edition target namespace.
    TargetRegionId string
    Region of Container Registry Enterprise Edition target instance.
    TargetRepoName string
    Name of Container Registry Enterprise Edition target repo.
    Id string
    ID of Container Registry Enterprise Edition sync rule.
    InstanceId string
    ID of Container Registry Enterprise Edition local instance.
    Name string
    Name of Container Registry Enterprise Edition sync rule.
    NamespaceName string
    Name of Container Registry Enterprise Edition local namespace.
    RegionId string
    Region of Container Registry Enterprise Edition local instance.
    RepoName string
    Name of Container Registry Enterprise Edition local repo.
    SyncDirection string
    FROM or TO, the direction of synchronization. FROM indicates that the local instance is the source instance. TO indicates that the local instance is the target instance to be synchronized.
    SyncScope string
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    SyncTrigger string
    PASSIVE or INITIATIVE, the policy configured to trigger the synchronization rule.
    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.
    TargetNamespaceName string
    Name of Container Registry Enterprise Edition target namespace.
    TargetRegionId string
    Region of Container Registry Enterprise Edition target instance.
    TargetRepoName string
    Name of Container Registry Enterprise Edition target repo.
    id String
    ID of Container Registry Enterprise Edition sync rule.
    instanceId String
    ID of Container Registry Enterprise Edition local instance.
    name String
    Name of Container Registry Enterprise Edition sync rule.
    namespaceName String
    Name of Container Registry Enterprise Edition local namespace.
    regionId String
    Region of Container Registry Enterprise Edition local instance.
    repoName String
    Name of Container Registry Enterprise Edition local repo.
    syncDirection String
    FROM or TO, the direction of synchronization. FROM indicates that the local instance is the source instance. TO indicates that the local instance is the target instance to be synchronized.
    syncScope String
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    syncTrigger String
    PASSIVE or INITIATIVE, the policy configured to trigger the synchronization rule.
    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.
    targetNamespaceName String
    Name of Container Registry Enterprise Edition target namespace.
    targetRegionId String
    Region of Container Registry Enterprise Edition target instance.
    targetRepoName String
    Name of Container Registry Enterprise Edition target repo.
    id string
    ID of Container Registry Enterprise Edition sync rule.
    instanceId string
    ID of Container Registry Enterprise Edition local instance.
    name string
    Name of Container Registry Enterprise Edition sync rule.
    namespaceName string
    Name of Container Registry Enterprise Edition local namespace.
    regionId string
    Region of Container Registry Enterprise Edition local instance.
    repoName string
    Name of Container Registry Enterprise Edition local repo.
    syncDirection string
    FROM or TO, the direction of synchronization. FROM indicates that the local instance is the source instance. TO indicates that the local instance is the target instance to be synchronized.
    syncScope string
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    syncTrigger string
    PASSIVE or INITIATIVE, the policy configured to trigger the synchronization rule.
    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.
    targetNamespaceName string
    Name of Container Registry Enterprise Edition target namespace.
    targetRegionId string
    Region of Container Registry Enterprise Edition target instance.
    targetRepoName string
    Name of Container Registry Enterprise Edition target repo.
    id str
    ID of Container Registry Enterprise Edition sync rule.
    instance_id str
    ID of Container Registry Enterprise Edition local instance.
    name str
    Name of Container Registry Enterprise Edition sync rule.
    namespace_name str
    Name of Container Registry Enterprise Edition local namespace.
    region_id str
    Region of Container Registry Enterprise Edition local instance.
    repo_name str
    Name of Container Registry Enterprise Edition local repo.
    sync_direction str
    FROM or TO, the direction of synchronization. FROM indicates that the local instance is the source instance. TO indicates that the local instance is the target instance to be synchronized.
    sync_scope str
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    sync_trigger str
    PASSIVE or INITIATIVE, the policy configured to trigger the synchronization rule.
    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.
    target_namespace_name str
    Name of Container Registry Enterprise Edition target namespace.
    target_region_id str
    Region of Container Registry Enterprise Edition target instance.
    target_repo_name str
    Name of Container Registry Enterprise Edition target repo.
    id String
    ID of Container Registry Enterprise Edition sync rule.
    instanceId String
    ID of Container Registry Enterprise Edition local instance.
    name String
    Name of Container Registry Enterprise Edition sync rule.
    namespaceName String
    Name of Container Registry Enterprise Edition local namespace.
    regionId String
    Region of Container Registry Enterprise Edition local instance.
    repoName String
    Name of Container Registry Enterprise Edition local repo.
    syncDirection String
    FROM or TO, the direction of synchronization. FROM indicates that the local instance is the source instance. TO indicates that the local instance is the target instance to be synchronized.
    syncScope String
    REPO or NAMESPACE,the scope that the synchronization rule applies.
    syncTrigger String
    PASSIVE or INITIATIVE, the policy configured to trigger the synchronization rule.
    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.
    targetNamespaceName String
    Name of Container Registry Enterprise Edition target namespace.
    targetRegionId String
    Region of Container Registry Enterprise Edition target instance.
    targetRepoName String
    Name of Container Registry Enterprise Edition target repo.

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi