1. Packages
  2. ngrok
  3. API Docs
  4. IpPolicyRule
ngrok v0.0.24 published on Friday, Sep 29, 2023 by Piers Karsenbarg

ngrok.IpPolicyRule

Explore with Pulumi AI

ngrok logo
ngrok v0.0.24 published on Friday, Sep 29, 2023 by Piers Karsenbarg

    IP Policy Rules are the IPv4 or IPv6 CIDRs entries that make up an IP Policy.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ngrok = PiersKarsenbarg.Ngrok;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ngrok.IpPolicyRule("example", new()
        {
            Cidr = "212.3.14.0/24",
            Description = "nyc office",
            IpPolicyId = "ipp_25auGv9R7vPmi6NKs5Cxcyzc2Cm",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-ngrok/sdk/go/ngrok"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ngrok.NewIpPolicyRule(ctx, "example", &ngrok.IpPolicyRuleArgs{
    			Cidr:        pulumi.String("212.3.14.0/24"),
    			Description: pulumi.String("nyc office"),
    			IpPolicyId:  pulumi.String("ipp_25auGv9R7vPmi6NKs5Cxcyzc2Cm"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ngrok.IpPolicyRule;
    import com.pulumi.ngrok.IpPolicyRuleArgs;
    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 example = new IpPolicyRule("example", IpPolicyRuleArgs.builder()        
                .cidr("212.3.14.0/24")
                .description("nyc office")
                .ipPolicyId("ipp_25auGv9R7vPmi6NKs5Cxcyzc2Cm")
                .build());
    
        }
    }
    
    import pulumi
    import pierskarsenbarg_pulumi_ngrok as ngrok
    
    example = ngrok.IpPolicyRule("example",
        cidr="212.3.14.0/24",
        description="nyc office",
        ip_policy_id="ipp_25auGv9R7vPmi6NKs5Cxcyzc2Cm")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as ngrok from "@pierskarsenbarg/ngrok";
    
    const example = new ngrok.IpPolicyRule("example", {
        cidr: "212.3.14.0/24",
        description: "nyc office",
        ipPolicyId: "ipp_25auGv9R7vPmi6NKs5Cxcyzc2Cm",
    });
    
    resources:
      example:
        type: ngrok:IpPolicyRule
        properties:
          cidr: 212.3.14.0/24
          description: nyc office
          ipPolicyId: ipp_25auGv9R7vPmi6NKs5Cxcyzc2Cm
    

    Create IpPolicyRule Resource

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

    Constructor syntax

    new IpPolicyRule(name: string, args: IpPolicyRuleArgs, opts?: CustomResourceOptions);
    @overload
    def IpPolicyRule(resource_name: str,
                     args: IpPolicyRuleArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpPolicyRule(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     cidr: Optional[str] = None,
                     ip_policy_id: Optional[str] = None,
                     action: Optional[str] = None,
                     description: Optional[str] = None,
                     metadata: Optional[str] = None)
    func NewIpPolicyRule(ctx *Context, name string, args IpPolicyRuleArgs, opts ...ResourceOption) (*IpPolicyRule, error)
    public IpPolicyRule(string name, IpPolicyRuleArgs args, CustomResourceOptions? opts = null)
    public IpPolicyRule(String name, IpPolicyRuleArgs args)
    public IpPolicyRule(String name, IpPolicyRuleArgs args, CustomResourceOptions options)
    
    type: ngrok:IpPolicyRule
    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 IpPolicyRuleArgs
    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 IpPolicyRuleArgs
    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 IpPolicyRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpPolicyRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpPolicyRuleArgs
    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 ipPolicyRuleResource = new Ngrok.IpPolicyRule("ipPolicyRuleResource", new()
    {
        Cidr = "string",
        IpPolicyId = "string",
        Action = "string",
        Description = "string",
        Metadata = "string",
    });
    
    example, err := ngrok.NewIpPolicyRule(ctx, "ipPolicyRuleResource", &ngrok.IpPolicyRuleArgs{
    	Cidr:        pulumi.String("string"),
    	IpPolicyId:  pulumi.String("string"),
    	Action:      pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Metadata:    pulumi.String("string"),
    })
    
    var ipPolicyRuleResource = new IpPolicyRule("ipPolicyRuleResource", IpPolicyRuleArgs.builder()
        .cidr("string")
        .ipPolicyId("string")
        .action("string")
        .description("string")
        .metadata("string")
        .build());
    
    ip_policy_rule_resource = ngrok.IpPolicyRule("ipPolicyRuleResource",
        cidr="string",
        ip_policy_id="string",
        action="string",
        description="string",
        metadata="string")
    
    const ipPolicyRuleResource = new ngrok.IpPolicyRule("ipPolicyRuleResource", {
        cidr: "string",
        ipPolicyId: "string",
        action: "string",
        description: "string",
        metadata: "string",
    });
    
    type: ngrok:IpPolicyRule
    properties:
        action: string
        cidr: string
        description: string
        ipPolicyId: string
        metadata: string
    

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

    Cidr string
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    IpPolicyId string
    ID of the IP policy this IP policy rule will be attached to
    Action string
    the action to apply to the policy rule, either allow or deny
    Description string
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    Metadata string
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
    Cidr string
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    IpPolicyId string
    ID of the IP policy this IP policy rule will be attached to
    Action string
    the action to apply to the policy rule, either allow or deny
    Description string
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    Metadata string
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
    cidr String
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    ipPolicyId String
    ID of the IP policy this IP policy rule will be attached to
    action String
    the action to apply to the policy rule, either allow or deny
    description String
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    metadata String
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
    cidr string
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    ipPolicyId string
    ID of the IP policy this IP policy rule will be attached to
    action string
    the action to apply to the policy rule, either allow or deny
    description string
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    metadata string
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
    cidr str
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    ip_policy_id str
    ID of the IP policy this IP policy rule will be attached to
    action str
    the action to apply to the policy rule, either allow or deny
    description str
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    metadata str
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
    cidr String
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    ipPolicyId String
    ID of the IP policy this IP policy rule will be attached to
    action String
    the action to apply to the policy rule, either allow or deny
    description String
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    metadata String
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.

    Outputs

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

    Get an existing IpPolicyRule 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?: IpPolicyRuleState, opts?: CustomResourceOptions): IpPolicyRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            cidr: Optional[str] = None,
            description: Optional[str] = None,
            ip_policy_id: Optional[str] = None,
            metadata: Optional[str] = None) -> IpPolicyRule
    func GetIpPolicyRule(ctx *Context, name string, id IDInput, state *IpPolicyRuleState, opts ...ResourceOption) (*IpPolicyRule, error)
    public static IpPolicyRule Get(string name, Input<string> id, IpPolicyRuleState? state, CustomResourceOptions? opts = null)
    public static IpPolicyRule get(String name, Output<String> id, IpPolicyRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Action string
    the action to apply to the policy rule, either allow or deny
    Cidr string
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    Description string
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    IpPolicyId string
    ID of the IP policy this IP policy rule will be attached to
    Metadata string
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
    Action string
    the action to apply to the policy rule, either allow or deny
    Cidr string
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    Description string
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    IpPolicyId string
    ID of the IP policy this IP policy rule will be attached to
    Metadata string
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
    action String
    the action to apply to the policy rule, either allow or deny
    cidr String
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    description String
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    ipPolicyId String
    ID of the IP policy this IP policy rule will be attached to
    metadata String
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
    action string
    the action to apply to the policy rule, either allow or deny
    cidr string
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    description string
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    ipPolicyId string
    ID of the IP policy this IP policy rule will be attached to
    metadata string
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
    action str
    the action to apply to the policy rule, either allow or deny
    cidr str
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    description str
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    ip_policy_id str
    ID of the IP policy this IP policy rule will be attached to
    metadata str
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
    action String
    the action to apply to the policy rule, either allow or deny
    cidr String
    an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
    description String
    human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
    ipPolicyId String
    ID of the IP policy this IP policy rule will be attached to
    metadata String
    arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.

    Package Details

    Repository
    ngrok pierskarsenbarg/pulumi-ngrok
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ngrok Terraform Provider.
    ngrok logo
    ngrok v0.0.24 published on Friday, Sep 29, 2023 by Piers Karsenbarg