1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getZeroTrustDeviceSubnet
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi

    Accepted Permissions

    • Cloudflare One Networks Read
    • Cloudflare One Networks Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleZeroTrustDeviceSubnet = cloudflare.getZeroTrustDeviceSubnet({
        accountId: "699d98642c564d2e855e9661899b7252",
        subnetId: "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_zero_trust_device_subnet = cloudflare.get_zero_trust_device_subnet(account_id="699d98642c564d2e855e9661899b7252",
        subnet_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.GetZeroTrustDeviceSubnet(ctx, &cloudflare.LookupZeroTrustDeviceSubnetArgs{
    			AccountId: pulumi.StringRef("699d98642c564d2e855e9661899b7252"),
    			SubnetId:  "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
    		}, nil)
    		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 exampleZeroTrustDeviceSubnet = Cloudflare.Index.GetZeroTrustDeviceSubnet.Invoke(new()
        {
            AccountId = "699d98642c564d2e855e9661899b7252",
            SubnetId = "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetZeroTrustDeviceSubnetArgs;
    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) {
            final var exampleZeroTrustDeviceSubnet = CloudflareFunctions.getZeroTrustDeviceSubnet(GetZeroTrustDeviceSubnetArgs.builder()
                .accountId("699d98642c564d2e855e9661899b7252")
                .subnetId("f70ff985-a4ef-4643-bbbc-4a0ed4fc8415")
                .build());
    
        }
    }
    
    variables:
      exampleZeroTrustDeviceSubnet:
        fn::invoke:
          function: cloudflare:getZeroTrustDeviceSubnet
          arguments:
            accountId: 699d98642c564d2e855e9661899b7252
            subnetId: f70ff985-a4ef-4643-bbbc-4a0ed4fc8415
    

    Using getZeroTrustDeviceSubnet

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getZeroTrustDeviceSubnet(args: GetZeroTrustDeviceSubnetArgs, opts?: InvokeOptions): Promise<GetZeroTrustDeviceSubnetResult>
    function getZeroTrustDeviceSubnetOutput(args: GetZeroTrustDeviceSubnetOutputArgs, opts?: InvokeOptions): Output<GetZeroTrustDeviceSubnetResult>
    def get_zero_trust_device_subnet(account_id: Optional[str] = None,
                                     subnet_id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetZeroTrustDeviceSubnetResult
    def get_zero_trust_device_subnet_output(account_id: Optional[pulumi.Input[str]] = None,
                                     subnet_id: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetZeroTrustDeviceSubnetResult]
    func LookupZeroTrustDeviceSubnet(ctx *Context, args *LookupZeroTrustDeviceSubnetArgs, opts ...InvokeOption) (*LookupZeroTrustDeviceSubnetResult, error)
    func LookupZeroTrustDeviceSubnetOutput(ctx *Context, args *LookupZeroTrustDeviceSubnetOutputArgs, opts ...InvokeOption) LookupZeroTrustDeviceSubnetResultOutput

    > Note: This function is named LookupZeroTrustDeviceSubnet in the Go SDK.

    public static class GetZeroTrustDeviceSubnet 
    {
        public static Task<GetZeroTrustDeviceSubnetResult> InvokeAsync(GetZeroTrustDeviceSubnetArgs args, InvokeOptions? opts = null)
        public static Output<GetZeroTrustDeviceSubnetResult> Invoke(GetZeroTrustDeviceSubnetInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetZeroTrustDeviceSubnetResult> getZeroTrustDeviceSubnet(GetZeroTrustDeviceSubnetArgs args, InvokeOptions options)
    public static Output<GetZeroTrustDeviceSubnetResult> getZeroTrustDeviceSubnet(GetZeroTrustDeviceSubnetArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getZeroTrustDeviceSubnet:getZeroTrustDeviceSubnet
      arguments:
        # arguments dictionary

    The following arguments are supported:

    SubnetId string
    The UUID of the subnet.
    AccountId string
    Cloudflare account ID
    SubnetId string
    The UUID of the subnet.
    AccountId string
    Cloudflare account ID
    subnetId String
    The UUID of the subnet.
    accountId String
    Cloudflare account ID
    subnetId string
    The UUID of the subnet.
    accountId string
    Cloudflare account ID
    subnet_id str
    The UUID of the subnet.
    account_id str
    Cloudflare account ID
    subnetId String
    The UUID of the subnet.
    accountId String
    Cloudflare account ID

    getZeroTrustDeviceSubnet Result

    The following output properties are available:

    Comment string
    An optional description of the subnet.
    CreatedAt string
    Timestamp of when the resource was created.
    DeletedAt string
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    Id string
    The UUID of the subnet.
    IsDefaultNetwork bool
    If true, this is the default subnet for the account. There can only be one default subnet per account.
    Name string
    A user-friendly name for the subnet.
    Network string
    The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
    SubnetId string
    The UUID of the subnet.
    SubnetType string
    The type of subnet. Available values: "cloudflareSource", "warp".
    AccountId string
    Cloudflare account ID
    Comment string
    An optional description of the subnet.
    CreatedAt string
    Timestamp of when the resource was created.
    DeletedAt string
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    Id string
    The UUID of the subnet.
    IsDefaultNetwork bool
    If true, this is the default subnet for the account. There can only be one default subnet per account.
    Name string
    A user-friendly name for the subnet.
    Network string
    The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
    SubnetId string
    The UUID of the subnet.
    SubnetType string
    The type of subnet. Available values: "cloudflareSource", "warp".
    AccountId string
    Cloudflare account ID
    comment String
    An optional description of the subnet.
    createdAt String
    Timestamp of when the resource was created.
    deletedAt String
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    id String
    The UUID of the subnet.
    isDefaultNetwork Boolean
    If true, this is the default subnet for the account. There can only be one default subnet per account.
    name String
    A user-friendly name for the subnet.
    network String
    The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
    subnetId String
    The UUID of the subnet.
    subnetType String
    The type of subnet. Available values: "cloudflareSource", "warp".
    accountId String
    Cloudflare account ID
    comment string
    An optional description of the subnet.
    createdAt string
    Timestamp of when the resource was created.
    deletedAt string
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    id string
    The UUID of the subnet.
    isDefaultNetwork boolean
    If true, this is the default subnet for the account. There can only be one default subnet per account.
    name string
    A user-friendly name for the subnet.
    network string
    The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
    subnetId string
    The UUID of the subnet.
    subnetType string
    The type of subnet. Available values: "cloudflareSource", "warp".
    accountId string
    Cloudflare account ID
    comment str
    An optional description of the subnet.
    created_at str
    Timestamp of when the resource was created.
    deleted_at str
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    id str
    The UUID of the subnet.
    is_default_network bool
    If true, this is the default subnet for the account. There can only be one default subnet per account.
    name str
    A user-friendly name for the subnet.
    network str
    The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
    subnet_id str
    The UUID of the subnet.
    subnet_type str
    The type of subnet. Available values: "cloudflareSource", "warp".
    account_id str
    Cloudflare account ID
    comment String
    An optional description of the subnet.
    createdAt String
    Timestamp of when the resource was created.
    deletedAt String
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    id String
    The UUID of the subnet.
    isDefaultNetwork Boolean
    If true, this is the default subnet for the account. There can only be one default subnet per account.
    name String
    A user-friendly name for the subnet.
    network String
    The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
    subnetId String
    The UUID of the subnet.
    subnetType String
    The type of subnet. Available values: "cloudflareSource", "warp".
    accountId String
    Cloudflare account ID

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v6.15.0
    published on Saturday, May 2, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.