commercetools.Channel
Explore with Pulumi AI
Channels represent a source or destination of different entities. They can be used to model warehouses or stores.
See also the Channels API Documentation
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as commercetools from "@pulumi/commercetools";
const my_channel = new commercetools.Channel("my-channel", {
    description: {
        "nl-NL": "Channel",
    },
    key: "my-channel-key",
    name: {
        "nl-NL": "Channel",
    },
    roles: ["ProductDistribution"],
});
import pulumi
import pulumi_commercetools as commercetools
my_channel = commercetools.Channel("my-channel",
    description={
        "nl-NL": "Channel",
    },
    key="my-channel-key",
    name={
        "nl-NL": "Channel",
    },
    roles=["ProductDistribution"])
package main
import (
	"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 {
		_, err := commercetools.NewChannel(ctx, "my-channel", &commercetools.ChannelArgs{
			Description: pulumi.StringMap{
				"nl-NL": pulumi.String("Channel"),
			},
			Key: pulumi.String("my-channel-key"),
			Name: pulumi.StringMap{
				"nl-NL": pulumi.String("Channel"),
			},
			Roles: pulumi.StringArray{
				pulumi.String("ProductDistribution"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Commercetools = Pulumi.Commercetools;
return await Deployment.RunAsync(() => 
{
    var my_channel = new Commercetools.Channel("my-channel", new()
    {
        Description = 
        {
            { "nl-NL", "Channel" },
        },
        Key = "my-channel-key",
        Name = 
        {
            { "nl-NL", "Channel" },
        },
        Roles = new[]
        {
            "ProductDistribution",
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.commercetools.Channel;
import com.pulumi.commercetools.ChannelArgs;
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) {
        var my_channel = new Channel("my-channel", ChannelArgs.builder()
            .description(Map.of("nl-NL", "Channel"))
            .key("my-channel-key")
            .name(Map.of("nl-NL", "Channel"))
            .roles("ProductDistribution")
            .build());
    }
}
resources:
  my-channel:
    type: commercetools:Channel
    properties:
      description:
        nl-NL: Channel
      key: my-channel-key
      name:
        nl-NL: Channel
      roles:
        - ProductDistribution
Create Channel Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Channel(name: string, args: ChannelArgs, opts?: CustomResourceOptions);@overload
def Channel(resource_name: str,
            args: ChannelArgs,
            opts: Optional[ResourceOptions] = None)
@overload
def Channel(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            key: Optional[str] = None,
            roles: Optional[Sequence[str]] = None,
            address: Optional[ChannelAddressArgs] = None,
            channel_id: Optional[str] = None,
            custom: Optional[ChannelCustomArgs] = None,
            description: Optional[Mapping[str, str]] = None,
            geolocation: Optional[ChannelGeolocationArgs] = None,
            name: Optional[Mapping[str, str]] = None)func NewChannel(ctx *Context, name string, args ChannelArgs, opts ...ResourceOption) (*Channel, error)public Channel(string name, ChannelArgs args, CustomResourceOptions? opts = null)
public Channel(String name, ChannelArgs args)
public Channel(String name, ChannelArgs args, CustomResourceOptions options)
type: commercetools:Channel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ChannelArgs
- 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 ChannelArgs
- 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 ChannelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ChannelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ChannelArgs
- 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 channelResource = new Commercetools.Channel("channelResource", new()
{
    Key = "string",
    Roles = new[]
    {
        "string",
    },
    Address = new Commercetools.Inputs.ChannelAddressArgs
    {
        Country = "string",
        Id = "string",
        StreetName = "string",
        Building = "string",
        City = "string",
        Company = "string",
        AdditionalStreetInfo = "string",
        Department = "string",
        Email = "string",
        ExternalId = "string",
        Fax = "string",
        Title = "string",
        Apartment = "string",
        Mobile = "string",
        LastName = "string",
        Key = "string",
        Phone = "string",
        PoBox = "string",
        PostalCode = "string",
        Region = "string",
        Salutation = "string",
        State = "string",
        AdditionalAddressInfo = "string",
        StreetNumber = "string",
        FirstName = "string",
    },
    ChannelId = "string",
    Custom = new Commercetools.Inputs.ChannelCustomArgs
    {
        TypeId = "string",
        Fields = 
        {
            { "string", "string" },
        },
    },
    Description = 
    {
        { "string", "string" },
    },
    Geolocation = new Commercetools.Inputs.ChannelGeolocationArgs
    {
        Coordinates = new[]
        {
            0,
        },
    },
    Name = 
    {
        { "string", "string" },
    },
});
example, err := commercetools.NewChannel(ctx, "channelResource", &commercetools.ChannelArgs{
Key: pulumi.String("string"),
Roles: pulumi.StringArray{
pulumi.String("string"),
},
Address: &.ChannelAddressArgs{
Country: pulumi.String("string"),
Id: pulumi.String("string"),
StreetName: pulumi.String("string"),
Building: pulumi.String("string"),
City: pulumi.String("string"),
Company: pulumi.String("string"),
AdditionalStreetInfo: pulumi.String("string"),
Department: pulumi.String("string"),
Email: pulumi.String("string"),
ExternalId: pulumi.String("string"),
Fax: pulumi.String("string"),
Title: pulumi.String("string"),
Apartment: pulumi.String("string"),
Mobile: pulumi.String("string"),
LastName: pulumi.String("string"),
Key: pulumi.String("string"),
Phone: pulumi.String("string"),
PoBox: pulumi.String("string"),
PostalCode: pulumi.String("string"),
Region: pulumi.String("string"),
Salutation: pulumi.String("string"),
State: pulumi.String("string"),
AdditionalAddressInfo: pulumi.String("string"),
StreetNumber: pulumi.String("string"),
FirstName: pulumi.String("string"),
},
ChannelId: pulumi.String("string"),
Custom: &.ChannelCustomArgs{
TypeId: pulumi.String("string"),
Fields: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
Description: pulumi.StringMap{
"string": pulumi.String("string"),
},
Geolocation: &.ChannelGeolocationArgs{
Coordinates: pulumi.Float64Array{
pulumi.Float64(0),
},
},
Name: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var channelResource = new Channel("channelResource", ChannelArgs.builder()
    .key("string")
    .roles("string")
    .address(ChannelAddressArgs.builder()
        .country("string")
        .id("string")
        .streetName("string")
        .building("string")
        .city("string")
        .company("string")
        .additionalStreetInfo("string")
        .department("string")
        .email("string")
        .externalId("string")
        .fax("string")
        .title("string")
        .apartment("string")
        .mobile("string")
        .lastName("string")
        .key("string")
        .phone("string")
        .poBox("string")
        .postalCode("string")
        .region("string")
        .salutation("string")
        .state("string")
        .additionalAddressInfo("string")
        .streetNumber("string")
        .firstName("string")
        .build())
    .channelId("string")
    .custom(ChannelCustomArgs.builder()
        .typeId("string")
        .fields(Map.of("string", "string"))
        .build())
    .description(Map.of("string", "string"))
    .geolocation(ChannelGeolocationArgs.builder()
        .coordinates(0)
        .build())
    .name(Map.of("string", "string"))
    .build());
channel_resource = commercetools.Channel("channelResource",
    key="string",
    roles=["string"],
    address={
        "country": "string",
        "id": "string",
        "street_name": "string",
        "building": "string",
        "city": "string",
        "company": "string",
        "additional_street_info": "string",
        "department": "string",
        "email": "string",
        "external_id": "string",
        "fax": "string",
        "title": "string",
        "apartment": "string",
        "mobile": "string",
        "last_name": "string",
        "key": "string",
        "phone": "string",
        "po_box": "string",
        "postal_code": "string",
        "region": "string",
        "salutation": "string",
        "state": "string",
        "additional_address_info": "string",
        "street_number": "string",
        "first_name": "string",
    },
    channel_id="string",
    custom={
        "type_id": "string",
        "fields": {
            "string": "string",
        },
    },
    description={
        "string": "string",
    },
    geolocation={
        "coordinates": [0],
    },
    name={
        "string": "string",
    })
const channelResource = new commercetools.Channel("channelResource", {
    key: "string",
    roles: ["string"],
    address: {
        country: "string",
        id: "string",
        streetName: "string",
        building: "string",
        city: "string",
        company: "string",
        additionalStreetInfo: "string",
        department: "string",
        email: "string",
        externalId: "string",
        fax: "string",
        title: "string",
        apartment: "string",
        mobile: "string",
        lastName: "string",
        key: "string",
        phone: "string",
        poBox: "string",
        postalCode: "string",
        region: "string",
        salutation: "string",
        state: "string",
        additionalAddressInfo: "string",
        streetNumber: "string",
        firstName: "string",
    },
    channelId: "string",
    custom: {
        typeId: "string",
        fields: {
            string: "string",
        },
    },
    description: {
        string: "string",
    },
    geolocation: {
        coordinates: [0],
    },
    name: {
        string: "string",
    },
});
type: commercetools:Channel
properties:
    address:
        additionalAddressInfo: string
        additionalStreetInfo: string
        apartment: string
        building: string
        city: string
        company: string
        country: string
        department: string
        email: string
        externalId: string
        fax: string
        firstName: string
        id: string
        key: string
        lastName: string
        mobile: string
        phone: string
        poBox: string
        postalCode: string
        region: string
        salutation: string
        state: string
        streetName: string
        streetNumber: string
        title: string
    channelId: string
    custom:
        fields:
            string: string
        typeId: string
    description:
        string: string
    geolocation:
        coordinates:
            - 0
    key: string
    name:
        string: string
    roles:
        - string
Channel 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 Channel resource accepts the following input properties:
- Key string
- Any arbitrary string key that uniquely identifies this channel within the project
- Roles List<string>
- The roles of this channel. Each channel must have at least one role
- Address
ChannelAddress 
- ChannelId string
- The ID of this resource.
- Custom
ChannelCustom 
- Description Dictionary<string, string>
- LocalizedString
- Geolocation
ChannelGeolocation 
- Name Dictionary<string, string>
- LocalizedString
- Key string
- Any arbitrary string key that uniquely identifies this channel within the project
- Roles []string
- The roles of this channel. Each channel must have at least one role
- Address
ChannelAddress Args 
- ChannelId string
- The ID of this resource.
- Custom
ChannelCustom Args 
- Description map[string]string
- LocalizedString
- Geolocation
ChannelGeolocation Args 
- Name map[string]string
- LocalizedString
- key String
- Any arbitrary string key that uniquely identifies this channel within the project
- roles List<String>
- The roles of this channel. Each channel must have at least one role
- address
ChannelAddress 
- channelId String
- The ID of this resource.
- custom
ChannelCustom 
- description Map<String,String>
- LocalizedString
- geolocation
ChannelGeolocation 
- name Map<String,String>
- LocalizedString
- key string
- Any arbitrary string key that uniquely identifies this channel within the project
- roles string[]
- The roles of this channel. Each channel must have at least one role
- address
ChannelAddress 
- channelId string
- The ID of this resource.
- custom
ChannelCustom 
- description {[key: string]: string}
- LocalizedString
- geolocation
ChannelGeolocation 
- name {[key: string]: string}
- LocalizedString
- key str
- Any arbitrary string key that uniquely identifies this channel within the project
- roles Sequence[str]
- The roles of this channel. Each channel must have at least one role
- address
ChannelAddress Args 
- channel_id str
- The ID of this resource.
- custom
ChannelCustom Args 
- description Mapping[str, str]
- LocalizedString
- geolocation
ChannelGeolocation Args 
- name Mapping[str, str]
- LocalizedString
- key String
- Any arbitrary string key that uniquely identifies this channel within the project
- roles List<String>
- The roles of this channel. Each channel must have at least one role
- address Property Map
- channelId String
- The ID of this resource.
- custom Property Map
- description Map<String>
- LocalizedString
- geolocation Property Map
- name Map<String>
- LocalizedString
Outputs
All input properties are implicitly available as output properties. Additionally, the Channel resource produces the following output properties:
Look up Existing Channel Resource
Get an existing Channel 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?: ChannelState, opts?: CustomResourceOptions): Channel@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        address: Optional[ChannelAddressArgs] = None,
        channel_id: Optional[str] = None,
        custom: Optional[ChannelCustomArgs] = None,
        description: Optional[Mapping[str, str]] = None,
        geolocation: Optional[ChannelGeolocationArgs] = None,
        key: Optional[str] = None,
        name: Optional[Mapping[str, str]] = None,
        roles: Optional[Sequence[str]] = None,
        version: Optional[float] = None) -> Channelfunc GetChannel(ctx *Context, name string, id IDInput, state *ChannelState, opts ...ResourceOption) (*Channel, error)public static Channel Get(string name, Input<string> id, ChannelState? state, CustomResourceOptions? opts = null)public static Channel get(String name, Output<String> id, ChannelState state, CustomResourceOptions options)resources:  _:    type: commercetools:Channel    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Address
ChannelAddress 
- ChannelId string
- The ID of this resource.
- Custom
ChannelCustom 
- Description Dictionary<string, string>
- LocalizedString
- Geolocation
ChannelGeolocation 
- Key string
- Any arbitrary string key that uniquely identifies this channel within the project
- Name Dictionary<string, string>
- LocalizedString
- Roles List<string>
- The roles of this channel. Each channel must have at least one role
- Version double
- Address
ChannelAddress Args 
- ChannelId string
- The ID of this resource.
- Custom
ChannelCustom Args 
- Description map[string]string
- LocalizedString
- Geolocation
ChannelGeolocation Args 
- Key string
- Any arbitrary string key that uniquely identifies this channel within the project
- Name map[string]string
- LocalizedString
- Roles []string
- The roles of this channel. Each channel must have at least one role
- Version float64
- address
ChannelAddress 
- channelId String
- The ID of this resource.
- custom
ChannelCustom 
- description Map<String,String>
- LocalizedString
- geolocation
ChannelGeolocation 
- key String
- Any arbitrary string key that uniquely identifies this channel within the project
- name Map<String,String>
- LocalizedString
- roles List<String>
- The roles of this channel. Each channel must have at least one role
- version Double
- address
ChannelAddress 
- channelId string
- The ID of this resource.
- custom
ChannelCustom 
- description {[key: string]: string}
- LocalizedString
- geolocation
ChannelGeolocation 
- key string
- Any arbitrary string key that uniquely identifies this channel within the project
- name {[key: string]: string}
- LocalizedString
- roles string[]
- The roles of this channel. Each channel must have at least one role
- version number
- address
ChannelAddress Args 
- channel_id str
- The ID of this resource.
- custom
ChannelCustom Args 
- description Mapping[str, str]
- LocalizedString
- geolocation
ChannelGeolocation Args 
- key str
- Any arbitrary string key that uniquely identifies this channel within the project
- name Mapping[str, str]
- LocalizedString
- roles Sequence[str]
- The roles of this channel. Each channel must have at least one role
- version float
- address Property Map
- channelId String
- The ID of this resource.
- custom Property Map
- description Map<String>
- LocalizedString
- geolocation Property Map
- key String
- Any arbitrary string key that uniquely identifies this channel within the project
- name Map<String>
- LocalizedString
- roles List<String>
- The roles of this channel. Each channel must have at least one role
- version Number
Supporting Types
ChannelAddress, ChannelAddressArgs    
- Country string
- AdditionalAddress stringInfo 
- AdditionalStreet stringInfo 
- Apartment string
- Building string
- City string
- Company string
- Department string
- Email string
- ExternalId string
- Fax string
- FirstName string
- Id string
- Key string
- LastName string
- Mobile string
- Phone string
- PoBox string
- PostalCode string
- Region string
- Salutation string
- State string
- StreetName string
- StreetNumber string
- Title string
- Country string
- AdditionalAddress stringInfo 
- AdditionalStreet stringInfo 
- Apartment string
- Building string
- City string
- Company string
- Department string
- Email string
- ExternalId string
- Fax string
- FirstName string
- Id string
- Key string
- LastName string
- Mobile string
- Phone string
- PoBox string
- PostalCode string
- Region string
- Salutation string
- State string
- StreetName string
- StreetNumber string
- Title string
- country String
- additionalAddress StringInfo 
- additionalStreet StringInfo 
- apartment String
- building String
- city String
- company String
- department String
- email String
- externalId String
- fax String
- firstName String
- id String
- key String
- lastName String
- mobile String
- phone String
- poBox String
- postalCode String
- region String
- salutation String
- state String
- streetName String
- streetNumber String
- title String
- country string
- additionalAddress stringInfo 
- additionalStreet stringInfo 
- apartment string
- building string
- city string
- company string
- department string
- email string
- externalId string
- fax string
- firstName string
- id string
- key string
- lastName string
- mobile string
- phone string
- poBox string
- postalCode string
- region string
- salutation string
- state string
- streetName string
- streetNumber string
- title string
- country str
- additional_address_ strinfo 
- additional_street_ strinfo 
- apartment str
- building str
- city str
- company str
- department str
- email str
- external_id str
- fax str
- first_name str
- id str
- key str
- last_name str
- mobile str
- phone str
- po_box str
- postal_code str
- region str
- salutation str
- state str
- street_name str
- street_number str
- title str
- country String
- additionalAddress StringInfo 
- additionalStreet StringInfo 
- apartment String
- building String
- city String
- company String
- department String
- email String
- externalId String
- fax String
- firstName String
- id String
- key String
- lastName String
- mobile String
- phone String
- poBox String
- postalCode String
- region String
- salutation String
- state String
- streetName String
- streetNumber String
- title String
ChannelCustom, ChannelCustomArgs    
ChannelGeolocation, ChannelGeolocationArgs    
- Coordinates List<double>
- Coordinates []float64
- coordinates List<Double>
- coordinates number[]
- coordinates Sequence[float]
- coordinates List<Number>
Package Details
- Repository
- commercetools labd/terraform-provider-commercetools
- License
- Notes
- This Pulumi package is based on the commercetoolsTerraform Provider.