updateVpcAttachment method

Future<UpdateVpcAttachmentResponse> updateVpcAttachment({
  1. required String attachmentId,
  2. List<String>? addSubnetArns,
  3. VpcOptions? options,
  4. List<String>? removeSubnetArns,
})

Updates a VPC attachment.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter attachmentId : The ID of the attachment.

Parameter addSubnetArns : Adds a subnet ARN to the VPC attachment.

Parameter options : Additional options for updating the VPC attachment.

Parameter removeSubnetArns : Removes a subnet ARN from the attachment.

Implementation

Future<UpdateVpcAttachmentResponse> updateVpcAttachment({
  required String attachmentId,
  List<String>? addSubnetArns,
  VpcOptions? options,
  List<String>? removeSubnetArns,
}) async {
  final $payload = <String, dynamic>{
    if (addSubnetArns != null) 'AddSubnetArns': addSubnetArns,
    if (options != null) 'Options': options,
    if (removeSubnetArns != null) 'RemoveSubnetArns': removeSubnetArns,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/vpc-attachments/${Uri.encodeComponent(attachmentId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateVpcAttachmentResponse.fromJson(response);
}