Configures a connection between the webhook that was created and the external tool with events to be detected.
Parameters:
-
webhook_name
(Optional[WebhookName], default:
None
)
–
The name of an existing webhook created with PutWebhook to register with a supported third party.
Raises:
Source code in docs_src/capo_codepipeline/_services/async_code_pipeline.py
| async def register_webhook_with_third_party(
self,
*,
config_overrides: Optional[AsyncCodePipelineClientConfig] = None,
webhook_name: Optional[
"capo_codepipeline.types.webhook_name.WebhookName"
] = None,
) -> "capo_codepipeline.types.register_webhook_with_third_party_output.RegisterWebhookWithThirdPartyOutput":
"""<p>Configures a connection between the webhook that was created and the external tool with events to be detected.</p>
Args:
webhook_name: <p>The name of an existing webhook created with PutWebhook to register with a supported third party. </p>
Raises:
capo_codepipeline.errors.validation_exception.ValidationException: <p>The validation was specified in an invalid format.</p>
capo_codepipeline.errors.webhook_not_found_exception.WebhookNotFoundException: <p>The specified webhook was entered in an invalid format or cannot be found.</p>
capo_codepipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_codepipeline.types.register_webhook_with_third_party_input.RegisterWebhookWithThirdPartyInput]",
) -> AsyncOperationResponse[
"capo_codepipeline.types.register_webhook_with_third_party_output.RegisterWebhookWithThirdPartyOutput"
]:
import capo_codepipeline._operations.code_pipeline_20150709.register_webhook_with_third_party
(
output,
http_response,
) = await capo_codepipeline._operations.code_pipeline_20150709.register_webhook_with_third_party.async_register_webhook_with_third_party(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RegisterWebhookWithThirdParty")
)
input_: capo_codepipeline.types.register_webhook_with_third_party_input.RegisterWebhookWithThirdPartyInput = {}
if webhook_name is not None:
input_["webhook_name"] = webhook_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|