awsglobalacceleratorendpoints

package
v2.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCfnEipEndpoint_Override

func NewCfnEipEndpoint_Override(c CfnEipEndpoint, eip awsec2.CfnEIP, options *CfnEipEndpointProps)

func NewInstanceEndpoint_Override

func NewInstanceEndpoint_Override(i InstanceEndpoint, instance awsec2.IInstance, options *InstanceEndpointProps)

Types

type ApplicationLoadBalancerEndpoint

type ApplicationLoadBalancerEndpoint interface {
	awsglobalaccelerator.IEndpoint
	// The region where the endpoint is located.
	//
	// If the region cannot be determined, `undefined` is returned.
	Region() *string
	// Render the endpoint to an endpoint configuration.
	RenderEndpointConfiguration() interface{}
}

Use an Application Load Balancer as a Global Accelerator Endpoint.

Example:

var alb applicationLoadBalancer
var listener listener

listener.addEndpointGroup(jsii.String("Group"), &endpointGroupOptions{
	endpoints: []iEndpoint{
		ga_endpoints.NewApplicationLoadBalancerEndpoint(alb, &applicationLoadBalancerEndpointOptions{
			weight: jsii.Number(128),
			preserveClientIp: jsii.Boolean(true),
		}),
	},
})

type ApplicationLoadBalancerEndpointOptions

type ApplicationLoadBalancerEndpointOptions struct {
	// Forward the client IP address in an `X-Forwarded-For` header.
	//
	// GlobalAccelerator will create Network Interfaces in your VPC in order
	// to preserve the client IP address.
	//
	// Client IP address preservation is supported only in specific AWS Regions.
	// See the GlobalAccelerator Developer Guide for a list.
	PreserveClientIp *bool `json:"preserveClientIp" yaml:"preserveClientIp"`
	// Endpoint weight across all endpoints in the group.
	//
	// Must be a value between 0 and 255.
	Weight *float64 `json:"weight" yaml:"weight"`
}

Properties for a ApplicationLoadBalancerEndpoint.

Example:

var alb applicationLoadBalancer
var listener listener

listener.addEndpointGroup(jsii.String("Group"), &endpointGroupOptions{
	endpoints: []iEndpoint{
		ga_endpoints.NewApplicationLoadBalancerEndpoint(alb, &applicationLoadBalancerEndpointOptions{
			weight: jsii.Number(128),
			preserveClientIp: jsii.Boolean(true),
		}),
	},
})

type CfnEipEndpoint

type CfnEipEndpoint interface {
	awsglobalaccelerator.IEndpoint
	// The region where the endpoint is located.
	//
	// If the region cannot be determined, `undefined` is returned.
	Region() *string
	// Render the endpoint to an endpoint configuration.
	RenderEndpointConfiguration() interface{}
}

Use an EC2 Instance as a Global Accelerator Endpoint.

Example:

var listener listener
var eip cfnEIP

listener.addEndpointGroup(jsii.String("Group"), &endpointGroupOptions{
	endpoints: []iEndpoint{
		ga_endpoints.NewCfnEipEndpoint(eip, &cfnEipEndpointProps{
			weight: jsii.Number(128),
		}),
	},
})

func NewCfnEipEndpoint

func NewCfnEipEndpoint(eip awsec2.CfnEIP, options *CfnEipEndpointProps) CfnEipEndpoint

type CfnEipEndpointProps

type CfnEipEndpointProps struct {
	// Endpoint weight across all endpoints in the group.
	//
	// Must be a value between 0 and 255.
	Weight *float64 `json:"weight" yaml:"weight"`
}

Properties for a NetworkLoadBalancerEndpoint.

Example:

var listener listener
var eip cfnEIP

listener.addEndpointGroup(jsii.String("Group"), &endpointGroupOptions{
	endpoints: []iEndpoint{
		ga_endpoints.NewCfnEipEndpoint(eip, &cfnEipEndpointProps{
			weight: jsii.Number(128),
		}),
	},
})

type InstanceEndpoint

type InstanceEndpoint interface {
	awsglobalaccelerator.IEndpoint
	// The region where the endpoint is located.
	//
	// If the region cannot be determined, `undefined` is returned.
	Region() *string
	// Render the endpoint to an endpoint configuration.
	RenderEndpointConfiguration() interface{}
}

Use an EC2 Instance as a Global Accelerator Endpoint.

Example:

var listener listener
var instance instance

