Class BgpNetwork


  • public class BgpNetwork
    extends com.pulumi.resources.CustomResource
    Provides a VPC Bgp Network resource. For information about VPC Bgp Network and how to use it, see [What is Bgp Network](https://www.alibabacloud.com/help/en/doc-detail/91267.html). > **NOTE:** Available since v1.153.0. ## Example Usage Basic Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.alicloud.expressconnect.ExpressconnectFunctions; import com.pulumi.alicloud.expressconnect.inputs.GetPhysicalConnectionsArgs; import com.pulumi.random.RandomInteger; import com.pulumi.random.RandomIntegerArgs; import com.pulumi.alicloud.expressconnect.VirtualBorderRouter; import com.pulumi.alicloud.expressconnect.VirtualBorderRouterArgs; import com.pulumi.alicloud.vpc.BgpNetwork; import com.pulumi.alicloud.vpc.BgpNetworkArgs; 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 config = ctx.config(); final var name = config.get("name").orElse("tf-example"); final var examplePhysicalConnections = ExpressconnectFunctions.getPhysicalConnections(GetPhysicalConnectionsArgs.builder() .nameRegex("^preserved-NODELETING") .build()); var vlanId = new RandomInteger("vlanId", RandomIntegerArgs.builder() .max(2999) .min(1) .build()); var exampleVirtualBorderRouter = new VirtualBorderRouter("exampleVirtualBorderRouter", VirtualBorderRouterArgs.builder() .localGatewayIp("10.0.0.1") .peerGatewayIp("10.0.0.2") .peeringSubnetMask("255.255.255.252") .physicalConnectionId(examplePhysicalConnections.applyValue(getPhysicalConnectionsResult -> getPhysicalConnectionsResult.connections()[0].id())) .virtualBorderRouterName(name) .vlanId(vlanId.id()) .minRxInterval(1000) .minTxInterval(1000) .detectMultiplier(10) .build()); var exampleBgpNetwork = new BgpNetwork("exampleBgpNetwork", BgpNetworkArgs.builder() .dstCidrBlock("192.168.0.0/24") .routerId(exampleVirtualBorderRouter.id()) .build()); } } ``` ## Import VPC Bgp Network can be imported using the id, e.g. ```sh $ pulumi import alicloud:vpc/bgpNetwork:BgpNetwork example <router_id>:<dst_cidr_block> ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> dstCidrBlock()  
      static BgpNetwork get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, BgpNetworkState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> routerId()  
      com.pulumi.core.Output<java.lang.String> status()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BgpNetwork

        public BgpNetwork​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • BgpNetwork

        public BgpNetwork​(java.lang.String name,
                          BgpNetworkArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • BgpNetwork

        public BgpNetwork​(java.lang.String name,
                          BgpNetworkArgs args,
                          @Nullable
                          com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • dstCidrBlock

        public com.pulumi.core.Output<java.lang.String> dstCidrBlock()
        Returns:
        The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
      • routerId

        public com.pulumi.core.Output<java.lang.String> routerId()
        Returns:
        The ID of the vRouter associated with the router interface.
      • status

        public com.pulumi.core.Output<java.lang.String> status()
        Returns:
        The state of the advertised BGP network.
      • get

        public static BgpNetwork get​(java.lang.String name,
                                     com.pulumi.core.Output<java.lang.String> id,
                                     @Nullable
                                     BgpNetworkState state,
                                     @Nullable
                                     com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.