Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.cs.getRegistryEnterpriseSyncRules
Explore with Pulumi AI
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:
- Instance
Id string - ID of Container Registry Enterprise Edition local instance.
- Ids List<string>
- A list of ids to filter results by sync rule id.
- Name
Regex string - A regex string to filter results by sync rule name.
- Namespace
Name string - Name of Container Registry Enterprise Edition local namespace.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Repo
Name string - Name of Container Registry Enterprise Edition local repo.
- Target
Instance stringId - ID of Container Registry Enterprise Edition target instance.
- Instance
Id string - ID of Container Registry Enterprise Edition local instance.
- Ids []string
- A list of ids to filter results by sync rule id.
- Name
Regex string - A regex string to filter results by sync rule name.
- Namespace
Name string - Name of Container Registry Enterprise Edition local namespace.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Repo
Name string - Name of Container Registry Enterprise Edition local repo.
- Target
Instance stringId - ID of Container Registry Enterprise Edition target instance.
- instance
Id String - ID of Container Registry Enterprise Edition local instance.
- ids List<String>
- A list of ids to filter results by sync rule id.
- name
Regex String - A regex string to filter results by sync rule name.
- namespace
Name String - Name of Container Registry Enterprise Edition local namespace.
- output
File String - File name where to save data source results (after running
pulumi preview
). - repo
Name String - Name of Container Registry Enterprise Edition local repo.
- target
Instance StringId - ID of Container Registry Enterprise Edition target instance.
- instance
Id string - ID of Container Registry Enterprise Edition local instance.
- ids string[]
- A list of ids to filter results by sync rule id.
- name
Regex string - A regex string to filter results by sync rule name.
- namespace
Name string - Name of Container Registry Enterprise Edition local namespace.
- output
File string - File name where to save data source results (after running
pulumi preview
). - repo
Name string - Name of Container Registry Enterprise Edition local repo.
- target
Instance stringId - 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_ strid - ID of Container Registry Enterprise Edition target instance.
- instance
Id String - ID of Container Registry Enterprise Edition local instance.
- ids List<String>
- A list of ids to filter results by sync rule id.
- name
Regex String - A regex string to filter results by sync rule name.
- namespace
Name String - Name of Container Registry Enterprise Edition local namespace.
- output
File String - File name where to save data source results (after running
pulumi preview
). - repo
Name String - Name of Container Registry Enterprise Edition local repo.
- target
Instance StringId - 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.
- Instance
Id string - ID of Container Registry Enterprise Edition local instance.
- Names List<string>
- A list of sync rule names.
- Rules
List<Pulumi.
Ali Cloud. CS. Outputs. Get Registry Enterprise Sync Rules Rule> - A list of matched Container Registry Enterprise Edition sync rules. Each element contains the following attributes:
- Name
Regex string - Namespace
Name string - Name of Container Registry Enterprise Edition local namespace.
- Output
File string - Repo
Name string - Name of Container Registry Enterprise Edition local repo.
- Target
Instance stringId - 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.
- Instance
Id string - ID of Container Registry Enterprise Edition local instance.
- Names []string
- A list of sync rule names.
- Rules
[]Get
Registry Enterprise Sync Rules Rule - A list of matched Container Registry Enterprise Edition sync rules. Each element contains the following attributes:
- Name
Regex string - Namespace
Name string - Name of Container Registry Enterprise Edition local namespace.
- Output
File string - Repo
Name string - Name of Container Registry Enterprise Edition local repo.
- Target
Instance stringId - 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.
- instance
Id String - ID of Container Registry Enterprise Edition local instance.
- names List<String>
- A list of sync rule names.
- rules
List<Get
Registry Enterprise Sync Rules Rule> - A list of matched Container Registry Enterprise Edition sync rules. Each element contains the following attributes:
- name
Regex String - namespace
Name String - Name of Container Registry Enterprise Edition local namespace.
- output
File String - repo
Name String - Name of Container Registry Enterprise Edition local repo.
- target
Instance StringId - 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.
- instance
Id string - ID of Container Registry Enterprise Edition local instance.
- names string[]
- A list of sync rule names.
- rules
Get
Registry Enterprise Sync Rules Rule[] - A list of matched Container Registry Enterprise Edition sync rules. Each element contains the following attributes:
- name
Regex string - namespace
Name string - Name of Container Registry Enterprise Edition local namespace.
- output
File string - repo
Name string - Name of Container Registry Enterprise Edition local repo.
- target
Instance stringId - 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[Get
Registry Enterprise Sync Rules Rule] - 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_ strid - 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.
- instance
Id 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:
- name
Regex String - namespace
Name String - Name of Container Registry Enterprise Edition local namespace.
- output
File String - repo
Name String - Name of Container Registry Enterprise Edition local repo.
- target
Instance StringId - ID of Container Registry Enterprise Edition target instance.
Supporting Types
GetRegistryEnterpriseSyncRulesRule
- Id string
- ID of Container Registry Enterprise Edition sync rule.
- Instance
Id string - ID of Container Registry Enterprise Edition local instance.
- Name string
- Name of Container Registry Enterprise Edition sync rule.
- Namespace
Name string - Name of Container Registry Enterprise Edition local namespace.
- Region
Id string - Region of Container Registry Enterprise Edition local instance.
- Repo
Name string - Name of Container Registry Enterprise Edition local repo.
- Sync
Direction string FROM
orTO
, 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 string REPO
orNAMESPACE
,the scope that the synchronization rule applies.- Sync
Trigger string PASSIVE
orINITIATIVE
, the policy configured to trigger the synchronization rule.- Tag
Filter string - The regular expression used to filter image tags for synchronization in the source repository.
- Target
Instance stringId - ID of Container Registry Enterprise Edition target instance.
- Target
Namespace stringName - Name of Container Registry Enterprise Edition target namespace.
- Target
Region stringId - Region of Container Registry Enterprise Edition target instance.
- Target
Repo stringName - Name of Container Registry Enterprise Edition target repo.
- Id string
- ID of Container Registry Enterprise Edition sync rule.
- Instance
Id string - ID of Container Registry Enterprise Edition local instance.
- Name string
- Name of Container Registry Enterprise Edition sync rule.
- Namespace
Name string - Name of Container Registry Enterprise Edition local namespace.
- Region
Id string - Region of Container Registry Enterprise Edition local instance.
- Repo
Name string - Name of Container Registry Enterprise Edition local repo.
- Sync
Direction string FROM
orTO
, 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 string REPO
orNAMESPACE
,the scope that the synchronization rule applies.- Sync
Trigger string PASSIVE
orINITIATIVE
, the policy configured to trigger the synchronization rule.- Tag
Filter string - The regular expression used to filter image tags for synchronization in the source repository.
- Target
Instance stringId - ID of Container Registry Enterprise Edition target instance.
- Target
Namespace stringName - Name of Container Registry Enterprise Edition target namespace.
- Target
Region stringId - Region of Container Registry Enterprise Edition target instance.
- Target
Repo stringName - Name of Container Registry Enterprise Edition target repo.
- id String
- ID of Container Registry Enterprise Edition sync rule.
- instance
Id String - ID of Container Registry Enterprise Edition local instance.
- name String
- Name of Container Registry Enterprise Edition sync rule.
- namespace
Name String - Name of Container Registry Enterprise Edition local namespace.
- region
Id String - Region of Container Registry Enterprise Edition local instance.
- repo
Name String - Name of Container Registry Enterprise Edition local repo.
- sync
Direction String FROM
orTO
, 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 String REPO
orNAMESPACE
,the scope that the synchronization rule applies.- sync
Trigger String PASSIVE
orINITIATIVE
, the policy configured to trigger the synchronization rule.- tag
Filter String - The regular expression used to filter image tags for synchronization in the source repository.
- target
Instance StringId - ID of Container Registry Enterprise Edition target instance.
- target
Namespace StringName - Name of Container Registry Enterprise Edition target namespace.
- target
Region StringId - Region of Container Registry Enterprise Edition target instance.
- target
Repo StringName - Name of Container Registry Enterprise Edition target repo.
- id string
- ID of Container Registry Enterprise Edition sync rule.
- instance
Id string - ID of Container Registry Enterprise Edition local instance.
- name string
- Name of Container Registry Enterprise Edition sync rule.
- namespace
Name string - Name of Container Registry Enterprise Edition local namespace.
- region
Id string - Region of Container Registry Enterprise Edition local instance.
- repo
Name string - Name of Container Registry Enterprise Edition local repo.
- sync
Direction string FROM
orTO
, 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 string REPO
orNAMESPACE
,the scope that the synchronization rule applies.- sync
Trigger string PASSIVE
orINITIATIVE
, the policy configured to trigger the synchronization rule.- tag
Filter string - The regular expression used to filter image tags for synchronization in the source repository.
- target
Instance stringId - ID of Container Registry Enterprise Edition target instance.
- target
Namespace stringName - Name of Container Registry Enterprise Edition target namespace.
- target
Region stringId - Region of Container Registry Enterprise Edition target instance.
- target
Repo stringName - 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
orTO
, 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
orNAMESPACE
,the scope that the synchronization rule applies.- sync_
trigger str PASSIVE
orINITIATIVE
, 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_ strid - ID of Container Registry Enterprise Edition target instance.
- target_
namespace_ strname - Name of Container Registry Enterprise Edition target namespace.
- target_
region_ strid - Region of Container Registry Enterprise Edition target instance.
- target_
repo_ strname - Name of Container Registry Enterprise Edition target repo.
- id String
- ID of Container Registry Enterprise Edition sync rule.
- instance
Id String - ID of Container Registry Enterprise Edition local instance.
- name String
- Name of Container Registry Enterprise Edition sync rule.
- namespace
Name String - Name of Container Registry Enterprise Edition local namespace.
- region
Id String - Region of Container Registry Enterprise Edition local instance.
- repo
Name String - Name of Container Registry Enterprise Edition local repo.
- sync
Direction String FROM
orTO
, 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 String REPO
orNAMESPACE
,the scope that the synchronization rule applies.- sync
Trigger String PASSIVE
orINITIATIVE
, the policy configured to trigger the synchronization rule.- tag
Filter String - The regular expression used to filter image tags for synchronization in the source repository.
- target
Instance StringId - ID of Container Registry Enterprise Edition target instance.
- target
Namespace StringName - Name of Container Registry Enterprise Edition target namespace.
- target
Region StringId - Region of Container Registry Enterprise Edition target instance.
- target
Repo StringName - 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.