get Chains
This data source provides the Cr Chains of the current Alibaba Cloud user. For information about CR Chains and how to use it, see What is Chain.
NOTE: Available in v1.161.0+.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cr.CrFunctions;
import com.pulumi.alicloud.cr.inputs.GetChainsArgs;
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 ids = CrFunctions.getChains(GetChainsArgs.builder()
.instanceId("example_value")
.ids(
"example_value-1",
"example_value-2")
.build());
ctx.export("crChainId1", ids.applyValue(getChainsResult -> getChainsResult.chains()[0].id()));
final var nameRegex = CrFunctions.getChains(GetChainsArgs.builder()
.instanceId("example_value")
.nameRegex("^my-Chain")
.build());
ctx.export("crChainId2", nameRegex.applyValue(getChainsResult -> getChainsResult.chains()[0].id()));
}
}
Content copied to clipboard
Return
A collection of values returned by getChains.
Parameters
argument
A collection of arguments for invoking getChains.
suspend fun getChains(enableDetails: Boolean? = null, ids: List<String>? = null, instanceId: String, nameRegex: String? = null, outputFile: String? = null, repoName: String? = null, repoNamespaceName: String? = null): GetChainsResult
Return
A collection of values returned by getChains.
See also
Parameters
enable Details
ids
A list of Chain IDs.
instance Id
The ID of CR Enterprise Edition instance.
name Regex
A regex string to filter results by Chain name.
output File
File name where to save data source results (after running pulumi preview
).
repo Name
The name of CR Enterprise Edition repository.
repo Namespace Name
The name of CR Enterprise Edition namespace.
Return
A collection of values returned by getChains.
See also
Parameters
argument
Builder for com.pulumi.alicloud.cr.kotlin.inputs.GetChainsPlainArgs.