Class GatewayVpcEndpointProps
Construction properties for a GatewayVpcEndpoint.
Inheritance
System.Object
GatewayVpcEndpointProps
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GatewayVpcEndpointProps : Object, IGatewayVpcEndpointProps, IGatewayVpcEndpointOptions
Syntax (vb)
Public Class GatewayVpcEndpointProps
Inherits Object
Implements IGatewayVpcEndpointProps, IGatewayVpcEndpointOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
IGatewayVpcEndpointService gatewayVpcEndpointService;
Subnet subnet;
SubnetFilter subnetFilter;
Vpc vpc;
var gatewayVpcEndpointProps = new GatewayVpcEndpointProps {
Service = gatewayVpcEndpointService,
Vpc = vpc,
// the properties below are optional
Subnets = new [] { new SubnetSelection {
AvailabilityZones = new [] { "availabilityZones" },
OnePerAz = false,
SubnetFilters = new [] { subnetFilter },
SubnetGroupName = "subnetGroupName",
Subnets = new [] { subnet },
SubnetType = SubnetType.PRIVATE_ISOLATED
} }
};
Synopsis
Constructors
GatewayVpcEndpointProps() |
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()
public GatewayVpcEndpointProps()
Properties
Service
The service to use for this gateway VPC endpoint.
public IGatewayVpcEndpointService Service { get; set; }
Property Value
Subnets
Where to add endpoint routing.
public ISubnetSelection[] Subnets { get; set; }
Property Value
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