Module iot

@pulumi/azure > iot

class ConsumerGroup

extends CustomResource

Manages a Consumer Group within an IotHub

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const testResourceGroup = new azure.core.ResourceGroup("test", {
    location: "West US",
    name: "resourceGroup1",
});
const testIoTHub = new azure.iot.IoTHub("test", {
    location: testResourceGroup.location,
    name: "test",
    resourceGroupName: testResourceGroup.name,
    sku: {
        capacity: 1,
        name: "S1",
        tier: "Standard",
    },
    tags: {
        purpose: "testing",
    },
});
const testConsumerGroup = new azure.iot.ConsumerGroup("test", {
    eventhubEndpointName: "events",
    iothubName: testIoTHub.name,
    name: "terraform",
    resourceGroupName: azurerm_resource_group_foo.name,
});

constructor

new ConsumerGroup(name: string, args: ConsumerGroupArgs, opts?: pulumi.CustomResourceOptions)

Create a ConsumerGroup resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ConsumerGroupState, opts?: pulumi.CustomResourceOptions): ConsumerGroup

Get an existing ConsumerGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property eventhubEndpointName

public eventhubEndpointName: pulumi.Output<string>;

The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property iothubName

public iothubName: pulumi.Output<string>;

The name of the IoT Hub. Changing this forces a new resource to be created.

property name

public name: pulumi.Output<string>;

The name of this Consumer Group. Changing this forces a new resource to be created.

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class IoTHub

extends CustomResource

Manages an IotHub

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const testResourceGroup = new azure.core.ResourceGroup("test", {
    location: "West US",
    name: "resourceGroup1",
});
const testAccount = new azure.storage.Account("test", {
    accountReplicationType: "LRS",
    accountTier: "Standard",
    location: testResourceGroup.location,
    name: "teststa",
    resourceGroupName: testResourceGroup.name,
});
const testIoTHub = new azure.iot.IoTHub("test", {
    endpoints: [{
        batchFrequencyInSeconds: 60,
        connectionString: testAccount.primaryBlobConnectionString,
        containerName: "test",
        encoding: "Avro",
        fileNameFormat: "{iothub}/{partition}_{YYYY}_{MM}_{DD}_{HH}_{mm}",
        maxChunkSizeInBytes: 10485760,
        name: "export",
        type: "AzureIotHub.StorageContainer",
    }],
    fallbackRoute: {
        enabled: true,
    },
    location: testResourceGroup.location,
    name: "test",
    resourceGroupName: testResourceGroup.name,
    routes: [{
        condition: "true",
        enabled: true,
        endpointNames: ["export"],
        name: "export",
        source: "DeviceMessages",
    }],
    sku: {
        capacity: 1,
        name: "S1",
        tier: "Standard",
    },
    tags: {
        purpose: "testing",
    },
});
const testContainer = new azure.storage.Container("test", {
    containerAccessType: "private",
    name: "test",
    resourceGroupName: testResourceGroup.name,
    storageAccountName: testAccount.name,
});

constructor

new IoTHub(name: string, args: IoTHubArgs, opts?: pulumi.CustomResourceOptions)

Create a IoTHub resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: IoTHubState, opts?: pulumi.CustomResourceOptions): IoTHub

Get an existing IoTHub resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property endpoints

public endpoints: pulumi.Output<{
    batchFrequencyInSeconds: undefined | number;
    connectionString: string;
    containerName: undefined | string;
    encoding: undefined | string;
    fileNameFormat: undefined | string;
    maxChunkSizeInBytes: undefined | number;
    name: string;
    type: string;
}[] | undefined>;

An endpoint block as defined below.

property eventHubEventsEndpoint

public eventHubEventsEndpoint: pulumi.Output<string>;

The EventHub compatible endpoint for events data

property eventHubEventsPath

public eventHubEventsPath: pulumi.Output<string>;

The EventHub compatible path for events data

property eventHubOperationsEndpoint

