scaleway.iot.Route
Explore with Pulumi AI
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,
},
});
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,
})
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
})
}
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,
},
});
});
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());
}
}
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!
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",
},
});
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",
})
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
})
}
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",
},
});
});
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());
}
}
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
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",
},
},
});
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",
},
})
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
})
}
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" },
},
},
});
});
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());
}
}
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
Create Route Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Route(name: string, args: RouteArgs, opts?: CustomResourceOptions);
@overload
def Route(resource_name: str,
args: RouteArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Route(resource_name: str,
opts: Optional[ResourceOptions] = None,
hub_id: Optional[str] = None,
topic: Optional[str] = None,
database: Optional[RouteDatabaseArgs] = None,
name: Optional[str] = None,
region: Optional[str] = None,
rest: Optional[RouteRestArgs] = None,
s3: Optional[RouteS3Args] = None)
func NewRoute(ctx *Context, name string, args RouteArgs, opts ...ResourceOption) (*Route, error)
public Route(string name, RouteArgs args, CustomResourceOptions? opts = null)
type: scaleway:iot:Route
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. RouteArgs - 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. RouteArgs - 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. RouteArgs - 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. RouteArgs - 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. RouteArgs - 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 routeResource = new Scaleway.Iot.Route("routeResource", new()
{
HubId = "string",
Topic = "string",
Database = new Scaleway.Iot.Inputs.RouteDatabaseArgs
{
Dbname = "string",
Host = "string",
Password = "string",
Port = 0,
Query = "string",
Username = "string",
},
Name = "string",
Region = "string",
Rest = new Scaleway.Iot.Inputs.RouteRestArgs
{
Headers =
{
{ "string", "string" },
},
Uri = "string",
Verb = "string",
},
S3 = new Scaleway.Iot.Inputs.RouteS3Args
{
BucketName = "string",
BucketRegion = "string",
Strategy = "string",
ObjectPrefix = "string",
},
});
example, err := iot.NewRoute(ctx, "routeResource", &iot.RouteArgs{
HubId: pulumi.String("string"),
Topic: pulumi.String("string"),
Database: &iot.RouteDatabaseArgs{
Dbname: pulumi.String("string"),
Host: pulumi.String("string"),
Password: pulumi.String("string"),
Port: pulumi.Int(0),
Query: pulumi.String("string"),
Username: pulumi.String("string"),
},
Name: pulumi.String("string"),
Region: pulumi.String("string"),
Rest: &iot.RouteRestArgs{
Headers: pulumi.StringMap{
"string": pulumi.String("string"),
},
Uri: pulumi.String("string"),
Verb: pulumi.String("string"),
},
S3: &iot.RouteS3Args{
BucketName: pulumi.String("string"),
BucketRegion: pulumi.String("string"),
Strategy: pulumi.String("string"),
ObjectPrefix: pulumi.String("string"),
},
})
var routeResource = new Route("routeResource", RouteArgs.builder()
.hubId("string")
.topic("string")
.database(RouteDatabaseArgs.builder()
.dbname("string")
.host("string")
.password("string")
.port(0)
.query("string")
.username("string")
.build())
.name("string")
.region("string")
.rest(RouteRestArgs.builder()
.headers(Map.of("string", "string"))
.uri("string")
.verb("string")
.build())
.s3(RouteS3Args.builder()
.bucketName("string")
.bucketRegion("string")
.strategy("string")
.objectPrefix("string")
.build())
.build());
route_resource = scaleway.iot.Route("routeResource",
hub_id="string",
topic="string",
database={
"dbname": "string",
"host": "string",
"password": "string",
"port": 0,
"query": "string",
"username": "string",
},
name="string",
region="string",
rest={
"headers": {
"string": "string",
},
"uri": "string",
"verb": "string",
},
s3={
"bucket_name": "string",
"bucket_region": "string",
"strategy": "string",
"object_prefix": "string",
})
const routeResource = new scaleway.iot.Route("routeResource", {
hubId: "string",
topic: "string",
database: {
dbname: "string",
host: "string",
password: "string",
port: 0,
query: "string",
username: "string",
},
name: "string",
region: "string",
rest: {
headers: {
string: "string",
},
uri: "string",
verb: "string",
},
s3: {
bucketName: "string",
bucketRegion: "string",
strategy: "string",
objectPrefix: "string",
},
});
type: scaleway:iot:Route
properties:
database:
dbname: string
host: string
password: string
port: 0
query: string
username: string
hubId: string
name: string
region: string
rest:
headers:
string: string
uri: string
verb: string
s3:
bucketName: string
bucketRegion: string
objectPrefix: string
strategy: string
topic: string
Route 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 Route resource accepts the following input properties:
- Hub
Id This property is required. Changes to this property will trigger replacement.
- The hub ID to which the Route will be attached to.
- Topic
This property is required. Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
). - Database
Changes to this property will trigger replacement.
Scaleway. Iot. Inputs. Route Database - Configuration block for the database routes. See product documentation for a better understanding of the parameters.
- Name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - Region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - Rest
Changes to this property will trigger replacement.
Scaleway. Iot. Inputs. Route Rest - Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- S3
Changes to this property will trigger replacement.
Scaleway. Iot. Inputs. Route S3 - 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.
- The hub ID to which the Route will be attached to.
- Topic
This property is required. Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
). - Database
Changes to this property will trigger replacement.
Database Args - Configuration block for the database routes. See product documentation for a better understanding of the parameters.
- Name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - Region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - Rest
Changes to this property will trigger replacement.
Rest Args - Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- S3
Changes to this property will trigger replacement.
S3Args - 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.
- The hub ID to which the Route will be attached to.
- topic
This property is required. Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
). - database
Changes to this property will trigger replacement.
Database - Configuration block for the database routes. See product documentation for a better understanding of the parameters.
- name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - rest
Changes to this property will trigger replacement.
Rest - Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- s3
Changes to this property will trigger replacement.
S3 - 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.
- The hub ID to which the Route will be attached to.
- topic
This property is required. Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
). - database
Changes to this property will trigger replacement.
Database - Configuration block for the database routes. See product documentation for a better understanding of the parameters.
- name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - rest
Changes to this property will trigger replacement.
Rest - Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- s3
Changes to this property will trigger replacement.
S3 - 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.
- The hub ID to which the Route will be attached to.
- topic
This property is required. Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
). - database
Changes to this property will trigger replacement.
Database Args - Configuration block for the database routes. See product documentation for a better understanding of the parameters.
- name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - rest
Changes to this property will trigger replacement.
Rest Args - Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- s3
Changes to this property will trigger replacement.
S3Args - 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.
- The hub ID to which the Route will be attached to.
- topic
This property is required. Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
). - database
Changes to this property will trigger replacement.
- Configuration block for the database routes. See product documentation for a better understanding of the parameters.
- name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - rest
Changes to this property will trigger replacement.
- Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- s3
Changes to this property will trigger replacement.
- 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 Route resource produces the following output properties:
- created_
at str - The date and time the Route was created.
- id str
- The provider-assigned unique ID for this managed resource.
Look up Existing Route Resource
Get an existing Route 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?: RouteState, opts?: CustomResourceOptions): Route
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
database: Optional[RouteDatabaseArgs] = None,
hub_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
rest: Optional[RouteRestArgs] = None,
s3: Optional[RouteS3Args] = None,
topic: Optional[str] = None) -> Route
func GetRoute(ctx *Context, name string, id IDInput, state *RouteState, opts ...ResourceOption) (*Route, error)
public static Route Get(string name, Input<string> id, RouteState? state, CustomResourceOptions? opts = null)
public static Route get(String name, Output<String> id, RouteState state, CustomResourceOptions options)
resources: _: type: scaleway:iot:Route 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.
- Created
At string - The date and time the Route was created.
- Database
Changes to this property will trigger replacement.
Scaleway. Iot. Inputs. Route Database - 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.
- The hub ID to which the Route will be attached to.
- Name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - Region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - Rest
Changes to this property will trigger replacement.
Scaleway. Iot. Inputs. Route Rest - Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- S3
Changes to this property will trigger replacement.
Scaleway. Iot. Inputs. Route S3 - Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
- Topic
Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
).
- Created
At string - The date and time the Route was created.
- Database
Changes to this property will trigger replacement.
Database Args - 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.
- The hub ID to which the Route will be attached to.
- Name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - Region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - Rest
Changes to this property will trigger replacement.
Rest Args - Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- S3
Changes to this property will trigger replacement.
S3Args - Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
- Topic
Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
).
- created
At String - The date and time the Route was created.
- database
Changes to this property will trigger replacement.
Database - 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.
- The hub ID to which the Route will be attached to.
- name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - rest
Changes to this property will trigger replacement.
Rest - Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- s3
Changes to this property will trigger replacement.
S3 - Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
- topic
Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
).
- created
At string - The date and time the Route was created.
- database
Changes to this property will trigger replacement.
Database - 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.
- The hub ID to which the Route will be attached to.
- name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - rest
Changes to this property will trigger replacement.
Rest - Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- s3
Changes to this property will trigger replacement.
S3 - Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
- topic
Changes to this property will trigger replacement.
- 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.
Database Args - 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.
- The hub ID to which the Route will be attached to.
- name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - rest
Changes to this property will trigger replacement.
Rest Args - Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- s3
Changes to this property will trigger replacement.
S3Args - Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
- topic
Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
).
- created
At String - The date and time the Route was created.
- database
Changes to this property will trigger replacement.
- 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.
- The hub ID to which the Route will be attached to.
- name
Changes to this property will trigger replacement.
- The name of the IoT Route you want to create (e.g.
my-route
). - region
Changes to this property will trigger replacement.
- (Defaults to provider
region
) The region in which the Route is attached to. - rest
Changes to this property will trigger replacement.
- Configuration block for the rest routes. See product documentation for a better understanding of the parameters.
- s3
Changes to this property will trigger replacement.
- Configuration block for the S3 routes. See product documentation for a better understanding of the parameters.
- topic
Changes to this property will trigger replacement.
- The topic the Route subscribes to, wildcards allowed (e.g.
thelab/+/temperature/#
).
Supporting Types
RouteDatabase, RouteDatabaseArgs
- Dbname
This property is required. Changes to this property will trigger replacement.
- The database name (e.g.
measurements
). - Host
This property is required. Changes to this property will trigger replacement.
- The database hostname. Can be an IP or a FQDN.
- Password
This property is required. Changes to this property will trigger replacement.
- The database password.
- Port
This property is required. Changes to this property will trigger replacement.
- The database port (e.g.
5432
) - Query
This property is required. Changes to this property will trigger replacement.
- 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.
- The database username.
- Dbname
This property is required. Changes to this property will trigger replacement.
- The database name (e.g.
measurements
). - Host
This property is required. Changes to this property will trigger replacement.
- The database hostname. Can be an IP or a FQDN.
- Password
This property is required. Changes to this property will trigger replacement.
- The database password.
- Port
This property is required. Changes to this property will trigger replacement.
- The database port (e.g.
5432
) - Query
This property is required. Changes to this property will trigger replacement.
- 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.
- The database username.
- dbname
This property is required. Changes to this property will trigger replacement.
- The database name (e.g.
measurements
). - host
This property is required. Changes to this property will trigger replacement.
- The database hostname. Can be an IP or a FQDN.
- password
This property is required. Changes to this property will trigger replacement.
- The database password.
- port
This property is required. Changes to this property will trigger replacement.
- The database port (e.g.
5432
) - query
This property is required. Changes to this property will trigger replacement.
- 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.
- The database username.
- dbname
This property is required. Changes to this property will trigger replacement.
- The database name (e.g.
measurements
). - host
This property is required. Changes to this property will trigger replacement.
- The database hostname. Can be an IP or a FQDN.
- password
This property is required. Changes to this property will trigger replacement.
- The database password.
- port
This property is required. Changes to this property will trigger replacement.
- The database port (e.g.
5432
) - query
This property is required. Changes to this property will trigger replacement.
- 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.
- The database username.
- dbname
This property is required. Changes to this property will trigger replacement.
- The database name (e.g.
measurements
). - host
This property is required. Changes to this property will trigger replacement.
- The database hostname. Can be an IP or a FQDN.
- password
This property is required. Changes to this property will trigger replacement.
- The database password.
- port
This property is required. Changes to this property will trigger replacement.
- The database port (e.g.
5432
) - query
This property is required. Changes to this property will trigger replacement.
- 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.
- The database username.
- dbname
This property is required. Changes to this property will trigger replacement.
- The database name (e.g.
measurements
). - host
This property is required. Changes to this property will trigger replacement.
- The database hostname. Can be an IP or a FQDN.
- password
This property is required. Changes to this property will trigger replacement.
- The database password.
- port
This property is required. Changes to this property will trigger replacement.
- The database port (e.g.
5432
) - query
This property is required. Changes to this property will trigger replacement.
- 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.
- The database username.
RouteRest, RouteRestArgs
- Headers
This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- The HTTP Verb used to call Rest URI (e.g.
post
).
- Headers
This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- The HTTP Verb used to call Rest URI (e.g.
post
).
- headers
This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- The HTTP Verb used to call Rest URI (e.g.
post
).
- headers
This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- The HTTP Verb used to call Rest URI (e.g.
post
).
- headers
This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- The HTTP Verb used to call Rest URI (e.g.
post
).
- headers
This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- The HTTP Verb used to call Rest URI (e.g.
post
).
RouteS3, RouteS3Args
- Bucket
Name This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- 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.
- The string to prefix object names with (e.g.
mykeyprefix-
).
- Bucket
Name This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- 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.
- The string to prefix object names with (e.g.
mykeyprefix-
).
- bucket
Name This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- 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.
- The string to prefix object names with (e.g.
mykeyprefix-
).
- bucket
Name This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- 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.
- The string to prefix object names with (e.g.
mykeyprefix-
).
- bucket_
name This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- 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.
- The string to prefix object names with (e.g.
mykeyprefix-
).
- bucket
Name This property is required. Changes to this property will trigger replacement.
- 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.
- 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.
- 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.
- 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:iot/route:Route route01 fr-par/11111111-1111-1111-1111-111111111111
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.