Class GatewayVpcEndpointAwsService
An AWS service for a gateway VPC endpoint.
Inheritance
System.Object
GatewayVpcEndpointAwsService
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class GatewayVpcEndpointAwsService : DeputyBase, IGatewayVpcEndpointService
Syntax (vb)
Public Class GatewayVpcEndpointAwsService
Inherits DeputyBase
Implements IGatewayVpcEndpointService
Remarks
ExampleMetadata: lit=test/integ.vpc-endpoint.lit.ts infused
Examples
// Add gateway endpoints when creating the VPC
var vpc = new Vpc(this, "MyVpc", new VpcProps {
GatewayEndpoints = new Dictionary<string, GatewayVpcEndpointOptions> {
{ "S3", new GatewayVpcEndpointOptions {
Service = GatewayVpcEndpointAwsService.S3
} }
}
});
// Alternatively gateway endpoints can be added on the VPC
var dynamoDbEndpoint = vpc.AddGatewayEndpoint("DynamoDbEndpoint", new GatewayVpcEndpointOptions {
Service = GatewayVpcEndpointAwsService.DYNAMODB
});
// This allows to customize the endpoint policy
dynamoDbEndpoint.AddToPolicy(
new PolicyStatement(new PolicyStatementProps { // Restrict to listing and describing tables
Principals = new [] { new AnyPrincipal() },
Actions = new [] { "dynamodb:DescribeTable", "dynamodb:ListTables" },
Resources = new [] { "*" } }));
// Add an interface endpoint
vpc.AddInterfaceEndpoint("EcrDockerEndpoint", new InterfaceVpcEndpointOptions {
Service = InterfaceVpcEndpointAwsService.ECR_DOCKER
});
Synopsis
Constructors
GatewayVpcEndpointAwsService(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
GatewayVpcEndpointAwsService(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
GatewayVpcEndpointAwsService(String, String) |
Properties
DYNAMODB | |
Name | The name of the service. |
S3 |
Constructors
GatewayVpcEndpointAwsService(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected GatewayVpcEndpointAwsService(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
GatewayVpcEndpointAwsService(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected GatewayVpcEndpointAwsService(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
GatewayVpcEndpointAwsService(String, String)
public GatewayVpcEndpointAwsService(string name, string prefix = null)
Parameters
- name System.String
- prefix System.String
Properties
DYNAMODB
public static GatewayVpcEndpointAwsService DYNAMODB { get; }
Property Value
Name
The name of the service.
public virtual string Name { get; }
Property Value
System.String