public eventHubOperationsEndpoint: pulumi.Output<string>;

The EventHub compatible endpoint for operational data

property eventHubOperationsPath

public eventHubOperationsPath: pulumi.Output<string>;

The EventHub compatible path for operational data

property fallbackRoute

public fallbackRoute: pulumi.Output<{
    condition: undefined | string;
    enabled: boolean;
    endpointNames: string[];
    source: undefined | string;
}>;

A fallback_route block as defined below. If the fallback route is enabled, messages that don’t match any of the supplied routes are automatically sent to this route. Defaults to messages/events.

property hostname

public hostname: pulumi.Output<string>;

The hostname of the IotHub Resource.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property ipFilterRules

public ipFilterRules: pulumi.Output<{
    action: string;
    ipMask: string;
    name: string;
}[] | undefined>;

One or more ip_filter_rule blocks as defined below.

property location

public location: pulumi.Output<string>;

Specifies the supported Azure location where the resource has to be createc. Changing this forces a new resource to be created.

property name

public name: pulumi.Output<string>;

Specifies the name of the IotHub resource. Changing this forces a new resource to be created.

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.

property routes

public routes: pulumi.Output<{
    condition: undefined | string;
    enabled: boolean;
    endpointNames: string[];
    name: string;
    source: string;
}[] | undefined>;

A route block as defined below.

property sharedAccessPolicies

public sharedAccessPolicies: pulumi.Output<{
    keyName: string;
    permissions: string;
    primaryKey: string;
    secondaryKey: string;
}[]>;

One or more shared_access_policy blocks as defined below.

property sku

public sku: pulumi.Output<{
    capacity: number;
    name: string;
    tier: string;
}>;

A sku block as defined below.

property tags

public tags: pulumi.Output<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property type

public type: pulumi.Output<string>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class SharedAccessPolicy

extends CustomResource

Manages an IotHub Shared Access Policy

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("example", {
    location: "West US",
    name: "resourceGroup1",
});
const exampleIoTHub = new azure.iot.IoTHub("example", {
    location: exampleResourceGroup.location,
    name: "example",
    resourceGroupName: exampleResourceGroup.name,
    sku: {
        capacity: 1,
        name: "S1",
        tier: "Standard",
    },
});
const exampleSharedAccessPolicy = new azure.iot.SharedAccessPolicy("example", {
    iothubName: exampleIoTHub.name,
    name: "example",
    registryRead: true,
    registryWrite: true,
    resourceGroupName: exampleResourceGroup.name,
});

constructor

new SharedAccessPolicy(name: string, args: SharedAccessPolicyArgs, opts?: pulumi.CustomResourceOptions)

Create a SharedAccessPolicy resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SharedAccessPolicyState, opts?: pulumi.CustomResourceOptions): SharedAccessPolicy

Get an existing SharedAccessPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property deviceConnect

public deviceConnect: pulumi.Output<boolean | undefined>;

Adds DeviceConnect permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property iothubName

public iothubName: pulumi.Output<string>;

The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

property name

public name: pulumi.Output<string>;

Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.

property primaryConnectionString

public primaryConnectionString: pulumi.Output<string>;

The primary connection string of the Shared Access Policy.

property primaryKey

public primaryKey: pulumi.Output<string>;

The primary key used to create the authentication token.

property registryRead

public registryRead: pulumi.Output<boolean | undefined>;

Adds RegistryRead permission to this Shared Access Account. It allows read access to the identity registry.

property registryWrite

public registryWrite: pulumi.Output<boolean | undefined>;

Adds RegistryWrite permission to this Shared Access Account. It allows write access to the identity registry.

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.

property secondaryConnectionString

public secondaryConnectionString: pulumi.Output<string>;

The secondary connection string of the Shared Access Policy.

property secondaryKey

public secondaryKey: pulumi.Output<string>;

The secondary key used to create the authentication token.

property serviceConnect

