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

ngrok.IpPolicy

Explore with Pulumi AI

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

    IP Policies are reusable groups of CIDR ranges with an allow or deny action. They can be attached to endpoints via the Endpoint Configuration IP Policy module. They can also be used with IP Restrictions to control source IP ranges that can start tunnel sessions and connect to the API and dashboard.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ngrok = PiersKarsenbarg.Ngrok;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ngrok.IpPolicy("example", new()
        {
            Action = "allow",
            Description = "API Outbound Gateway",
        });
    
    });
    
    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.NewIpPolicy(ctx, "example", &ngrok.IpPolicyArgs{
    			Action:      pulumi.String("allow"),
    			Description: pulumi.String("API Outbound Gateway"),
    		})
    		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.IpPolicy;
    import com.pulumi.ngrok.IpPolicyArgs;
    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 IpPolicy("example", IpPolicyArgs.builder()        
                .action("allow")
                .description("API Outbound Gateway")
                .build());
    
        }
    }
    
    import pulumi
    import pierskarsenbarg_pulumi_ngrok as ngrok
    
    example = ngrok.IpPolicy("example",
        action="allow",
        description="API Outbound Gateway")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as ngrok from "@pierskarsenbarg/ngrok";
    
    const example = new ngrok.IpPolicy("example", {
        action: "allow",
        description: "API Outbound Gateway",
    });
    
    resources:
      example:
        type: ngrok:IpPolicy
        properties:
          action: allow
          description: API Outbound Gateway
    

    Create IpPolicy Resource

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

    Constructor syntax

    new IpPolicy(name: string, args?: IpPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def IpPolicy(resource_name: str,
                 args: Optional[IpPolicyArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpPolicy(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 action: Optional[str] = None,
                 description: Optional[str] = None,
                 metadata: Optional[str] = None)
    func NewIpPolicy(ctx *Context, name string, args *IpPolicyArgs, opts ...ResourceOption) (*IpPolicy, error)
    public IpPolicy(string name, IpPolicyArgs? args = null, CustomResourceOptions? opts = null)
    public IpPolicy(String name, IpPolicyArgs args)
    public IpPolicy(String name, IpPolicyArgs args, CustomResourceOptions options)
    
    type: ngrok:IpPolicy
    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 IpPolicyArgs
    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 IpPolicyArgs
    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 IpPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var ipPolicyResource = new Ngrok.IpPolicy("ipPolicyResource", new()
    {
        Action = "string",
        Description = "string",
        Metadata = "string",
    });
    
    example, err := ngrok.NewIpPolicy(ctx, "ipPolicyResource", &ngrok.IpPolicyArgs{
    	Action:      pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Metadata:    pulumi.String("string"),
    })
    
    var ipPolicyResource = new IpPolicy("ipPolicyResource", IpPolicyArgs.builder()        
        .action("string")
        .description("string")
        .metadata("string")
        .build());
    
    ip_policy_resource = ngrok.IpPolicy("ipPolicyResource",
        action="string",
        description="string",
        metadata="string")
    
    const ipPolicyResource = new ngrok.IpPolicy("ipPolicyResource", {
        action: "string",
        description: "string",
        metadata: "string",
    });
    
    type: ngrok:IpPolicy
    properties:
        action: string
        description: string
        metadata: string
    

    IpPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The IpPolicy resource accepts the following input properties:

    Action string
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    Description string
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    Metadata string
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
    Action string
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    Description string
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    Metadata string
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
    action String
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    description String
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    metadata String
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
    action string
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    description string
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    metadata string
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
    action str
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    description str
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    metadata str
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
    action String
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    description String
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    metadata String
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.

    Outputs

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

    Get an existing IpPolicy 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?: IpPolicyState, opts?: CustomResourceOptions): IpPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            description: Optional[str] = None,
            metadata: Optional[str] = None) -> IpPolicy
    func GetIpPolicy(ctx *Context, name string, id IDInput, state *IpPolicyState, opts ...ResourceOption) (*IpPolicy, error)
    public static IpPolicy Get(string name, Input<string> id, IpPolicyState? state, CustomResourceOptions? opts = null)
    public static IpPolicy get(String name, Output<String> id, IpPolicyState 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
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    Description string
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    Metadata string
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
    Action string
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    Description string
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    Metadata string
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
    action String
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    description String
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    metadata String
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
    action string
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    description string
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    metadata string
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
    action str
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    description str
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    metadata str
    arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
    action String
    this field is deprecated. Please leave it empty and use the ip policy rule object's "action" field instead. It is temporarily retained for backwards compatibility reasons.
    description String
    human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
    metadata String
    arbitrary user-defined machine-readable data of this IP policy. 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