Class AccessRule
Provides a Cloudflare IP Firewall Access Rule resource. Access control can be applied on basis of IP addresses, IP ranges, AS numbers or countries.
Inherited Members
Namespace: Pulumi.Cloudflare
Assembly: Pulumi.Cloudflare.dll
Syntax
public class AccessRule : CustomResource
Constructors
View SourceAccessRule(String, AccessRuleArgs, CustomResourceOptions)
Create a AccessRule resource with the given unique name, arguments, and options.
Declaration
public AccessRule(string name, AccessRuleArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AccessRuleArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceConfiguration
Rule configuration to apply to a matched request. It's a complex value. See description below.
Declaration
public Output<AccessRuleConfiguration> Configuration { get; }
Property Value
| Type | Description |
|---|---|
| Output<AccessRuleConfiguration> |
Mode
The action to apply to a matched request. Allowed values: "block", "challenge", "whitelist", "js_challenge"
Declaration
public Output<string> Mode { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Notes
A personal note about the rule. Typically used as a reminder or explanation for the rule.
Declaration
public Output<string> Notes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ZoneId
The DNS zone to which the access rule should be added.
Declaration
public Output<string> ZoneId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AccessRuleState, CustomResourceOptions)
Get an existing AccessRule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AccessRule Get(string name, Input<string> id, AccessRuleState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AccessRuleState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AccessRule |