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

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.576Z") @Stability(Stable) public class CfnListener extends CfnResource implements IInspectable
The AWS::GlobalAccelerator::Listener resource is a Global Accelerator resource type that contains information about how you create a listener to process inbound connections from clients to an accelerator.

Connections arrive to assigned static IP addresses on a port, port range, or list of port ranges that you specify.

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.globalaccelerator.*;
 CfnListener cfnListener = CfnListener.Builder.create(this, "MyCfnListener")
         .acceleratorArn("acceleratorArn")
         .portRanges(List.of(PortRangeProperty.builder()
                 .fromPort(123)
                 .toPort(123)
                 .build()))
         .protocol("protocol")
         // the properties below are optional
         .clientAffinity("clientAffinity")
         .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

    • CfnListener

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

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

      @Stability(Stable) public CfnListener(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnListenerProps props)
      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

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

      @Stability(Stable) @NotNull public String getAttrListenerArn()
      The ARN of the listener, such as arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh/listener/0123vxyz .
    • getCfnProperties

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

      @Stability(Stable) @NotNull public String getAcceleratorArn()
      The Amazon Resource Name (ARN) of your accelerator.
    • setAcceleratorArn

      @Stability(Stable) public void setAcceleratorArn(@NotNull String value)
      The Amazon Resource Name (ARN) of your accelerator.
    • getPortRanges

      @Stability(Stable) @NotNull public Object getPortRanges()
      The list of port ranges for the connections from clients to the accelerator.
    • setPortRanges

      @Stability(Stable) public void setPortRanges(@NotNull IResolvable value)
      The list of port ranges for the connections from clients to the accelerator.
    • setPortRanges

      @Stability(Stable) public void setPortRanges(@NotNull List<Object> value)
      The list of port ranges for the connections from clients to the accelerator.
    • getProtocol

      @Stability(Stable) @NotNull public String getProtocol()
      The protocol for the connections from clients to the accelerator.
    • setProtocol

      @Stability(Stable) public void setProtocol(@NotNull String value)
      The protocol for the connections from clients to the accelerator.
    • getClientAffinity

      @Stability(Stable) @Nullable public String getClientAffinity()
      Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request.
    • setClientAffinity

      @Stability(Stable) public void setClientAffinity(@Nullable String value)
      Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request.