import { aws_iam as iam, aws_ec2 as ec2 } from 'aws-cdk-lib'; import * as core from 'aws-cdk-lib'; import * as constructs from 'constructs'; import { IService, AuthType, LoggingDestination } from './index'; /** * AccesModes */ export declare enum ServiceNetworkAccessMode { /** * Unauthenticated Access */ UNAUTHENTICATED = "UNAUTHENTICATED", /** * Unauthenticated Access */ AUTHENTICATED_ONLY = "AUTHENTICATED", /** * THIS Org only */ ORG_ONLY = "ORG_ONLY" } /** * Properties to share a Service Network */ export interface ShareServiceNetworkProps { /** * The name of the share. */ readonly name: string; /** * Are external Principals allowed * @default false; */ readonly allowExternalPrincipals?: boolean | undefined; /** * Principals to share the Service Network with * @default none */ readonly accounts: string[]; /** * disable discovery * @default false */ readonly disableDiscovery?: boolean | undefined; /** * The access mode for the Service Network * @default 'UNAUTHENTICATED' */ readonly accessMode?: ServiceNetworkAccessMode | undefined; /** * The description of the Service Network * @default none */ readonly description?: string | undefined; /** * The tags to apply to the Service Network * @default none */ readonly tags?: { [key: string]: string; }; } /** * Properties to associate a VPC with a Service Network */ export interface AssociateVPCProps { /** * The VPC to associate with the Service Network */ readonly vpc: ec2.IVpc; /** * The security groups to associate with the Service Network * @default a security group that allows inbound 443 will be permitted. */ readonly securityGroups?: ec2.SecurityGroup[] | undefined; } /** * Properties to add a logging Destination */ export interface AddloggingDestinationProps { /** * The logging destination */ readonly destination: LoggingDestination; } /** * Properties to add a Service to a Service Network */ export interface AddServiceProps { /** * The Service to add to the Service Network */ readonly service: IService; /** * The Service Network to add the Service to */ readonly serviceNetworkId: string; } /** * Create a vpc lattice service network. * Implemented by `ServiceNetwork`. */ export interface IServiceNetwork extends core.IResource { /** * The Amazon Resource Name (ARN) of the service network. */ readonly serviceNetworkArn: string; /** * The Id of the Service Network */ readonly serviceNetworkId: string; /** * Is this an imported serviceNetwork */ readonly imported: boolean; /** * Add Lattice Service */ addService(props: AddServiceProps): void; /** * Associate a VPC with the Service Network */ associateVPC(props: AssociateVPCProps): void; } /** * The properties for the ServiceNetwork. */ export interface ServiceNetworkProps { /** The name of the Service Network. If not provided Cloudformation will provide * a name * @default cloudformation generated name */ readonly name?: string; /** * The type of authentication to use with the Service Network * @default 'AWS_IAM' */ readonly authType?: AuthType | undefined; /** * Logging destinations * @default: no logging */ readonly loggingDestinations?: LoggingDestination[]; /** * Lattice Services that are assocaited with this Service Network * @default no services are associated with the service network */ readonly services?: IService[] | undefined; /** * Vpcs that are associated with this Service Network * @default no vpcs are associated */ readonly vpcs?: ec2.IVpc[] | undefined; /** * Allow external principals * @default false */ readonly accessmode?: ServiceNetworkAccessMode | undefined; /** * Additional AuthStatments: */ readonly authStatements?: iam.PolicyStatement[] | undefined; } declare abstract class ServiceNetworkBase extends core.Resource implements IServiceNetwork { /** * THe Arn of the Service Network */ abstract readonly serviceNetworkArn: string; /** * The Id of the Service Network */ abstract readonly serviceNetworkId: string; /** * Boolean */ abstract imported: boolean; /** * Add A lattice service to a lattice network */ addService(props: AddServiceProps): void; /** * Associate a VPC with the Service Network * This provides an opinionated default of adding a security group to allow inbound 443 */ associateVPC(props: AssociateVPCProps): void; } /** * Create a vpcLattice Service Network. */ export declare class ServiceNetwork extends ServiceNetworkBase { /** * Import a Service Network by Id */ static fromId(scope: constructs.Construct, id: string, serviceNetworkId: string): IServiceNetwork; static fromName(scope: constructs.Construct, id: string, serviceNetworkName: string): IServiceNetwork; /** * The Arn of the service network */ readonly serviceNetworkArn: string; /** * The Id of the Service Network */ readonly serviceNetworkId: string; /** * imported */ readonly imported: boolean; /** * Name of the ServiceNetwork */ readonly name: string; /** * the authType of the service network */ authType: AuthType | undefined; /** * A managed Policy that is the auth policy */ authPolicy: iam.PolicyDocument; constructor(scope: constructs.Construct, id: string, props: ServiceNetworkProps); /** * This will give the principals access to all resources that are on this * service network. This is a broad permission. * Consider granting Access at the Service * addToResourcePolicy() * */ addStatementToAuthPolicy(statement: iam.PolicyStatement): void; /** * Apply the AuthPolicy to a Service Network */ applyAuthPolicyToServiceNetwork(): void; /** * send logs to a destination */ addloggingDestination(props: AddloggingDestinationProps): void; /** * Share the The Service network using RAM * @param props ShareServiceNetwork */ share(props: ShareServiceNetworkProps): void; } /** * Props for ImportedSearch */ export interface ImportedServiceNetworkProps { /** * Import by Name * @default - No search By Name */ readonly serviceNetworkName?: string | undefined; /** * Import by Id * @default - No Search by Id */ readonly serviceNetworkId?: string | undefined; } /** * Props to Associate a VPC with a Service Network */ export interface AssociateVpcProps { /** * security groups for the lattice endpoint * @default a security group that will permit inbound 443 */ readonly securityGroups?: ec2.ISecurityGroup[]; /** * The VPC to associate with */ readonly vpc: ec2.IVpc; /** * Service Network Identifier */ readonly serviceNetworkId: string; } /** * Associate a VPO with Lattice Service Network */ export declare class AssociateVpc extends core.Resource { constructor(scope: constructs.Construct, id: string, props: AssociateVpcProps); } /** * Props for Service Assocaition */ export interface ServiceAssociationProps { /** * lattice Service */ readonly service: IService; /** * Lattice ServiceId */ readonly serviceNetworkId: string; } /** * Creates an Association Between a Lattice Service and a Service Network */ export declare class ServiceAssociation extends core.Resource { constructor(scope: constructs.Construct, id: string, props: ServiceAssociationProps); } export {};