ResourcePolicy
Source:
src/AWS/VpcLattice/ResourcePolicy.ts
A resource-based permission policy on a VPC Lattice service or service network — the policy AWS RAM manages when sharing Lattice resources across accounts, attachable directly for fine-grained cross-account control.
Attaching Resource Policies
Section titled “Attaching Resource Policies”const network = yield* ServiceNetwork("SharedNetwork", {});const policy = yield* ResourcePolicy("SharePolicy", { resourceArn: network.serviceNetworkArn, policy: { Version: "2012-10-17", Statement: [ { Effect: "Allow", Principal: { AWS: "arn:aws:iam::123456789012:root" }, Action: [ "vpc-lattice:CreateServiceNetworkVpcAssociation", "vpc-lattice:CreateServiceNetworkServiceAssociation", "vpc-lattice:GetServiceNetwork", ], Resource: network.serviceNetworkArn, }, ], },});