public serviceConnect: pulumi.Output<boolean | undefined>;

Adds ServiceConnect permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface ConsumerGroupArgs

The set of arguments for constructing a ConsumerGroup resource.

property eventhubEndpointName

eventhubEndpointName: pulumi.Input<string>;

The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.

property iothubName

iothubName: pulumi.Input<string>;

The name of the IoT Hub. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

The name of this Consumer Group. Changing this forces a new resource to be created.

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.

interface ConsumerGroupState

Input properties used for looking up and filtering ConsumerGroup resources.

property eventhubEndpointName

eventhubEndpointName?: pulumi.Input<string>;

The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.

property iothubName

iothubName?: pulumi.Input<string>;

The name of the IoT Hub. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

The name of this Consumer Group. Changing this forces a new resource to be created.

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.

interface IoTHubArgs

The set of arguments for constructing a IoTHub resource.

property endpoints

endpoints?: pulumi.Input<pulumi.Input<{
    batchFrequencyInSeconds: pulumi.Input<number>;
    connectionString: pulumi.Input<string>;
    containerName: pulumi.Input<string>;
    encoding: pulumi.Input<string>;
    fileNameFormat: pulumi.Input<string>;
    maxChunkSizeInBytes: pulumi.Input<number>;
    name: pulumi.Input<string>;
    type: pulumi.Input<string>;
}>[]>;

An endpoint block as defined below.

property fallbackRoute

fallbackRoute?: pulumi.Input<{
    condition: pulumi.Input<string>;
    enabled: pulumi.Input<boolean>;
    endpointNames: pulumi.Input<pulumi.Input<string>[]>;
    source: pulumi.Input<string>;
}>;

A fallback_route block as defined below. If the fallback route is enabled, messages that don’t match any of the supplied routes are automatically sent to this route. Defaults to messages/events.

property ipFilterRules

ipFilterRules?: pulumi.Input<pulumi.Input<{
    action: pulumi.Input<string>;
    ipMask: pulumi.Input<string>;
    name: pulumi.Input<string>;
}>[]>;

One or more ip_filter_rule blocks as defined below.

property location

location?: pulumi.Input<string>;

Specifies the supported Azure location where the resource has to be createc. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

Specifies the name of the IotHub resource. Changing this forces a new resource to be created.

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.

property routes

routes?: pulumi.Input<pulumi.Input<{
    condition: pulumi.Input<string>;
    enabled: pulumi.Input<boolean>;
    endpointNames: pulumi.Input<pulumi.Input<string>[]>;
    name: pulumi.Input<string>;
    source: pulumi.Input<string>;
}>[]>;

A route block as defined below.

property sku

sku: pulumi.Input<{
    capacity: pulumi.Input<number>;
    name: pulumi.Input<string>;
    tier: pulumi.Input<string>;
}>;

A sku block as defined below.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface IoTHubState

Input properties used for looking up and filtering IoTHub resources.

property endpoints

endpoints?: pulumi.Input<pulumi.Input<{
    batchFrequencyInSeconds: pulumi.Input<number>;
    connectionString: pulumi.Input<string>;
    containerName: pulumi.Input<string>;
    encoding: pulumi.Input<string>;
    fileNameFormat: pulumi.Input<string>;
    maxChunkSizeInBytes: pulumi.Input<number>;
    name: pulumi.Input<string>;
    type: pulumi.Input<string>;
}>[]>;

An endpoint block as defined below.

property eventHubEventsEndpoint

eventHubEventsEndpoint?: pulumi.Input<string>;

The EventHub compatible endpoint for events data

property eventHubEventsPath

eventHubEventsPath?: pulumi.Input<string>;

The EventHub compatible path for events data

property eventHubOperationsEndpoint

eventHubOperationsEndpoint?: pulumi.Input<string>;

The EventHub compatible endpoint for operational data

property eventHubOperationsPath

eventHubOperationsPath?: pulumi.Input<string>;

