hsdp.IamDevice
Explore with Pulumi AI
Provides a resource for managing HSDP IAM devices.
Example Usage
The following example creates a device
import * as pulumi from "@pulumi/pulumi";
import * as hsdp from "@pulumi/hsdp";
import * as random from "@pulumi/random";
const testDevicerandom_password = new random.index.Random_password("testDevicerandom_password", {});
const testDevicerandom_uuid = new random.index.Random_uuid("testDevicerandom_uuid", {});
// Create a test device
const testDeviceIamDevice = new hsdp.IamDevice("testDeviceIamDevice", {
loginId: "test_device_a",
password: testDevicerandom_password.result,
externalIdentifier: {
type: {
code: "ID",
text: "Device Identifier",
},
system: "https://www.philips.co.id/c-m-ho/cooking/airfryer",
value: "001",
},
type: "ActivityMonitor",
organizationId: _var.org_id,
applicationId: _var.app_id,
forTest: true,
isActive: true,
globalReferenceId: testDevicerandom_uuid.result,
});
import pulumi
import pulumi_hsdp as hsdp
import pulumi_random as random
test_devicerandom_password = random.index.Random_password("testDevicerandom_password")
test_devicerandom_uuid = random.index.Random_uuid("testDevicerandom_uuid")
# Create a test device
test_device_iam_device = hsdp.IamDevice("testDeviceIamDevice",
login_id="test_device_a",
password=test_devicerandom_password["result"],
external_identifier={
"type": {
"code": "ID",
"text": "Device Identifier",
},
"system": "https://www.philips.co.id/c-m-ho/cooking/airfryer",
"value": "001",
},
type="ActivityMonitor",
organization_id=var["org_id"],
application_id=var["app_id"],
for_test=True,
is_active=True,
global_reference_id=test_devicerandom_uuid["result"])
package main
import (
"github.com/pulumi/pulumi-random/sdk/go/random"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testDevicerandom_password, err := random.NewRandom_password(ctx, "testDevicerandom_password", nil)
if err != nil {
return err
}
testDevicerandom_uuid, err := random.NewRandom_uuid(ctx, "testDevicerandom_uuid", nil)
if err != nil {
return err
}
// Create a test device
_, err = hsdp.NewIamDevice(ctx, "testDeviceIamDevice", &hsdp.IamDeviceArgs{
LoginId: pulumi.String("test_device_a"),
Password: testDevicerandom_password.Result,
ExternalIdentifier: &hsdp.IamDeviceExternalIdentifierArgs{
Type: &hsdp.IamDeviceExternalIdentifierTypeArgs{
Code: pulumi.String("ID"),
Text: pulumi.String("Device Identifier"),
},
System: pulumi.String("https://www.philips.co.id/c-m-ho/cooking/airfryer"),
Value: pulumi.String("001"),
},
Type: pulumi.String("ActivityMonitor"),
OrganizationId: pulumi.Any(_var.Org_id),
ApplicationId: pulumi.Any(_var.App_id),
ForTest: pulumi.Bool(true),
IsActive: pulumi.Bool(true),
GlobalReferenceId: testDevicerandom_uuid.Result,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Hsdp = Pulumi.Hsdp;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var testDevicerandom_password = new Random.Index.Random_password("testDevicerandom_password");
var testDevicerandom_uuid = new Random.Index.Random_uuid("testDevicerandom_uuid");
// Create a test device
var testDeviceIamDevice = new Hsdp.IamDevice("testDeviceIamDevice", new()
{
LoginId = "test_device_a",
Password = testDevicerandom_password.Result,
ExternalIdentifier = new Hsdp.Inputs.IamDeviceExternalIdentifierArgs
{
Type = new Hsdp.Inputs.IamDeviceExternalIdentifierTypeArgs
{
Code = "ID",
Text = "Device Identifier",
},
System = "https://www.philips.co.id/c-m-ho/cooking/airfryer",
Value = "001",
},
Type = "ActivityMonitor",
OrganizationId = @var.Org_id,
ApplicationId = @var.App_id,
ForTest = true,
IsActive = true,
GlobalReferenceId = testDevicerandom_uuid.Result,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.random_password;
import com.pulumi.random.random_uuid;
import com.pulumi.hsdp.IamDevice;
import com.pulumi.hsdp.IamDeviceArgs;
import com.pulumi.hsdp.inputs.IamDeviceExternalIdentifierArgs;
import com.pulumi.hsdp.inputs.IamDeviceExternalIdentifierTypeArgs;
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 testDevicerandom_password = new Random_password("testDevicerandom_password");
var testDevicerandom_uuid = new Random_uuid("testDevicerandom_uuid");
// Create a test device
var testDeviceIamDevice = new IamDevice("testDeviceIamDevice", IamDeviceArgs.builder()
.loginId("test_device_a")
.password(testDevicerandom_password.result())
.externalIdentifier(IamDeviceExternalIdentifierArgs.builder()
.type(IamDeviceExternalIdentifierTypeArgs.builder()
.code("ID")
.text("Device Identifier")
.build())
.system("https://www.philips.co.id/c-m-ho/cooking/airfryer")
.value("001")
.build())
.type("ActivityMonitor")
.organizationId(var_.org_id())
.applicationId(var_.app_id())
.forTest(true)
.isActive(true)
.globalReferenceId(testDevicerandom_uuid.result())
.build());
}
}
resources:
testDevicerandom_password:
type: random:random_password
testDevicerandom_uuid:
type: random:random_uuid
# Create a test device
testDeviceIamDevice:
type: hsdp:IamDevice
properties:
loginId: test_device_a
password: ${testDevicerandom_password.result}
externalIdentifier:
type:
code: ID
text: Device Identifier
system: https://www.philips.co.id/c-m-ho/cooking/airfryer
value: '001'
type: ActivityMonitor
organizationId: ${var.org_id}
applicationId: ${var.app_id}
forTest: true
isActive: true
globalReferenceId: ${testDevicerandom_uuid.result}
Create IamDevice Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamDevice(name: string, args: IamDeviceArgs, opts?: CustomResourceOptions);
@overload
def IamDevice(resource_name: str,
args: IamDeviceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IamDevice(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
login_id: Optional[str] = None,
organization_id: Optional[str] = None,
password: Optional[str] = None,
type: Optional[str] = None,
debug_until: Optional[str] = None,
external_identifier: Optional[IamDeviceExternalIdentifierArgs] = None,
for_test: Optional[bool] = None,
global_reference_id: Optional[str] = None,
iam_device_id: Optional[str] = None,
is_active: Optional[bool] = None)
func NewIamDevice(ctx *Context, name string, args IamDeviceArgs, opts ...ResourceOption) (*IamDevice, error)
public IamDevice(string name, IamDeviceArgs args, CustomResourceOptions? opts = null)
public IamDevice(String name, IamDeviceArgs args)
public IamDevice(String name, IamDeviceArgs args, CustomResourceOptions options)
type: hsdp:IamDevice
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 IamDeviceArgs
- 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 IamDeviceArgs
- 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 IamDeviceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamDeviceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamDeviceArgs
- 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 iamDeviceResource = new Hsdp.IamDevice("iamDeviceResource", new()
{
ApplicationId = "string",
LoginId = "string",
OrganizationId = "string",
Password = "string",
Type = "string",
DebugUntil = "string",
ExternalIdentifier = new Hsdp.Inputs.IamDeviceExternalIdentifierArgs
{
System = "string",
Value = "string",
Type = new Hsdp.Inputs.IamDeviceExternalIdentifierTypeArgs
{
Code = "string",
Text = "string",
},
},
ForTest = false,
GlobalReferenceId = "string",
IamDeviceId = "string",
IsActive = false,
});
example, err := hsdp.NewIamDevice(ctx, "iamDeviceResource", &hsdp.IamDeviceArgs{
ApplicationId: pulumi.String("string"),
LoginId: pulumi.String("string"),
OrganizationId: pulumi.String("string"),
Password: pulumi.String("string"),
Type: pulumi.String("string"),
DebugUntil: pulumi.String("string"),
ExternalIdentifier: &hsdp.IamDeviceExternalIdentifierArgs{
System: pulumi.String("string"),
Value: pulumi.String("string"),
Type: &hsdp.IamDeviceExternalIdentifierTypeArgs{
Code: pulumi.String("string"),
Text: pulumi.String("string"),
},
},
ForTest: pulumi.Bool(false),
GlobalReferenceId: pulumi.String("string"),
IamDeviceId: pulumi.String("string"),
IsActive: pulumi.Bool(false),
})
var iamDeviceResource = new IamDevice("iamDeviceResource", IamDeviceArgs.builder()
.applicationId("string")
.loginId("string")
.organizationId("string")
.password("string")
.type("string")
.debugUntil("string")
.externalIdentifier(IamDeviceExternalIdentifierArgs.builder()
.system("string")
.value("string")
.type(IamDeviceExternalIdentifierTypeArgs.builder()
.code("string")
.text("string")
.build())
.build())
.forTest(false)
.globalReferenceId("string")
.iamDeviceId("string")
.isActive(false)
.build());
iam_device_resource = hsdp.IamDevice("iamDeviceResource",
application_id="string",
login_id="string",
organization_id="string",
password="string",
type="string",
debug_until="string",
external_identifier={
"system": "string",
"value": "string",
"type": {
"code": "string",
"text": "string",
},
},
for_test=False,
global_reference_id="string",
iam_device_id="string",
is_active=False)
const iamDeviceResource = new hsdp.IamDevice("iamDeviceResource", {
applicationId: "string",
loginId: "string",
organizationId: "string",
password: "string",
type: "string",
debugUntil: "string",
externalIdentifier: {
system: "string",
value: "string",
type: {
code: "string",
text: "string",
},
},
forTest: false,
globalReferenceId: "string",
iamDeviceId: "string",
isActive: false,
});
type: hsdp:IamDevice
properties:
applicationId: string
debugUntil: string
externalIdentifier:
system: string
type:
code: string
text: string
value: string
forTest: false
globalReferenceId: string
iamDeviceId: string
isActive: false
loginId: string
organizationId: string
password: string
type: string
IamDevice 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 IamDevice resource accepts the following input properties:
- Application
Id string - the application ID (GUID) this device should be attached to
- Login
Id string - The login id of the device
- Organization
Id string - the organization ID (GUID) this device should be attached to
- Password string
- The password of the device
- Type string
- Debug
Until string - External
Identifier IamDevice External Identifier - Block describing external ID of this device
- For
Test bool - Boolean. When set to true this device is marked as a test device
- Global
Reference stringId - Iam
Device stringId - The GUID of the device
- Is
Active bool - Boolean. Controls if this device is active or not
- Application
Id string - the application ID (GUID) this device should be attached to
- Login
Id string - The login id of the device
- Organization
Id string - the organization ID (GUID) this device should be attached to
- Password string
- The password of the device
- Type string
- Debug
Until string - External
Identifier IamDevice External Identifier Args - Block describing external ID of this device
- For
Test bool - Boolean. When set to true this device is marked as a test device
- Global
Reference stringId - Iam
Device stringId - The GUID of the device
- Is
Active bool - Boolean. Controls if this device is active or not
- application
Id String - the application ID (GUID) this device should be attached to
- login
Id String - The login id of the device
- organization
Id String - the organization ID (GUID) this device should be attached to
- password String
- The password of the device
- type String
- debug
Until String - external
Identifier IamDevice External Identifier - Block describing external ID of this device
- for
Test Boolean - Boolean. When set to true this device is marked as a test device
- global
Reference StringId - iam
Device StringId - The GUID of the device
- is
Active Boolean - Boolean. Controls if this device is active or not
- application
Id string - the application ID (GUID) this device should be attached to
- login
Id string - The login id of the device
- organization
Id string - the organization ID (GUID) this device should be attached to
- password string
- The password of the device
- type string
- debug
Until string - external
Identifier IamDevice External Identifier - Block describing external ID of this device
- for
Test boolean - Boolean. When set to true this device is marked as a test device
- global
Reference stringId - iam
Device stringId - The GUID of the device
- is
Active boolean - Boolean. Controls if this device is active or not
- application_
id str - the application ID (GUID) this device should be attached to
- login_
id str - The login id of the device
- organization_
id str - the organization ID (GUID) this device should be attached to
- password str
- The password of the device
- type str
- debug_
until str - external_
identifier IamDevice External Identifier Args - Block describing external ID of this device
- for_
test bool - Boolean. When set to true this device is marked as a test device
- global_
reference_ strid - iam_
device_ strid - The GUID of the device
- is_
active bool - Boolean. Controls if this device is active or not
- application
Id String - the application ID (GUID) this device should be attached to
- login
Id String - The login id of the device
- organization
Id String - the organization ID (GUID) this device should be attached to
- password String
- The password of the device
- type String
- debug
Until String - external
Identifier Property Map - Block describing external ID of this device
- for
Test Boolean - Boolean. When set to true this device is marked as a test device
- global
Reference StringId - iam
Device StringId - The GUID of the device
- is
Active Boolean - Boolean. Controls if this device is active or not
Outputs
All input properties are implicitly available as output properties. Additionally, the IamDevice resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Registration
Date string - (Generated) The date the device was registered
- Text string
- Id string
- The provider-assigned unique ID for this managed resource.
- Registration
Date string - (Generated) The date the device was registered
- Text string
- id String
- The provider-assigned unique ID for this managed resource.
- registration
Date String - (Generated) The date the device was registered
- text String
- id string
- The provider-assigned unique ID for this managed resource.
- registration
Date string - (Generated) The date the device was registered
- text string
- id str
- The provider-assigned unique ID for this managed resource.
- registration_
date str - (Generated) The date the device was registered
- text str
- id String
- The provider-assigned unique ID for this managed resource.
- registration
Date String - (Generated) The date the device was registered
- text String
Look up Existing IamDevice Resource
Get an existing IamDevice 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?: IamDeviceState, opts?: CustomResourceOptions): IamDevice
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
debug_until: Optional[str] = None,
external_identifier: Optional[IamDeviceExternalIdentifierArgs] = None,
for_test: Optional[bool] = None,
global_reference_id: Optional[str] = None,
iam_device_id: Optional[str] = None,
is_active: Optional[bool] = None,
login_id: Optional[str] = None,
organization_id: Optional[str] = None,
password: Optional[str] = None,
registration_date: Optional[str] = None,
text: Optional[str] = None,
type: Optional[str] = None) -> IamDevice
func GetIamDevice(ctx *Context, name string, id IDInput, state *IamDeviceState, opts ...ResourceOption) (*IamDevice, error)
public static IamDevice Get(string name, Input<string> id, IamDeviceState? state, CustomResourceOptions? opts = null)
public static IamDevice get(String name, Output<String> id, IamDeviceState state, CustomResourceOptions options)
resources: _: type: hsdp:IamDevice get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Application
Id string - the application ID (GUID) this device should be attached to
- Debug
Until string - External
Identifier IamDevice External Identifier - Block describing external ID of this device
- For
Test bool - Boolean. When set to true this device is marked as a test device
- Global
Reference stringId - Iam
Device stringId - The GUID of the device
- Is
Active bool - Boolean. Controls if this device is active or not
- Login
Id string - The login id of the device
- Organization
Id string - the organization ID (GUID) this device should be attached to
- Password string
- The password of the device
- Registration
Date string - (Generated) The date the device was registered
- Text string
- Type string
- Application
Id string - the application ID (GUID) this device should be attached to
- Debug
Until string - External
Identifier IamDevice External Identifier Args - Block describing external ID of this device
- For
Test bool - Boolean. When set to true this device is marked as a test device
- Global
Reference stringId - Iam
Device stringId - The GUID of the device
- Is
Active bool - Boolean. Controls if this device is active or not
- Login
Id string - The login id of the device
- Organization
Id string - the organization ID (GUID) this device should be attached to
- Password string
- The password of the device
- Registration
Date string - (Generated) The date the device was registered
- Text string
- Type string
- application
Id String - the application ID (GUID) this device should be attached to
- debug
Until String - external
Identifier IamDevice External Identifier - Block describing external ID of this device
- for
Test Boolean - Boolean. When set to true this device is marked as a test device
- global
Reference StringId - iam
Device StringId - The GUID of the device
- is
Active Boolean - Boolean. Controls if this device is active or not
- login
Id String - The login id of the device
- organization
Id String - the organization ID (GUID) this device should be attached to
- password String
- The password of the device
- registration
Date String - (Generated) The date the device was registered
- text String
- type String
- application
Id string - the application ID (GUID) this device should be attached to
- debug
Until string - external
Identifier IamDevice External Identifier - Block describing external ID of this device
- for
Test boolean - Boolean. When set to true this device is marked as a test device
- global
Reference stringId - iam
Device stringId - The GUID of the device
- is
Active boolean - Boolean. Controls if this device is active or not
- login
Id string - The login id of the device
- organization
Id string - the organization ID (GUID) this device should be attached to
- password string
- The password of the device
- registration
Date string - (Generated) The date the device was registered
- text string
- type string
- application_
id str - the application ID (GUID) this device should be attached to
- debug_
until str - external_
identifier IamDevice External Identifier Args - Block describing external ID of this device
- for_
test bool - Boolean. When set to true this device is marked as a test device
- global_
reference_ strid - iam_
device_ strid - The GUID of the device
- is_
active bool - Boolean. Controls if this device is active or not
- login_
id str - The login id of the device
- organization_
id str - the organization ID (GUID) this device should be attached to
- password str
- The password of the device
- registration_
date str - (Generated) The date the device was registered
- text str
- type str
- application
Id String - the application ID (GUID) this device should be attached to
- debug
Until String - external
Identifier Property Map - Block describing external ID of this device
- for
Test Boolean - Boolean. When set to true this device is marked as a test device
- global
Reference StringId - iam
Device StringId - The GUID of the device
- is
Active Boolean - Boolean. Controls if this device is active or not
- login
Id String - The login id of the device
- organization
Id String - the organization ID (GUID) this device should be attached to
- password String
- The password of the device
- registration
Date String - (Generated) The date the device was registered
- text String
- type String
Supporting Types
IamDeviceExternalIdentifier, IamDeviceExternalIdentifierArgs
- System string
- The system where the identifier is defined in
- Value string
- The value of the identifier
- Type
Iam
Device External Identifier Type - Block describing the type
- System string
- The system where the identifier is defined in
- Value string
- The value of the identifier
- Type
Iam
Device External Identifier Type - Block describing the type
- system String
- The system where the identifier is defined in
- value String
- The value of the identifier
- type
Iam
Device External Identifier Type - Block describing the type
- system string
- The system where the identifier is defined in
- value string
- The value of the identifier
- type
Iam
Device External Identifier Type - Block describing the type
- system str
- The system where the identifier is defined in
- value str
- The value of the identifier
- type
Iam
Device External Identifier Type - Block describing the type
- system String
- The system where the identifier is defined in
- value String
- The value of the identifier
- type Property Map
- Block describing the type
IamDeviceExternalIdentifierType, IamDeviceExternalIdentifierTypeArgs
Import
Existing devices can be imported, however they will be missing their password rendering them pretty much useless.
Therefore, we recommend creating them using the provider.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- hsdp philips-software/terraform-provider-hsdp
- License
- Notes
- This Pulumi package is based on the
hsdp
Terraform Provider.