java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IHostRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:06.118Z") @Stability(Stable) public class CfnHost extends CfnResource implements IInspectable, IHostRef, ITaggableV2
A resource that represents the infrastructure where a third-party provider is installed.

You create one host for all connections to that provider.

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.codeconnections.*;
 CfnHost cfnHost = CfnHost.Builder.create(this, "MyCfnHost")
         .name("name")
         .providerEndpoint("providerEndpoint")
         .providerType("providerType")
         // the properties below are optional
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .vpcConfiguration(VpcConfigurationProperty.builder()
                 .securityGroupIds(List.of("securityGroupIds"))
                 .subnetIds(List.of("subnetIds"))
                 .vpcId("vpcId")
                 // the properties below are optional
                 .tlsCertificate("tlsCertificate")
                 .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

    • CfnHost

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

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

      @Stability(Stable) public CfnHost(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnHostProps props)
      Create a new AWS::CodeConnections::Host.

      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

    • arnForHost

      @Stability(Stable) @NotNull public static String arnForHost(@NotNull IHostRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnHost

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

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

      @Stability(Stable) @NotNull public String getAttrHostArn()
      The Amazon Resource Name (ARN) of the host.
    • getAttrHostId

      @Stability(Stable) @NotNull public String getAttrHostId()
      The server-generated unique identifier for the host.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The status of the host.
    • 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
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getHostRef

      @Stability(Stable) @NotNull public HostReference getHostRef()
      A reference to a Host resource.
      Specified by:
      getHostRef in interface IHostRef
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the host.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the host.
    • getProviderEndpoint

      @Stability(Stable) @NotNull public String getProviderEndpoint()
      The endpoint of the infrastructure where your provider type is installed.
    • setProviderEndpoint

      @Stability(Stable) public void setProviderEndpoint(@NotNull String value)
      The endpoint of the infrastructure where your provider type is installed.
    • getProviderType

      @Stability(Stable) @NotNull public String getProviderType()
      The name of the installed provider to be associated with your connection.
    • setProviderType

      @Stability(Stable) public void setProviderType(@NotNull String value)
      The name of the installed provider to be associated with your connection.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Tags to apply to the host.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Tags to apply to the host.
    • getVpcConfiguration

      @Stability(Stable) @Nullable public Object getVpcConfiguration()
      The VPC configuration provisioned for the host.

      Returns union: either IResolvable or CfnHost.VpcConfigurationProperty

    • setVpcConfiguration

      @Stability(Stable) public void setVpcConfiguration(@Nullable IResolvable value)
      The VPC configuration provisioned for the host.
    • setVpcConfiguration

      @Stability(Stable) public void setVpcConfiguration(@Nullable CfnHost.VpcConfigurationProperty value)
      The VPC configuration provisioned for the host.