alicloud.vpc.getBgpGroups
Explore with Pulumi AI
This data source provides the Vpc Bgp Groups of the current Alibaba Cloud user.
NOTE: Available in v1.152.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Vpc.GetBgpGroups.Invoke(new()
{
Ids = new[]
{
"example_value",
},
});
var nameRegex = AliCloud.Vpc.GetBgpGroups.Invoke(new()
{
NameRegex = "^my-BgpGroup",
});
return new Dictionary<string, object?>
{
["vpcBgpGroupId1"] = ids.Apply(getBgpGroupsResult => getBgpGroupsResult.Groups[0]?.Id),
["vpcBgpGroupId2"] = nameRegex.Apply(getBgpGroupsResult => getBgpGroupsResult.Groups[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := vpc.GetBgpGroups(ctx, &vpc.GetBgpGroupsArgs{
Ids: []string{
"example_value",
},
}, nil)
if err != nil {
return err
}
ctx.Export("vpcBgpGroupId1", ids.Groups[0].Id)
nameRegex, err := vpc.GetBgpGroups(ctx, &vpc.GetBgpGroupsArgs{
NameRegex: pulumi.StringRef("^my-BgpGroup"),
}, nil)
if err != nil {
return err
}
ctx.Export("vpcBgpGroupId2", nameRegex.Groups[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetBgpGroupsArgs;
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 = VpcFunctions.getBgpGroups(GetBgpGroupsArgs.builder()
.ids("example_value")
.build());
ctx.export("vpcBgpGroupId1", ids.applyValue(getBgpGroupsResult -> getBgpGroupsResult.groups()[0].id()));
final var nameRegex = VpcFunctions.getBgpGroups(GetBgpGroupsArgs.builder()
.nameRegex("^my-BgpGroup")
.build());
ctx.export("vpcBgpGroupId2", nameRegex.applyValue(getBgpGroupsResult -> getBgpGroupsResult.groups()[0].id()));
}
}
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.vpc.get_bgp_groups(ids=["example_value"])
pulumi.export("vpcBgpGroupId1", ids.groups[0].id)
name_regex = alicloud.vpc.get_bgp_groups(name_regex="^my-BgpGroup")
pulumi.export("vpcBgpGroupId2", name_regex.groups[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.vpc.getBgpGroups({
ids: ["example_value"],
});
export const vpcBgpGroupId1 = ids.then(ids => ids.groups?.[0]?.id);
const nameRegex = alicloud.vpc.getBgpGroups({
nameRegex: "^my-BgpGroup",
});
export const vpcBgpGroupId2 = nameRegex.then(nameRegex => nameRegex.groups?.[0]?.id);
variables:
ids:
fn::invoke:
Function: alicloud:vpc:getBgpGroups
Arguments:
ids:
- example_value
nameRegex:
fn::invoke:
Function: alicloud:vpc:getBgpGroups
Arguments:
nameRegex: ^my-BgpGroup
outputs:
vpcBgpGroupId1: ${ids.groups[0].id}
vpcBgpGroupId2: ${nameRegex.groups[0].id}
Using getBgpGroups
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 getBgpGroups(args: GetBgpGroupsArgs, opts?: InvokeOptions): Promise<GetBgpGroupsResult>
function getBgpGroupsOutput(args: GetBgpGroupsOutputArgs, opts?: InvokeOptions): Output<GetBgpGroupsResult>
def get_bgp_groups(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
router_id: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBgpGroupsResult
def get_bgp_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
router_id: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBgpGroupsResult]
func GetBgpGroups(ctx *Context, args *GetBgpGroupsArgs, opts ...InvokeOption) (*GetBgpGroupsResult, error)
func GetBgpGroupsOutput(ctx *Context, args *GetBgpGroupsOutputArgs, opts ...InvokeOption) GetBgpGroupsResultOutput
> Note: This function is named GetBgpGroups
in the Go SDK.
public static class GetBgpGroups
{
public static Task<GetBgpGroupsResult> InvokeAsync(GetBgpGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetBgpGroupsResult> Invoke(GetBgpGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBgpGroupsResult> getBgpGroups(GetBgpGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:vpc/getBgpGroups:getBgpGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
A list of Bgp Group IDs.
- Name
Regex string A regex string to filter results by Bgp Group name.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Router
Id string The ID of the VBR.
- Status string
The status of the resource.
- Ids []string
A list of Bgp Group IDs.
- Name
Regex string A regex string to filter results by Bgp Group name.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Router
Id string The ID of the VBR.
- Status string
The status of the resource.
- ids List<String>
A list of Bgp Group IDs.
- name
Regex String A regex string to filter results by Bgp Group name.
- output
File String File name where to save data source results (after running
pulumi preview
).- router
Id String The ID of the VBR.
- status String
The status of the resource.
- ids string[]
A list of Bgp Group IDs.
- name
Regex string A regex string to filter results by Bgp Group name.
- output
File string File name where to save data source results (after running
pulumi preview
).- router
Id string The ID of the VBR.
- status string
The status of the resource.
- ids Sequence[str]
A list of Bgp Group IDs.
- name_
regex str A regex string to filter results by Bgp Group name.
- output_
file str File name where to save data source results (after running
pulumi preview
).- router_
id str The ID of the VBR.
- status str
The status of the resource.
- ids List<String>
A list of Bgp Group IDs.
- name
Regex String A regex string to filter results by Bgp Group name.
- output
File String File name where to save data source results (after running
pulumi preview
).- router
Id String The ID of the VBR.
- status String
The status of the resource.
getBgpGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Vpc. Outputs. Get Bgp Groups Group> - Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Name
Regex string - Output
File string - Router
Id string - Status string
- Groups
[]Get
Bgp Groups Group - Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Name
Regex string - Output
File string - Router
Id string - Status string
- groups
List<Get
Bgp Groups Group> - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- name
Regex String - output
File String - router
Id String - status String
- groups
Get
Bgp Groups Group[] - id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- name
Regex string - output
File string - router
Id string - status string
- groups
Sequence[Get
Bgp Groups Group] - id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- name_
regex str - output_
file str - router_
id str - status str
- groups List<Property Map>
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- name
Regex String - output
File String - router
Id String - status String
Supporting Types
GetBgpGroupsGroup
- Auth
Key string The key used by the BGP group.
- Bgp
Group stringName The name of the BGP group.
- Description string
Description of the BGP group.
- Hold string
The hold time to wait for the incoming BGP message. If no message has been passed in after the hold time, the BGP neighbor is considered disconnected.
- Id string
The ID of the Bgp Group.
- Ip
Version string IP version.
- Is
Fake boolAsn Whether the AS number is false.
- Keepalive string
The keepalive time.
- Local
Asn int The local AS number.
- Peer
Asn int The autonomous system (AS) number of the BGP peer.
- Route
Limit string Routing limits.
- Router
Id string The ID of the VBR.
- Status string
The status of the resource.
- Auth
Key string The key used by the BGP group.
- Bgp
Group stringName The name of the BGP group.
- Description string
Description of the BGP group.
- Hold string
The hold time to wait for the incoming BGP message. If no message has been passed in after the hold time, the BGP neighbor is considered disconnected.
- Id string
The ID of the Bgp Group.
- Ip
Version string IP version.
- Is
Fake boolAsn Whether the AS number is false.
- Keepalive string
The keepalive time.
- Local
Asn int The local AS number.
- Peer
Asn int The autonomous system (AS) number of the BGP peer.
- Route
Limit string Routing limits.
- Router
Id string The ID of the VBR.
- Status string
The status of the resource.
- auth
Key String The key used by the BGP group.
- bgp
Group StringName The name of the BGP group.
- description String
Description of the BGP group.
- hold String
The hold time to wait for the incoming BGP message. If no message has been passed in after the hold time, the BGP neighbor is considered disconnected.
- id String
The ID of the Bgp Group.
- ip
Version String IP version.
- is
Fake BooleanAsn Whether the AS number is false.
- keepalive String
The keepalive time.
- local
Asn Integer The local AS number.
- peer
Asn Integer The autonomous system (AS) number of the BGP peer.
- route
Limit String Routing limits.
- router
Id String The ID of the VBR.
- status String
The status of the resource.
- auth
Key string The key used by the BGP group.
- bgp
Group stringName The name of the BGP group.
- description string
Description of the BGP group.
- hold string
The hold time to wait for the incoming BGP message. If no message has been passed in after the hold time, the BGP neighbor is considered disconnected.
- id string
The ID of the Bgp Group.
- ip
Version string IP version.
- is
Fake booleanAsn Whether the AS number is false.
- keepalive string
The keepalive time.
- local
Asn number The local AS number.
- peer
Asn number The autonomous system (AS) number of the BGP peer.
- route
Limit string Routing limits.
- router
Id string The ID of the VBR.
- status string
The status of the resource.
- auth_
key str The key used by the BGP group.
- bgp_
group_ strname The name of the BGP group.
- description str
Description of the BGP group.
- hold str
The hold time to wait for the incoming BGP message. If no message has been passed in after the hold time, the BGP neighbor is considered disconnected.
- id str
The ID of the Bgp Group.
- ip_
version str IP version.
- is_
fake_ boolasn Whether the AS number is false.
- keepalive str
The keepalive time.
- local_
asn int The local AS number.
- peer_
asn int The autonomous system (AS) number of the BGP peer.
- route_
limit str Routing limits.
- router_
id str The ID of the VBR.
- status str
The status of the resource.
- auth
Key String The key used by the BGP group.
- bgp
Group StringName The name of the BGP group.
- description String
Description of the BGP group.
- hold String
The hold time to wait for the incoming BGP message. If no message has been passed in after the hold time, the BGP neighbor is considered disconnected.
- id String
The ID of the Bgp Group.
- ip
Version String IP version.
- is
Fake BooleanAsn Whether the AS number is false.
- keepalive String
The keepalive time.
- local
Asn Number The local AS number.
- peer
Asn Number The autonomous system (AS) number of the BGP peer.
- route
Limit String Routing limits.
- router
Id String The ID of the VBR.
- status String
The status of the resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.