registerWebhookWithThirdParty method

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

Configures a connection between the webhook that was created and the external tool with events to be detected.

May throw ValidationException. May throw WebhookNotFoundException.

Parameter webhookName : The name of an existing webhook created with PutWebhook to register with a supported third party.

Implementation

Future<void> registerWebhookWithThirdParty({
  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.RegisterWebhookWithThirdParty'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (webhookName != null) 'webhookName': webhookName,
    },
  );
}