Skip to content

create_connector_profile async

create_connector_profile(
    connector_profile_name: ConnectorProfileName,
    connector_type: ConnectorType,
    connection_mode: ConnectionMode,
    connector_profile_config: ConnectorProfileConfig,
    *,
    config_overrides: Optional[AsyncAppflowClientConfig] = None,
    kms_arn: Optional[KMSArn] = None,
    connector_label: Optional[ConnectorLabel] = None,
    client_token: Optional[ClientToken] = None,
) -> CreateConnectorProfileResponse

Creates a new connector profile associated with your Amazon Web Services account. There is a soft quota of 100 connector profiles per Amazon Web Services account. If you need more connector profiles than this quota allows, you can submit a request to the Amazon AppFlow team through the Amazon AppFlow support channel. In each connector profile that you create, you can provide the credentials and properties for only one connector.

Parameters:

  • connector_profile_name (ConnectorProfileName) –

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

  • kms_arn (Optional[KMSArn], default: None ) –

    The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.

  • connector_type (ConnectorType) –

    The type of connector, such as Salesforce, Amplitude, and so on.

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

    The label of the connector. The label is unique for each ConnectorRegistration in your Amazon Web Services account. Only needed if calling for CUSTOMCONNECTOR connector type/.

  • connection_mode (ConnectionMode) –

    Indicates the connection mode and specifies whether it is public or private. Private flows use Amazon Web Services PrivateLink to route data over Amazon Web Services infrastructure without exposing it to the public internet.

  • connector_profile_config (ConnectorProfileConfig) –

    Defines the connector-specific configuration and credentials.

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

    The clientToken parameter is an idempotency token. It ensures that your CreateConnectorProfile 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 CreateConnectorProfile. The token is active for 8 hours.

Raises:

  • ConflictException –

    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.

  • ConnectorAuthenticationException –

    An error occurred when authenticating with the connector endpoint.

  • InternalServerException –

    An internal service error occurred during the processing of your request. Try again later.

  • ServiceQuotaExceededException –

    The request would cause a service quota (such as the number of flows) to be exceeded.

  • ValidationException –

    The request has invalid or missing parameters.

  • UnknownServiceError –

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

Source code in docs_src/capo_appflow/_services/async_appflow.py
async def create_connector_profile(
    self,
    connector_profile_name: "capo_appflow.types.connector_profile_name.ConnectorProfileName",
    connector_type: "capo_appflow.types.connector_type.ConnectorType",
    connection_mode: "capo_appflow.types.connection_mode.ConnectionMode",
    connector_profile_config: "capo_appflow.types.connector_profile_config.ConnectorProfileConfig",
    *,
    config_overrides: Optional[AsyncAppflowClientConfig] = None,
    kms_arn: Optional["capo_appflow.types.kms_arn.KMSArn"] = None,
    connector_label: Optional[
        "capo_appflow.types.connector_label.ConnectorLabel"
    ] = None,
    client_token: Optional["capo_appflow.types.client_token.ClientToken"] = None,
) -> "capo_appflow.types.create_connector_profile_response.CreateConnectorProfileResponse":
    """<p> Creates a new connector profile associated with your Amazon Web Services account. There is a soft quota of 100 connector profiles per Amazon Web Services account. If you need more connector profiles than this quota allows, you can submit a request to the Amazon AppFlow team through the Amazon AppFlow support channel. In each connector profile that you create, you can provide the credentials and properties for only one connector.</p>

    Args:
        connector_profile_name: <p> The name of the connector profile. The name is unique for each <code>ConnectorProfile</code> in your Amazon Web Services account. </p>
        kms_arn: <p> The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key. </p>
        connector_type: <p> The type of connector, such as Salesforce, Amplitude, and so on. </p>
        connector_label: <p>The label of the connector. The label is unique for each <code>ConnectorRegistration</code> in your Amazon Web Services account. Only needed if calling for CUSTOMCONNECTOR connector type/.</p>
        connection_mode: <p> Indicates the connection mode and specifies whether it is public or private. Private flows use Amazon Web Services PrivateLink to route data over Amazon Web Services infrastructure without exposing it to the public internet. </p>
        connector_profile_config: <p> Defines the connector-specific configuration and credentials. </p>
        client_token: <p>The <code>clientToken</code> parameter is an idempotency token. It ensures that your <code>CreateConnectorProfile</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>CreateConnectorProfile</code>. The token is active for 8 hours.</p>

    Raises:
        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.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </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.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.create_connector_profile_request.CreateConnectorProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_appflow.types.create_connector_profile_response.CreateConnectorProfileResponse"
    ]:
        import capo_appflow._operations.sandstone_configuration_service_lambda.create_connector_profile

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

    def _redact_input(
        input_: "capo_appflow.types.create_connector_profile_request.CreateConnectorProfileRequest",
    ) -> dict[str, Any]:
        import capo_appflow.types.create_connector_profile_request

        return capo_appflow.types.create_connector_profile_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateConnectorProfile", redact_input=_redact_input),
    )
    input_: capo_appflow.types.create_connector_profile_request.CreateConnectorProfileRequest = {
        "connector_profile_name": connector_profile_name,
        "connector_type": connector_type,
        "connection_mode": connection_mode,
        "connector_profile_config": connector_profile_config,
    }
    if kms_arn is not None:
        input_["kms_arn"] = kms_arn
    if connector_label is not None:
        input_["connector_label"] = connector_label
    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