Show / Hide Table of Contents

Class GatewayVpcEndpointProps

Construction properties for a GatewayVpcEndpoint.

Inheritance
object
GatewayVpcEndpointProps
Implements
IGatewayVpcEndpointProps
IGatewayVpcEndpointOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GatewayVpcEndpointProps : IGatewayVpcEndpointProps, IGatewayVpcEndpointOptions
Syntax (vb)
Public Class GatewayVpcEndpointProps Implements IGatewayVpcEndpointProps, IGatewayVpcEndpointOptions
Remarks

ExampleMetadata: infused

Examples
var stack = new Stack();
            var myVpc = new VpcV2(this, "Vpc");
            var routeTable = new RouteTable(this, "RouteTable", new RouteTableProps {
                Vpc = myVpc
            });
            var subnet = new SubnetV2(this, "Subnet", new SubnetV2Props {
                Vpc = myVpc,
                AvailabilityZone = "eu-west-2a",
                Ipv4CidrBlock = new IpCidr("10.0.0.0/24"),
                SubnetType = SubnetType.PRIVATE
            });

            var dynamoEndpoint = new GatewayVpcEndpoint(this, "DynamoEndpoint", new GatewayVpcEndpointProps {
                Service = GatewayVpcEndpointAwsService.DYNAMODB,
                Vpc = myVpc,
                Subnets = new [] { subnet }
            });
            new Route(this, "DynamoDBRoute", new RouteProps {
                RouteTable = routeTable,
                Destination = "0.0.0.0/0",
                Target = new Dictionary<string, IVpcEndpoint?> { { "endpoint", dynamoEndpoint } }
            });

Synopsis

Constructors

GatewayVpcEndpointProps()

Construction properties for a GatewayVpcEndpoint.

Properties

Service

The service to use for this gateway VPC endpoint.

Subnets

Where to add endpoint routing.

Vpc

The VPC network in which the gateway endpoint will be used.

Constructors

GatewayVpcEndpointProps()

Construction properties for a GatewayVpcEndpoint.

public GatewayVpcEndpointProps()
Remarks

ExampleMetadata: infused

Examples
var stack = new Stack();
            var myVpc = new VpcV2(this, "Vpc");
            var routeTable = new RouteTable(this, "RouteTable", new RouteTableProps {
                Vpc = myVpc
            });
            var subnet = new SubnetV2(this, "Subnet", new SubnetV2Props {
                Vpc = myVpc,
                AvailabilityZone = "eu-west-2a",
                Ipv4CidrBlock = new IpCidr("10.0.0.0/24"),
                SubnetType = SubnetType.PRIVATE
            });

            var dynamoEndpoint = new GatewayVpcEndpoint(this, "DynamoEndpoint", new GatewayVpcEndpointProps {
                Service = GatewayVpcEndpointAwsService.DYNAMODB,
                Vpc = myVpc,
                Subnets = new [] { subnet }
            });
            new Route(this, "DynamoDBRoute", new RouteProps {
                RouteTable = routeTable,
                Destination = "0.0.0.0/0",
                Target = new Dictionary<string, IVpcEndpoint?> { { "endpoint", dynamoEndpoint } }
            });

Properties

Service

The service to use for this gateway VPC endpoint.

public IGatewayVpcEndpointService Service { get; set; }
Property Value

IGatewayVpcEndpointService

Remarks

ExampleMetadata: infused

Subnets

Where to add endpoint routing.

public ISubnetSelection[]? Subnets { get; set; }
Property Value

ISubnetSelection[]

Remarks

By default, this endpoint will be routable from all subnets in the VPC. Specify a list of subnet selection objects here to be more specific.

Default: - All subnets in the VPC

Examples
Vpc vpc;


             vpc.AddGatewayEndpoint("DynamoDbEndpoint", new GatewayVpcEndpointOptions {
                 Service = GatewayVpcEndpointAwsService.DYNAMODB,
                 // Add only to ISOLATED subnets
                 Subnets = new [] { new SubnetSelection { SubnetType = SubnetType.PRIVATE_ISOLATED } }
             });

Vpc

The VPC network in which the gateway endpoint will be used.

public IVpc Vpc { get; set; }
Property Value

IVpc

Remarks

ExampleMetadata: infused

Implements

IGatewayVpcEndpointProps
IGatewayVpcEndpointOptions
Back to top Generated by DocFX