Class CfnConnection

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IConnectionRef, 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.935Z") @Stability(Stable) public class CfnConnection extends CfnResource implements IInspectable, IConnectionRef, ITaggableV2
Resource Type definition for AWS::DirectConnect::Connection.

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.*;
 CfnConnection cfnConnection = CfnConnection.Builder.create(this, "MyCfnConnection")
         .bandwidth("bandwidth")
         .connectionName("connectionName")
         .location("location")
         // the properties below are optional
         .lagId("lagId")
         .providerName("providerName")
         .requestMacSec(false)
         .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

    • CfnConnection

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

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

      @Stability(Stable) public CfnConnection(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnConnectionProps props)
      Create a new AWS::DirectConnect::Connection.

      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

    • arnForConnection

      @Stability(Stable) @NotNull public static String arnForConnection(@NotNull IConnectionRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnConnection

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

      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.
    • getAttrConnectionArn

      @Stability(Stable) @NotNull public String getAttrConnectionArn()
      The ARN of the connection.
    • getAttrConnectionId

      @Stability(Stable) @NotNull public String getAttrConnectionId()
      The ID of the connection.
    • getAttrConnectionState

      @Stability(Stable) @NotNull public String getAttrConnectionState()
      The state of the connection.
    • 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
    • getConnectionRef

      @Stability(Stable) @NotNull public ConnectionReference getConnectionRef()
      A reference to a Connection resource.
      Specified by:
      getConnectionRef in interface IConnectionRef
    • getBandwidth

      @Stability(Stable) @NotNull public String getBandwidth()
      The bandwidth of the connection.
    • setBandwidth

      @Stability(Stable) public void setBandwidth(@NotNull String value)
      The bandwidth of the connection.
    • getConnectionName

      @Stability(Stable) @NotNull public String getConnectionName()
      The name of the connection.
    • setConnectionName

      @Stability(Stable) public void setConnectionName(@NotNull String value)
      The name of the connection.
    • getLocation

      @Stability(Stable) @NotNull public String getLocation()
      The location of the connection.
    • setLocation

      @Stability(Stable) public void setLocation(@NotNull String value)
      The location of the connection.
    • getLagId

      @Stability(Stable) @Nullable public String getLagId()
    • setLagId

      @Stability(Stable) public void setLagId(@Nullable String value)
    • getProviderName

      @Stability(Stable) @Nullable public String getProviderName()
      The name of the service provider associated with the requested connection.
    • setProviderName

      @Stability(Stable) public void setProviderName(@Nullable String value)
      The name of the service provider associated with the requested connection.
    • getRequestMacSec

      @Stability(Stable) @Nullable public Object getRequestMacSec()
      Indicates whether you want the connection to support MAC Security (MACsec).

      Returns union: either Boolean or IResolvable

    • setRequestMacSec

      @Stability(Stable) public void setRequestMacSec(@Nullable Boolean value)
      Indicates whether you want the connection to support MAC Security (MACsec).
    • setRequestMacSec

      @Stability(Stable) public void setRequestMacSec(@Nullable IResolvable value)
      Indicates whether you want the connection to support MAC Security (MACsec).
    • getTags

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

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