volcengine.direct_connect.BgpPeer
Explore with Pulumi AI
Provides a resource to manage direct connect bgp peer
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Direct_connect.BgpPeer("foo", new()
{
Description = "tf-test",
RemoteAsn = 2000,
VirtualInterfaceId = "dcv-62vi13v131tsn3gd6il****",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/direct_connect"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := direct_connect.NewBgpPeer(ctx, "foo", &direct_connect.BgpPeerArgs{
Description: pulumi.String("tf-test"),
RemoteAsn: pulumi.Int(2000),
VirtualInterfaceId: pulumi.String("dcv-62vi13v131tsn3gd6il****"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.direct_connect.BgpPeer;
import com.pulumi.volcengine.direct_connect.BgpPeerArgs;
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) {
var foo = new BgpPeer("foo", BgpPeerArgs.builder()
.description("tf-test")
.remoteAsn(2000)
.virtualInterfaceId("dcv-62vi13v131tsn3gd6il****")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.direct_connect.BgpPeer("foo",
description="tf-test",
remote_asn=2000,
virtual_interface_id="dcv-62vi13v131tsn3gd6il****")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.direct_connect.BgpPeer("foo", {
description: "tf-test",
remoteAsn: 2000,
virtualInterfaceId: "dcv-62vi13v131tsn3gd6il****",
});
resources:
foo:
type: volcengine:direct_connect:BgpPeer
properties:
description: tf-test
remoteAsn: 2000
virtualInterfaceId: dcv-62vi13v131tsn3gd6il****
Create BgpPeer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BgpPeer(name: string, args: BgpPeerArgs, opts?: CustomResourceOptions);
@overload
def BgpPeer(resource_name: str,
args: BgpPeerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BgpPeer(resource_name: str,
opts: Optional[ResourceOptions] = None,
remote_asn: Optional[int] = None,
virtual_interface_id: Optional[str] = None,
auth_key: Optional[str] = None,
bgp_peer_name: Optional[str] = None,
description: Optional[str] = None)
func NewBgpPeer(ctx *Context, name string, args BgpPeerArgs, opts ...ResourceOption) (*BgpPeer, error)
public BgpPeer(string name, BgpPeerArgs args, CustomResourceOptions? opts = null)
public BgpPeer(String name, BgpPeerArgs args)
public BgpPeer(String name, BgpPeerArgs args, CustomResourceOptions options)
type: volcengine:direct_connect:BgpPeer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BgpPeerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BgpPeerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BgpPeerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BgpPeerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BgpPeerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var bgpPeerResource = new Volcengine.Direct_connect.BgpPeer("bgpPeerResource", new()
{
RemoteAsn = 0,
VirtualInterfaceId = "string",
AuthKey = "string",
BgpPeerName = "string",
Description = "string",
});
example, err := direct_connect.NewBgpPeer(ctx, "bgpPeerResource", &direct_connect.BgpPeerArgs{
RemoteAsn: pulumi.Int(0),
VirtualInterfaceId: pulumi.String("string"),
AuthKey: pulumi.String("string"),
BgpPeerName: pulumi.String("string"),
Description: pulumi.String("string"),
})
var bgpPeerResource = new BgpPeer("bgpPeerResource", BgpPeerArgs.builder()
.remoteAsn(0)
.virtualInterfaceId("string")
.authKey("string")
.bgpPeerName("string")
.description("string")
.build());
bgp_peer_resource = volcengine.direct_connect.BgpPeer("bgpPeerResource",
remote_asn=0,
virtual_interface_id="string",
auth_key="string",
bgp_peer_name="string",
description="string")
const bgpPeerResource = new volcengine.direct_connect.BgpPeer("bgpPeerResource", {
remoteAsn: 0,
virtualInterfaceId: "string",
authKey: "string",
bgpPeerName: "string",
description: "string",
});
type: volcengine:direct_connect:BgpPeer
properties:
authKey: string
bgpPeerName: string
description: string
remoteAsn: 0
virtualInterfaceId: string
BgpPeer Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BgpPeer resource accepts the following input properties:
- Remote
Asn int - The remote asn of bgp peer.
- Virtual
Interface stringId - The id of virtual interface.
- Auth
Key string - The auth key of bgp peer.
- Bgp
Peer stringName - The name of bgp peer.
- Description string
- The description of bgp peer.
- Remote
Asn int - The remote asn of bgp peer.
- Virtual
Interface stringId - The id of virtual interface.
- Auth
Key string - The auth key of bgp peer.
- Bgp
Peer stringName - The name of bgp peer.
- Description string
- The description of bgp peer.
- remote
Asn Integer - The remote asn of bgp peer.
- virtual
Interface StringId - The id of virtual interface.
- auth
Key String - The auth key of bgp peer.
- bgp
Peer StringName - The name of bgp peer.
- description String
- The description of bgp peer.
- remote
Asn number - The remote asn of bgp peer.
- virtual
Interface stringId - The id of virtual interface.
- auth
Key string - The auth key of bgp peer.
- bgp
Peer stringName - The name of bgp peer.
- description string
- The description of bgp peer.
- remote_
asn int - The remote asn of bgp peer.
- virtual_
interface_ strid - The id of virtual interface.
- auth_
key str - The auth key of bgp peer.
- bgp_
peer_ strname - The name of bgp peer.
- description str
- The description of bgp peer.
- remote
Asn Number - The remote asn of bgp peer.
- virtual
Interface StringId - The id of virtual interface.
- auth
Key String - The auth key of bgp peer.
- bgp
Peer StringName - The name of bgp peer.
- description String
- The description of bgp peer.
Outputs
All input properties are implicitly available as output properties. Additionally, the BgpPeer resource produces the following output properties:
- Account
Id string - The id of account.
- Bgp
Peer stringId - The id of bgp peer.
- Creation
Time string - The create time of bgp peer.
- Id string
- The provider-assigned unique ID for this managed resource.
- Local
Asn int - The local asn of bgp peer.
- Session
Status string - The session status of bgp peer.
- Status string
- The status of bgp peer.
- Update
Time string - The update time of bgp peer.
- Account
Id string - The id of account.
- Bgp
Peer stringId - The id of bgp peer.
- Creation
Time string - The create time of bgp peer.
- Id string
- The provider-assigned unique ID for this managed resource.
- Local
Asn int - The local asn of bgp peer.
- Session
Status string - The session status of bgp peer.
- Status string
- The status of bgp peer.
- Update
Time string - The update time of bgp peer.
- account
Id String - The id of account.
- bgp
Peer StringId - The id of bgp peer.
- creation
Time String - The create time of bgp peer.
- id String
- The provider-assigned unique ID for this managed resource.
- local
Asn Integer - The local asn of bgp peer.
- session
Status String - The session status of bgp peer.
- status String
- The status of bgp peer.
- update
Time String - The update time of bgp peer.
- account
Id string - The id of account.
- bgp
Peer stringId - The id of bgp peer.
- creation
Time string - The create time of bgp peer.
- id string
- The provider-assigned unique ID for this managed resource.
- local
Asn number - The local asn of bgp peer.
- session
Status string - The session status of bgp peer.
- status string
- The status of bgp peer.
- update
Time string - The update time of bgp peer.
- account_
id str - The id of account.
- bgp_
peer_ strid - The id of bgp peer.
- creation_
time str - The create time of bgp peer.
- id str
- The provider-assigned unique ID for this managed resource.
- local_
asn int - The local asn of bgp peer.
- session_
status str - The session status of bgp peer.
- status str
- The status of bgp peer.
- update_
time str - The update time of bgp peer.
- account
Id String - The id of account.
- bgp
Peer StringId - The id of bgp peer.
- creation
Time String - The create time of bgp peer.
- id String
- The provider-assigned unique ID for this managed resource.
- local
Asn Number - The local asn of bgp peer.
- session
Status String - The session status of bgp peer.
- status String
- The status of bgp peer.
- update
Time String - The update time of bgp peer.
Look up Existing BgpPeer Resource
Get an existing BgpPeer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BgpPeerState, opts?: CustomResourceOptions): BgpPeer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
auth_key: Optional[str] = None,
bgp_peer_id: Optional[str] = None,
bgp_peer_name: Optional[str] = None,
creation_time: Optional[str] = None,
description: Optional[str] = None,
local_asn: Optional[int] = None,
remote_asn: Optional[int] = None,
session_status: Optional[str] = None,
status: Optional[str] = None,
update_time: Optional[str] = None,
virtual_interface_id: Optional[str] = None) -> BgpPeer
func GetBgpPeer(ctx *Context, name string, id IDInput, state *BgpPeerState, opts ...ResourceOption) (*BgpPeer, error)
public static BgpPeer Get(string name, Input<string> id, BgpPeerState? state, CustomResourceOptions? opts = null)
public static BgpPeer get(String name, Output<String> id, BgpPeerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - The id of account.
- Auth
Key string - The auth key of bgp peer.
- Bgp
Peer stringId - The id of bgp peer.
- Bgp
Peer stringName - The name of bgp peer.
- Creation
Time string - The create time of bgp peer.
- Description string
- The description of bgp peer.
- Local
Asn int - The local asn of bgp peer.
- Remote
Asn int - The remote asn of bgp peer.
- Session
Status string - The session status of bgp peer.
- Status string
- The status of bgp peer.
- Update
Time string - The update time of bgp peer.
- Virtual
Interface stringId - The id of virtual interface.
- Account
Id string - The id of account.
- Auth
Key string - The auth key of bgp peer.
- Bgp
Peer stringId - The id of bgp peer.
- Bgp
Peer stringName - The name of bgp peer.
- Creation
Time string - The create time of bgp peer.
- Description string
- The description of bgp peer.
- Local
Asn int - The local asn of bgp peer.
- Remote
Asn int - The remote asn of bgp peer.
- Session
Status string - The session status of bgp peer.
- Status string
- The status of bgp peer.
- Update
Time string - The update time of bgp peer.
- Virtual
Interface stringId - The id of virtual interface.
- account
Id String - The id of account.
- auth
Key String - The auth key of bgp peer.
- bgp
Peer StringId - The id of bgp peer.
- bgp
Peer StringName - The name of bgp peer.
- creation
Time String - The create time of bgp peer.
- description String
- The description of bgp peer.
- local
Asn Integer - The local asn of bgp peer.
- remote
Asn Integer - The remote asn of bgp peer.
- session
Status String - The session status of bgp peer.
- status String
- The status of bgp peer.
- update
Time String - The update time of bgp peer.
- virtual
Interface StringId - The id of virtual interface.
- account
Id string - The id of account.
- auth
Key string - The auth key of bgp peer.
- bgp
Peer stringId - The id of bgp peer.
- bgp
Peer stringName - The name of bgp peer.
- creation
Time string - The create time of bgp peer.
- description string
- The description of bgp peer.
- local
Asn number - The local asn of bgp peer.
- remote
Asn number - The remote asn of bgp peer.
- session
Status string - The session status of bgp peer.
- status string
- The status of bgp peer.
- update
Time string - The update time of bgp peer.
- virtual
Interface stringId - The id of virtual interface.
- account_
id str - The id of account.
- auth_
key str - The auth key of bgp peer.
- bgp_
peer_ strid - The id of bgp peer.
- bgp_
peer_ strname - The name of bgp peer.
- creation_
time str - The create time of bgp peer.
- description str
- The description of bgp peer.
- local_
asn int - The local asn of bgp peer.
- remote_
asn int - The remote asn of bgp peer.
- session_
status str - The session status of bgp peer.
- status str
- The status of bgp peer.
- update_
time str - The update time of bgp peer.
- virtual_
interface_ strid - The id of virtual interface.
- account
Id String - The id of account.
- auth
Key String - The auth key of bgp peer.
- bgp
Peer StringId - The id of bgp peer.
- bgp
Peer StringName - The name of bgp peer.
- creation
Time String - The create time of bgp peer.
- description String
- The description of bgp peer.
- local
Asn Number - The local asn of bgp peer.
- remote
Asn Number - The remote asn of bgp peer.
- session
Status String - The session status of bgp peer.
- status String
- The status of bgp peer.
- update
Time String - The update time of bgp peer.
- virtual
Interface StringId - The id of virtual interface.
Import
DirectConnectBgpPeer can be imported using the id, e.g.
$ pulumi import volcengine:direct_connect/bgpPeer:BgpPeer default bgp-2752hz4teko3k7fap8u4c****
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.