listener.addEndpointGroup(jsii.String("Group"), &endpointGroupOptions{
	endpoints: []iEndpoint{
		ga_endpoints.NewInstanceEndpoint(instance, &instanceEndpointProps{
			weight: jsii.Number(128),
			preserveClientIp: jsii.Boolean(true),
		}),
	},
})

func NewInstanceEndpoint

func NewInstanceEndpoint(instance awsec2.IInstance, options *InstanceEndpointProps) InstanceEndpoint

type InstanceEndpointProps

type InstanceEndpointProps struct {
	// Forward the client IP address.
	//
	// GlobalAccelerator will create Network Interfaces in your VPC in order
	// to preserve the client IP address.
	//
	// Client IP address preservation is supported only in specific AWS Regions.
	// See the GlobalAccelerator Developer Guide for a list.
	PreserveClientIp *bool `json:"preserveClientIp" yaml:"preserveClientIp"`
	// Endpoint weight across all endpoints in the group.
	//
	// Must be a value between 0 and 255.
	Weight *float64 `json:"weight" yaml:"weight"`
}

Properties for a NetworkLoadBalancerEndpoint.

Example:

var listener listener
var instance instance

listener.addEndpointGroup(jsii.String("Group"), &endpointGroupOptions{
	endpoints: []iEndpoint{
		ga_endpoints.NewInstanceEndpoint(instance, &instanceEndpointProps{
			weight: jsii.Number(128),
			preserveClientIp: jsii.Boolean(true),
		}),
	},
})

type NetworkLoadBalancerEndpoint

type NetworkLoadBalancerEndpoint interface {
	awsglobalaccelerator.IEndpoint
	// The region where the endpoint is located.
	//
	// If the region cannot be determined, `undefined` is returned.
	Region() *string
	// Render the endpoint to an endpoint configuration.
	RenderEndpointConfiguration() interface{}
}

Use a Network Load Balancer as a Global Accelerator Endpoint.

Example:

// Create an Accelerator
accelerator := globalaccelerator.NewAccelerator(this, jsii.String("Accelerator"))

// Create a Listener
listener := accelerator.addListener(jsii.String("Listener"), &listenerOptions{
	portRanges: []portRange{
		&portRange{
			fromPort: jsii.Number(80),
		},
		&portRange{
			fromPort: jsii.Number(443),
		},
	},
})

// Import the Load Balancers
nlb1 := elbv2.networkLoadBalancer.fromNetworkLoadBalancerAttributes(this, jsii.String("NLB1"), &networkLoadBalancerAttributes{
	loadBalancerArn: jsii.String("arn:aws:elasticloadbalancing:us-west-2:111111111111:loadbalancer/app/my-load-balancer1/e16bef66805b"),
})
nlb2 := elbv2.networkLoadBalancer.fromNetworkLoadBalancerAttributes(this, jsii.String("NLB2"), &networkLoadBalancerAttributes{
	loadBalancerArn: jsii.String("arn:aws:elasticloadbalancing:ap-south-1:111111111111:loadbalancer/app/my-load-balancer2/5513dc2ea8a1"),
})

// Add one EndpointGroup for each Region we are targeting
listener.addEndpointGroup(jsii.String("Group1"), &endpointGroupOptions{
	endpoints: []iEndpoint{
		ga_endpoints.NewNetworkLoadBalancerEndpoint(nlb1),
	},
})
listener.addEndpointGroup(jsii.String("Group2"), &endpointGroupOptions{
	// Imported load balancers automatically calculate their Region from the ARN.
	// If you are load balancing to other resources, you must also pass a `region`
	// parameter here.
	endpoints: []*iEndpoint{
		ga_endpoints.NewNetworkLoadBalancerEndpoint(nlb2),
	},
})

type NetworkLoadBalancerEndpointProps

type NetworkLoadBalancerEndpointProps struct {
	// Endpoint weight across all endpoints in the group.
	//
	// Must be a value between 0 and 255.
	Weight *float64 `json:"weight" yaml:"weight"`
}

Properties for a NetworkLoadBalancerEndpoint.

Example:

var nlb networkLoadBalancer
var listener listener

listener.addEndpointGroup(jsii.String("Group"), &endpointGroupOptions{
	endpoints: []iEndpoint{
		ga_endpoints.NewNetworkLoadBalancerEndpoint(nlb, &networkLoadBalancerEndpointProps{
			weight: jsii.Number(128),
		}),
	},
})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL