deregisterWebhookWithThirdParty method

Future<void> deregisterWebhookWithThirdParty({
  1. String? webhookName,
})

Removes the connection between the webhook that was created by CodePipeline and the external tool with events to be detected. Currently supported only for webhooks that target an action type of GitHub.

May throw ValidationException. May throw WebhookNotFoundException.

Parameter webhookName : The name of the webhook you want to deregister.

Implementation

Future<void> deregisterWebhookWithThirdParty({
  String? webhookName,
}) async {
  _s.validateStringLength(
    'webhookName',
    webhookName,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodePipeline_20150709.DeregisterWebhookWithThirdParty'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (webhookName != null) 'webhookName': webhookName,
    },
  );
}