create_service_network_vpc_association
async
¶
create_service_network_vpc_association(
service_network_identifier: ServiceNetworkIdentifierWithoutRegex,
vpc_identifier: VpcId,
*,
config_overrides: Optional[AsyncVPCLatticeClientConfig] = 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/async_vpc_lattice.py
4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 | |