AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Associates a VPC with a service network. When you associate a VPC with the service network, it enables all the resources within that VPC to be clients and communicate with other services in the service network. For more information, see Manage VPC associations in the Amazon VPC Lattice User Guide.
You can't use this operation if there is a disassociation in progress. If the association fails, retry by deleting the association and recreating it.
As a result of this operation, the association gets created in the service network account and the VPC owner account.
If you add a security group to the service network and VPC association, the association must continue to always have at least one security group. You can add or edit security groups at any time. However, to remove all security groups, you must first delete the association and recreate it without security groups.
For .NET Core this operation is only available in asynchronous form. Please refer to CreateServiceNetworkVpcAssociationAsync.
Namespace: Amazon.VPCLattice
Assembly: AWSSDK.VPCLattice.dll
Version: 3.x.y.z
public abstract CreateServiceNetworkVpcAssociationResponse CreateServiceNetworkVpcAssociation( CreateServiceNetworkVpcAssociationRequest request )
Container for the necessary parameters to execute the CreateServiceNetworkVpcAssociation service method.
Exception | Condition |
---|---|
AccessDeniedException | The user does not have sufficient access to perform this action. |
ConflictException | The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. |
InternalServerException | An unexpected error occurred while processing the request. |
ResourceNotFoundException | The request references a resource that does not exist. |
ServiceQuotaExceededException | The request would cause a service quota to be exceeded. |
ThrottlingException | The limit on the number of requests per second was exceeded. |
ValidationException | The input does not satisfy the constraints specified by an Amazon Web Services service. |
.NET Framework:
Supported in: 4.5 and newer, 3.5