The EventHub compatible path for operational data

property fallbackRoute

fallbackRoute?: pulumi.Input<{
    condition: pulumi.Input<string>;
    enabled: pulumi.Input<boolean>;
    endpointNames: pulumi.Input<pulumi.Input<string>[]>;
    source: pulumi.Input<string>;
}>;

A fallback_route block as defined below. If the fallback route is enabled, messages that don’t match any of the supplied routes are automatically sent to this route. Defaults to messages/events.

property hostname

hostname?: pulumi.Input<string>;

The hostname of the IotHub Resource.

property ipFilterRules

ipFilterRules?: pulumi.Input<pulumi.Input<{
    action: pulumi.Input<string>;
    ipMask: pulumi.Input<string>;
    name: pulumi.Input<string>;
}>[]>;

One or more ip_filter_rule blocks as defined below.

property location

location?: pulumi.Input<string>;

Specifies the supported Azure location where the resource has to be createc. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

Specifies the name of the IotHub resource. Changing this forces a new resource to be created.

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.

property routes

routes?: pulumi.Input<pulumi.Input<{
    condition: pulumi.Input<string>;
    enabled: pulumi.Input<boolean>;
    endpointNames: pulumi.Input<pulumi.Input<string>[]>;
    name: pulumi.Input<string>;
    source: pulumi.Input<string>;
}>[]>;

A route block as defined below.

property sharedAccessPolicies

sharedAccessPolicies?: pulumi.Input<pulumi.Input<{
    keyName: pulumi.Input<string>;
    permissions: pulumi.Input<string>;
    primaryKey: pulumi.Input<string>;
    secondaryKey: pulumi.Input<string>;
}>[]>;

One or more shared_access_policy blocks as defined below.

property sku

sku?: pulumi.Input<{
    capacity: pulumi.Input<number>;
    name: pulumi.Input<string>;
    tier: pulumi.Input<string>;
}>;

A sku block as defined below.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property type

type?: pulumi.Input<string>;

interface SharedAccessPolicyArgs

The set of arguments for constructing a SharedAccessPolicy resource.

property deviceConnect

deviceConnect?: pulumi.Input<boolean>;

Adds DeviceConnect permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.

property iothubName

iothubName: pulumi.Input<string>;

The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.

property registryRead

registryRead?: pulumi.Input<boolean>;

Adds RegistryRead permission to this Shared Access Account. It allows read access to the identity registry.

property registryWrite

registryWrite?: pulumi.Input<boolean>;

Adds RegistryWrite permission to this Shared Access Account. It allows write access to the identity registry.

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.

property serviceConnect

serviceConnect?: pulumi.Input<boolean>;

Adds ServiceConnect permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.

interface SharedAccessPolicyState

Input properties used for looking up and filtering SharedAccessPolicy resources.

property deviceConnect

deviceConnect?: pulumi.Input<boolean>;

Adds DeviceConnect permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.

property iothubName

iothubName?: pulumi.Input<string>;

The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.

property primaryConnectionString

primaryConnectionString?: pulumi.Input<string>;

The primary connection string of the Shared Access Policy.

property primaryKey

primaryKey?: pulumi.Input<string>;

The primary key used to create the authentication token.

property registryRead

registryRead?: pulumi.Input<boolean>;

Adds RegistryRead permission to this Shared Access Account. It allows read access to the identity registry.

property registryWrite

registryWrite?: pulumi.Input<boolean>;

Adds RegistryWrite permission to this Shared Access Account. It allows write access to the identity registry.

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.

property secondaryConnectionString

secondaryConnectionString?: pulumi.Input<string>;

The secondary connection string of the Shared Access Policy.

property secondaryKey

secondaryKey?: pulumi.Input<string>;

The secondary key used to create the authentication token.

property serviceConnect

serviceConnect?: pulumi.Input<boolean>;

Adds ServiceConnect permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.