Class Peering


  • public class Peering
    extends com.pulumi.resources.CustomResource
    Peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location. Azure REST API version: 2022-10-01. Prior API version in Azure Native 1.x: 2021-01-01. ## Example Usage ### Create a direct peering ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.azurenative.peering.Peering; import com.pulumi.azurenative.peering.PeeringArgs; 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 peering = new Peering("peering", PeeringArgs.builder() .direct(Map.ofEntries( Map.entry("connections", Map.ofEntries( Map.entry("bandwidthInMbps", 10000), Map.entry("bgpSession", Map.ofEntries( Map.entry("maxPrefixesAdvertisedV4", 1000), Map.entry("maxPrefixesAdvertisedV6", 100), Map.entry("md5AuthenticationKey", "test-md5-auth-key"), Map.entry("sessionPrefixV4", "192.168.0.0/31"), Map.entry("sessionPrefixV6", "fd00::0/127") )), Map.entry("connectionIdentifier", "5F4CB5C7-6B43-4444-9338-9ABC72606C16"), Map.entry("peeringDBFacilityId", 99999), Map.entry("sessionAddressProvider", "Peer"), Map.entry("useForPeeringService", false) ), Map.ofEntries( Map.entry("bandwidthInMbps", 10000), Map.entry("connectionIdentifier", "8AB00818-D533-4504-A25A-03A17F61201C"), Map.entry("peeringDBFacilityId", 99999), Map.entry("sessionAddressProvider", "Microsoft"), Map.entry("useForPeeringService", true) )), Map.entry("directPeeringType", "Edge"), Map.entry("peerAsn", Map.of("id", "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1")) )) .kind("Direct") .location("eastus") .peeringLocation("peeringLocation0") .peeringName("peeringName") .resourceGroupName("rgName") .sku(Map.of("name", "Basic_Direct_Free")) .build()); } } ``` ### Create a peering with exchange route server ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.azurenative.peering.Peering; import com.pulumi.azurenative.peering.PeeringArgs; 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 peering = new Peering("peering", PeeringArgs.builder() .direct(Map.ofEntries( Map.entry("connections", Map.ofEntries( Map.entry("bandwidthInMbps", 10000), Map.entry("bgpSession", Map.ofEntries( Map.entry("maxPrefixesAdvertisedV4", 1000), Map.entry("maxPrefixesAdvertisedV6", 100), Map.entry("microsoftSessionIPv4Address", "192.168.0.123"), Map.entry("peerSessionIPv4Address", "192.168.0.234"), Map.entry("sessionPrefixV4", "192.168.0.0/24") )), Map.entry("connectionIdentifier", "5F4CB5C7-6B43-4444-9338-9ABC72606C16"), Map.entry("peeringDBFacilityId", 99999), Map.entry("sessionAddressProvider", "Peer"), Map.entry("useForPeeringService", true) )), Map.entry("directPeeringType", "IxRs"), Map.entry("peerAsn", Map.of("id", "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1")) )) .kind("Direct") .location("eastus") .peeringLocation("peeringLocation0") .peeringName("peeringName") .resourceGroupName("rgName") .sku(Map.of("name", "Premium_Direct_Free")) .build()); } } ``` ### Create an exchange peering ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.azurenative.peering.Peering; import com.pulumi.azurenative.peering.PeeringArgs; 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 peering = new Peering("peering", PeeringArgs.builder() .exchange(Map.ofEntries( Map.entry("connections", Map.ofEntries( Map.entry("bgpSession", Map.ofEntries( Map.entry("maxPrefixesAdvertisedV4", 1000), Map.entry("maxPrefixesAdvertisedV6", 100), Map.entry("md5AuthenticationKey", "test-md5-auth-key"), Map.entry("peerSessionIPv4Address", "192.168.2.1"), Map.entry("peerSessionIPv6Address", "fd00::1") )), Map.entry("connectionIdentifier", "CE495334-0E94-4E51-8164-8116D6CD284D"), Map.entry("peeringDBFacilityId", 99999) ), Map.ofEntries( Map.entry("bgpSession", Map.ofEntries( Map.entry("maxPrefixesAdvertisedV4", 1000), Map.entry("maxPrefixesAdvertisedV6", 100), Map.entry("md5AuthenticationKey", "test-md5-auth-key"), Map.entry("peerSessionIPv4Address", "192.168.2.2"), Map.entry("peerSessionIPv6Address", "fd00::2") )), Map.entry("connectionIdentifier", "CDD8E673-CB07-47E6-84DE-3739F778762B"), Map.entry("peeringDBFacilityId", 99999) )), Map.entry("peerAsn", Map.of("id", "/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1")) )) .kind("Exchange") .location("eastus") .peeringLocation("peeringLocation0") .peeringName("peeringName") .resourceGroupName("rgName") .sku(Map.of("name", "Basic_Exchange_Free")) .build()); } } ``` ## Import An existing resource can be imported using its type token, name, and identifier, e.g. ```sh $ pulumi import azure-native:peering:Peering peeringName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName} ```
    • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      Peering​(java.lang.String name)  
      Peering​(java.lang.String name, PeeringArgs args)  
      Peering​(java.lang.String name, PeeringArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.Optional<PeeringPropertiesDirectResponse>> direct()  
      com.pulumi.core.Output<java.util.Optional<PeeringPropertiesExchangeResponse>> exchange()  
      static Peering get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, 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> kind()  
      com.pulumi.core.Output<java.lang.String> location()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> peeringLocation()  
      com.pulumi.core.Output<java.lang.String> provisioningState()  
      com.pulumi.core.Output<PeeringSkuResponse> sku()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.lang.String> type()  
      • 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

      • Peering

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

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

        public Peering​(java.lang.String name,
                       PeeringArgs 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

      • direct

        public com.pulumi.core.Output<java.util.Optional<PeeringPropertiesDirectResponse>> direct()
        Returns:
        The properties that define a direct peering.
      • exchange

        public com.pulumi.core.Output<java.util.Optional<PeeringPropertiesExchangeResponse>> exchange()
        Returns:
        The properties that define an exchange peering.
      • kind

        public com.pulumi.core.Output<java.lang.String> kind()
        Returns:
        The kind of the peering.
      • location

        public com.pulumi.core.Output<java.lang.String> location()
        Returns:
        The location of the resource.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        The name of the resource.
      • peeringLocation

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> peeringLocation()
        Returns:
        The location of the peering.
      • provisioningState

        public com.pulumi.core.Output<java.lang.String> provisioningState()
        Returns:
        The provisioning state of the resource.
      • sku

        public com.pulumi.core.Output<PeeringSkuResponse> sku()
        Returns:
        The SKU that defines the tier and kind of the peering.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        The resource tags.
      • type

        public com.pulumi.core.Output<java.lang.String> type()
        Returns:
        The type of the resource.
      • get

        public static Peering get​(java.lang.String name,
                                  com.pulumi.core.Output<java.lang.String> id,
                                  @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.
        options - Optional settings to control the behavior of the CustomResource.