scaleway.IotNetwork
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const mainIotHub = new scaleway.IotHub("main", {
name: "main",
productPlan: "plan_shared",
});
const main = new scaleway.IotNetwork("main", {
name: "main",
hubId: mainIotHub.id,
type: "sigfox",
});
import pulumi
import pulumiverse_scaleway as scaleway
main_iot_hub = scaleway.IotHub("main",
name="main",
product_plan="plan_shared")
main = scaleway.IotNetwork("main",
name="main",
hub_id=main_iot_hub.id,
type="sigfox")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
mainIotHub, err := scaleway.NewIotHub(ctx, "main", &scaleway.IotHubArgs{
Name: pulumi.String("main"),
ProductPlan: pulumi.String("plan_shared"),
})
if err != nil {
return err
}
_, err = scaleway.NewIotNetwork(ctx, "main", &scaleway.IotNetworkArgs{
Name: pulumi.String("main"),
HubId: mainIotHub.ID(),
Type: pulumi.String("sigfox"),
})
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 mainIotHub = new Scaleway.IotHub("main", new()
{
Name = "main",
ProductPlan = "plan_shared",
});
var main = new Scaleway.IotNetwork("main", new()
{
Name = "main",
HubId = mainIotHub.Id,
Type = "sigfox",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.IotHub;
import com.pulumi.scaleway.IotHubArgs;
import com.pulumi.scaleway.IotNetwork;
import com.pulumi.scaleway.IotNetworkArgs;
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 mainIotHub = new IotHub("mainIotHub", IotHubArgs.builder()
.name("main")
.productPlan("plan_shared")
.build());
var main = new IotNetwork("main", IotNetworkArgs.builder()
.name("main")
.hubId(mainIotHub.id())
.type("sigfox")
.build());
}
}
resources:
main:
type: scaleway:IotNetwork
properties:
name: main
hubId: ${mainIotHub.id}
type: sigfox
mainIotHub:
type: scaleway:IotHub
name: main
properties:
name: main
productPlan: plan_shared
Create IotNetwork Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IotNetwork(name: string, args: IotNetworkArgs, opts?: CustomResourceOptions);
@overload
def IotNetwork(resource_name: str,
args: IotNetworkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IotNetwork(resource_name: str,
opts: Optional[ResourceOptions] = None,
hub_id: Optional[str] = None,
type: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
topic_prefix: Optional[str] = None)
func NewIotNetwork(ctx *Context, name string, args IotNetworkArgs, opts ...ResourceOption) (*IotNetwork, error)
public IotNetwork(string name, IotNetworkArgs args, CustomResourceOptions? opts = null)
public IotNetwork(String name, IotNetworkArgs args)
public IotNetwork(String name, IotNetworkArgs args, CustomResourceOptions options)
type: scaleway:IotNetwork
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args IotNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args IotNetworkArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args IotNetworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IotNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IotNetworkArgs
- 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 iotNetworkResource = new Scaleway.IotNetwork("iotNetworkResource", new()
{
HubId = "string",
Type = "string",
Name = "string",
Region = "string",
TopicPrefix = "string",
});
example, err := scaleway.NewIotNetwork(ctx, "iotNetworkResource", &scaleway.IotNetworkArgs{
HubId: pulumi.String("string"),
Type: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
TopicPrefix: pulumi.String("string"),
})
var iotNetworkResource = new IotNetwork("iotNetworkResource", IotNetworkArgs.builder()
.hubId("string")
.type("string")
.name("string")
.region("string")
.topicPrefix("string")
.build());
iot_network_resource = scaleway.IotNetwork("iotNetworkResource",
hub_id="string",
type="string",
name="string",
region="string",
topic_prefix="string")
const iotNetworkResource = new scaleway.IotNetwork("iotNetworkResource", {
hubId: "string",
type: "string",
name: "string",
region: "string",
topicPrefix: "string",
});
type: scaleway:IotNetwork
properties:
hubId: string
name: string
region: string
topicPrefix: string
type: string
IotNetwork 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 IotNetwork resource accepts the following input properties:
- Hub
Id string - The hub ID to which the Network will be attached to.
- Type string
- The network type to create (e.g.
sigfox
). - Name string
- The name of the IoT Network you want to create (e.g.
my-net
). - Region string
- (Defaults to provider
region
) The region in which the Network is attached to. - Topic
Prefix string - The prefix that will be prepended to all topics for this Network.
- Hub
Id string - The hub ID to which the Network will be attached to.
- Type string
- The network type to create (e.g.
sigfox
). - Name string
- The name of the IoT Network you want to create (e.g.
my-net
). - Region string
- (Defaults to provider
region
) The region in which the Network is attached to. - Topic
Prefix string - The prefix that will be prepended to all topics for this Network.
- hub
Id String - The hub ID to which the Network will be attached to.
- type String
- The network type to create (e.g.
sigfox
). - name String
- The name of the IoT Network you want to create (e.g.
my-net
). - region String
- (Defaults to provider
region
) The region in which the Network is attached to. - topic
Prefix String - The prefix that will be prepended to all topics for this Network.
- hub
Id string - The hub ID to which the Network will be attached to.
- type string
- The network type to create (e.g.
sigfox
). - name string
- The name of the IoT Network you want to create (e.g.
my-net
). - region string
- (Defaults to provider
region
) The region in which the Network is attached to. - topic
Prefix string - The prefix that will be prepended to all topics for this Network.
- hub_
id str - The hub ID to which the Network will be attached to.
- type str
- The network type to create (e.g.
sigfox
). - name str
- The name of the IoT Network you want to create (e.g.
my-net
). - region str
- (Defaults to provider
region
) The region in which the Network is attached to. - topic_
prefix str - The prefix that will be prepended to all topics for this Network.
- hub
Id String - The hub ID to which the Network will be attached to.
- type String
- The network type to create (e.g.
sigfox
). - name String
- The name of the IoT Network you want to create (e.g.
my-net
). - region String
- (Defaults to provider
region
) The region in which the Network is attached to. - topic
Prefix String - The prefix that will be prepended to all topics for this Network.
Outputs
All input properties are implicitly available as output properties. Additionally, the IotNetwork resource produces the following output properties:
- created_
at str - The date and time the Network was created.
- endpoint str
- The endpoint to use when interacting with the network.
- id str
- The provider-assigned unique ID for this managed resource.
- secret str
- The endpoint key to keep secret.
Look up Existing IotNetwork Resource
Get an existing IotNetwork 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?: IotNetworkState, opts?: CustomResourceOptions): IotNetwork
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
endpoint: Optional[str] = None,
hub_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
secret: Optional[str] = None,
topic_prefix: Optional[str] = None,
type: Optional[str] = None) -> IotNetwork
func GetIotNetwork(ctx *Context, name string, id IDInput, state *IotNetworkState, opts ...ResourceOption) (*IotNetwork, error)
public static IotNetwork Get(string name, Input<string> id, IotNetworkState? state, CustomResourceOptions? opts = null)
public static IotNetwork get(String name, Output<String> id, IotNetworkState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - The date and time the Network was created.
- Endpoint string
- The endpoint to use when interacting with the network.
- Hub
Id string - The hub ID to which the Network will be attached to.
- Name string
- The name of the IoT Network you want to create (e.g.
my-net
). - Region string
- (Defaults to provider
region
) The region in which the Network is attached to. - Secret string
- The endpoint key to keep secret.
- Topic
Prefix string - The prefix that will be prepended to all topics for this Network.
- Type string
- The network type to create (e.g.
sigfox
).
- Created
At string - The date and time the Network was created.
- Endpoint string
- The endpoint to use when interacting with the network.
- Hub
Id string - The hub ID to which the Network will be attached to.
- Name string
- The name of the IoT Network you want to create (e.g.
my-net
). - Region string
- (Defaults to provider
region
) The region in which the Network is attached to. - Secret string
- The endpoint key to keep secret.
- Topic
Prefix string - The prefix that will be prepended to all topics for this Network.
- Type string
- The network type to create (e.g.
sigfox
).
- created
At String - The date and time the Network was created.
- endpoint String
- The endpoint to use when interacting with the network.
- hub
Id String - The hub ID to which the Network will be attached to.
- name String
- The name of the IoT Network you want to create (e.g.
my-net
). - region String
- (Defaults to provider
region
) The region in which the Network is attached to. - secret String
- The endpoint key to keep secret.
- topic
Prefix String - The prefix that will be prepended to all topics for this Network.
- type String
- The network type to create (e.g.
sigfox
).
- created
At string - The date and time the Network was created.
- endpoint string
- The endpoint to use when interacting with the network.
- hub
Id string - The hub ID to which the Network will be attached to.
- name string
- The name of the IoT Network you want to create (e.g.
my-net
). - region string
- (Defaults to provider
region
) The region in which the Network is attached to. - secret string
- The endpoint key to keep secret.
- topic
Prefix string - The prefix that will be prepended to all topics for this Network.
- type string
- The network type to create (e.g.
sigfox
).
- created_
at str - The date and time the Network was created.
- endpoint str
- The endpoint to use when interacting with the network.
- hub_
id str - The hub ID to which the Network will be attached to.
- name str
- The name of the IoT Network you want to create (e.g.
my-net
). - region str
- (Defaults to provider
region
) The region in which the Network is attached to. - secret str
- The endpoint key to keep secret.
- topic_
prefix str - The prefix that will be prepended to all topics for this Network.
- type str
- The network type to create (e.g.
sigfox
).
- created
At String - The date and time the Network was created.
- endpoint String
- The endpoint to use when interacting with the network.
- hub
Id String - The hub ID to which the Network will be attached to.
- name String
- The name of the IoT Network you want to create (e.g.
my-net
). - region String
- (Defaults to provider
region
) The region in which the Network is attached to. - secret String
- The endpoint key to keep secret.
- topic
Prefix String - The prefix that will be prepended to all topics for this Network.
- type String
- The network type to create (e.g.
sigfox
).
Import
IoT Networks can be imported using the {region}/{id}
, e.g.
bash
$ pulumi import scaleway:index/iotNetwork:IotNetwork net01 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.