Class: AWSCDK::VPCLattice::CfnTargetGroup::TargetProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
vpc_lattice/cfn_target_group.rb

Overview

Describes a target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, port: nil) ⇒ TargetProperty

Returns a new instance of TargetProperty.

Parameters:

  • id (String)

    The ID of the target.

  • port (Numeric, nil) (defaults to: nil)

    The port on which the target is listening.



894
895
896
897
898
899
# File 'vpc_lattice/cfn_target_group.rb', line 894

def initialize(id:, port: nil)
  @id = id
  Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  @port = port
  Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil?
end

Instance Attribute Details

#idString (readonly)

The ID of the target.

If the target group type is INSTANCE , this is an instance ID. If the target group type is IP , this is an IP address. If the target group type is LAMBDA , this is the ARN of a Lambda function. If the target group type is ALB , this is the ARN of an Application Load Balancer.



907
908
909
# File 'vpc_lattice/cfn_target_group.rb', line 907

def id
  @id
end

#portNumeric? (readonly)

The port on which the target is listening.

For HTTP, the default is 80. For HTTPS, the default is 443.



914
915
916
# File 'vpc_lattice/cfn_target_group.rb', line 914

def port
  @port
end

Class Method Details

.jsii_propertiesObject



916
917
918
919
920
921
# File 'vpc_lattice/cfn_target_group.rb', line 916

def self.jsii_properties
  {
    :id => "id",
    :port => "port",
  }
end

Instance Method Details

#to_jsiiObject



923
924
925
926
927
928
929
930
# File 'vpc_lattice/cfn_target_group.rb', line 923

def to_jsii
  result = {}
  result.merge!({
    "id" => @id,
    "port" => @port,
  })
  result.compact
end