published on Tuesday, Oct 27, 2026 by labd
published on Tuesday, Oct 27, 2026 by labd
Create a new API extension to extend the behaviour of an API with business logic. Note that API extensions affect the performance of the API it is extending. If it fails, the whole API call fails
Also see the API Extension API Documentation
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as commercetools from "@pulumi/commercetools";
import * as google from "@pulumi/google";
// HTTP api extension
const my_http_extension = new commercetools.ApiExtension("my-http-extension", {
key: "my-http-extension-key",
destination: {
type: "HTTP",
url: "https://example.com",
authorizationHeader: "Basic 12345",
},
triggers: [{
resourceTypeId: "customer",
actions: [
"Create",
"Update",
],
}],
});
// AWS Lambda api extension
const my_awslambda_extension = new commercetools.ApiExtension("my-awslambda-extension", {
key: "my-awslambda-extension-key",
destination: {
type: "awslambda",
arn: "us-east-1:123456789012:mylambda",
accessKey: "mykey",
accessSecret: "mysecret",
},
triggers: [{
resourceTypeId: "customer",
actions: [
"Create",
"Update",
],
}],
});
// Google Cloud Function api extension
const my_googlecloudfunction_extension = new commercetools.ApiExtension("my-googlecloudfunction-extension", {
key: "my-googlecloudfunction-extension-key",
destination: {
type: "googlecloudfunction",
url: "https://example.com",
},
triggers: [{
resourceTypeId: "customer",
actions: [
"Create",
"Update",
],
}],
});
const myCloudFunction = new google.index.CloudfunctionsFunction("my_cloud_function", {
name: "function-test",
description: "My function",
runtime: "nodejs16",
});
const invoker = new google.index.CloudfunctionsFunctionIamMember("invoker", {
project: "my-project",
region: "europe-central2",
cloudFunction: myCloudFunction.name,
role: "roles/cloudfunctions.invoker",
member: "serviceAccount:extensions@commercetools-platform.iam.gserviceaccount.com",
});
// An API extension which runs after another extension, expands references in the
// payload and receives the state of the resource before the update
const my_dependent_extension = new commercetools.ApiExtension("my-dependent-extension", {
key: "my-dependent-extension-key",
destination: {
type: "HTTP",
url: "https://example.com",
authorizationHeader: "Basic 12345",
},
triggers: [{
resourceTypeId: "cart",
actions: [
"Create",
"Update",
],
}],
dependencies: [
my_http_extension.key,
"an-extension-managed-elsewhere",
],
expansionPaths: [
"lineItems[*].variant",
"customerGroup",
],
additionalContext: {
includeOldResource: true,
},
});
import pulumi
import pulumi_commercetools as commercetools
import pulumi_google as google
# HTTP api extension
my_http_extension = commercetools.ApiExtension("my-http-extension",
key="my-http-extension-key",
destination={
"type": "HTTP",
"url": "https://example.com",
"authorization_header": "Basic 12345",
},
triggers=[{
"resource_type_id": "customer",
"actions": [
"Create",
"Update",
],
}])
# AWS Lambda api extension
my_awslambda_extension = commercetools.ApiExtension("my-awslambda-extension",
key="my-awslambda-extension-key",
destination={
"type": "awslambda",
"arn": "us-east-1:123456789012:mylambda",
"access_key": "mykey",
"access_secret": "mysecret",
},
triggers=[{
"resource_type_id": "customer",
"actions": [
"Create",
"Update",
],
}])
# Google Cloud Function api extension
my_googlecloudfunction_extension = commercetools.ApiExtension("my-googlecloudfunction-extension",
key="my-googlecloudfunction-extension-key",
destination={
"type": "googlecloudfunction",
"url": "https://example.com",
},
triggers=[{
"resource_type_id": "customer",
"actions": [
"Create",
"Update",
],
}])
my_cloud_function = google.index.CloudfunctionsFunction("my_cloud_function",
name=function-test,
description=My function,
runtime=nodejs16)
invoker = google.index.CloudfunctionsFunctionIamMember("invoker",
project=my-project,
region=europe-central2,
cloud_function=my_cloud_function.name,
role=roles/cloudfunctions.invoker,
member=serviceAccount:extensions@commercetools-platform.iam.gserviceaccount.com)
# An API extension which runs after another extension, expands references in the
# payload and receives the state of the resource before the update
my_dependent_extension = commercetools.ApiExtension("my-dependent-extension",
key="my-dependent-extension-key",
destination={
"type": "HTTP",
"url": "https://example.com",
"authorization_header": "Basic 12345",
},
triggers=[{
"resource_type_id": "cart",
"actions": [
"Create",
"Update",
],
}],
dependencies=[
my_http_extension.key,
"an-extension-managed-elsewhere",
],
expansion_paths=[
"lineItems[*].variant",
"customerGroup",
],
additional_context={
"include_old_resource": True,
})
package main
import (
"github.com/pulumi/pulumi-google/sdk/go/google"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/commercetools/commercetools"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// HTTP api extension
my_http_extension, err := commercetools.NewApiExtension(ctx, "my-http-extension", &commercetools.ApiExtensionArgs{
Key: pulumi.String("my-http-extension-key"),
Destination: &commercetools.ApiExtensionDestinationArgs{
Type: pulumi.String("HTTP"),
Url: pulumi.String("https://example.com"),
AuthorizationHeader: pulumi.String("Basic 12345"),
},
Triggers: commercetools.ApiExtensionTriggerArray{
&commercetools.ApiExtensionTriggerArgs{
ResourceTypeId: pulumi.String("customer"),
Actions: pulumi.StringArray{
pulumi.String("Create"),
pulumi.String("Update"),
},
},
},
})
if err != nil {
return err
}
// AWS Lambda api extension
_, err = commercetools.NewApiExtension(ctx, "my-awslambda-extension", &commercetools.ApiExtensionArgs{
Key: pulumi.String("my-awslambda-extension-key"),
Destination: &commercetools.ApiExtensionDestinationArgs{
Type: pulumi.String("awslambda"),
Arn: pulumi.String("us-east-1:123456789012:mylambda"),
AccessKey: pulumi.String("mykey"),
AccessSecret: pulumi.String("mysecret"),
},
Triggers: commercetools.ApiExtensionTriggerArray{
&commercetools.ApiExtensionTriggerArgs{
ResourceTypeId: pulumi.String("customer"),
Actions: pulumi.StringArray{
pulumi.String("Create"),
pulumi.String("Update"),
},
},
},
})
if err != nil {
return err
}
// Google Cloud Function api extension
_, err = commercetools.NewApiExtension(ctx, "my-googlecloudfunction-extension", &commercetools.ApiExtensionArgs{
Key: pulumi.String("my-googlecloudfunction-extension-key"),
Destination: &commercetools.ApiExtensionDestinationArgs{
Type: pulumi.String("googlecloudfunction"),
Url: pulumi.String("https://example.com"),
},
Triggers: commercetools.ApiExtensionTriggerArray{
&commercetools.ApiExtensionTriggerArgs{
ResourceTypeId: pulumi.String("customer"),
Actions: pulumi.StringArray{
pulumi.String("Create"),
pulumi.String("Update"),
},
},
},
})
if err != nil {
return err
}
myCloudFunction, err := google.NewCloudfunctionsFunction(ctx, "my_cloud_function", &google.CloudfunctionsFunctionArgs{
Name: "function-test",
Description: "My function",
Runtime: "nodejs16",
})
if err != nil {
return err
}
_, err = google.NewCloudfunctionsFunctionIamMember(ctx, "invoker", &google.CloudfunctionsFunctionIamMemberArgs{
Project: "my-project",
Region: "europe-central2",
CloudFunction: myCloudFunction.Name,
Role: "roles/cloudfunctions.invoker",
Member: "serviceAccount:extensions@commercetools-platform.iam.gserviceaccount.com",
})
if err != nil {
return err
}
// An API extension which runs after another extension, expands references in the
// payload and receives the state of the resource before the update
_, err = commercetools.NewApiExtension(ctx, "my-dependent-extension", &commercetools.ApiExtensionArgs{
Key: pulumi.String("my-dependent-extension-key"),
Destination: &commercetools.ApiExtensionDestinationArgs{
Type: pulumi.String("HTTP"),
Url: pulumi.String("https://example.com"),
AuthorizationHeader: pulumi.String("Basic 12345"),
},
Triggers: commercetools.ApiExtensionTriggerArray{
&commercetools.ApiExtensionTriggerArgs{
ResourceTypeId: pulumi.String("cart"),
Actions: pulumi.StringArray{
pulumi.String("Create"),
pulumi.String("Update"),
},
},
},
Dependencies: pulumi.StringArray{
my_http_extension.Key,
pulumi.String("an-extension-managed-elsewhere"),
},
ExpansionPaths: pulumi.StringArray{
pulumi.String("lineItems[*].variant"),
pulumi.String("customerGroup"),
},
AdditionalContext: &commercetools.ApiExtensionAdditionalContextArgs{
IncludeOldResource: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Commercetools = Pulumi.Commercetools;
using Google = Pulumi.Google;
return await Deployment.RunAsync(() =>
{
// HTTP api extension
var my_http_extension = new Commercetools.ApiExtension("my-http-extension", new()
{
Key = "my-http-extension-key",
Destination = new Commercetools.Inputs.ApiExtensionDestinationArgs
{
Type = "HTTP",
Url = "https://example.com",
AuthorizationHeader = "Basic 12345",
},
Triggers = new[]
{
new Commercetools.Inputs.ApiExtensionTriggerArgs
{
ResourceTypeId = "customer",
Actions = new[]
{
"Create",
"Update",
},
},
},
});
// AWS Lambda api extension
var my_awslambda_extension = new Commercetools.ApiExtension("my-awslambda-extension", new()
{
Key = "my-awslambda-extension-key",
Destination = new Commercetools.Inputs.ApiExtensionDestinationArgs
{
Type = "awslambda",
Arn = "us-east-1:123456789012:mylambda",
AccessKey = "mykey",
AccessSecret = "mysecret",
},
Triggers = new[]
{
new Commercetools.Inputs.ApiExtensionTriggerArgs
{
ResourceTypeId = "customer",
Actions = new[]
{
"Create",
"Update",
},
},
},
});
// Google Cloud Function api extension
var my_googlecloudfunction_extension = new Commercetools.ApiExtension("my-googlecloudfunction-extension", new()
{
Key = "my-googlecloudfunction-extension-key",
Destination = new Commercetools.Inputs.ApiExtensionDestinationArgs
{
Type = "googlecloudfunction",
Url = "https://example.com",
},
Triggers = new[]
{
new Commercetools.Inputs.ApiExtensionTriggerArgs
{
ResourceTypeId = "customer",
Actions = new[]
{
"Create",
"Update",
},
},
},
});
var myCloudFunction = new Google.Index.CloudfunctionsFunction("my_cloud_function", new()
{
Name = "function-test",
Description = "My function",
Runtime = "nodejs16",
});
var invoker = new Google.Index.CloudfunctionsFunctionIamMember("invoker", new()
{
Project = "my-project",
Region = "europe-central2",
CloudFunction = myCloudFunction.Name,
Role = "roles/cloudfunctions.invoker",
Member = "serviceAccount:extensions@commercetools-platform.iam.gserviceaccount.com",
});
// An API extension which runs after another extension, expands references in the
// payload and receives the state of the resource before the update
var my_dependent_extension = new Commercetools.ApiExtension("my-dependent-extension", new()
{
Key = "my-dependent-extension-key",
Destination = new Commercetools.Inputs.ApiExtensionDestinationArgs
{
Type = "HTTP",
Url = "https://example.com",
AuthorizationHeader = "Basic 12345",
},
Triggers = new[]
{
new Commercetools.Inputs.ApiExtensionTriggerArgs
{
ResourceTypeId = "cart",
Actions = new[]
{
"Create",
"Update",
},
},
},
Dependencies = new[]
{
my_http_extension.Key,
"an-extension-managed-elsewhere",
},
ExpansionPaths = new[]
{
"lineItems[*].variant",
"customerGroup",
},
AdditionalContext = new Commercetools.Inputs.ApiExtensionAdditionalContextArgs
{
IncludeOldResource = true,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.commercetools.ApiExtension;
import com.pulumi.commercetools.ApiExtensionArgs;
import com.pulumi.commercetools.inputs.ApiExtensionDestinationArgs;
import com.pulumi.commercetools.inputs.ApiExtensionTriggerArgs;
import com.pulumi.google.CloudfunctionsFunction;
import com.pulumi.google.CloudfunctionsFunctionArgs;
import com.pulumi.google.CloudfunctionsFunctionIamMember;
import com.pulumi.google.CloudfunctionsFunctionIamMemberArgs;
import com.pulumi.commercetools.inputs.ApiExtensionAdditionalContextArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// HTTP api extension
var my_http_extension = new ApiExtension("my-http-extension", ApiExtensionArgs.builder()
.key("my-http-extension-key")
.destination(ApiExtensionDestinationArgs.builder()
.type("HTTP")
.url("https://example.com")
.authorizationHeader("Basic 12345")
.build())
.triggers(ApiExtensionTriggerArgs.builder()
.resourceTypeId("customer")
.actions(
"Create",
"Update")
.build())
.build());
// AWS Lambda api extension
var my_awslambda_extension = new ApiExtension("my-awslambda-extension", ApiExtensionArgs.builder()
.key("my-awslambda-extension-key")
.destination(ApiExtensionDestinationArgs.builder()
.type("awslambda")
.arn("us-east-1:123456789012:mylambda")
.accessKey("mykey")
.accessSecret("mysecret")
.build())
.triggers(ApiExtensionTriggerArgs.builder()
.resourceTypeId("customer")
.actions(
"Create",
"Update")
.build())
.build());
// Google Cloud Function api extension
var my_googlecloudfunction_extension = new ApiExtension("my-googlecloudfunction-extension", ApiExtensionArgs.builder()
.key("my-googlecloudfunction-extension-key")
.destination(ApiExtensionDestinationArgs.builder()
.type("googlecloudfunction")
.url("https://example.com")
.build())
.triggers(ApiExtensionTriggerArgs.builder()
.resourceTypeId("customer")
.actions(
"Create",
"Update")
.build())
.build());
var myCloudFunction = new CloudfunctionsFunction("myCloudFunction", CloudfunctionsFunctionArgs.builder()
.name("function-test")
.description("My function")
.runtime("nodejs16")
.build());
var invoker = new CloudfunctionsFunctionIamMember("invoker", CloudfunctionsFunctionIamMemberArgs.builder()
.project("my-project")
.region("europe-central2")
.cloudFunction(myCloudFunction.name())
.role("roles/cloudfunctions.invoker")
.member("serviceAccount:extensions@commercetools-platform.iam.gserviceaccount.com")
.build());
// An API extension which runs after another extension, expands references in the
// payload and receives the state of the resource before the update
var my_dependent_extension = new ApiExtension("my-dependent-extension", ApiExtensionArgs.builder()
.key("my-dependent-extension-key")
.destination(ApiExtensionDestinationArgs.builder()
.type("HTTP")
.url("https://example.com")
.authorizationHeader("Basic 12345")
.build())
.triggers(ApiExtensionTriggerArgs.builder()
.resourceTypeId("cart")
.actions(
"Create",
"Update")
.build())
.dependencies(
my_http_extension.key(),
"an-extension-managed-elsewhere")
.expansionPaths(
"lineItems[*].variant",
"customerGroup")
.additionalContext(ApiExtensionAdditionalContextArgs.builder()
.includeOldResource(true)
.build())
.build());
}
}
resources:
# HTTP api extension
my-http-extension:
type: commercetools:ApiExtension
properties:
key: my-http-extension-key
destination:
type: HTTP
url: https://example.com
authorizationHeader: Basic 12345
triggers:
- resourceTypeId: customer
actions:
- Create
- Update
# AWS Lambda api extension
my-awslambda-extension:
type: commercetools:ApiExtension
properties:
key: my-awslambda-extension-key
destination:
type: awslambda
arn: us-east-1:123456789012:mylambda
accessKey: mykey
accessSecret: mysecret
triggers:
- resourceTypeId: customer
actions:
- Create
- Update
# Google Cloud Function api extension
my-googlecloudfunction-extension:
type: commercetools:ApiExtension
properties:
key: my-googlecloudfunction-extension-key
destination:
type: googlecloudfunction
url: https://example.com
triggers:
- resourceTypeId: customer
actions:
- Create
- Update
myCloudFunction:
type: google:CloudfunctionsFunction
name: my_cloud_function
properties:
name: function-test
description: My function
runtime: nodejs16
invoker:
type: google:CloudfunctionsFunctionIamMember
properties:
project: my-project
region: europe-central2
cloudFunction: ${myCloudFunction.name}
role: roles/cloudfunctions.invoker
member: serviceAccount:extensions@commercetools-platform.iam.gserviceaccount.com
# An API extension which runs after another extension, expands references in the
# payload and receives the state of the resource before the update
my-dependent-extension:
type: commercetools:ApiExtension
properties:
key: my-dependent-extension-key
destination:
type: HTTP
url: https://example.com
authorizationHeader: Basic 12345
triggers:
- resourceTypeId: cart
actions:
- Create
- Update
dependencies:
- ${["my-http-extension"].key}
- an-extension-managed-elsewhere
expansionPaths:
- lineItems[*].variant
- customerGroup
additionalContext:
includeOldResource: true
Example coming soon!
Create ApiExtension Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiExtension(name: string, args: ApiExtensionArgs, opts?: CustomResourceOptions);@overload
def ApiExtension(resource_name: str,
args: ApiExtensionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiExtension(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination: Optional[ApiExtensionDestinationArgs] = None,
triggers: Optional[Sequence[ApiExtensionTriggerArgs]] = None,
additional_context: Optional[ApiExtensionAdditionalContextArgs] = None,
api_extension_id: Optional[str] = None,
dependencies: Optional[Sequence[str]] = None,
expansion_paths: Optional[Sequence[str]] = None,
key: Optional[str] = None,
timeout_in_ms: Optional[float] = None)func NewApiExtension(ctx *Context, name string, args ApiExtensionArgs, opts ...ResourceOption) (*ApiExtension, error)public ApiExtension(string name, ApiExtensionArgs args, CustomResourceOptions? opts = null)
public ApiExtension(String name, ApiExtensionArgs args)
public ApiExtension(String name, ApiExtensionArgs args, CustomResourceOptions options)
type: commercetools:ApiExtension
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "commercetools_api_extension" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ApiExtensionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ApiExtensionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApiExtensionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiExtensionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiExtensionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var apiExtensionResource = new Commercetools.ApiExtension("apiExtensionResource", new()
{
Destination = new Commercetools.Inputs.ApiExtensionDestinationArgs
{
Type = "string",
AccessKey = "string",
AccessSecret = "string",
Arn = "string",
AuthorizationHeader = "string",
AzureAuthentication = "string",
Url = "string",
},
Triggers = new[]
{
new Commercetools.Inputs.ApiExtensionTriggerArgs
{
Actions = new[]
{
"string",
},
ResourceTypeId = "string",
Condition = "string",
},
},
AdditionalContext = new Commercetools.Inputs.ApiExtensionAdditionalContextArgs
{
IncludeOldResource = false,
},
ApiExtensionId = "string",
Dependencies = new[]
{
"string",
},
ExpansionPaths = new[]
{
"string",
},
Key = "string",
TimeoutInMs = 0.0,
});
example, err := commercetools.NewApiExtension(ctx, "apiExtensionResource", &commercetools.ApiExtensionArgs{
Destination: &commercetools.ApiExtensionDestinationArgs{
Type: pulumi.String("string"),
AccessKey: pulumi.String("string"),
AccessSecret: pulumi.String("string"),
Arn: pulumi.String("string"),
AuthorizationHeader: pulumi.String("string"),
AzureAuthentication: pulumi.String("string"),
Url: pulumi.String("string"),
},
Triggers: commercetools.ApiExtensionTriggerArray{
&commercetools.ApiExtensionTriggerArgs{
Actions: pulumi.StringArray{
pulumi.String("string"),
},
ResourceTypeId: pulumi.String("string"),
Condition: pulumi.String("string"),
},
},
AdditionalContext: &commercetools.ApiExtensionAdditionalContextArgs{
IncludeOldResource: pulumi.Bool(false),
},
ApiExtensionId: pulumi.String("string"),
Dependencies: pulumi.StringArray{
pulumi.String("string"),
},
ExpansionPaths: pulumi.StringArray{
pulumi.String("string"),
},
Key: pulumi.String("string"),
TimeoutInMs: pulumi.Float64(0),
})
resource "commercetools_api_extension" "apiExtensionResource" {
lifecycle {
create_before_destroy = true
}
destination = {
type = "string"
access_key = "string"
access_secret = "string"
arn = "string"
authorization_header = "string"
azure_authentication = "string"
url = "string"
}
triggers {
actions = ["string"]
resource_type_id = "string"
condition = "string"
}
additional_context = {
include_old_resource = false
}
api_extension_id = "string"
dependencies = ["string"]
expansion_paths = ["string"]
key = "string"
timeout_in_ms = 0
}
var apiExtensionResource = new ApiExtension("apiExtensionResource", ApiExtensionArgs.builder()
.destination(ApiExtensionDestinationArgs.builder()
.type("string")
.accessKey("string")
.accessSecret("string")
.arn("string")
.authorizationHeader("string")
.azureAuthentication("string")
.url("string")
.build())
.triggers(ApiExtensionTriggerArgs.builder()
.actions("string")
.resourceTypeId("string")
.condition("string")
.build())
.additionalContext(ApiExtensionAdditionalContextArgs.builder()
.includeOldResource(false)
.build())
.apiExtensionId("string")
.dependencies("string")
.expansionPaths("string")
.key("string")
.timeoutInMs(0.0)
.build());
api_extension_resource = commercetools.ApiExtension("apiExtensionResource",
destination={
"type": "string",
"access_key": "string",
"access_secret": "string",
"arn": "string",
"authorization_header": "string",
"azure_authentication": "string",
"url": "string",
},
triggers=[{
"actions": ["string"],
"resource_type_id": "string",
"condition": "string",
}],
additional_context={
"include_old_resource": False,
},
api_extension_id="string",
dependencies=["string"],
expansion_paths=["string"],
key="string",
timeout_in_ms=float(0))
const apiExtensionResource = new commercetools.ApiExtension("apiExtensionResource", {
destination: {
type: "string",
accessKey: "string",
accessSecret: "string",
arn: "string",
authorizationHeader: "string",
azureAuthentication: "string",
url: "string",
},
triggers: [{
actions: ["string"],
resourceTypeId: "string",
condition: "string",
}],
additionalContext: {
includeOldResource: false,
},
apiExtensionId: "string",
dependencies: ["string"],
expansionPaths: ["string"],
key: "string",
timeoutInMs: 0,
});
type: commercetools:ApiExtension
properties:
additionalContext:
includeOldResource: false
apiExtensionId: string
dependencies:
- string
destination:
accessKey: string
accessSecret: string
arn: string
authorizationHeader: string
azureAuthentication: string
type: string
url: string
expansionPaths:
- string
key: string
timeoutInMs: 0
triggers:
- actions:
- string
condition: string
resourceTypeId: string
ApiExtension Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ApiExtension resource accepts the following input properties:
- Destination
Api
Extension Destination - Destination Details where the extension can be reached
- Triggers
List<Api
Extension Trigger> - Array of Trigger Describes what triggers the extension
- Additional
Context ApiExtension Additional Context - Configures additional information included in the payload sent to the API Extension
- Api
Extension stringId - The ID of this resource.
- Dependencies List<string>
- Expansion
Paths List<string> - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- Key string
- User-specific unique identifier for the extension
- Timeout
In doubleMs - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- Destination
Api
Extension Destination Args - Destination Details where the extension can be reached
- Triggers
[]Api
Extension Trigger Args - Array of Trigger Describes what triggers the extension
- Additional
Context ApiExtension Additional Context Args - Configures additional information included in the payload sent to the API Extension
- Api
Extension stringId - The ID of this resource.
- Dependencies []string
- Expansion
Paths []string - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- Key string
- User-specific unique identifier for the extension
- Timeout
In float64Ms - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- destination object
- Destination Details where the extension can be reached
- triggers list(object)
- Array of Trigger Describes what triggers the extension
- additional_
context object - Configures additional information included in the payload sent to the API Extension
- api_
extension_ stringid - The ID of this resource.
- dependencies list(string)
- expansion_
paths list(string) - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- key string
- User-specific unique identifier for the extension
- timeout_
in_ numberms - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- destination
Api
Extension Destination - Destination Details where the extension can be reached
- triggers
List<Api
Extension Trigger> - Array of Trigger Describes what triggers the extension
- additional
Context ApiExtension Additional Context - Configures additional information included in the payload sent to the API Extension
- api
Extension StringId - The ID of this resource.
- dependencies List<String>
- expansion
Paths List<String> - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- key String
- User-specific unique identifier for the extension
- timeout
In DoubleMs - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- destination
Api
Extension Destination - Destination Details where the extension can be reached
- triggers
Api
Extension Trigger[] - Array of Trigger Describes what triggers the extension
- additional
Context ApiExtension Additional Context - Configures additional information included in the payload sent to the API Extension
- api
Extension stringId - The ID of this resource.
- dependencies string[]
- expansion
Paths string[] - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- key string
- User-specific unique identifier for the extension
- timeout
In numberMs - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- destination
Api
Extension Destination Args - Destination Details where the extension can be reached
- triggers
Sequence[Api
Extension Trigger Args] - Array of Trigger Describes what triggers the extension
- additional_
context ApiExtension Additional Context Args - Configures additional information included in the payload sent to the API Extension
- api_
extension_ strid - The ID of this resource.
- dependencies Sequence[str]
- expansion_
paths Sequence[str] - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- key str
- User-specific unique identifier for the extension
- timeout_
in_ floatms - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- destination Property Map
- Destination Details where the extension can be reached
- triggers List<Property Map>
- Array of Trigger Describes what triggers the extension
- additional
Context Property Map - Configures additional information included in the payload sent to the API Extension
- api
Extension StringId - The ID of this resource.
- dependencies List<String>
- expansion
Paths List<String> - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- key String
- User-specific unique identifier for the extension
- timeout
In NumberMs - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiExtension resource produces the following output properties:
Look up Existing ApiExtension Resource
Get an existing ApiExtension resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApiExtensionState, opts?: CustomResourceOptions): ApiExtension@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
additional_context: Optional[ApiExtensionAdditionalContextArgs] = None,
api_extension_id: Optional[str] = None,
dependencies: Optional[Sequence[str]] = None,
destination: Optional[ApiExtensionDestinationArgs] = None,
expansion_paths: Optional[Sequence[str]] = None,
key: Optional[str] = None,
timeout_in_ms: Optional[float] = None,
triggers: Optional[Sequence[ApiExtensionTriggerArgs]] = None,
version: Optional[float] = None) -> ApiExtensionfunc GetApiExtension(ctx *Context, name string, id IDInput, state *ApiExtensionState, opts ...ResourceOption) (*ApiExtension, error)public static ApiExtension Get(string name, Input<string> id, ApiExtensionState? state, CustomResourceOptions? opts = null)public static ApiExtension get(String name, Output<String> id, ApiExtensionState state, CustomResourceOptions options)resources: existingApiExtension: type: commercetools:ApiExtension get: id: ${id}import {
to = commercetools_api_extension.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state ApiExtensionState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state ApiExtensionState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state ApiExtensionState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state ApiExtensionState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Additional
Context ApiExtension Additional Context - Configures additional information included in the payload sent to the API Extension
- Api
Extension stringId - The ID of this resource.
- Dependencies List<string>
- Destination
Api
Extension Destination - Destination Details where the extension can be reached
- Expansion
Paths List<string> - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- Key string
- User-specific unique identifier for the extension
- Timeout
In doubleMs - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- Triggers
List<Api
Extension Trigger> - Array of Trigger Describes what triggers the extension
- Version double
- Additional
Context ApiExtension Additional Context Args - Configures additional information included in the payload sent to the API Extension
- Api
Extension stringId - The ID of this resource.
- Dependencies []string
- Destination
Api
Extension Destination Args - Destination Details where the extension can be reached
- Expansion
Paths []string - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- Key string
- User-specific unique identifier for the extension
- Timeout
In float64Ms - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- Triggers
[]Api
Extension Trigger Args - Array of Trigger Describes what triggers the extension
- Version float64
- additional_
context object - Configures additional information included in the payload sent to the API Extension
- api_
extension_ stringid - The ID of this resource.
- dependencies list(string)
- destination object
- Destination Details where the extension can be reached
- expansion_
paths list(string) - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- key string
- User-specific unique identifier for the extension
- timeout_
in_ numberms - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- triggers list(object)
- Array of Trigger Describes what triggers the extension
- version number
- additional
Context ApiExtension Additional Context - Configures additional information included in the payload sent to the API Extension
- api
Extension StringId - The ID of this resource.
- dependencies List<String>
- destination
Api
Extension Destination - Destination Details where the extension can be reached
- expansion
Paths List<String> - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- key String
- User-specific unique identifier for the extension
- timeout
In DoubleMs - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- triggers
List<Api
Extension Trigger> - Array of Trigger Describes what triggers the extension
- version Double
- additional
Context ApiExtension Additional Context - Configures additional information included in the payload sent to the API Extension
- api
Extension stringId - The ID of this resource.
- dependencies string[]
- destination
Api
Extension Destination - Destination Details where the extension can be reached
- expansion
Paths string[] - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- key string
- User-specific unique identifier for the extension
- timeout
In numberMs - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- triggers
Api
Extension Trigger[] - Array of Trigger Describes what triggers the extension
- version number
- additional_
context ApiExtension Additional Context Args - Configures additional information included in the payload sent to the API Extension
- api_
extension_ strid - The ID of this resource.
- dependencies Sequence[str]
- destination
Api
Extension Destination Args - Destination Details where the extension can be reached
- expansion_
paths Sequence[str] - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- key str
- User-specific unique identifier for the extension
- timeout_
in_ floatms - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- triggers
Sequence[Api
Extension Trigger Args] - Array of Trigger Describes what triggers the extension
- version float
- additional
Context Property Map - Configures additional information included in the payload sent to the API Extension
- api
Extension StringId - The ID of this resource.
- dependencies List<String>
- destination Property Map
- Destination Details where the extension can be reached
- expansion
Paths List<String> - Expansion paths used for reference expansion of the payload. Be aware of the limits of this feature and its performance impact.
- key String
- User-specific unique identifier for the extension
- timeout
In NumberMs - Maximum time (in milliseconds) that the Extension can respond within. If no timeout is provided, the default value is used for all types of Extensions, including payment Extensions. The maximum value is 10000 ms (10 seconds) for payment Extensions and 2000 ms (2 seconds) for all other Extensions.
- triggers List<Property Map>
- Array of Trigger Describes what triggers the extension
- version Number
Supporting Types
ApiExtensionAdditionalContext, ApiExtensionAdditionalContextArgs
- Include
Old boolResource - Whether the payload sent to the API Extension should include an
oldResourcefield with the state of the resource before the update. This only applies toUpdateactions; forCreateactionsoldResourceis never included.
- Include
Old boolResource - Whether the payload sent to the API Extension should include an
oldResourcefield with the state of the resource before the update. This only applies toUpdateactions; forCreateactionsoldResourceis never included.
- include_
old_ boolresource - Whether the payload sent to the API Extension should include an
oldResourcefield with the state of the resource before the update. This only applies toUpdateactions; forCreateactionsoldResourceis never included.
- include
Old BooleanResource - Whether the payload sent to the API Extension should include an
oldResourcefield with the state of the resource before the update. This only applies toUpdateactions; forCreateactionsoldResourceis never included.
- include
Old booleanResource - Whether the payload sent to the API Extension should include an
oldResourcefield with the state of the resource before the update. This only applies toUpdateactions; forCreateactionsoldResourceis never included.
- include_
old_ boolresource - Whether the payload sent to the API Extension should include an
oldResourcefield with the state of the resource before the update. This only applies toUpdateactions; forCreateactionsoldResourceis never included.
- include
Old BooleanResource - Whether the payload sent to the API Extension should include an
oldResourcefield with the state of the resource before the update. This only applies toUpdateactions; forCreateactionsoldResourceis never included.
ApiExtensionDestination, ApiExtensionDestinationArgs
- Type string
- Access
Key string - Access
Secret string - Arn string
- string
- Azure
Authentication string - Url string
- Type string
- Access
Key string - Access
Secret string - Arn string
- string
- Azure
Authentication string - Url string
- type string
- access_
key string - access_
secret string - arn string
- string
- azure_
authentication string - url string
- type String
- access
Key String - access
Secret String - arn String
- String
- azure
Authentication String - url String
- type string
- access
Key string - access
Secret string - arn string
- string
- azure
Authentication string - url string
- type str
- access_
key str - access_
secret str - arn str
- str
- azure_
authentication str - url str
- type String
- access
Key String - access
Secret String - arn String
- String
- azure
Authentication String - url String
ApiExtensionTrigger, ApiExtensionTriggerArgs
- Actions List<string>
- Currently, Create and Update are supported
- Resource
Type stringId - The resource type that triggers the extension, for example
cart,order,paymentorrecurring-order. See the ExtensionResourceTypeId documentation for all supported values - Condition string
- Valid predicate that controls the conditions under which the API Extension is called.
- Actions []string
- Currently, Create and Update are supported
- Resource
Type stringId - The resource type that triggers the extension, for example
cart,order,paymentorrecurring-order. See the ExtensionResourceTypeId documentation for all supported values - Condition string
- Valid predicate that controls the conditions under which the API Extension is called.
- actions list(string)
- Currently, Create and Update are supported
- resource_
type_ stringid - The resource type that triggers the extension, for example
cart,order,paymentorrecurring-order. See the ExtensionResourceTypeId documentation for all supported values - condition string
- Valid predicate that controls the conditions under which the API Extension is called.
- actions List<String>
- Currently, Create and Update are supported
- resource
Type StringId - The resource type that triggers the extension, for example
cart,order,paymentorrecurring-order. See the ExtensionResourceTypeId documentation for all supported values - condition String
- Valid predicate that controls the conditions under which the API Extension is called.
- actions string[]
- Currently, Create and Update are supported
- resource
Type stringId - The resource type that triggers the extension, for example
cart,order,paymentorrecurring-order. See the ExtensionResourceTypeId documentation for all supported values - condition string
- Valid predicate that controls the conditions under which the API Extension is called.
- actions Sequence[str]
- Currently, Create and Update are supported
- resource_
type_ strid - The resource type that triggers the extension, for example
cart,order,paymentorrecurring-order. See the ExtensionResourceTypeId documentation for all supported values - condition str
- Valid predicate that controls the conditions under which the API Extension is called.
- actions List<String>
- Currently, Create and Update are supported
- resource
Type StringId - The resource type that triggers the extension, for example
cart,order,paymentorrecurring-order. See the ExtensionResourceTypeId documentation for all supported values - condition String
- Valid predicate that controls the conditions under which the API Extension is called.
Package Details
- Repository
- commercetools labd/terraform-provider-commercetools
- License
- Notes
- This Pulumi package is based on the
commercetoolsTerraform Provider.
published on Tuesday, Oct 27, 2026 by labd