updateVPCConnection method

Future<UpdateVPCConnectionResponse> updateVPCConnection({
  1. required String awsAccountId,
  2. required String name,
  3. required String roleArn,
  4. required List<String> securityGroupIds,
  5. required List<String> subnetIds,
  6. required String vPCConnectionId,
  7. List<String>? dnsResolvers,
})

Updates a VPC connection.

May throw AccessDeniedException. May throw ConflictException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnsupportedUserEditionException.

Parameter awsAccountId : The Amazon Web Services account ID of the account that contains the VPC connection that you want to update.

Parameter name : The display name for the VPC connection.

Parameter roleArn : An IAM role associated with the VPC connection.

Parameter securityGroupIds : A list of security group IDs for the VPC connection.

Parameter subnetIds : A list of subnet IDs for the VPC connection.

Parameter vPCConnectionId : The ID of the VPC connection that you're updating. This ID is a unique identifier for each Amazon Web Services Region in an Amazon Web Services account.

Parameter dnsResolvers : A list of IP addresses of DNS resolver endpoints for the VPC connection.

Implementation

Future<UpdateVPCConnectionResponse> updateVPCConnection({
  required String awsAccountId,
  required String name,
  required String roleArn,
  required List<String> securityGroupIds,
  required List<String> subnetIds,
  required String vPCConnectionId,
  List<String>? dnsResolvers,
}) async {
  final $payload = <String, dynamic>{
    'Name': name,
    'RoleArn': roleArn,
    'SecurityGroupIds': securityGroupIds,
    'SubnetIds': subnetIds,
    if (dnsResolvers != null) 'DnsResolvers': dnsResolvers,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/vpc-connections/${Uri.encodeComponent(vPCConnectionId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateVPCConnectionResponse.fromJson(response);
}