cloudflare.DeviceDexTest
Explore with Pulumi AI
Provides a Cloudflare Device Dex Test resource. Device Dex Tests allow for building location-aware device settings policies.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = new cloudflare.DeviceDexTest("example", {
accountId: "f037e56e89293a057740de681ac9abbe",
name: "GET homepage",
description: "Send a HTTP GET request to the home endpoint every half hour.",
interval: "0h30m0s",
enabled: true,
data: {
host: "https://example.com/home",
kind: "http",
method: "GET",
},
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.DeviceDexTest("example",
account_id="f037e56e89293a057740de681ac9abbe",
name="GET homepage",
description="Send a HTTP GET request to the home endpoint every half hour.",
interval="0h30m0s",
enabled=True,
data={
"host": "https://example.com/home",
"kind": "http",
"method": "GET",
})
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewDeviceDexTest(ctx, "example", &cloudflare.DeviceDexTestArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
Name: pulumi.String("GET homepage"),
Description: pulumi.String("Send a HTTP GET request to the home endpoint every half hour."),
Interval: pulumi.String("0h30m0s"),
Enabled: pulumi.Bool(true),
Data: &cloudflare.DeviceDexTestDataArgs{
Host: pulumi.String("https://example.com/home"),
Kind: pulumi.String("http"),
Method: pulumi.String("GET"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var example = new Cloudflare.DeviceDexTest("example", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
Name = "GET homepage",
Description = "Send a HTTP GET request to the home endpoint every half hour.",
Interval = "0h30m0s",
Enabled = true,
Data = new Cloudflare.Inputs.DeviceDexTestDataArgs
{
Host = "https://example.com/home",
Kind = "http",
Method = "GET",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.DeviceDexTest;
import com.pulumi.cloudflare.DeviceDexTestArgs;
import com.pulumi.cloudflare.inputs.DeviceDexTestDataArgs;
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 DeviceDexTest("example", DeviceDexTestArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.name("GET homepage")
.description("Send a HTTP GET request to the home endpoint every half hour.")
.interval("0h30m0s")
.enabled(true)
.data(DeviceDexTestDataArgs.builder()
.host("https://example.com/home")
.kind("http")
.method("GET")
.build())
.build());
}
}
resources:
example:
type: cloudflare:DeviceDexTest
properties:
accountId: f037e56e89293a057740de681ac9abbe
name: GET homepage
description: Send a HTTP GET request to the home endpoint every half hour.
interval: 0h30m0s
enabled: true
data:
host: https://example.com/home
kind: http
method: GET
Create DeviceDexTest Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DeviceDexTest(name: string, args: DeviceDexTestArgs, opts?: CustomResourceOptions);
@overload
def DeviceDexTest(resource_name: str,
args: DeviceDexTestArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DeviceDexTest(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
data: Optional[DeviceDexTestDataArgs] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
interval: Optional[str] = None,
name: Optional[str] = None)
func NewDeviceDexTest(ctx *Context, name string, args DeviceDexTestArgs, opts ...ResourceOption) (*DeviceDexTest, error)
public DeviceDexTest(string name, DeviceDexTestArgs args, CustomResourceOptions? opts = null)
public DeviceDexTest(String name, DeviceDexTestArgs args)
public DeviceDexTest(String name, DeviceDexTestArgs args, CustomResourceOptions options)
type: cloudflare:DeviceDexTest
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 DeviceDexTestArgs
- 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 DeviceDexTestArgs
- 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 DeviceDexTestArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeviceDexTestArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DeviceDexTestArgs
- 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 deviceDexTestResource = new Cloudflare.DeviceDexTest("deviceDexTestResource", new()
{
AccountId = "string",
Data = new Cloudflare.Inputs.DeviceDexTestDataArgs
{
Host = "string",
Kind = "string",
Method = "string",
},
Description = "string",
Enabled = false,
Interval = "string",
Name = "string",
});
example, err := cloudflare.NewDeviceDexTest(ctx, "deviceDexTestResource", &cloudflare.DeviceDexTestArgs{
AccountId: pulumi.String("string"),
Data: &cloudflare.DeviceDexTestDataArgs{
Host: pulumi.String("string"),
Kind: pulumi.String("string"),
Method: pulumi.String("string"),
},
Description: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Interval: pulumi.String("string"),
Name: pulumi.String("string"),
})
var deviceDexTestResource = new DeviceDexTest("deviceDexTestResource", DeviceDexTestArgs.builder()
.accountId("string")
.data(DeviceDexTestDataArgs.builder()
.host("string")
.kind("string")
.method("string")
.build())
.description("string")
.enabled(false)
.interval("string")
.name("string")
.build());
device_dex_test_resource = cloudflare.DeviceDexTest("deviceDexTestResource",
account_id="string",
data={
"host": "string",
"kind": "string",
"method": "string",
},
description="string",
enabled=False,
interval="string",
name="string")
const deviceDexTestResource = new cloudflare.DeviceDexTest("deviceDexTestResource", {
accountId: "string",
data: {
host: "string",
kind: "string",
method: "string",
},
description: "string",
enabled: false,
interval: "string",
name: "string",
});
type: cloudflare:DeviceDexTest
properties:
accountId: string
data:
host: string
kind: string
method: string
description: string
enabled: false
interval: string
name: string
DeviceDexTest 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 DeviceDexTest resource accepts the following input properties:
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Data
Device
Dex Test Data - The configuration object which contains the details for the WARP client to conduct the test.
- Description string
- Additional details about the test.
- Enabled bool
- Determines whether or not the test is active.
- Interval string
- How often the test will run.
- Name string
- The name of the Device Dex Test. Must be unique.
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Data
Device
Dex Test Data Args - The configuration object which contains the details for the WARP client to conduct the test.
- Description string
- Additional details about the test.
- Enabled bool
- Determines whether or not the test is active.
- Interval string
- How often the test will run.
- Name string
- The name of the Device Dex Test. Must be unique.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- data
Device
Dex Test Data - The configuration object which contains the details for the WARP client to conduct the test.
- description String
- Additional details about the test.
- enabled Boolean
- Determines whether or not the test is active.
- interval String
- How often the test will run.
- name String
- The name of the Device Dex Test. Must be unique.
- account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- data
Device
Dex Test Data - The configuration object which contains the details for the WARP client to conduct the test.
- description string
- Additional details about the test.
- enabled boolean
- Determines whether or not the test is active.
- interval string
- How often the test will run.
- name string
- The name of the Device Dex Test. Must be unique.
- account_
id str - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- data
Device
Dex Test Data Args - The configuration object which contains the details for the WARP client to conduct the test.
- description str
- Additional details about the test.
- enabled bool
- Determines whether or not the test is active.
- interval str
- How often the test will run.
- name str
- The name of the Device Dex Test. Must be unique.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- data Property Map
- The configuration object which contains the details for the WARP client to conduct the test.
- description String
- Additional details about the test.
- enabled Boolean
- Determines whether or not the test is active.
- interval String
- How often the test will run.
- name String
- The name of the Device Dex Test. Must be unique.
Outputs
All input properties are implicitly available as output properties. Additionally, the DeviceDexTest resource produces the following output properties:
Look up Existing DeviceDexTest Resource
Get an existing DeviceDexTest 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?: DeviceDexTestState, opts?: CustomResourceOptions): DeviceDexTest
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
created: Optional[str] = None,
data: Optional[DeviceDexTestDataArgs] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
interval: Optional[str] = None,
name: Optional[str] = None,
updated: Optional[str] = None) -> DeviceDexTest
func GetDeviceDexTest(ctx *Context, name string, id IDInput, state *DeviceDexTestState, opts ...ResourceOption) (*DeviceDexTest, error)
public static DeviceDexTest Get(string name, Input<string> id, DeviceDexTestState? state, CustomResourceOptions? opts = null)
public static DeviceDexTest get(String name, Output<String> id, DeviceDexTestState 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.
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Created string
- Timestamp of when the Dex Test was created.
- Data
Device
Dex Test Data - The configuration object which contains the details for the WARP client to conduct the test.
- Description string
- Additional details about the test.
- Enabled bool
- Determines whether or not the test is active.
- Interval string
- How often the test will run.
- Name string
- The name of the Device Dex Test. Must be unique.
- Updated string
- Timestamp of when the Dex Test was last updated.
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Created string
- Timestamp of when the Dex Test was created.
- Data
Device
Dex Test Data Args - The configuration object which contains the details for the WARP client to conduct the test.
- Description string
- Additional details about the test.
- Enabled bool
- Determines whether or not the test is active.
- Interval string
- How often the test will run.
- Name string
- The name of the Device Dex Test. Must be unique.
- Updated string
- Timestamp of when the Dex Test was last updated.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- created String
- Timestamp of when the Dex Test was created.
- data
Device
Dex Test Data - The configuration object which contains the details for the WARP client to conduct the test.
- description String
- Additional details about the test.
- enabled Boolean
- Determines whether or not the test is active.
- interval String
- How often the test will run.
- name String
- The name of the Device Dex Test. Must be unique.
- updated String
- Timestamp of when the Dex Test was last updated.
- account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- created string
- Timestamp of when the Dex Test was created.
- data
Device
Dex Test Data - The configuration object which contains the details for the WARP client to conduct the test.
- description string
- Additional details about the test.
- enabled boolean
- Determines whether or not the test is active.
- interval string
- How often the test will run.
- name string
- The name of the Device Dex Test. Must be unique.
- updated string
- Timestamp of when the Dex Test was last updated.
- account_
id str - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- created str
- Timestamp of when the Dex Test was created.
- data
Device
Dex Test Data Args - The configuration object which contains the details for the WARP client to conduct the test.
- description str
- Additional details about the test.
- enabled bool
- Determines whether or not the test is active.
- interval str
- How often the test will run.
- name str
- The name of the Device Dex Test. Must be unique.
- updated str
- Timestamp of when the Dex Test was last updated.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- created String
- Timestamp of when the Dex Test was created.
- data Property Map
- The configuration object which contains the details for the WARP client to conduct the test.
- description String
- Additional details about the test.
- enabled Boolean
- Determines whether or not the test is active.
- interval String
- How often the test will run.
- name String
- The name of the Device Dex Test. Must be unique.
- updated String
- Timestamp of when the Dex Test was last updated.
Supporting Types
DeviceDexTestData, DeviceDexTestDataArgs
Import
$ pulumi import cloudflare:index/deviceDexTest:DeviceDexTest example <account_id>/<device_dex_test_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.