Class: AWSCDK::GlobalAccelerator::CfnEndpointGroup::EndpointConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
global_accelerator/cfn_endpoint_group.rb

Overview

A complex type for endpoints.

A resource must be valid and active when you add it as an endpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint_id:, attachment_arn: nil, client_ip_preservation_enabled: nil, weight: nil) ⇒ EndpointConfigurationProperty

Returns a new instance of EndpointConfigurationProperty.

Parameters:

  • endpoint_id (String)

    An ID for the endpoint.

  • attachment_arn (String, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) of the cross-account attachment that specifies the endpoints (resources) that can be added to accelerators and principals that have permission to add the endpoints.

  • client_ip_preservation_enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.

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

    The weight associated with the endpoint.



631
632
633
634
635
636
637
638
639
640
# File 'global_accelerator/cfn_endpoint_group.rb', line 631

def initialize(endpoint_id:, attachment_arn: nil, client_ip_preservation_enabled: nil, weight: nil)
  @endpoint_id = endpoint_id
  Jsii::Type.check_type(@endpoint_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpointId")
  @attachment_arn = attachment_arn
  Jsii::Type.check_type(@attachment_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attachmentArn") unless @attachment_arn.nil?
  @client_ip_preservation_enabled = client_ip_preservation_enabled
  Jsii::Type.check_type(@client_ip_preservation_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "clientIpPreservationEnabled") unless @client_ip_preservation_enabled.nil?
  @weight = weight
  Jsii::Type.check_type(@weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weight") unless @weight.nil?
end

Instance Attribute Details

#attachment_arnString? (readonly)

The Amazon Resource Name (ARN) of the cross-account attachment that specifies the endpoints (resources) that can be added to accelerators and principals that have permission to add the endpoints.



655
656
657
# File 'global_accelerator/cfn_endpoint_group.rb', line 655

def attachment_arn
  @attachment_arn
end

#client_ip_preservation_enabledBoolean, ... (readonly)

Note:

Default: - true

Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.

The value is true or false. The default value is true for new accelerators.

If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator.

For more information, see Preserve Client IP Addresses in the AWS Global Accelerator Developer Guide .



667
668
669
# File 'global_accelerator/cfn_endpoint_group.rb', line 667

def client_ip_preservation_enabled
  @client_ip_preservation_enabled
end

#endpoint_idString (readonly)

An ID for the endpoint.

If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. A resource must be valid and active when you add it as an endpoint.

For cross-account endpoints, this must be the ARN of the resource.



650
651
652
# File 'global_accelerator/cfn_endpoint_group.rb', line 650

def endpoint_id
  @endpoint_id
end

#weightNumeric? (readonly)

Note:

Default: - 100

The weight associated with the endpoint.

When you add weights to endpoints, you configure Global Accelerator to route traffic based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second and third endpoints, and 6/20 is routed to the last endpoint. For more information, see Endpoint Weights in the AWS Global Accelerator Developer Guide .



675
676
677
# File 'global_accelerator/cfn_endpoint_group.rb', line 675

def weight
  @weight
end

Class Method Details

.jsii_propertiesObject



677
678
679
680
681
682
683
684
# File 'global_accelerator/cfn_endpoint_group.rb', line 677

def self.jsii_properties
  {
    :endpoint_id => "endpointId",
    :attachment_arn => "attachmentArn",
    :client_ip_preservation_enabled => "clientIpPreservationEnabled",
    :weight => "weight",
  }
end

Instance Method Details

#to_jsiiObject



686
687
688
689
690
691
692
693
694
695
# File 'global_accelerator/cfn_endpoint_group.rb', line 686

def to_jsii
  result = {}
  result.merge!({
    "endpointId" => @endpoint_id,
    "attachmentArn" => @attachment_arn,
    "clientIpPreservationEnabled" => @client_ip_preservation_enabled,
    "weight" => @weight,
  })
  result.compact
end