1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZeroTrustRiskBehavior
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.ZeroTrustRiskBehavior

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleZeroTrustRiskBehavior = new cloudflare.ZeroTrustRiskBehavior("example_zero_trust_risk_behavior", {
        accountId: "account_id",
        behaviors: {
            foo: {
                enabled: true,
                riskLevel: "low",
            },
        },
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_zero_trust_risk_behavior = cloudflare.ZeroTrustRiskBehavior("example_zero_trust_risk_behavior",
        account_id="account_id",
        behaviors={
            "foo": {
                "enabled": True,
                "risk_level": "low",
            },
        })
    
    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.NewZeroTrustRiskBehavior(ctx, "example_zero_trust_risk_behavior", &cloudflare.ZeroTrustRiskBehaviorArgs{
    			AccountId: pulumi.String("account_id"),
    			Behaviors: cloudflare.ZeroTrustRiskBehaviorBehaviorsMap{
    				"foo": &cloudflare.ZeroTrustRiskBehaviorBehaviorsArgs{
    					Enabled:   pulumi.Bool(true),
    					RiskLevel: pulumi.String("low"),
    				},
    			},
    		})
    		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 exampleZeroTrustRiskBehavior = new Cloudflare.ZeroTrustRiskBehavior("example_zero_trust_risk_behavior", new()
        {
            AccountId = "account_id",
            Behaviors = 
            {
                { "foo", new Cloudflare.Inputs.ZeroTrustRiskBehaviorBehaviorsArgs
                {
                    Enabled = true,
                    RiskLevel = "low",
                } },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.ZeroTrustRiskBehavior;
    import com.pulumi.cloudflare.ZeroTrustRiskBehaviorArgs;
    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 exampleZeroTrustRiskBehavior = new ZeroTrustRiskBehavior("exampleZeroTrustRiskBehavior", ZeroTrustRiskBehaviorArgs.builder()
                .accountId("account_id")
                .behaviors(Map.of("foo", ZeroTrustRiskBehaviorBehaviorsArgs.builder()
                    .enabled(true)
                    .riskLevel("low")
                    .build()))
                .build());
    
        }
    }
    
    resources:
      exampleZeroTrustRiskBehavior:
        type: cloudflare:ZeroTrustRiskBehavior
        name: example_zero_trust_risk_behavior
        properties:
          accountId: account_id
          behaviors:
            foo:
              enabled: true
              riskLevel: low
    

    Create ZeroTrustRiskBehavior Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ZeroTrustRiskBehavior(name: string, args: ZeroTrustRiskBehaviorArgs, opts?: CustomResourceOptions);
    @overload
    def ZeroTrustRiskBehavior(resource_name: str,
                              args: ZeroTrustRiskBehaviorArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ZeroTrustRiskBehavior(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              account_id: Optional[str] = None,
                              behaviors: Optional[Mapping[str, ZeroTrustRiskBehaviorBehaviorsArgs]] = None)
    func NewZeroTrustRiskBehavior(ctx *Context, name string, args ZeroTrustRiskBehaviorArgs, opts ...ResourceOption) (*ZeroTrustRiskBehavior, error)
    public ZeroTrustRiskBehavior(string name, ZeroTrustRiskBehaviorArgs args, CustomResourceOptions? opts = null)
    public ZeroTrustRiskBehavior(String name, ZeroTrustRiskBehaviorArgs args)
    public ZeroTrustRiskBehavior(String name, ZeroTrustRiskBehaviorArgs args, CustomResourceOptions options)
    
    type: cloudflare:ZeroTrustRiskBehavior
    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 ZeroTrustRiskBehaviorArgs
    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 ZeroTrustRiskBehaviorArgs
    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 ZeroTrustRiskBehaviorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ZeroTrustRiskBehaviorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ZeroTrustRiskBehaviorArgs
    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 zeroTrustRiskBehaviorResource = new Cloudflare.ZeroTrustRiskBehavior("zeroTrustRiskBehaviorResource", new()
    {
        AccountId = "string",
        Behaviors = 
        {
            { "string", new Cloudflare.Inputs.ZeroTrustRiskBehaviorBehaviorsArgs
            {
                Enabled = false,
                RiskLevel = "string",
            } },
        },
    });
    
    example, err := cloudflare.NewZeroTrustRiskBehavior(ctx, "zeroTrustRiskBehaviorResource", &cloudflare.ZeroTrustRiskBehaviorArgs{
    	AccountId: pulumi.String("string"),
    	Behaviors: cloudflare.ZeroTrustRiskBehaviorBehaviorsMap{
    		"string": &cloudflare.ZeroTrustRiskBehaviorBehaviorsArgs{
    			Enabled:   pulumi.Bool(false),
    			RiskLevel: pulumi.String("string"),
    		},
    	},
    })
    
    var zeroTrustRiskBehaviorResource = new ZeroTrustRiskBehavior("zeroTrustRiskBehaviorResource", ZeroTrustRiskBehaviorArgs.builder()
        .accountId("string")
        .behaviors(Map.of("string", Map.ofEntries(
            Map.entry("enabled", false),
            Map.entry("riskLevel", "string")
        )))
        .build());
    
    zero_trust_risk_behavior_resource = cloudflare.ZeroTrustRiskBehavior("zeroTrustRiskBehaviorResource",
        account_id="string",
        behaviors={
            "string": {
                "enabled": False,
                "risk_level": "string",
            },
        })
    
    const zeroTrustRiskBehaviorResource = new cloudflare.ZeroTrustRiskBehavior("zeroTrustRiskBehaviorResource", {
        accountId: "string",
        behaviors: {
            string: {
                enabled: false,
                riskLevel: "string",
            },
        },
    });
    
    type: cloudflare:ZeroTrustRiskBehavior
    properties:
        accountId: string
        behaviors:
            string:
                enabled: false
                riskLevel: string
    

    ZeroTrustRiskBehavior 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 ZeroTrustRiskBehavior resource accepts the following input properties:

    AccountId string
    Behaviors Dictionary<string, ZeroTrustRiskBehaviorBehaviorsArgs>
    AccountId string
    Behaviors map[string]ZeroTrustRiskBehaviorBehaviorsArgs
    accountId String
    behaviors Map<String,ZeroTrustRiskBehaviorBehaviorsArgs>
    accountId string
    behaviors {[key: string]: ZeroTrustRiskBehaviorBehaviorsArgs}
    account_id str
    behaviors Mapping[str, ZeroTrustRiskBehaviorBehaviorsArgs]
    accountId String
    behaviors Map<Property Map>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ZeroTrustRiskBehavior resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ZeroTrustRiskBehavior Resource

    Get an existing ZeroTrustRiskBehavior 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?: ZeroTrustRiskBehaviorState, opts?: CustomResourceOptions): ZeroTrustRiskBehavior
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            behaviors: Optional[Mapping[str, ZeroTrustRiskBehaviorBehaviorsArgs]] = None) -> ZeroTrustRiskBehavior
    func GetZeroTrustRiskBehavior(ctx *Context, name string, id IDInput, state *ZeroTrustRiskBehaviorState, opts ...ResourceOption) (*ZeroTrustRiskBehavior, error)
    public static ZeroTrustRiskBehavior Get(string name, Input<string> id, ZeroTrustRiskBehaviorState? state, CustomResourceOptions? opts = null)
    public static ZeroTrustRiskBehavior get(String name, Output<String> id, ZeroTrustRiskBehaviorState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:ZeroTrustRiskBehavior    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.
    The following state arguments are supported:
    AccountId string
    Behaviors Dictionary<string, ZeroTrustRiskBehaviorBehaviorsArgs>
    AccountId string
    Behaviors map[string]ZeroTrustRiskBehaviorBehaviorsArgs
    accountId String
    behaviors Map<String,ZeroTrustRiskBehaviorBehaviorsArgs>
    accountId string
    behaviors {[key: string]: ZeroTrustRiskBehaviorBehaviorsArgs}
    account_id str
    behaviors Mapping[str, ZeroTrustRiskBehaviorBehaviorsArgs]
    accountId String
    behaviors Map<Property Map>

    Supporting Types

    ZeroTrustRiskBehaviorBehaviors, ZeroTrustRiskBehaviorBehaviorsArgs

    Enabled bool
    RiskLevel string
    Available values: "low", "medium", "high".
    Enabled bool
    RiskLevel string
    Available values: "low", "medium", "high".
    enabled Boolean
    riskLevel String
    Available values: "low", "medium", "high".
    enabled boolean
    riskLevel string
    Available values: "low", "medium", "high".
    enabled bool
    risk_level str
    Available values: "low", "medium", "high".
    enabled Boolean
    riskLevel String
    Available values: "low", "medium", "high".

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi