87 lines
2.5 KiB
TypeScript
87 lines
2.5 KiB
TypeScript
import type { Construct } from 'constructs';
|
|
import * as ec2 from '../../../aws-ec2';
|
|
import type { IResource } from '../../../core';
|
|
import { Resource } from '../../../core';
|
|
import type { IVpcLinkRef, VpcLinkReference } from '../index';
|
|
/**
|
|
* Represents an API Gateway VpcLink
|
|
*/
|
|
export interface IVpcLink extends IResource, IVpcLinkRef {
|
|
/**
|
|
* Physical ID of the VpcLink resource
|
|
* @attribute
|
|
*/
|
|
readonly vpcLinkId: string;
|
|
/**
|
|
* The VPC to which this VPC Link is associated with.
|
|
*/
|
|
readonly vpc: ec2.IVpc;
|
|
}
|
|
/**
|
|
* Properties for a VpcLink
|
|
*/
|
|
export interface VpcLinkProps {
|
|
/**
|
|
* The VPC in which the private resources reside.
|
|
*/
|
|
readonly vpc: ec2.IVpc;
|
|
/**
|
|
* The name used to label and identify the VPC link.
|
|
* @default - automatically generated name
|
|
*/
|
|
readonly vpcLinkName?: string;
|
|
/**
|
|
* A list of subnets for the VPC link.
|
|
*
|
|
* @default - private subnets of the provided VPC. Use `addSubnets` to add more subnets
|
|
*/
|
|
readonly subnets?: ec2.SubnetSelection;
|
|
/**
|
|
* A list of security groups for the VPC link.
|
|
*
|
|
* @default - no security groups. Use `addSecurityGroups` to add security groups
|
|
*/
|
|
readonly securityGroups?: ec2.ISecurityGroupRef[];
|
|
}
|
|
/**
|
|
* Attributes when importing a new VpcLink
|
|
*/
|
|
export interface VpcLinkAttributes {
|
|
/**
|
|
* The VPC Link id
|
|
*/
|
|
readonly vpcLinkId: string;
|
|
/**
|
|
* The VPC to which this VPC link is associated with.
|
|
*/
|
|
readonly vpc: ec2.IVpc;
|
|
}
|
|
/**
|
|
* Define a new VPC Link
|
|
* Specifies an API Gateway VPC link for a HTTP API to access resources in an Amazon Virtual Private Cloud (VPC).
|
|
*/
|
|
export declare class VpcLink extends Resource implements IVpcLink {
|
|
/** Uniquely identifies this class. */
|
|
static readonly PROPERTY_INJECTION_ID: string;
|
|
/**
|
|
* Import a VPC Link by specifying its attributes.
|
|
*/
|
|
static fromVpcLinkAttributes(scope: Construct, id: string, attrs: VpcLinkAttributes): IVpcLink;
|
|
readonly vpcLinkId: string;
|
|
readonly vpc: ec2.IVpc;
|
|
private readonly subnets;
|
|
private readonly securityGroups;
|
|
constructor(scope: Construct, id: string, props: VpcLinkProps);
|
|
/**
|
|
* Adds the provided subnets to the vpc link
|
|
*/
|
|
addSubnets(...subnets: ec2.ISubnetRef[]): void;
|
|
/**
|
|
* Adds the provided security groups to the vpc link
|
|
*/
|
|
addSecurityGroups(...groups: ec2.ISecurityGroupRef[]): void;
|
|
get vpcLinkRef(): VpcLinkReference;
|
|
private renderSubnets;
|
|
private renderSecurityGroups;
|
|
}
|