1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. RiskBehavior
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.RiskBehavior

Explore with Pulumi AI

Deprecated: cloudflare.index/riskbehavior.RiskBehavior has been deprecated in favor of cloudflare.index/zerotrustriskbehavior.ZeroTrustRiskBehavior

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",
        },
    },
});
Copy
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",
        },
    })
Copy
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
	})
}
Copy
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",
            } },
        },
    });

});
Copy
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());

    }
}
Copy
resources:
  exampleZeroTrustRiskBehavior:
    type: cloudflare:ZeroTrustRiskBehavior
    name: example_zero_trust_risk_behavior
    properties:
      accountId: account_id
      behaviors:
        foo:
          enabled: true
          riskLevel: low
Copy

Create RiskBehavior Resource

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

Constructor syntax

new RiskBehavior(name: string, args: RiskBehaviorArgs, opts?: CustomResourceOptions);
@overload
def RiskBehavior(resource_name: str,
                 args: RiskBehaviorArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def RiskBehavior(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 account_id: Optional[str] = None,
                 behaviors: Optional[Mapping[str, RiskBehaviorBehaviorsArgs]] = None)
func NewRiskBehavior(ctx *Context, name string, args RiskBehaviorArgs, opts ...ResourceOption) (*RiskBehavior, error)
public RiskBehavior(string name, RiskBehaviorArgs args, CustomResourceOptions? opts = null)
public RiskBehavior(String name, RiskBehaviorArgs args)
public RiskBehavior(String name, RiskBehaviorArgs args, CustomResourceOptions options)
type: cloudflare:RiskBehavior
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RiskBehaviorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RiskBehaviorArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RiskBehaviorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RiskBehaviorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RiskBehaviorArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

AccountId This property is required. string
Behaviors This property is required. Dictionary<string, RiskBehaviorBehaviorsArgs>
AccountId This property is required. string
Behaviors This property is required. map[string]RiskBehaviorBehaviorsArgs
accountId This property is required. String
behaviors This property is required. Map<String,RiskBehaviorBehaviorsArgs>
accountId This property is required. string
behaviors This property is required. {[key: string]: RiskBehaviorBehaviorsArgs}
account_id This property is required. str
behaviors This property is required. Mapping[str, RiskBehaviorBehaviorsArgs]
accountId This property is required. String
behaviors This property is required. Map<Property Map>

Outputs

All input properties are implicitly available as output properties. Additionally, the RiskBehavior 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 RiskBehavior Resource

Get an existing RiskBehavior 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?: RiskBehaviorState, opts?: CustomResourceOptions): RiskBehavior
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        behaviors: Optional[Mapping[str, RiskBehaviorBehaviorsArgs]] = None) -> RiskBehavior
func GetRiskBehavior(ctx *Context, name string, id IDInput, state *RiskBehaviorState, opts ...ResourceOption) (*RiskBehavior, error)
public static RiskBehavior Get(string name, Input<string> id, RiskBehaviorState? state, CustomResourceOptions? opts = null)
public static RiskBehavior get(String name, Output<String> id, RiskBehaviorState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:RiskBehavior    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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, RiskBehaviorBehaviorsArgs>
AccountId string
Behaviors map[string]RiskBehaviorBehaviorsArgs
accountId String
behaviors Map<String,RiskBehaviorBehaviorsArgs>
accountId string
behaviors {[key: string]: RiskBehaviorBehaviorsArgs}
account_id str
behaviors Mapping[str, RiskBehaviorBehaviorsArgs]
accountId String
behaviors Map<Property Map>

Supporting Types

RiskBehaviorBehaviors
, RiskBehaviorBehaviorsArgs

Enabled This property is required. bool
RiskLevel This property is required. string
Available values: "low", "medium", "high".
Enabled This property is required. bool
RiskLevel This property is required. string
Available values: "low", "medium", "high".
enabled This property is required. Boolean
riskLevel This property is required. String
Available values: "low", "medium", "high".
enabled This property is required. boolean
riskLevel This property is required. string
Available values: "low", "medium", "high".
enabled This property is required. bool
risk_level This property is required. str
Available values: "low", "medium", "high".
enabled This property is required. Boolean
riskLevel This property is required. 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.