Class GatewayVpcEndpoint
A gateway VPC endpoint.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class GatewayVpcEndpoint : VpcEndpoint, IGatewayVpcEndpoint, IVpcEndpoint, IResource, IConstruct, IDependable
Syntax (vb)
Public Class GatewayVpcEndpoint
Inherits VpcEndpoint
Implements IGatewayVpcEndpoint, IVpcEndpoint, IResource, IConstruct, IDependable
Remarks
Resource: AWS::EC2::VPCEndpoint
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
GatewayVpcEndpoint(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
GatewayVpcEndpoint(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
GatewayVpcEndpoint(Construct, String, IGatewayVpcEndpointProps) |
Properties
VpcEndpointCreationTimestamp | The date and time the gateway VPC endpoint was created. |
VpcEndpointDnsEntries | |
VpcEndpointId | The gateway VPC endpoint identifier. |
VpcEndpointNetworkInterfaceIds |
Methods
FromGatewayVpcEndpointId(Construct, String, String) |
Constructors
GatewayVpcEndpoint(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected GatewayVpcEndpoint(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
GatewayVpcEndpoint(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected GatewayVpcEndpoint(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
GatewayVpcEndpoint(Construct, String, IGatewayVpcEndpointProps)
public GatewayVpcEndpoint(Construct scope, string id, IGatewayVpcEndpointProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IGatewayVpcEndpointProps
Properties
VpcEndpointCreationTimestamp
The date and time the gateway VPC endpoint was created.
public virtual string VpcEndpointCreationTimestamp { get; }
Property Value
System.String
Remarks
Attribute: true
VpcEndpointDnsEntries
public virtual string[] VpcEndpointDnsEntries { get; }
Property Value
System.String[]
Remarks
Attribute: true
VpcEndpointId
The gateway VPC endpoint identifier.
public override string VpcEndpointId { get; }
Property Value
System.String
Overrides
VpcEndpointNetworkInterfaceIds
public virtual string[] VpcEndpointNetworkInterfaceIds { get; }
Property Value
System.String[]
Remarks
Attribute: true
Methods
FromGatewayVpcEndpointId(Construct, String, String)
public static IGatewayVpcEndpoint FromGatewayVpcEndpointId(Construct scope, string id, string gatewayVpcEndpointId)
Parameters
- scope Constructs.Construct
- id System.String
- gatewayVpcEndpointId System.String
Returns