Class EndpointGroup
EndpointGroup construct.
Inherited Members
Namespace: Amazon.CDK.AWS.GlobalAccelerator
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EndpointGroup : Resource, IEndpointGroup, IResource, IConstruct, IDependable
Syntax (vb)
Public Class EndpointGroup Inherits Resource Implements IEndpointGroup, IResource, IConstruct, IDependable
Remarks
ExampleMetadata: infused
Examples
Listener listener;
// Non-open ALB
ApplicationLoadBalancer alb;
// Remember that there is only one AGA security group per VPC.
Vpc vpc;
var endpointGroup = listener.AddEndpointGroup("Group", new EndpointGroupOptions {
Endpoints = new [] {
new ApplicationLoadBalancerEndpoint(alb, new ApplicationLoadBalancerEndpointOptions {
PreserveClientIp = true
}) }
});
var agaSg = endpointGroup.ConnectionsPeer("GlobalAcceleratorSG", vpc);
// Allow connections from the AGA to the ALB
alb.Connections.AllowFrom(agaSg, Port.Tcp(443));
Synopsis
Constructors
EndpointGroup(Construct, string, IEndpointGroupProps) | EndpointGroup construct. |
Properties
EndpointGroupArn | EndpointGroup ARN. |
EndpointGroupName | The name of the endpoint group. |
Endpoints | The array of the endpoints in this endpoint group. |
PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
AddEndpoint(IEndpoint) | Add an endpoint. |
ConnectionsPeer(string, IVpc) | Return an object that represents the Accelerator's Security Group. |
FromEndpointGroupArn(Construct, string, string) | import from ARN. |
Constructors
EndpointGroup(Construct, string, IEndpointGroupProps)
EndpointGroup construct.
public EndpointGroup(Construct scope, string id, IEndpointGroupProps props)
Parameters
- scope Construct
- id string
- props IEndpointGroupProps
Remarks
ExampleMetadata: infused
Examples
Listener listener;
// Non-open ALB
ApplicationLoadBalancer alb;
// Remember that there is only one AGA security group per VPC.
Vpc vpc;
var endpointGroup = listener.AddEndpointGroup("Group", new EndpointGroupOptions {
Endpoints = new [] {
new ApplicationLoadBalancerEndpoint(alb, new ApplicationLoadBalancerEndpointOptions {
PreserveClientIp = true
}) }
});
var agaSg = endpointGroup.ConnectionsPeer("GlobalAcceleratorSG", vpc);
// Allow connections from the AGA to the ALB
alb.Connections.AllowFrom(agaSg, Port.Tcp(443));
Properties
EndpointGroupArn
EndpointGroup ARN.
public virtual string EndpointGroupArn { get; }
Property Value
Remarks
ExampleMetadata: infused
EndpointGroupName
The name of the endpoint group.
public virtual string EndpointGroupName { get; }
Property Value
Remarks
Attribute: true
Endpoints
The array of the endpoints in this endpoint group.
protected virtual IEndpoint[] Endpoints { get; }
Property Value
Remarks
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: infused
Methods
AddEndpoint(IEndpoint)
Add an endpoint.
public virtual void AddEndpoint(IEndpoint endpoint)
Parameters
- endpoint IEndpoint
Remarks
ExampleMetadata: infused
ConnectionsPeer(string, IVpc)
Return an object that represents the Accelerator's Security Group.
public virtual IPeer ConnectionsPeer(string id, IVpc vpc)
Parameters
Returns
Remarks
Uses a Custom Resource to look up the Security Group that Accelerator creates at deploy time. Requires your VPC ID to perform the lookup.
The Security Group will only be created if you enable Client IP Preservation on any of the endpoints.
You cannot manipulate the rules inside this security group, but you can use this security group as a Peer in Connections rules on other constructs.
FromEndpointGroupArn(Construct, string, string)
import from ARN.
public static IEndpointGroup FromEndpointGroupArn(Construct scope, string id, string endpointGroupArn)
Parameters
Returns
Remarks
ExampleMetadata: infused