- Article
- 8 minutes to read
Applies to:Azure Logic Apps (Verbrauch + Standard)
Without writing any code, you can quickly create automated integration workflows using pre-built connector operations in Azure Logic Apps. A connector helps your workflows connect and access data, events and actions across other applications, services, systems, protocols and platforms. Each connector provides issues such as triggers, actions, or both that you can add to your workflows. By using these operations, you extend the capabilities of your cloud and on-premises applications to work with new and existing data.
Connectors in Azure Logic Apps are bothIncorporatedomanagement. AIncorporatedThe connector runs natively on the Azure Logic Apps runtime, which means they are hosted in the same process as the runtime, providing higher performance, low latency, and local connectivity. FORmanaged connectorit's a proxy or wrapper around an API like Office 365 or Salesforce that helps the underlying service communicate with Azure Logic Apps. Managed Connectors are powered by the Connector Infrastructure in Azure and are deployed, hosted, run, and managed by Microsoft. you can choose betweenHundreds of managed connectorsto use with your workflows in Azure Logic Apps.
When using a connector operation in a workflow for the first time, some connectors don't need to create a connection first, but many others do. Each connection you create is actually a separate Azure resource that provides access to the target application, service, system, protocol, or platform.
However, sometimes you may want to call REST APIs that are not available as pre-built connectors. To support custom scenarios, you can create your owncustom connectorsOffers triggers and actions that are not available as prepared operations.
This article provides an overview of custom connectors forConsumable Logic Apps Workflows and Standard Logic Apps Workflows. Each logic app type is backed by a different Azure Logic Apps runtime, each hosted on multi-tenant and single-tenant Azure. For more information about connectors in Azure Logic Apps, see the following documentation:
- Information about connectors in Azure Logic Apps
- Connectors built into Azure Logic Apps
- Connect connectors in Azure Logic Apps
- connector overview
- Single-tenant versus multi-tenant integration services environment for Azure Logic Apps
Consumer Logic Apps
EmAzure Required Logic Apps, you can createcustom Swagger-based or SOAP API connectorsuntilspecific limitsfor use in consumer logic app workflows. HeConnectors-Documentationprovides more general information about creating custom connectors to consume logic apps, including complete basic and advanced tutorials. The following list also provides direct links to information about custom connectors for consuming logic apps:
- Create an Azure Logic Apps connector
- Create a custom connector from an OpenAPI definition
- Create a custom connector from a Postman collection
- Use a custom connector from a logic app
- Share custom connectors across your organization
- Submit your connectors for Microsoft certification
- Custom Connector FAQ
Logik Standard Applications
EmSingle-tenant Azure Logic Apps, the redesigned Azure Logic Apps runtime supports standard logic apps workflows. This runtime differs from the multi-tenant Azure Logic Apps runtime, which supports consumable logic app workflows. The single-tenant runtime uses theAzure Functions extensibility model, which gives you a key resource for creating your own functionsrecessed connectorsfor everyone to use in standard workflows. In most cases, the embedded version offers better performance, features, price, etc.
When Azure Logic Apps for tenancy officially launched, the new built-in connectors included Azure Blob Storage, Azure Event Hubs, Azure Service Bus, and SQL Server. Over time, this list of built-in connectors will only grow. However, if you need connectors that aren't available in standard logic app workflows, you canCreate your own built-in connectorsUsing the same extensibility model used bybased service providerconnectors built into standard workflows.
Built-in connectors based on service providers
In single-tenant Azure Logic Apps,An internal connector with certain attributes is informally called a service provider.. For example, these connectors are based on theAzure Functions extensibility model, which give you the ability to create your own custom built-in connectors to use in standard logic app workflows.
Non-service provider built-in connectors, on the other hand, have the following attributes:
It is not based on the Azure Functions extensibility model.
Deployed directly as a job in the Azure Logic Apps runtime, for example B. Schedule, HTTP, request, and XML operations.
There is currently no functionality available to create a built-in non-service provider connector or a new job type that runs directly in the Azure Logic Apps runtime. However, you can create your own built-in connectors using the service provider's infrastructure.
The next section provides more information on how the extensibility model works for custom built-in connectors.
Integrated connector extensibility model
based onAzure Functions extensibility model, the Azure Logic Apps single-tenant built-in connector extensibility model has a service provider infrastructure that you can useCreate, package, register and install your own built-in connectorsas Azure Functions extensions that anyone can use in their standard workflows. This model includes custom built-in trigger functions that support exposureAzure Functions trigger or actionas a service provider trigger in your custom embedded connector.
The following diagram shows the method implementations that the Azure Logic Apps designer and runtime expect for a custom built-in connector with aAzure Functions based trigger:
The following sections provide more information about the interfaces your connector must implement.
IServiceOperationsProviderIServiceOperationsProvider
This interface contains the methods that provide the operational manifest for your custom built-in connector.
operational manifest
The operation manifest contains metadata about the operations implemented in your custom embedded connector. The Azure Logic Apps designer uses this metadata primarily to power the experiences for building and monitoring your connector's operations. For example, the designer uses operation metadata to understand the input parameters required for a given operation and to facilitate the generation of output property tokens based on the schema of the operation's outputs.
The designer requires and uses theGetService()YGetOperations()Methods for querying the features your connector exposes and displays on the designer surface. HeGetService()The method also specifies the connection input parameters required by the designer.
For more information about these methods and their implementation, see theDeployment Methodssection later in this article.
calls to operations
(Video) How to Create Custom Microsoft Azure Logic Apps ConnectorsOperation calls are the method implementations used by the Azure Logic Apps runtime during workflow execution to invoke the operations specified in the workflow definition.
If your trigger is an Azure Functions based trigger type, theObtenerBindingConnectionInformation()The method is used by the Azure Logic Apps runtime to provide the necessary connection parameter information for binding the Azure Functions trigger.
If your connector has actions, theInvokeOperation()The runtime uses the method to invoke each action on your connector that is performed during workflow execution. Otherwise, you don't need to implement this method.
For more information about these methods and their implementation, see theDeployment Methodssection later in this article.
IServiceOperationsTriggerProviderIServiceOperationsTriggerProvider
Custom built-in trigger functions support adding or exposing aAzure Functions trigger or actionas a service provider trigger in your custom embedded connector. To use the Azure Functions-based trigger type and the same Azure Functions binding as the Azure Managed Connector trigger, implement the following methods to provide the connection information and trigger bindings as required by Azure Functions.
HeGetFunctionTiggerType()The method is required to return the string identical to thetype- Parameters in Azure Functions trigger binding.
HeGetFunctionTriggerDefinition()has a default implementation, so you don't need to implement this method explicitly. However, if you want to update the trigger's default behavior, for example, to provide additional parameters that the designer doesn't expose, you can implement this method and override the default behavior.
Deployment Methods
The following sections provide more information about the methods your connector must implement. For the complete example, see ReviewExemplo de CosmosDbServiceOperationProvider.csYCreate custom built-in connectors for Azure Logic Apps single-tenant standard logic apps.
GetService()
The designer needs this method to get high-level metadata for their service, including the service description, connection input parameters, features, branding color, icon URL, etc.
public ServiceOperationApi GetService(){ devuelve esto.{custom-service-name-apis}.ServiceOperationServiceApi();}
For more information, see VerificationExemplo de CosmosDbServiceOperationProvider.cs.
GetOperations()
The designer needs this method for his service to implement the operations. The list of operations is based on the Swagger schema. The designer also uses the operation metadata to understand the input parameters for specific operations and generate the results as property tokens based on the schema of an operation's result.
public IEnumerable<ServiceOperation> GetOperations(bool expandManifest){ return expandManifest ? List of service operations: GetApiOperations();}
For more information, see VerificationExemplo de CosmosDbServiceOperationProvider.cs.
ObtenerBindingConnectionInformation()
If you want to use the Azure Functions based trigger type, this method will provide the necessary connection parameter information for the Azure Functions trigger binding.
öffentliche Zeichenfolge GetBindingConnectionInformation (String operationId, InSensibleDictionary<JToken> connectionParameters) { return ServiceOperationsProviderUtilities .GetRequiredParameterValue( serviceId: ServiceId, operationId: operationID, parámetroName: "connectionString", parámetros: connectionParameters)? .ToValue<cadena>();}
For more information, see VerificationExemplo de CosmosDbServiceOperationProvider.cs.
InvokeOperation()
If your custom built-in connector only has one trigger, you don't need to implement this method. However, if your connector has actions to implement, you must implement them.InvokeOperation()- Method called for each action in your connector that is performed during workflow execution. Depending on your needs, you can use any client for your connector actions, for example. B. FTPClient, HTTPClient, etc. This example uses HTTPClient.
Public Task<ServiceOperationResponse> InvokeOperation(string operationId, InSensibleDictionary<JToken> connectionParameters, ServiceOperationRequest serviceOperationRequest){ usando (var client = new HttpClient()) { respuesta = client.SendAsync(httpRequestMessage).ConfigureAwait(false).ToJObject(); } neue ServiceOperationResponse zurückgeben (corpo: resposta);}
For more information, see VerificationExemplo de CosmosDbServiceOperationProvider.cs.
GetFunctionTiggerType()
To use an Azure Functions-based trigger as a trigger in your connector, you need to return the string equal totype- Parameters in Azure Functions trigger binding.
The following example returns the string for the default Azure Cosmos DB built-in trigger,"type": "cosmosDBTrigger"
:
public string GetFunctionTriggerType(){ retorna "CosmosDBTrigger";}
For more information, see VerificationExemplo de CosmosDbServiceOperationProvider.cs.
GetFunctionTriggerDefinition()
This method has a default implementation, so you don't need to implement it explicitly. However, if you want to update the trigger's default behavior, for example, to provide additional parameters that the designer doesn't expose, you can implement this method and override the default behavior.
Next steps
When you're ready to start the deployment steps, continue with the following article:
- Create custom built-in connectors for Azure Logic Apps single-tenant standard logic apps