deleteApplicationVpcConfiguration method

Future<DeleteApplicationVpcConfigurationResponse> deleteApplicationVpcConfiguration({
  1. required String applicationName,
  2. required int currentApplicationVersionId,
  3. required String vpcConfigurationId,
})

Removes a VPC configuration from a Kinesis Data Analytics application.

May throw ResourceNotFoundException. May throw ResourceInUseException. May throw InvalidArgumentException. May throw ConcurrentModificationException. May throw InvalidApplicationConfigurationException.

Parameter applicationName : The name of an existing application.

Parameter currentApplicationVersionId : The current application version ID. You can retrieve the application version ID using DescribeApplication.

Parameter vpcConfigurationId : The ID of the VPC configuration to delete.

Implementation

Future<DeleteApplicationVpcConfigurationResponse>
    deleteApplicationVpcConfiguration({
  required String applicationName,
  required int currentApplicationVersionId,
  required String vpcConfigurationId,
}) async {
  ArgumentError.checkNotNull(applicationName, 'applicationName');
  _s.validateStringLength(
    'applicationName',
    applicationName,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(
      currentApplicationVersionId, 'currentApplicationVersionId');
  _s.validateNumRange(
    'currentApplicationVersionId',
    currentApplicationVersionId,
    1,
    999999999,
    isRequired: true,
  );
  ArgumentError.checkNotNull(vpcConfigurationId, 'vpcConfigurationId');
  _s.validateStringLength(
    'vpcConfigurationId',
    vpcConfigurationId,
    1,
    50,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'KinesisAnalytics_20180523.DeleteApplicationVpcConfiguration'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationName': applicationName,
      'CurrentApplicationVersionId': currentApplicationVersionId,
      'VpcConfigurationId': vpcConfigurationId,
    },
  );

  return DeleteApplicationVpcConfigurationResponse.fromJson(
      jsonResponse.body);
}