create_service_network_vpc_association
¶
create_service_network_vpc_association(
service_network_identifier: ServiceNetworkIdentifierWithoutRegex,
vpc_identifier: VpcId,
*,
config_overrides: Optional[VPCLatticeClientConfig] = None,
client_token: Optional[ClientToken] = None,
private_dns_enabled: Optional[Boolean] = None,
security_group_ids: Optional[SecurityGroupList] = None,
tags: Optional[TagMap] = None,
dns_options: Optional[DnsOptions] = None,
) -> CreateServiceNetworkVpcAssociationResponse
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.
Parameters:
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails.
-
service_network_identifier(ServiceNetworkIdentifierWithoutRegex) –The ID or ARN of the service network. You must use an ARN if the resources are in different accounts.
-
vpc_identifier(VpcId) –The ID of the VPC.
-
private_dns_enabled(Optional[Boolean], default:None) –Indicates if private DNS is enabled for the VPC association.
-
security_group_ids(Optional[SecurityGroupList], default:None) –The IDs of the security groups. Security groups aren't added by default. You can add a security group to apply network level controls to control which resources in a VPC are allowed to access the service network and its services. For more information, see Control traffic to resources using security groups in the Amazon VPC User Guide.
-
tags(Optional[TagMap], default:None) –The tags for the association.
-
dns_options(Optional[DnsOptions], default:None) –DNS options for the service network VPC association.
Raises:
-
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.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_vpc_lattice/_services/vpc_lattice.py
4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 | |