1. Packages
  2. Scaleway
  3. API Docs
  4. IotRoute
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.IotRoute

Explore with Pulumi AI

Deprecated: scaleway.index/iotroute.IotRoute has been deprecated in favor of scaleway.iot/route.Route

Example Usage

Database Route

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const mainHub = new scaleway.iot.Hub("main", {
    name: "main",
    productPlan: "plan_shared",
});
const iot = new scaleway.databases.Instance("iot", {
    name: "iot",
    nodeType: "db-dev-s",
    engine: "PostgreSQL-12",
    userName: "root",
    password: "T3stP4ssw0rdD0N0tUs3!",
});
const main = new scaleway.iot.Route("main", {
    name: "default",
    hubId: mainHub.id,
    topic: "#",
    database: {
        query: `INSERT INTO measurements(
\x09push_time,
\x09report_time,
\x09station_id,
\x09temperature,
\x09humidity
) VALUES (
\x09NOW(),
\x09TIMESTAMP 'epoch' + ((PAYLOAD::jsonb->'last_reported')::integer * INTERVAL '1 second'),
\x09(PAYLOAD::jsonb->'station_id')::uuid,
\x09(PAYLOAD::jsonb->'temperature')::decimal,
\x09(PAYLOAD::jsonb->'humidity'):decimal:
);
`,
        host: iot.endpointIp,
        port: iot.endpointPort,
        dbname: "rdb",
        username: iot.userName,
        password: iot.password,
    },
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main_hub = scaleway.iot.Hub("main",
    name="main",
    product_plan="plan_shared")
iot = scaleway.databases.Instance("iot",
    name="iot",
    node_type="db-dev-s",
    engine="PostgreSQL-12",
    user_name="root",
    password="T3stP4ssw0rdD0N0tUs3!")
main = scaleway.iot.Route("main",
    name="default",
    hub_id=main_hub.id,
    topic="#",
    database={
        "query": """INSERT INTO measurements(
\x09push_time,
\x09report_time,
\x09station_id,
\x09temperature,
\x09humidity
) VALUES (
\x09NOW(),
\x09TIMESTAMP 'epoch' + (($PAYLOAD::jsonb->'last_reported')::integer * INTERVAL '1 second'),
\x09($PAYLOAD::jsonb->'station_id')::uuid,
\x09($PAYLOAD::jsonb->'temperature')::decimal,
\x09($PAYLOAD::jsonb->'humidity'):decimal:
);
""",
        "host": iot.endpoint_ip,
        "port": iot.endpoint_port,
        "dbname": "rdb",
        "username": iot.user_name,
        "password": iot.password,
    })
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/databases"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iot"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		mainHub, err := iot.NewHub(ctx, "main", &iot.HubArgs{
			Name:        pulumi.String("main"),
			ProductPlan: pulumi.String("plan_shared"),
		})
		if err != nil {
			return err
		}
		iot, err := databases.NewInstance(ctx, "iot", &databases.InstanceArgs{
			Name:     pulumi.String("iot"),
			NodeType: pulumi.String("db-dev-s"),
			Engine:   pulumi.String("PostgreSQL-12"),
			UserName: pulumi.String("root"),
			Password: pulumi.String("T3stP4ssw0rdD0N0tUs3!"),
		})
		if err != nil {
			return err
		}
		_, err = iot.NewRoute(ctx, "main", &iot.RouteArgs{
			Name:  pulumi.String("default"),
			HubId: mainHub.ID(),
			Topic: pulumi.String("#"),
			Database: &iot.RouteDatabaseArgs{
				Query: pulumi.String(`INSERT INTO measurements(
	push_time,
	report_time,
	station_id,
	temperature,
	humidity
) VALUES (
	NOW(),
	TIMESTAMP 'epoch' + (($PAYLOAD::jsonb->'last_reported')::integer * INTERVAL '1 second'),
	($PAYLOAD::jsonb->'station_id')::uuid,
	($PAYLOAD::jsonb->'temperature')::decimal,
	($PAYLOAD::jsonb->'humidity'):decimal:
);
`),
				Host:     iot.EndpointIp,
				Port:     iot.EndpointPort,
				Dbname:   pulumi.String("rdb"),
				Username: iot.UserName,
				Password: iot.Password,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var mainHub = new Scaleway.Iot.Hub("main", new()
    {
        Name = "main",
        ProductPlan = "plan_shared",
    });

    var iot = new Scaleway.Databases.Instance("iot", new()
    {
        Name = "iot",
        NodeType = "db-dev-s",
        Engine = "PostgreSQL-12",
        UserName = "root",
        Password = "T3stP4ssw0rdD0N0tUs3!",
    });

    var main = new Scaleway.Iot.Route("main", new()
    {
        Name = "default",
        HubId = mainHub.Id,
        Topic = "#",
        Database = new Scaleway.Iot.Inputs.RouteDatabaseArgs
        {
            Query = @"INSERT INTO measurements(
	push_time,
	report_time,
	station_id,
	temperature,
	humidity
) VALUES (
	NOW(),
	TIMESTAMP 'epoch' + (($PAYLOAD::jsonb->'last_reported')::integer * INTERVAL '1 second'),
	($PAYLOAD::jsonb->'station_id')::uuid,
	($PAYLOAD::jsonb->'temperature')::decimal,
	($PAYLOAD::jsonb->'humidity'):decimal:
);
",
            Host = iot.EndpointIp,
            Port = iot.EndpointPort,
            Dbname = "rdb",
            Username = iot.UserName,
            Password = iot.Password,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iot.Hub;
import com.pulumi.scaleway.iot.HubArgs;
import com.pulumi.scaleway.databases.Instance;
import com.pulumi.scaleway.databases.InstanceArgs;
import com.pulumi.scaleway.iot.Route;
import com.pulumi.scaleway.iot.RouteArgs;
import com.pulumi.scaleway.iot.inputs.RouteDatabaseArgs;
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 mainHub = new Hub("mainHub", HubArgs.builder()
            .name("main")
            .productPlan("plan_shared")
            .build());

        var iot = new Instance("iot", InstanceArgs.builder()
            .name("iot")
            .nodeType("db-dev-s")
            .engine("PostgreSQL-12")
            .userName("root")
            .password("T3stP4ssw0rdD0N0tUs3!")
            .build());

        var main = new Route("main", RouteArgs.builder()
            .name("default")
            .hubId(mainHub.id())
            .topic("#")
            .database(RouteDatabaseArgs.builder()
                .query("""
INSERT INTO measurements(
	push_time,
	report_time,
	station_id,
	temperature,
	humidity
) VALUES (
	NOW(),
	TIMESTAMP 'epoch' + (($PAYLOAD::jsonb->'last_reported')::integer * INTERVAL '1 second'),
	($PAYLOAD::jsonb->'station_id')::uuid,
	($PAYLOAD::jsonb->'temperature')::decimal,
	($PAYLOAD::jsonb->'humidity'):decimal:
);
                """)
                .host(iot.endpointIp())
                .port(iot.endpointPort())
                .dbname("rdb")
                .username(iot.userName())
                .password(iot.password())
                .build())
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:iot:Route
    properties:
      name: default
      hubId: ${mainHub.id}
      topic: '#'
      database:
        query: |
          INSERT INTO measurements(
          	push_time,
          	report_time,
          	station_id,
          	temperature,
          	humidity
          ) VALUES (
          	NOW(),
          	TIMESTAMP 'epoch' + (($PAYLOAD::jsonb->'last_reported')::integer * INTERVAL '1 second'),
          	($PAYLOAD::jsonb->'station_id')::uuid,
          	($PAYLOAD::jsonb->'temperature')::decimal,
          	($PAYLOAD::jsonb->'humidity'):decimal:
          );          
        host: ${iot.endpointIp}
        port: ${iot.endpointPort}
        dbname: rdb
        username: ${iot.userName}
        password: ${iot.password}
  mainHub:
    type: scaleway:iot:Hub
    name: main
    properties:
      name: main
      productPlan: plan_shared
  iot:
    type: scaleway:databases:Instance
    properties:
      name: iot
      nodeType: db-dev-s
      engine: PostgreSQL-12
      userName: root
      password: T3stP4ssw0rdD0N0tUs3!
Copy

S3 Route

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const mainHub = new scaleway.iot.Hub("main", {
    name: "main",
    productPlan: "plan_shared",
});
const mainBucket = new scaleway.object.Bucket("main", {
    region: "fr-par",
    name: "my_awesome-bucket",
});
const main = new scaleway.iot.Route("main", {
    name: "main",
    hubId: mainHub.id,
    topic: "#",
    s3: {
        bucketRegion: mainBucket.region,
        bucketName: mainBucket.name,
        objectPrefix: "foo",
        strategy: "per_topic",
    },
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main_hub = scaleway.iot.Hub("main",
    name="main",
    product_plan="plan_shared")
main_bucket = scaleway.object.Bucket("main",
    region="fr-par",
    name="my_awesome-bucket")
main = scaleway.iot.Route("main",
    name="main",
    hub_id=main_hub.id,
    topic="#",
    s3={
        "bucket_region": main_bucket.region,
        "bucket_name": main_bucket.name,
        "object_prefix": "foo",
        "strategy": "per_topic",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iot"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/object"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		mainHub, err := iot.NewHub(ctx, "main", &iot.HubArgs{
			Name:        pulumi.String("main"),
			ProductPlan: pulumi.String("plan_shared"),
		})
		if err != nil {
			return err
		}
		mainBucket, err := object.NewBucket(ctx, "main", &object.BucketArgs{
			Region: pulumi.String("fr-par"),
			Name:   pulumi.String("my_awesome-bucket"),
		})
		if err != nil {
			return err
		}
		_, err = iot.NewRoute(ctx, "main", &iot.RouteArgs{
			Name:  pulumi.String("main"),
			HubId: mainHub.ID(),
			Topic: pulumi.String("#"),
			S3: &iot.RouteS3Args{
				BucketRegion: mainBucket.Region,
				BucketName:   mainBucket.Name,
				ObjectPrefix: pulumi.String("foo"),
				Strategy:     pulumi.String("per_topic"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var mainHub = new Scaleway.Iot.Hub("main", new()
    {
        Name = "main",
        ProductPlan = "plan_shared",
    });

    var mainBucket = new Scaleway.Object.Bucket("main", new()
    {
        Region = "fr-par",
        Name = "my_awesome-bucket",
    });

    var main = new Scaleway.Iot.Route("main", new()
    {
        Name = "main",
        HubId = mainHub.Id,
        Topic = "#",
        S3 = new Scaleway.Iot.Inputs.RouteS3Args
        {
            BucketRegion = mainBucket.Region,
            BucketName = mainBucket.Name,
            ObjectPrefix = "foo",
            Strategy = "per_topic",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iot.Hub;
import com.pulumi.scaleway.iot.HubArgs;
import com.pulumi.scaleway.object.Bucket;
import com.pulumi.scaleway.object.BucketArgs;
import com.pulumi.scaleway.iot.Route;
import com.pulumi.scaleway.iot.RouteArgs;
import com.pulumi.scaleway.iot.inputs.RouteS3Args;
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 mainHub = new Hub("mainHub", HubArgs.builder()
            .name("main")
            .productPlan("plan_shared")
            .build());

        var mainBucket = new Bucket("mainBucket", BucketArgs.builder()
            .region("fr-par")
            .name("my_awesome-bucket")
            .build());

        var main = new Route("main", RouteArgs.builder()
            .name("main")
            .hubId(mainHub.id())
            .topic("#")
            .s3(RouteS3Args.builder()
                .bucketRegion(mainBucket.region())
                .bucketName(mainBucket.name())
                .objectPrefix("foo")
                .strategy("per_topic")
                .build())
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:iot:Route
    properties:
      name: main
      hubId: ${mainHub.id}
      topic: '#'
      s3:
        bucketRegion: ${mainBucket.region}
        bucketName: ${mainBucket.name}
        objectPrefix: foo
        strategy: per_topic
  mainHub:
    type: scaleway:iot:Hub
    name: main
    properties:
      name: main
      productPlan: plan_shared
  mainBucket:
    type: scaleway:object:Bucket
    name: main
    properties:
      region: fr-par
      name: my_awesome-bucket
Copy

Rest Route

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const mainHub = new scaleway.iot.Hub("main", {
    name: "main",
    productPlan: "plan_shared",
});
const main = new scaleway.iot.Route("main", {
    name: "main",
    hubId: mainHub.id,
    topic: "#",
    rest: {
        verb: "get",
        uri: "http://scaleway.com",
        headers: {
            "X-awesome-header": "my-awesome-value",
        },
    },
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main_hub = scaleway.iot.Hub("main",
    name="main",
    product_plan="plan_shared")
main = scaleway.iot.Route("main",
    name="main",
    hub_id=main_hub.id,
    topic="#",
    rest={
        "verb": "get",
        "uri": "http://scaleway.com",
        "headers": {
            "X-awesome-header": "my-awesome-value",
        },
    })
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iot"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		mainHub, err := iot.NewHub(ctx, "main", &iot.HubArgs{
			Name:        pulumi.String("main"),
			ProductPlan: pulumi.String("plan_shared"),
		})
		if err != nil {
			return err
		}
		_, err = iot.NewRoute(ctx, "main", &iot.RouteArgs{
			Name:  pulumi.String("main"),
			HubId: mainHub.ID(),
			Topic: pulumi.String("#"),
			Rest: &iot.RouteRestArgs{
				Verb: pulumi.String("get"),
				Uri:  pulumi.String("http://scaleway.com"),
				Headers: pulumi.StringMap{
					"X-awesome-header": pulumi.String("my-awesome-value"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var mainHub = new Scaleway.Iot.Hub("main", new()
    {
        Name = "main",
        ProductPlan = "plan_shared",
    });

    var main = new Scaleway.Iot.Route("main", new()
    {
        Name = "main",
        HubId = mainHub.Id,
        Topic = "#",
        Rest = new Scaleway.Iot.Inputs.RouteRestArgs
        {
            Verb = "get",
            Uri = "http://scaleway.com",
            Headers = 
            {
                { "X-awesome-header", "my-awesome-value" },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iot.Hub;
import com.pulumi.scaleway.iot.HubArgs;
import com.pulumi.scaleway.iot.Route;
import com.pulumi.scaleway.iot.RouteArgs;
import com.pulumi.scaleway.iot.inputs.RouteRestArgs;
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 mainHub = new Hub("mainHub", HubArgs.builder()
            .name("main")
            .productPlan("plan_shared")
            .build());

        var main = new Route("main", RouteArgs.builder()
            .name("main")
            .hubId(mainHub.id())
            .topic("#")
            .rest(RouteRestArgs.builder()
                .verb("get")
                .uri("http://scaleway.com")
                .headers(Map.of("X-awesome-header", "my-awesome-value"))
                .build())
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:iot:Route
    properties:
      name: main
      hubId: ${mainHub.id}
      topic: '#'
      rest:
        verb: get
        uri: http://scaleway.com
        headers:
          X-awesome-header: my-awesome-value
  mainHub:
    type: scaleway:iot:Hub
    name: main
    properties:
      name: main
      productPlan: plan_shared
Copy

Create IotRoute Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new IotRoute(name: string, args: IotRouteArgs, opts?: CustomResourceOptions);
@overload
def IotRoute(resource_name: str,
             args: IotRouteArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def IotRoute(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             database: Optional[IotRouteDatabaseArgs] = None,
             hub_id: Optional[str] = None,
             name: Optional[str] = None,
             region: Optional[str] = None,
             rest: Optional[IotRouteRestArgs] = None,
             s3: Optional[IotRouteS3Args] = None,
             topic: Optional[str] = None)
func NewIotRoute(ctx *Context, name string, args IotRouteArgs, opts ...ResourceOption) (*IotRoute, error)
public IotRoute(string name, IotRouteArgs args, CustomResourceOptions? opts = null)
public IotRoute(String name, IotRouteArgs args)
public IotRoute(String name, IotRouteArgs args, CustomResourceOptions options)
type: scaleway:IotRoute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. IotRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. IotRouteArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. IotRouteArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. IotRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. IotRouteArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

IotRoute 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 IotRoute resource accepts the following input properties:

HubId
This property is required.
Changes to this property will trigger replacement.
string
The hub ID to which the Route will be attached to.
Topic
This property is required.
Changes to this property will trigger replacement.
string
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
Database Changes to this property will trigger replacement. Pulumiverse.Scaleway.Inputs.IotRouteDatabase
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
Name Changes to this property will trigger replacement. string
The name of the IoT Route you want to create (e.g. my-route).
Region Changes to this property will trigger replacement. string
(Defaults to provider region) The region in which the Route is attached to.
Rest Changes to this property will trigger replacement. Pulumiverse.Scaleway.Inputs.IotRouteRest
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
S3 Changes to this property will trigger replacement. Pulumiverse.Scaleway.Inputs.IotRouteS3
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
HubId
This property is required.
Changes to this property will trigger replacement.
string
The hub ID to which the Route will be attached to.
Topic
This property is required.
Changes to this property will trigger replacement.
string
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
Database Changes to this property will trigger replacement. IotRouteDatabaseArgs
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
Name Changes to this property will trigger replacement. string
The name of the IoT Route you want to create (e.g. my-route).
Region Changes to this property will trigger replacement. string
(Defaults to provider region) The region in which the Route is attached to.
Rest Changes to this property will trigger replacement. IotRouteRestArgs
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
S3 Changes to this property will trigger replacement. IotRouteS3Args
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
hubId
This property is required.
Changes to this property will trigger replacement.
String
The hub ID to which the Route will be attached to.
topic
This property is required.
Changes to this property will trigger replacement.
String
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
database Changes to this property will trigger replacement. IotRouteDatabase
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
name Changes to this property will trigger replacement. String
The name of the IoT Route you want to create (e.g. my-route).
region Changes to this property will trigger replacement. String
(Defaults to provider region) The region in which the Route is attached to.
rest Changes to this property will trigger replacement. IotRouteRest
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
s3 Changes to this property will trigger replacement. IotRouteS3
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
hubId
This property is required.
Changes to this property will trigger replacement.
string
The hub ID to which the Route will be attached to.
topic
This property is required.
Changes to this property will trigger replacement.
string
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
database Changes to this property will trigger replacement. IotRouteDatabase
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
name Changes to this property will trigger replacement. string
The name of the IoT Route you want to create (e.g. my-route).
region Changes to this property will trigger replacement. string
(Defaults to provider region) The region in which the Route is attached to.
rest Changes to this property will trigger replacement. IotRouteRest
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
s3 Changes to this property will trigger replacement. IotRouteS3
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
hub_id
This property is required.
Changes to this property will trigger replacement.
str
The hub ID to which the Route will be attached to.
topic
This property is required.
Changes to this property will trigger replacement.
str
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
database Changes to this property will trigger replacement. IotRouteDatabaseArgs
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
name Changes to this property will trigger replacement. str
The name of the IoT Route you want to create (e.g. my-route).
region Changes to this property will trigger replacement. str
(Defaults to provider region) The region in which the Route is attached to.
rest Changes to this property will trigger replacement. IotRouteRestArgs
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
s3 Changes to this property will trigger replacement. IotRouteS3Args
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
hubId
This property is required.
Changes to this property will trigger replacement.
String
The hub ID to which the Route will be attached to.
topic
This property is required.
Changes to this property will trigger replacement.
String
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
database Changes to this property will trigger replacement. Property Map
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
name Changes to this property will trigger replacement. String
The name of the IoT Route you want to create (e.g. my-route).
region Changes to this property will trigger replacement. String
(Defaults to provider region) The region in which the Route is attached to.
rest Changes to this property will trigger replacement. Property Map
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
s3 Changes to this property will trigger replacement. Property Map
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.

Outputs

All input properties are implicitly available as output properties. Additionally, the IotRoute resource produces the following output properties:

CreatedAt string
The date and time the Route was created.
Id string
The provider-assigned unique ID for this managed resource.
CreatedAt string
The date and time the Route was created.
Id string
The provider-assigned unique ID for this managed resource.
createdAt String
The date and time the Route was created.
id String
The provider-assigned unique ID for this managed resource.
createdAt string
The date and time the Route was created.
id string
The provider-assigned unique ID for this managed resource.
created_at str
The date and time the Route was created.
id str
The provider-assigned unique ID for this managed resource.
createdAt String
The date and time the Route was created.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing IotRoute Resource

Get an existing IotRoute 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?: IotRouteState, opts?: CustomResourceOptions): IotRoute
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        database: Optional[IotRouteDatabaseArgs] = None,
        hub_id: Optional[str] = None,
        name: Optional[str] = None,
        region: Optional[str] = None,
        rest: Optional[IotRouteRestArgs] = None,
        s3: Optional[IotRouteS3Args] = None,
        topic: Optional[str] = None) -> IotRoute
func GetIotRoute(ctx *Context, name string, id IDInput, state *IotRouteState, opts ...ResourceOption) (*IotRoute, error)
public static IotRoute Get(string name, Input<string> id, IotRouteState? state, CustomResourceOptions? opts = null)
public static IotRoute get(String name, Output<String> id, IotRouteState state, CustomResourceOptions options)
resources:  _:    type: scaleway:IotRoute    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
CreatedAt string
The date and time the Route was created.
Database Changes to this property will trigger replacement. Pulumiverse.Scaleway.Inputs.IotRouteDatabase
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
HubId Changes to this property will trigger replacement. string
The hub ID to which the Route will be attached to.
Name Changes to this property will trigger replacement. string
The name of the IoT Route you want to create (e.g. my-route).
Region Changes to this property will trigger replacement. string
(Defaults to provider region) The region in which the Route is attached to.
Rest Changes to this property will trigger replacement. Pulumiverse.Scaleway.Inputs.IotRouteRest
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
S3 Changes to this property will trigger replacement. Pulumiverse.Scaleway.Inputs.IotRouteS3
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
Topic Changes to this property will trigger replacement. string
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
CreatedAt string
The date and time the Route was created.
Database Changes to this property will trigger replacement. IotRouteDatabaseArgs
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
HubId Changes to this property will trigger replacement. string
The hub ID to which the Route will be attached to.
Name Changes to this property will trigger replacement. string
The name of the IoT Route you want to create (e.g. my-route).
Region Changes to this property will trigger replacement. string
(Defaults to provider region) The region in which the Route is attached to.
Rest Changes to this property will trigger replacement. IotRouteRestArgs
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
S3 Changes to this property will trigger replacement. IotRouteS3Args
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
Topic Changes to this property will trigger replacement. string
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
createdAt String
The date and time the Route was created.
database Changes to this property will trigger replacement. IotRouteDatabase
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
hubId Changes to this property will trigger replacement. String
The hub ID to which the Route will be attached to.
name Changes to this property will trigger replacement. String
The name of the IoT Route you want to create (e.g. my-route).
region Changes to this property will trigger replacement. String
(Defaults to provider region) The region in which the Route is attached to.
rest Changes to this property will trigger replacement. IotRouteRest
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
s3 Changes to this property will trigger replacement. IotRouteS3
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
topic Changes to this property will trigger replacement. String
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
createdAt string
The date and time the Route was created.
database Changes to this property will trigger replacement. IotRouteDatabase
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
hubId Changes to this property will trigger replacement. string
The hub ID to which the Route will be attached to.
name Changes to this property will trigger replacement. string
The name of the IoT Route you want to create (e.g. my-route).
region Changes to this property will trigger replacement. string
(Defaults to provider region) The region in which the Route is attached to.
rest Changes to this property will trigger replacement. IotRouteRest
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
s3 Changes to this property will trigger replacement. IotRouteS3
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
topic Changes to this property will trigger replacement. string
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
created_at str
The date and time the Route was created.
database Changes to this property will trigger replacement. IotRouteDatabaseArgs
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
hub_id Changes to this property will trigger replacement. str
The hub ID to which the Route will be attached to.
name Changes to this property will trigger replacement. str
The name of the IoT Route you want to create (e.g. my-route).
region Changes to this property will trigger replacement. str
(Defaults to provider region) The region in which the Route is attached to.
rest Changes to this property will trigger replacement. IotRouteRestArgs
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
s3 Changes to this property will trigger replacement. IotRouteS3Args
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
topic Changes to this property will trigger replacement. str
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).
createdAt String
The date and time the Route was created.
database Changes to this property will trigger replacement. Property Map
Configuration block for the database routes. See product documentation for a better understanding of the parameters.
hubId Changes to this property will trigger replacement. String
The hub ID to which the Route will be attached to.
name Changes to this property will trigger replacement. String
The name of the IoT Route you want to create (e.g. my-route).
region Changes to this property will trigger replacement. String
(Defaults to provider region) The region in which the Route is attached to.
rest Changes to this property will trigger replacement. Property Map
Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
s3 Changes to this property will trigger replacement. Property Map
Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
topic Changes to this property will trigger replacement. String
The topic the Route subscribes to, wildcards allowed (e.g. thelab/+/temperature/#).

Supporting Types

IotRouteDatabase
, IotRouteDatabaseArgs

Dbname
This property is required.
Changes to this property will trigger replacement.
string
The database name (e.g. measurements).
Host
This property is required.
Changes to this property will trigger replacement.
string
The database hostname. Can be an IP or a FQDN.
Password
This property is required.
Changes to this property will trigger replacement.
string
The database password.
Port
This property is required.
Changes to this property will trigger replacement.
int
The database port (e.g. 5432)
Query
This property is required.
Changes to this property will trigger replacement.
string
The SQL query that will be executed when receiving a message ($TOPIC and $PAYLOAD variables are available, see documentation, e.g. INSERT INTO mytable(date, topic, value) VALUES (NOW(), $TOPIC, $PAYLOAD)).
Username
This property is required.
Changes to this property will trigger replacement.
string
The database username.
Dbname
This property is required.
Changes to this property will trigger replacement.
string
The database name (e.g. measurements).
Host
This property is required.
Changes to this property will trigger replacement.
string
The database hostname. Can be an IP or a FQDN.
Password
This property is required.
Changes to this property will trigger replacement.
string
The database password.
Port
This property is required.
Changes to this property will trigger replacement.
int
The database port (e.g. 5432)
Query
This property is required.
Changes to this property will trigger replacement.
string
The SQL query that will be executed when receiving a message ($TOPIC and $PAYLOAD variables are available, see documentation, e.g. INSERT INTO mytable(date, topic, value) VALUES (NOW(), $TOPIC, $PAYLOAD)).
Username
This property is required.
Changes to this property will trigger replacement.
string
The database username.
dbname
This property is required.
Changes to this property will trigger replacement.
String
The database name (e.g. measurements).
host
This property is required.
Changes to this property will trigger replacement.
String
The database hostname. Can be an IP or a FQDN.
password
This property is required.
Changes to this property will trigger replacement.
String
The database password.
port
This property is required.
Changes to this property will trigger replacement.
Integer
The database port (e.g. 5432)
query
This property is required.
Changes to this property will trigger replacement.
String
The SQL query that will be executed when receiving a message ($TOPIC and $PAYLOAD variables are available, see documentation, e.g. INSERT INTO mytable(date, topic, value) VALUES (NOW(), $TOPIC, $PAYLOAD)).
username
This property is required.
Changes to this property will trigger replacement.
String
The database username.
dbname
This property is required.
Changes to this property will trigger replacement.
string
The database name (e.g. measurements).
host
This property is required.
Changes to this property will trigger replacement.
string
The database hostname. Can be an IP or a FQDN.
password
This property is required.
Changes to this property will trigger replacement.
string
The database password.
port
This property is required.
Changes to this property will trigger replacement.
number
The database port (e.g. 5432)
query
This property is required.
Changes to this property will trigger replacement.
string
The SQL query that will be executed when receiving a message ($TOPIC and $PAYLOAD variables are available, see documentation, e.g. INSERT INTO mytable(date, topic, value) VALUES (NOW(), $TOPIC, $PAYLOAD)).
username
This property is required.
Changes to this property will trigger replacement.
string
The database username.
dbname
This property is required.
Changes to this property will trigger replacement.
str
The database name (e.g. measurements).
host
This property is required.
Changes to this property will trigger replacement.
str
The database hostname. Can be an IP or a FQDN.
password
This property is required.
Changes to this property will trigger replacement.
str
The database password.
port
This property is required.
Changes to this property will trigger replacement.
int
The database port (e.g. 5432)
query
This property is required.
Changes to this property will trigger replacement.
str
The SQL query that will be executed when receiving a message ($TOPIC and $PAYLOAD variables are available, see documentation, e.g. INSERT INTO mytable(date, topic, value) VALUES (NOW(), $TOPIC, $PAYLOAD)).
username
This property is required.
Changes to this property will trigger replacement.
str
The database username.
dbname
This property is required.
Changes to this property will trigger replacement.
String
The database name (e.g. measurements).
host
This property is required.
Changes to this property will trigger replacement.
String
The database hostname. Can be an IP or a FQDN.
password
This property is required.
Changes to this property will trigger replacement.
String
The database password.
port
This property is required.
Changes to this property will trigger replacement.
Number
The database port (e.g. 5432)
query
This property is required.
Changes to this property will trigger replacement.
String
The SQL query that will be executed when receiving a message ($TOPIC and $PAYLOAD variables are available, see documentation, e.g. INSERT INTO mytable(date, topic, value) VALUES (NOW(), $TOPIC, $PAYLOAD)).
username
This property is required.
Changes to this property will trigger replacement.
String
The database username.

IotRouteRest
, IotRouteRestArgs

Headers
This property is required.
Changes to this property will trigger replacement.
Dictionary<string, string>
a map of the extra headers to send with the HTTP call (e.g. X-Header = Value).
Uri
This property is required.
Changes to this property will trigger replacement.
string
The URI of the Rest endpoint (e.g. https://internal.mycompany.com/ingest/mqttdata).
Verb
This property is required.
Changes to this property will trigger replacement.
string
The HTTP Verb used to call Rest URI (e.g. post).
Headers
This property is required.
Changes to this property will trigger replacement.
map[string]string
a map of the extra headers to send with the HTTP call (e.g. X-Header = Value).
Uri
This property is required.
Changes to this property will trigger replacement.
string
The URI of the Rest endpoint (e.g. https://internal.mycompany.com/ingest/mqttdata).
Verb
This property is required.
Changes to this property will trigger replacement.
string
The HTTP Verb used to call Rest URI (e.g. post).
headers
This property is required.
Changes to this property will trigger replacement.
Map<String,String>
a map of the extra headers to send with the HTTP call (e.g. X-Header = Value).
uri
This property is required.
Changes to this property will trigger replacement.
String
The URI of the Rest endpoint (e.g. https://internal.mycompany.com/ingest/mqttdata).
verb
This property is required.
Changes to this property will trigger replacement.
String
The HTTP Verb used to call Rest URI (e.g. post).
headers
This property is required.
Changes to this property will trigger replacement.
{[key: string]: string}
a map of the extra headers to send with the HTTP call (e.g. X-Header = Value).
uri
This property is required.
Changes to this property will trigger replacement.
string
The URI of the Rest endpoint (e.g. https://internal.mycompany.com/ingest/mqttdata).
verb
This property is required.
Changes to this property will trigger replacement.
string
The HTTP Verb used to call Rest URI (e.g. post).
headers
This property is required.
Changes to this property will trigger replacement.
Mapping[str, str]
a map of the extra headers to send with the HTTP call (e.g. X-Header = Value).
uri
This property is required.
Changes to this property will trigger replacement.
str
The URI of the Rest endpoint (e.g. https://internal.mycompany.com/ingest/mqttdata).
verb
This property is required.
Changes to this property will trigger replacement.
str
The HTTP Verb used to call Rest URI (e.g. post).
headers
This property is required.
Changes to this property will trigger replacement.
Map<String>
a map of the extra headers to send with the HTTP call (e.g. X-Header = Value).
uri
This property is required.
Changes to this property will trigger replacement.
String
The URI of the Rest endpoint (e.g. https://internal.mycompany.com/ingest/mqttdata).
verb
This property is required.
Changes to this property will trigger replacement.
String
The HTTP Verb used to call Rest URI (e.g. post).

IotRouteS3
, IotRouteS3Args

BucketName
This property is required.
Changes to this property will trigger replacement.
string
The name of the S3 route's destination bucket (e.g. my-object-storage).
BucketRegion
This property is required.
Changes to this property will trigger replacement.
string
The region of the S3 route's destination bucket (e.g. fr-par).
Strategy
This property is required.
Changes to this property will trigger replacement.
string
How the S3 route's objects will be created (e.g. per_topic). See documentation for behaviour details.
ObjectPrefix Changes to this property will trigger replacement. string
The string to prefix object names with (e.g. mykeyprefix-).
BucketName
This property is required.
Changes to this property will trigger replacement.
string
The name of the S3 route's destination bucket (e.g. my-object-storage).
BucketRegion
This property is required.
Changes to this property will trigger replacement.
string
The region of the S3 route's destination bucket (e.g. fr-par).
Strategy
This property is required.
Changes to this property will trigger replacement.
string
How the S3 route's objects will be created (e.g. per_topic). See documentation for behaviour details.
ObjectPrefix Changes to this property will trigger replacement. string
The string to prefix object names with (e.g. mykeyprefix-).
bucketName
This property is required.
Changes to this property will trigger replacement.
String
The name of the S3 route's destination bucket (e.g. my-object-storage).
bucketRegion
This property is required.
Changes to this property will trigger replacement.
String
The region of the S3 route's destination bucket (e.g. fr-par).
strategy
This property is required.
Changes to this property will trigger replacement.
String
How the S3 route's objects will be created (e.g. per_topic). See documentation for behaviour details.
objectPrefix Changes to this property will trigger replacement. String
The string to prefix object names with (e.g. mykeyprefix-).
bucketName
This property is required.
Changes to this property will trigger replacement.
string
The name of the S3 route's destination bucket (e.g. my-object-storage).
bucketRegion
This property is required.
Changes to this property will trigger replacement.
string
The region of the S3 route's destination bucket (e.g. fr-par).
strategy
This property is required.
Changes to this property will trigger replacement.
string
How the S3 route's objects will be created (e.g. per_topic). See documentation for behaviour details.
objectPrefix Changes to this property will trigger replacement. string
The string to prefix object names with (e.g. mykeyprefix-).
bucket_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the S3 route's destination bucket (e.g. my-object-storage).
bucket_region
This property is required.
Changes to this property will trigger replacement.
str
The region of the S3 route's destination bucket (e.g. fr-par).
strategy
This property is required.
Changes to this property will trigger replacement.
str
How the S3 route's objects will be created (e.g. per_topic). See documentation for behaviour details.
object_prefix Changes to this property will trigger replacement. str
The string to prefix object names with (e.g. mykeyprefix-).
bucketName
This property is required.
Changes to this property will trigger replacement.
String
The name of the S3 route's destination bucket (e.g. my-object-storage).
bucketRegion
This property is required.
Changes to this property will trigger replacement.
String
The region of the S3 route's destination bucket (e.g. fr-par).
strategy
This property is required.
Changes to this property will trigger replacement.
String
How the S3 route's objects will be created (e.g. per_topic). See documentation for behaviour details.
objectPrefix Changes to this property will trigger replacement. String
The string to prefix object names with (e.g. mykeyprefix-).

Import

IoT Routes can be imported using the {region}/{id}, e.g.

bash

$ pulumi import scaleway:index/iotRoute:IotRoute route01 fr-par/11111111-1111-1111-1111-111111111111
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.