import * as core from 'aws-cdk-lib'; import { aws_iam as iam, aws_certificatemanager as certificatemanager, aws_route53 as r53 } from 'aws-cdk-lib'; import * as constructs from 'constructs'; import { IListener, IServiceNetwork } from './index'; /** * Properties to Share the Service */ export interface ShareServiceProps { /** * The name of the service */ readonly name: string; /** * Allow External Principals * @default false */ readonly allowExternalPrincipals?: boolean | undefined; /** * Principals to share the service with. * TO DO, this needs some work * @default none */ readonly accounts: string[] | undefined; } /** * Create a vpcLattice service network. * Implemented by `Service`. */ export interface IService extends core.IResource { /** * The Id of the Service */ readonly serviceId: string; /** * The Arn of the Service */ readonly serviceArn: string; /** * the discovered OrgId */ readonly orgId: string | undefined; /** * Imported */ readonly imported: boolean; /** * The authType of the service. */ authType: string | undefined; /** * A certificate that may be used by the service */ certificate: certificatemanager.Certificate | undefined; /** * A custom Domain used by the service */ customDomain: string | undefined; /** * A name for the service */ name: string | undefined; /** * The auth Policy for the service. */ authPolicy: iam.PolicyDocument; /** * associate the service with a servicenetwork. */ associateWithServiceNetwork(serviceNetwork: IServiceNetwork): void; /** * apply an authpolicy to the servicenetwork */ applyAuthPolicy(): iam.PolicyDocument; } /** * Properties for a Lattice Service */ export interface ServiceProps { /** * Name for the service * @default cloudformation will provide a name */ readonly name?: string | undefined; /** * The authType of the Service * @default 'AWS_IAM' */ readonly authType?: string | undefined; /** * Listeners that will be attached to the service * @default no listeners */ readonly listeners?: IListener[] | undefined; /** * A certificate that may be used by the service * @default no custom certificate is used */ readonly certificate?: certificatemanager.Certificate | undefined; /** * A customDomain used by the service * @default no customdomain is used */ readonly customDomain?: string | undefined; /** * A custom hosname * @default no hostname is used */ readonly hostedZone?: r53.IHostedZone | undefined; /** * Share Service *@default no sharing of the service */ readonly shares?: ShareServiceProps[] | undefined; /** * ServiceNetwork to associate with. * @default will not assocaite with any serviceNetwork. */ readonly serviceNetwork?: IServiceNetwork | undefined; } /** * Create a vpcLattice Service */ export declare class Service extends core.Resource implements IService { /** * import a service from Id */ static fromServiceId(scope: constructs.Construct, id: string, serviceId: string): IService; /** * The Id of the Service */ readonly serviceId: string; /** * The Arn of the Service */ readonly serviceArn: string; /** * the discovered OrgId */ readonly orgId: string | undefined; /** * Imported */ readonly imported: boolean; /** * The authType of the service. */ authType: string | undefined; /** * A certificate that may be used by the service */ certificate: certificatemanager.Certificate | undefined; /** * A custom Domain used by the service */ customDomain: string | undefined; /** * A DNS Entry for the service */ hostedZone: r53.IHostedZone | undefined; /** * A name for the service */ name: string | undefined; /** * The auth Policy for the service. */ authPolicy: iam.PolicyDocument; constructor(scope: constructs.Construct, id: string, props: ServiceProps); /** * .grantAccess on a lattice service, will permit the principals to * access all of the service. Consider using more granual permissions * at the rule level. * * @param principals */ grantAccess(principals: iam.IPrincipal[]): void; /** * apply an authpolicy */ applyAuthPolicy(): iam.PolicyDocument; /** * Add a PolicyStatement * */ addPolicyStatement(statement: iam.PolicyStatement): void; /** * Share the service to other accounts via RAM */ shareToAccounts(props: ShareServiceProps): void; /** * Associate with a Service Network */ associateWithServiceNetwork(serviceNetwork: IServiceNetwork): void; } /** * Props for Service Assocaition */ export interface ServiceNetworkAssociationProps { /** * lattice Service */ readonly serviceNetwork: IServiceNetwork; /** * Lattice ServiceId */ readonly serviceId: string; } /** * Creates an Association Between a Lattice Service and a Service Network * consider using .associateWithServiceNetwork */ export declare class ServiceNetworkAssociation extends core.Resource { constructor(scope: constructs.Construct, id: string, props: ServiceNetworkAssociationProps); }