Class VpcLink
Define a new VPC Link Specifies an API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private Cloud (VPC).
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class VpcLink : Resource, IVpcLink, IResource, IVpcLinkRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class VpcLink Inherits Resource Implements IVpcLink, IResource, IVpcLinkRef, IConstruct, IDependable, IEnvironmentAware
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
var vpc = new Vpc(this, "VPC");
var nlb = new NetworkLoadBalancer(this, "NLB", new NetworkLoadBalancerProps {
Vpc = vpc
});
var link = new VpcLink(this, "link", new VpcLinkProps {
Targets = new [] { nlb }
});
var integration = new Integration(new IntegrationProps {
Type = IntegrationType.HTTP_PROXY,
IntegrationHttpMethod = "ANY",
Options = new IntegrationOptions {
ConnectionType = ConnectionType.VPC_LINK,
VpcLink = link
}
});
Synopsis
Constructors
| VpcLink(Construct, string, IVpcLinkProps?) | Define a new VPC Link Specifies an API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private Cloud (VPC). |
Properties
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
| VpcLinkId | Physical ID of the VpcLink resource. |
| VpcLinkRef | A reference to a VpcLink resource. |
Methods
| AddTargets(params INetworkLoadBalancer[]) | Define a new VPC Link Specifies an API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private Cloud (VPC). |
| FromVpcLinkId(Construct, string, string) | Import a VPC Link by its Id. |
Constructors
VpcLink(Construct, string, IVpcLinkProps?)
Define a new VPC Link Specifies an API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private Cloud (VPC).
public VpcLink(Construct scope, string id, IVpcLinkProps? props = null)
Parameters
- scope Construct
- id string
- props IVpcLinkProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
var vpc = new Vpc(this, "VPC");
var nlb = new NetworkLoadBalancer(this, "NLB", new NetworkLoadBalancerProps {
Vpc = vpc
});
var link = new VpcLink(this, "link", new VpcLinkProps {
Targets = new [] { nlb }
});
var integration = new Integration(new IntegrationProps {
Type = IntegrationType.HTTP_PROXY,
IntegrationHttpMethod = "ANY",
Options = new IntegrationOptions {
ConnectionType = ConnectionType.VPC_LINK,
VpcLink = link
}
});
Properties
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: infused
VpcLinkId
Physical ID of the VpcLink resource.
public virtual string VpcLinkId { get; }
Property Value
Remarks
Attribute: true
VpcLinkRef
A reference to a VpcLink resource.
public virtual IVpcLinkReference VpcLinkRef { get; }
Property Value
Remarks
ExampleMetadata: infused
Methods
AddTargets(params INetworkLoadBalancer[])
Define a new VPC Link Specifies an API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private Cloud (VPC).
public virtual void AddTargets(params INetworkLoadBalancer[] targets)
Parameters
- targets INetworkLoadBalancer[]
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
var vpc = new Vpc(this, "VPC");
var nlb = new NetworkLoadBalancer(this, "NLB", new NetworkLoadBalancerProps {
Vpc = vpc
});
var link = new VpcLink(this, "link", new VpcLinkProps {
Targets = new [] { nlb }
});
var integration = new Integration(new IntegrationProps {
Type = IntegrationType.HTTP_PROXY,
IntegrationHttpMethod = "ANY",
Options = new IntegrationOptions {
ConnectionType = ConnectionType.VPC_LINK,
VpcLink = link
}
});
FromVpcLinkId(Construct, string, string)
Import a VPC Link by its Id.
public static IVpcLink FromVpcLinkId(Construct scope, string id, string vpcLinkId)
Parameters
Returns
Remarks
ExampleMetadata: infused