com.pulumi.cloudflare.SplitTunnel Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.cloudflare;
import com.pulumi.cloudflare.SplitTunnelArgs;
import com.pulumi.cloudflare.Utilities;
import com.pulumi.cloudflare.inputs.SplitTunnelState;
import com.pulumi.cloudflare.outputs.SplitTunnelTunnel;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a Cloudflare Split Tunnel resource. Split tunnels are used to either
* include or exclude lists of routes from the WARP client's tunnel.
*
* ## Import
*
* Split Tunnels for default device policies must use "default" as the policy ID.
*
* ```sh
* $ pulumi import cloudflare:index/splitTunnel:SplitTunnel example <account_id>/<policy_id>/<mode>
* ```
*
*/
@ResourceType(type="cloudflare:index/splitTunnel:SplitTunnel")
public class SplitTunnel extends com.pulumi.resources.CustomResource {
/**
* The account identifier to target for the resource.
*
*/
@Export(name="accountId", type=String.class, parameters={})
private Output accountId;
/**
* @return The account identifier to target for the resource.
*
*/
public Output accountId() {
return this.accountId;
}
/**
* The mode of the split tunnel policy. Available values: `include`, `exclude`.
*
*/
@Export(name="mode", type=String.class, parameters={})
private Output mode;
/**
* @return The mode of the split tunnel policy. Available values: `include`, `exclude`.
*
*/
public Output mode() {
return this.mode;
}
/**
* The settings policy for which to configure this split tunnel policy.
*
*/
@Export(name="policyId", type=String.class, parameters={})
private Output* @Nullable */ String> policyId;
/**
* @return The settings policy for which to configure this split tunnel policy.
*
*/
public Output> policyId() {
return Codegen.optional(this.policyId);
}
/**
* The value of the tunnel attributes.
*
*/
@Export(name="tunnels", type=List.class, parameters={SplitTunnelTunnel.class})
private Output> tunnels;
/**
* @return The value of the tunnel attributes.
*
*/
public Output> tunnels() {
return this.tunnels;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public SplitTunnel(String name) {
this(name, SplitTunnelArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public SplitTunnel(String name, SplitTunnelArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public SplitTunnel(String name, SplitTunnelArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("cloudflare:index/splitTunnel:SplitTunnel", name, args == null ? SplitTunnelArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}
private SplitTunnel(String name, Output id, @Nullable SplitTunnelState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("cloudflare:index/splitTunnel:SplitTunnel", name, state, makeResourceOptions(options, id));
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static SplitTunnel get(String name, Output id, @Nullable SplitTunnelState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new SplitTunnel(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy