Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.Device("example", {action: "SUSPEND"});
import pulumi
import pulumi_okta as okta
example = okta.Device("example", action="SUSPEND")
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v6/go/okta"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := okta.NewDevice(ctx, "example", &okta.DeviceArgs{
Action: pulumi.String("SUSPEND"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var example = new Okta.Device("example", new()
{
Action = "SUSPEND",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.Device;
import com.pulumi.okta.DeviceArgs;
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 example = new Device("example", DeviceArgs.builder()
.action("SUSPEND")
.build());
}
}
resources:
example:
type: okta:Device
properties:
action: SUSPEND
Create Device Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Device(name: string, args?: DeviceArgs, opts?: CustomResourceOptions);@overload
def Device(resource_name: str,
args: Optional[DeviceArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Device(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None)func NewDevice(ctx *Context, name string, args *DeviceArgs, opts ...ResourceOption) (*Device, error)public Device(string name, DeviceArgs? args = null, CustomResourceOptions? opts = null)
public Device(String name, DeviceArgs args)
public Device(String name, DeviceArgs args, CustomResourceOptions options)
type: okta:Device
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 DeviceArgs
- 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 DeviceArgs
- 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 DeviceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DeviceArgs
- 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 deviceResource = new Okta.Device("deviceResource", new()
{
Action = "string",
});
example, err := okta.NewDevice(ctx, "deviceResource", &okta.DeviceArgs{
Action: pulumi.String("string"),
})
var deviceResource = new Device("deviceResource", DeviceArgs.builder()
.action("string")
.build());
device_resource = okta.Device("deviceResource", action="string")
const deviceResource = new okta.Device("deviceResource", {action: "string"});
type: okta:Device
properties:
action: string
Device 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 Device resource accepts the following input properties:
- Action string
- The action of the device.
- Action string
- The action of the device.
- action String
- The action of the device.
- action string
- The action of the device.
- action str
- The action of the device.
- action String
- The action of the device.
Outputs
All input properties are implicitly available as output properties. Additionally, the Device resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Type string - The resource type of the device.
- Status string
- The status of the device.
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Type string - The resource type of the device.
- Status string
- The status of the device.
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Type String - The resource type of the device.
- status String
- The status of the device.
- id string
- The provider-assigned unique ID for this managed resource.
- resource
Type string - The resource type of the device.
- status string
- The status of the device.
- id str
- The provider-assigned unique ID for this managed resource.
- resource_
type str - The resource type of the device.
- status str
- The status of the device.
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Type String - The resource type of the device.
- status String
- The status of the device.
Look up Existing Device Resource
Get an existing Device 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?: DeviceState, opts?: CustomResourceOptions): Device@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
resource_type: Optional[str] = None,
status: Optional[str] = None) -> Devicefunc GetDevice(ctx *Context, name string, id IDInput, state *DeviceState, opts ...ResourceOption) (*Device, error)public static Device Get(string name, Input<string> id, DeviceState? state, CustomResourceOptions? opts = null)public static Device get(String name, Output<String> id, DeviceState state, CustomResourceOptions options)resources: _: type: okta:Device 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.
- Action string
- The action of the device.
- Resource
Type string - The resource type of the device.
- Status string
- The status of the device.
- Action string
- The action of the device.
- Resource
Type string - The resource type of the device.
- Status string
- The status of the device.
- action String
- The action of the device.
- resource
Type String - The resource type of the device.
- status String
- The status of the device.
- action string
- The action of the device.
- resource
Type string - The resource type of the device.
- status string
- The status of the device.
- action str
- The action of the device.
- resource_
type str - The resource type of the device.
- status str
- The status of the device.
- action String
- The action of the device.
- resource
Type String - The resource type of the device.
- status String
- The status of the device.
Import
$ pulumi import okta:index/device:Device example <device_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oktaTerraform Provider.
