Skip to content

register_connector async

register_connector(
    *,
    config_overrides: Optional[AsyncAppflowClientConfig] = None,
    connector_label: Optional[ConnectorLabel] = None,
    description: Optional[Description] = None,
    connector_provisioning_type: Optional[ConnectorProvisioningType] = None,
    connector_provisioning_config: Optional[ConnectorProvisioningConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> RegisterConnectorResponse

Registers a new custom connector with your Amazon Web Services account. Before you can register the connector, you must deploy the associated AWS lambda function in your account.

Parameters:

  • connector_label (Optional[ConnectorLabel], default: None ) –

    The name of the connector. The name is unique for each ConnectorRegistration in your Amazon Web Services account.

  • description (Optional[Description], default: None ) –

    A description about the connector that's being registered.

  • connector_provisioning_type (Optional[ConnectorProvisioningType], default: None ) –

    The provisioning type of the connector. Currently the only supported value is LAMBDA.

  • connector_provisioning_config (Optional[ConnectorProvisioningConfig], default: None ) –

    The provisioning type of the connector. Currently the only supported value is LAMBDA.

  • client_token (Optional[ClientToken], default: None ) –

    The clientToken parameter is an idempotency token. It ensures that your RegisterConnector request completes only once. You choose the value to pass. For example, if you don't receive a response from your request, you can safely retry the request with the same clientToken parameter value.

    If you omit a clientToken value, the Amazon Web Services SDK that you are using inserts a value for you. This way, the SDK can safely retry requests multiple times after a network error. You must provide your own value for other use cases.

    If you specify input parameters that differ from your first request, an error occurs. If you use a different value for clientToken, Amazon AppFlow considers it a new call to RegisterConnector. The token is active for 8 hours.

Raises:

Source code in docs_src/capo_appflow/_services/async_appflow.py
async def register_connector(
    self,
    *,
    config_overrides: Optional[AsyncAppflowClientConfig] = None,
    connector_label: Optional[
        "capo_appflow.types.connector_label.ConnectorLabel"
    ] = None,
    description: Optional["capo_appflow.types.description.Description"] = None,
    connector_provisioning_type: Optional[
        "capo_appflow.types.connector_provisioning_type.ConnectorProvisioningType"
    ] = None,
    connector_provisioning_config: Optional[
        "capo_appflow.types.connector_provisioning_config.ConnectorProvisioningConfig"
    ] = None,
    client_token: Optional["capo_appflow.types.client_token.ClientToken"] = None,
) -> "capo_appflow.types.register_connector_response.RegisterConnectorResponse":
    """<p>Registers a new custom connector with your Amazon Web Services account. Before you can register the connector, you must deploy the associated AWS lambda function in your account.</p>

    Args:
        connector_label: <p> The name of the connector. The name is unique for each <code>ConnectorRegistration</code> in your Amazon Web Services account.</p>
        description: <p>A description about the connector that's being registered.</p>
        connector_provisioning_type: <p>The provisioning type of the connector. Currently the only supported value is LAMBDA. </p>
        connector_provisioning_config: <p>The provisioning type of the connector. Currently the only supported value is LAMBDA.</p>
        client_token: <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>RegisterConnector</code> request completes only once. You choose the value to pass. For example, if you don't receive a response from your request, you can safely retry the request with the same <code>clientToken</code> parameter value.</p> <p>If you omit a <code>clientToken</code> value, the Amazon Web Services SDK that you are using inserts a value for you. This way, the SDK can safely retry requests multiple times after a network error. You must provide your own value for other use cases.</p> <p>If you specify input parameters that differ from your first request, an error occurs. If you use a different value for <code>clientToken</code>, Amazon AppFlow considers it a new call to <code>RegisterConnector</code>. The token is active for 8 hours.</p>

    Raises:
        capo_appflow.errors.access_denied_exception.AccessDeniedException: <p>AppFlow/Requester has invalid or missing permissions.</p>
        capo_appflow.errors.conflict_exception.ConflictException: <p> There was a conflict when processing the request (for example, a flow with the given name already exists within the account. Check for conflicting resource names and try again. </p>
        capo_appflow.errors.connector_authentication_exception.ConnectorAuthenticationException: <p> An error occurred when authenticating with the connector endpoint. </p>
        capo_appflow.errors.connector_server_exception.ConnectorServerException: <p> An error occurred when retrieving data from the connector endpoint. </p>
        capo_appflow.errors.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </p>
        capo_appflow.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource specified in the request (such as the source or destination connector profile) is not found. </p>
        capo_appflow.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The request would cause a service quota (such as the number of flows) to be exceeded. </p>
        capo_appflow.errors.throttling_exception.ThrottlingException: <p>API calls have exceeded the maximum allowed API request rate per account and per Region. </p>
        capo_appflow.errors.validation_exception.ValidationException: <p> The request has invalid or missing parameters. </p>
        capo_appflow.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appflow.types.register_connector_request.RegisterConnectorRequest]",
    ) -> AsyncOperationResponse[
        "capo_appflow.types.register_connector_response.RegisterConnectorResponse"
    ]:
        import capo_appflow._operations.sandstone_configuration_service_lambda.register_connector

        (
            output,
            http_response,
        ) = await capo_appflow._operations.sandstone_configuration_service_lambda.register_connector.async_register_connector(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RegisterConnector")
    )
    input_: capo_appflow.types.register_connector_request.RegisterConnectorRequest = {}
    if connector_label is not None:
        input_["connector_label"] = connector_label
    if description is not None:
        input_["description"] = description
    if connector_provisioning_type is not None:
        input_["connector_provisioning_type"] = connector_provisioning_type
    if connector_provisioning_config is not None:
        input_["connector_provisioning_config"] = connector_provisioning_config
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output