Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi
alicloud.cr.getChains
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.cr.getChains({
instanceId: "example_value",
ids: [
"example_value-1",
"example_value-2",
],
});
export const crChainId1 = ids.then(ids => ids.chains?.[0]?.id);
const nameRegex = alicloud.cr.getChains({
instanceId: "example_value",
nameRegex: "^my-Chain",
});
export const crChainId2 = nameRegex.then(nameRegex => nameRegex.chains?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.cr.get_chains(instance_id="example_value",
ids=[
"example_value-1",
"example_value-2",
])
pulumi.export("crChainId1", ids.chains[0].id)
name_regex = alicloud.cr.get_chains(instance_id="example_value",
name_regex="^my-Chain")
pulumi.export("crChainId2", name_regex.chains[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := cr.GetChains(ctx, &cr.GetChainsArgs{
InstanceId: "example_value",
Ids: []string{
"example_value-1",
"example_value-2",
},
}, nil)
if err != nil {
return err
}
ctx.Export("crChainId1", ids.Chains[0].Id)
nameRegex, err := cr.GetChains(ctx, &cr.GetChainsArgs{
InstanceId: "example_value",
NameRegex: pulumi.StringRef("^my-Chain"),
}, nil)
if err != nil {
return err
}
ctx.Export("crChainId2", nameRegex.Chains[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.CR.GetChains.Invoke(new()
{
InstanceId = "example_value",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
});
var nameRegex = AliCloud.CR.GetChains.Invoke(new()
{
InstanceId = "example_value",
NameRegex = "^my-Chain",
});
return new Dictionary<string, object?>
{
["crChainId1"] = ids.Apply(getChainsResult => getChainsResult.Chains[0]?.Id),
["crChainId2"] = nameRegex.Apply(getChainsResult => getChainsResult.Chains[0]?.Id),
};
});
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()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:cr:getChains
Arguments:
instanceId: example_value
ids:
- example_value-1
- example_value-2
nameRegex:
fn::invoke:
Function: alicloud:cr:getChains
Arguments:
instanceId: example_value
nameRegex: ^my-Chain
outputs:
crChainId1: ${ids.chains[0].id}
crChainId2: ${nameRegex.chains[0].id}
Using getChains
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 getChains(args: GetChainsArgs, opts?: InvokeOptions): Promise<GetChainsResult>
function getChainsOutput(args: GetChainsOutputArgs, opts?: InvokeOptions): Output<GetChainsResult>
def get_chains(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
repo_name: Optional[str] = None,
repo_namespace_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetChainsResult
def get_chains_output(enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
repo_name: Optional[pulumi.Input[str]] = None,
repo_namespace_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetChainsResult]
func GetChains(ctx *Context, args *GetChainsArgs, opts ...InvokeOption) (*GetChainsResult, error)
func GetChainsOutput(ctx *Context, args *GetChainsOutputArgs, opts ...InvokeOption) GetChainsResultOutput
> Note: This function is named GetChains
in the Go SDK.
public static class GetChains
{
public static Task<GetChainsResult> InvokeAsync(GetChainsArgs args, InvokeOptions? opts = null)
public static Output<GetChainsResult> Invoke(GetChainsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetChainsResult> getChains(GetChainsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cr/getChains:getChains
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - The ID of CR Enterprise Edition instance.
- Enable
Details bool - Ids List<string>
- A list of Chain IDs.
- Name
Regex string - A regex string to filter results by Chain name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Repo
Name string - The name of CR Enterprise Edition repository.
- Repo
Namespace stringName - The name of CR Enterprise Edition namespace.
- Instance
Id string - The ID of CR Enterprise Edition instance.
- Enable
Details bool - Ids []string
- A list of Chain IDs.
- Name
Regex string - A regex string to filter results by Chain name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Repo
Name string - The name of CR Enterprise Edition repository.
- Repo
Namespace stringName - The name of CR Enterprise Edition namespace.
- instance
Id String - The ID of CR Enterprise Edition instance.
- enable
Details Boolean - ids List<String>
- A list of Chain IDs.
- name
Regex String - A regex string to filter results by Chain name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - repo
Name String - The name of CR Enterprise Edition repository.
- repo
Namespace StringName - The name of CR Enterprise Edition namespace.
- instance
Id string - The ID of CR Enterprise Edition instance.
- enable
Details boolean - ids string[]
- A list of Chain IDs.
- name
Regex string - A regex string to filter results by Chain name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - repo
Name string - The name of CR Enterprise Edition repository.
- repo
Namespace stringName - The name of CR Enterprise Edition namespace.
- instance_
id str - The ID of CR Enterprise Edition instance.
- enable_
details bool - ids Sequence[str]
- A list of Chain IDs.
- name_
regex str - A regex string to filter results by Chain name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - repo_
name str - The name of CR Enterprise Edition repository.
- repo_
namespace_ strname - The name of CR Enterprise Edition namespace.
- instance
Id String - The ID of CR Enterprise Edition instance.
- enable
Details Boolean - ids List<String>
- A list of Chain IDs.
- name
Regex String - A regex string to filter results by Chain name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - repo
Name String - The name of CR Enterprise Edition repository.
- repo
Namespace StringName - The name of CR Enterprise Edition namespace.
getChains Result
The following output properties are available:
- Chains
List<Pulumi.
Ali Cloud. CR. Outputs. Get Chains Chain> - A list of Cr Chains. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Chain IDs.
- Instance
Id string - The ID of CR Enterprise Edition instance.
- Names List<string>
- A list of Chain names.
- Enable
Details bool - Name
Regex string - Output
File string - Repo
Name string - Repo
Namespace stringName
- Chains
[]Get
Chains Chain - A list of Cr Chains. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Chain IDs.
- Instance
Id string - The ID of CR Enterprise Edition instance.
- Names []string
- A list of Chain names.
- Enable
Details bool - Name
Regex string - Output
File string - Repo
Name string - Repo
Namespace stringName
- chains
List<Get
Chains Chain> - A list of Cr Chains. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Chain IDs.
- instance
Id String - The ID of CR Enterprise Edition instance.
- names List<String>
- A list of Chain names.
- enable
Details Boolean - name
Regex String - output
File String - repo
Name String - repo
Namespace StringName
- chains
Get
Chains Chain[] - A list of Cr Chains. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Chain IDs.
- instance
Id string - The ID of CR Enterprise Edition instance.
- names string[]
- A list of Chain names.
- enable
Details boolean - name
Regex string - output
File string - repo
Name string - repo
Namespace stringName
- chains
Sequence[Get
Chains Chain] - A list of Cr Chains. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Chain IDs.
- instance_
id str - The ID of CR Enterprise Edition instance.
- names Sequence[str]
- A list of Chain names.
- enable_
details bool - name_
regex str - output_
file str - repo_
name str - repo_
namespace_ strname
- chains List<Property Map>
- A list of Cr Chains. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Chain IDs.
- instance
Id String - The ID of CR Enterprise Edition instance.
- names List<String>
- A list of Chain names.
- enable
Details Boolean - name
Regex String - output
File String - repo
Name String - repo
Namespace StringName
Supporting Types
GetChainsChain
- Chain
Configs List<Pulumi.Ali Cloud. CR. Inputs. Get Chains Chain Chain Config> - The configuration of delivery chain.
- Chain
Id string - The ID of delivery chain.
- Chain
Name string - The name of delivery chain.
- Create
Time string - The creation time of delivery chain.
- Description string
- The description of delivery chain.
- Id string
- The resource ID of the delivery chain. The value formats as
<instance_id>:<chain_id>
. - Instance
Id string - The ID of CR Enterprise Edition instance.
- Modified
Time string - The modification time of delivery chain description.
- Scope
Id string - Delivery chain scope ID.
- Scope
Type string - Delivery chain scope type.
- Chain
Configs []GetChains Chain Chain Config - The configuration of delivery chain.
- Chain
Id string - The ID of delivery chain.
- Chain
Name string - The name of delivery chain.
- Create
Time string - The creation time of delivery chain.
- Description string
- The description of delivery chain.
- Id string
- The resource ID of the delivery chain. The value formats as
<instance_id>:<chain_id>
. - Instance
Id string - The ID of CR Enterprise Edition instance.
- Modified
Time string - The modification time of delivery chain description.
- Scope
Id string - Delivery chain scope ID.
- Scope
Type string - Delivery chain scope type.
- chain
Configs List<GetChains Chain Chain Config> - The configuration of delivery chain.
- chain
Id String - The ID of delivery chain.
- chain
Name String - The name of delivery chain.
- create
Time String - The creation time of delivery chain.
- description String
- The description of delivery chain.
- id String
- The resource ID of the delivery chain. The value formats as
<instance_id>:<chain_id>
. - instance
Id String - The ID of CR Enterprise Edition instance.
- modified
Time String - The modification time of delivery chain description.
- scope
Id String - Delivery chain scope ID.
- scope
Type String - Delivery chain scope type.
- chain
Configs GetChains Chain Chain Config[] - The configuration of delivery chain.
- chain
Id string - The ID of delivery chain.
- chain
Name string - The name of delivery chain.
- create
Time string - The creation time of delivery chain.
- description string
- The description of delivery chain.
- id string
- The resource ID of the delivery chain. The value formats as
<instance_id>:<chain_id>
. - instance
Id string - The ID of CR Enterprise Edition instance.
- modified
Time string - The modification time of delivery chain description.
- scope
Id string - Delivery chain scope ID.
- scope
Type string - Delivery chain scope type.
- chain_
configs Sequence[GetChains Chain Chain Config] - The configuration of delivery chain.
- chain_
id str - The ID of delivery chain.
- chain_
name str - The name of delivery chain.
- create_
time str - The creation time of delivery chain.
- description str
- The description of delivery chain.
- id str
- The resource ID of the delivery chain. The value formats as
<instance_id>:<chain_id>
. - instance_
id str - The ID of CR Enterprise Edition instance.
- modified_
time str - The modification time of delivery chain description.
- scope_
id str - Delivery chain scope ID.
- scope_
type str - Delivery chain scope type.
- chain
Configs List<Property Map> - The configuration of delivery chain.
- chain
Id String - The ID of delivery chain.
- chain
Name String - The name of delivery chain.
- create
Time String - The creation time of delivery chain.
- description String
- The description of delivery chain.
- id String
- The resource ID of the delivery chain. The value formats as
<instance_id>:<chain_id>
. - instance
Id String - The ID of CR Enterprise Edition instance.
- modified
Time String - The modification time of delivery chain description.
- scope
Id String - Delivery chain scope ID.
- scope
Type String - Delivery chain scope type.
GetChainsChainChainConfig
- Nodes
List<Pulumi.
Ali Cloud. CR. Inputs. Get Chains Chain Chain Config Node> - Each node in the delivery chain.
- Routers
List<Pulumi.
Ali Cloud. CR. Inputs. Get Chains Chain Chain Config Router> - Execution sequence relationship between delivery chain nodes.
- Nodes
[]Get
Chains Chain Chain Config Node - Each node in the delivery chain.
- Routers
[]Get
Chains Chain Chain Config Router - Execution sequence relationship between delivery chain nodes.
- nodes
List<Get
Chains Chain Chain Config Node> - Each node in the delivery chain.
- routers
List<Get
Chains Chain Chain Config Router> - Execution sequence relationship between delivery chain nodes.
- nodes
Get
Chains Chain Chain Config Node[] - Each node in the delivery chain.
- routers
Get
Chains Chain Chain Config Router[] - Execution sequence relationship between delivery chain nodes.
- nodes
Sequence[Get
Chains Chain Chain Config Node] - Each node in the delivery chain.
- routers
Sequence[Get
Chains Chain Chain Config Router] - Execution sequence relationship between delivery chain nodes.
- nodes List<Property Map>
- Each node in the delivery chain.
- routers List<Property Map>
- Execution sequence relationship between delivery chain nodes.
GetChainsChainChainConfigNode
- Enable bool
- Whether to enable the delivery chain node. Valid values:
true
,false
. - Node
Configs List<Pulumi.Ali Cloud. CR. Inputs. Get Chains Chain Chain Config Node Node Config> - The configuration of delivery chain node.
- Node
Name string - The name of delivery chain node.
- Enable bool
- Whether to enable the delivery chain node. Valid values:
true
,false
. - Node
Configs []GetChains Chain Chain Config Node Node Config - The configuration of delivery chain node.
- Node
Name string - The name of delivery chain node.
- enable Boolean
- Whether to enable the delivery chain node. Valid values:
true
,false
. - node
Configs List<GetChains Chain Chain Config Node Node Config> - The configuration of delivery chain node.
- node
Name String - The name of delivery chain node.
- enable boolean
- Whether to enable the delivery chain node. Valid values:
true
,false
. - node
Configs GetChains Chain Chain Config Node Node Config[] - The configuration of delivery chain node.
- node
Name string - The name of delivery chain node.
- enable bool
- Whether to enable the delivery chain node. Valid values:
true
,false
. - node_
configs Sequence[GetChains Chain Chain Config Node Node Config] - The configuration of delivery chain node.
- node_
name str - The name of delivery chain node.
- enable Boolean
- Whether to enable the delivery chain node. Valid values:
true
,false
. - node
Configs List<Property Map> - The configuration of delivery chain node.
- node
Name String - The name of delivery chain node.
GetChainsChainChainConfigNodeNodeConfig
- Deny
Policies List<Pulumi.Ali Cloud. CR. Inputs. Get Chains Chain Chain Config Node Node Config Deny Policy> - Blocking rules for scanning nodes in delivery chain nodes. Note: When
node_name
isVULNERABILITY_SCANNING
, the parameters indeny_policy
need to be filled in.
- Deny
Policies []GetChains Chain Chain Config Node Node Config Deny Policy - Blocking rules for scanning nodes in delivery chain nodes. Note: When
node_name
isVULNERABILITY_SCANNING
, the parameters indeny_policy
need to be filled in.
- deny
Policies List<GetChains Chain Chain Config Node Node Config Deny Policy> - Blocking rules for scanning nodes in delivery chain nodes. Note: When
node_name
isVULNERABILITY_SCANNING
, the parameters indeny_policy
need to be filled in.
- deny
Policies GetChains Chain Chain Config Node Node Config Deny Policy[] - Blocking rules for scanning nodes in delivery chain nodes. Note: When
node_name
isVULNERABILITY_SCANNING
, the parameters indeny_policy
need to be filled in.
- deny_
policies Sequence[GetChains Chain Chain Config Node Node Config Deny Policy] - Blocking rules for scanning nodes in delivery chain nodes. Note: When
node_name
isVULNERABILITY_SCANNING
, the parameters indeny_policy
need to be filled in.
- deny
Policies List<Property Map> - Blocking rules for scanning nodes in delivery chain nodes. Note: When
node_name
isVULNERABILITY_SCANNING
, the parameters indeny_policy
need to be filled in.
GetChainsChainChainConfigNodeNodeConfigDenyPolicy
- Issue
Count string - The count of scanning vulnerabilities that triggers blocking.
- Issue
Level string - The level of scanning vulnerability that triggers blocking. Valid values:
LOW
,MEDIUM
,HIGH
,UNKNOWN
. - Logic string
- The logic of trigger blocking. Valid values:
AND
,OR
. - Action string
- The action of trigger blocking. Valid values:
BLOCK
,BLOCK_RETAG
,BLOCK_DELETE_TAG
. WhileBlock
means block the delivery chain from continuing to execute,BLOCK_RETAG
means block overwriting push image tag,BLOCK_DELETE_TAG
means block deletion of mirror tags.
- Issue
Count string - The count of scanning vulnerabilities that triggers blocking.
- Issue
Level string - The level of scanning vulnerability that triggers blocking. Valid values:
LOW
,MEDIUM
,HIGH
,UNKNOWN
. - Logic string
- The logic of trigger blocking. Valid values:
AND
,OR
. - Action string
- The action of trigger blocking. Valid values:
BLOCK
,BLOCK_RETAG
,BLOCK_DELETE_TAG
. WhileBlock
means block the delivery chain from continuing to execute,BLOCK_RETAG
means block overwriting push image tag,BLOCK_DELETE_TAG
means block deletion of mirror tags.
- issue
Count String - The count of scanning vulnerabilities that triggers blocking.
- issue
Level String - The level of scanning vulnerability that triggers blocking. Valid values:
LOW
,MEDIUM
,HIGH
,UNKNOWN
. - logic String
- The logic of trigger blocking. Valid values:
AND
,OR
. - action String
- The action of trigger blocking. Valid values:
BLOCK
,BLOCK_RETAG
,BLOCK_DELETE_TAG
. WhileBlock
means block the delivery chain from continuing to execute,BLOCK_RETAG
means block overwriting push image tag,BLOCK_DELETE_TAG
means block deletion of mirror tags.
- issue
Count string - The count of scanning vulnerabilities that triggers blocking.
- issue
Level string - The level of scanning vulnerability that triggers blocking. Valid values:
LOW
,MEDIUM
,HIGH
,UNKNOWN
. - logic string
- The logic of trigger blocking. Valid values:
AND
,OR
. - action string
- The action of trigger blocking. Valid values:
BLOCK
,BLOCK_RETAG
,BLOCK_DELETE_TAG
. WhileBlock
means block the delivery chain from continuing to execute,BLOCK_RETAG
means block overwriting push image tag,BLOCK_DELETE_TAG
means block deletion of mirror tags.
- issue_
count str - The count of scanning vulnerabilities that triggers blocking.
- issue_
level str - The level of scanning vulnerability that triggers blocking. Valid values:
LOW
,MEDIUM
,HIGH
,UNKNOWN
. - logic str
- The logic of trigger blocking. Valid values:
AND
,OR
. - action str
- The action of trigger blocking. Valid values:
BLOCK
,BLOCK_RETAG
,BLOCK_DELETE_TAG
. WhileBlock
means block the delivery chain from continuing to execute,BLOCK_RETAG
means block overwriting push image tag,BLOCK_DELETE_TAG
means block deletion of mirror tags.
- issue
Count String - The count of scanning vulnerabilities that triggers blocking.
- issue
Level String - The level of scanning vulnerability that triggers blocking. Valid values:
LOW
,MEDIUM
,HIGH
,UNKNOWN
. - logic String
- The logic of trigger blocking. Valid values:
AND
,OR
. - action String
- The action of trigger blocking. Valid values:
BLOCK
,BLOCK_RETAG
,BLOCK_DELETE_TAG
. WhileBlock
means block the delivery chain from continuing to execute,BLOCK_RETAG
means block overwriting push image tag,BLOCK_DELETE_TAG
means block deletion of mirror tags.
GetChainsChainChainConfigRouter
- Froms
[]Get
Chains Chain Chain Config Router From - Source node.
- Tos
[]Get
Chains Chain Chain Config Router To - Destination node.
- froms
List<Get
Chains Chain Chain Config Router From> - Source node.
- tos
List<Get
Chains Chain Chain Config Router To> - Destination node.
- froms
Get
Chains Chain Chain Config Router From[] - Source node.
- tos
Get
Chains Chain Chain Config Router To[] - Destination node.
- froms
Sequence[Get
Chains Chain Chain Config Router From] - Source node.
- tos
Sequence[Get
Chains Chain Chain Config Router To] - Destination node.
- froms List<Property Map>
- Source node.
- tos List<Property Map>
- Destination node.
GetChainsChainChainConfigRouterFrom
- Node
Name string - The name of delivery chain node.
- Node
Name string - The name of delivery chain node.
- node
Name String - The name of delivery chain node.
- node
Name string - The name of delivery chain node.
- node_
name str - The name of delivery chain node.
- node
Name String - The name of delivery chain node.
GetChainsChainChainConfigRouterTo
- Node
Name string - The name of delivery chain node.
- Node
Name string - The name of delivery chain node.
- node
Name String - The name of delivery chain node.
- node
Name string - The name of delivery chain node.
- node_
name str - The name of delivery chain node.
- node
Name String - The name of delivery chain node.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.