Class CfnPublicVirtualInterface

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.directconnect.CfnPublicVirtualInterface
All Implemented Interfaces:
IInspectable, IPublicVirtualInterfaceRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:41.943Z") @Stability(Stable) public class CfnPublicVirtualInterface extends CfnResource implements IInspectable, IPublicVirtualInterfaceRef, ITaggableV2
Resource Type definition for AWS::DirectConnect::PublicVirtualInterface.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.directconnect.*;
 CfnPublicVirtualInterface cfnPublicVirtualInterface = CfnPublicVirtualInterface.Builder.create(this, "MyCfnPublicVirtualInterface")
         .bgpPeers(List.of(BgpPeerProperty.builder()
                 .addressFamily("addressFamily")
                 .asn("asn")
                 // the properties below are optional
                 .amazonAddress("amazonAddress")
                 .authKey("authKey")
                 .bgpPeerId("bgpPeerId")
                 .customerAddress("customerAddress")
                 .build()))
         .connectionId("connectionId")
         .virtualInterfaceName("virtualInterfaceName")
         .vlan(123)
         // the properties below are optional
         .allocatePublicVirtualInterfaceRoleArn("allocatePublicVirtualInterfaceRoleArn")
         .routeFilterPrefixes(List.of("routeFilterPrefixes"))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnPublicVirtualInterface

      protected CfnPublicVirtualInterface(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnPublicVirtualInterface

      protected CfnPublicVirtualInterface(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnPublicVirtualInterface

      @Stability(Stable) public CfnPublicVirtualInterface(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPublicVirtualInterfaceProps props)
      Create a new AWS::DirectConnect::PublicVirtualInterface.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • isCfnPublicVirtualInterface

      @Stability(Stable) @NotNull public static Boolean isCfnPublicVirtualInterface(@NotNull Object x)
      Checks whether the given object is a CfnPublicVirtualInterface.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrVirtualInterfaceArn

      @Stability(Stable) @NotNull public String getAttrVirtualInterfaceArn()
      The ARN of the virtual interface.
    • getAttrVirtualInterfaceId

      @Stability(Stable) @NotNull public String getAttrVirtualInterfaceId()
      The ID of the virtual interface.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getPublicVirtualInterfaceRef

      @Stability(Stable) @NotNull public PublicVirtualInterfaceReference getPublicVirtualInterfaceRef()
      A reference to a PublicVirtualInterface resource.
      Specified by:
      getPublicVirtualInterfaceRef in interface IPublicVirtualInterfaceRef
    • getBgpPeers

      @Stability(Stable) @NotNull public Object getBgpPeers()
      The BGP peers configured on this virtual interface.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnPublicVirtualInterface.BgpPeerProperty>

    • setBgpPeers

      @Stability(Stable) public void setBgpPeers(@NotNull IResolvable value)
      The BGP peers configured on this virtual interface.
    • setBgpPeers

      @Stability(Stable) public void setBgpPeers(@NotNull List<Object> value)
      The BGP peers configured on this virtual interface.
    • getConnectionId

      @Stability(Stable) @NotNull public String getConnectionId()
    • setConnectionId

      @Stability(Stable) public void setConnectionId(@NotNull String value)
    • getVirtualInterfaceName

      @Stability(Stable) @NotNull public String getVirtualInterfaceName()
      The name of the virtual interface assigned by the customer network.
    • setVirtualInterfaceName

      @Stability(Stable) public void setVirtualInterfaceName(@NotNull String value)
      The name of the virtual interface assigned by the customer network.
    • getVlan

      @Stability(Stable) @NotNull public Number getVlan()
      The ID of the VLAN.
    • setVlan

      @Stability(Stable) public void setVlan(@NotNull Number value)
      The ID of the VLAN.
    • getAllocatePublicVirtualInterfaceRoleArn

      @Stability(Stable) @Nullable public String getAllocatePublicVirtualInterfaceRoleArn()
      The Amazon Resource Name (ARN) of the role to allocate the public virtual interface.
    • setAllocatePublicVirtualInterfaceRoleArn

      @Stability(Stable) public void setAllocatePublicVirtualInterfaceRoleArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the role to allocate the public virtual interface.
    • getRouteFilterPrefixes

      @Stability(Stable) @Nullable public List<String> getRouteFilterPrefixes()
      The routes to be advertised to the AWS network in this region.
    • setRouteFilterPrefixes

      @Stability(Stable) public void setRouteFilterPrefixes(@Nullable List<String> value)
      The routes to be advertised to the AWS network in this region.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags associated with the public virtual interface.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags associated with the public virtual interface.