Skip to content

create_custom_plugin

create_custom_plugin(
    content_type: CustomPluginContentType,
    location: CustomPluginLocation,
    name: __stringMin1Max128,
    *,
    config_overrides: Optional[KafkaConnectClientConfig] = None,
    description: Optional[__stringMax1024] = None,
    tags: Optional[Tags] = None,
) -> CreateCustomPluginResponse

Creates a custom plugin using the specified properties.

Parameters:

Raises:

  • BadRequestException –

    HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.

  • ConflictException –

    HTTP Status Code 409: Conflict. A resource with this name already exists. Retry your request with another name.

  • ForbiddenException –

    HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.

  • InternalServerErrorException –

    HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.

  • NotFoundException –

    HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.

  • ServiceUnavailableException –

    HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.

  • TooManyRequestsException –

    HTTP Status Code 429: Limit exceeded. Resource limit reached.

  • UnauthorizedException –

    HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_kafkaconnect/_services/kafka_connect.py
def create_custom_plugin(
    self,
    content_type: "capo_kafkaconnect.types.custom_plugin_content_type.CustomPluginContentType",
    location: "capo_kafkaconnect.types.custom_plugin_location.CustomPluginLocation",
    name: "capo_kafkaconnect.types.__string_min1_max128.__stringMin1Max128",
    *,
    config_overrides: Optional[KafkaConnectClientConfig] = None,
    description: Optional[
        "capo_kafkaconnect.types.__string_max1024.__stringMax1024"
    ] = None,
    tags: Optional["capo_kafkaconnect.types.tags.Tags"] = None,
) -> "capo_kafkaconnect.types.create_custom_plugin_response.CreateCustomPluginResponse":
    """<p>Creates a custom plugin using the specified properties.</p>

    Args:
        content_type: <p>The type of the plugin file.</p>
        description: <p>A summary description of the custom plugin.</p>
        location: <p>Information about the location of a custom plugin.</p>
        name: <p>The name of the custom plugin.</p>
        tags: <p>The tags you want to attach to the custom plugin.</p>

    Raises:
        capo_kafkaconnect.errors.bad_request_exception.BadRequestException: <p>HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.</p>
        capo_kafkaconnect.errors.conflict_exception.ConflictException: <p>HTTP Status Code 409: Conflict. A resource with this name already exists. Retry your request with another name.</p>
        capo_kafkaconnect.errors.forbidden_exception.ForbiddenException: <p>HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.</p>
        capo_kafkaconnect.errors.internal_server_error_exception.InternalServerErrorException: <p>HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.</p>
        capo_kafkaconnect.errors.not_found_exception.NotFoundException: <p>HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.</p>
        capo_kafkaconnect.errors.service_unavailable_exception.ServiceUnavailableException: <p>HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.</p>
        capo_kafkaconnect.errors.too_many_requests_exception.TooManyRequestsException: <p>HTTP Status Code 429: Limit exceeded. Resource limit reached.</p>
        capo_kafkaconnect.errors.unauthorized_exception.UnauthorizedException: <p>HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.</p>
        capo_kafkaconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_kafkaconnect.types.create_custom_plugin_request.CreateCustomPluginRequest]",
    ) -> OperationResponse[
        "capo_kafkaconnect.types.create_custom_plugin_response.CreateCustomPluginResponse"
    ]:
        import capo_kafkaconnect._operations.kafka_connect.create_custom_plugin

        output, http_response = (
            capo_kafkaconnect._operations.kafka_connect.create_custom_plugin.create_custom_plugin(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCustomPlugin")
    )
    input_: capo_kafkaconnect.types.create_custom_plugin_request.CreateCustomPluginRequest = {
        "content_type": content_type,
        "location": location,
        "name": name,
    }
    if description is not None:
        input_["description"] = description
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output