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

ngrok.IpRestriction

Explore with Pulumi AI

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

    An IP restriction is a restriction placed on the CIDRs that are allowed to initiate traffic to a specific aspect of your ngrok account. An IP restriction has a type which defines the ingress it applies to. IP restrictions can be used to enforce the source IPs that can make API requests, log in to the dashboard, start ngrok agents, and connect to your public-facing endpoints.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ngrok = PiersKarsenbarg.Ngrok;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ngrok.IpRestriction("example", new()
        {
            IpPolicyIds = new[]
            {
                "ipp_25auGwa4eEWUeCOBfCZkwtwqFey",
            },
            Type = "dashboard",
        });
    
    });
    
    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.NewIpRestriction(ctx, "example", &ngrok.IpRestrictionArgs{
    			IpPolicyIds: pulumi.StringArray{
    				pulumi.String("ipp_25auGwa4eEWUeCOBfCZkwtwqFey"),
    			},
    			Type: pulumi.String("dashboard"),
    		})
    		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.IpRestriction;
    import com.pulumi.ngrok.IpRestrictionArgs;
    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 IpRestriction("example", IpRestrictionArgs.builder()        
                .ipPolicyIds("ipp_25auGwa4eEWUeCOBfCZkwtwqFey")
                .type("dashboard")
                .build());
    
        }
    }
    
    import pulumi
    import pierskarsenbarg_pulumi_ngrok as ngrok
    
    example = ngrok.IpRestriction("example",
        ip_policy_ids=["ipp_25auGwa4eEWUeCOBfCZkwtwqFey"],
        type="dashboard")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as ngrok from "@pierskarsenbarg/ngrok";
    
    const example = new ngrok.IpRestriction("example", {
        ipPolicyIds: ["ipp_25auGwa4eEWUeCOBfCZkwtwqFey"],
        type: "dashboard",
    });
    
    resources:
      example:
        type: ngrok:IpRestriction
        properties:
          ipPolicyIds:
            - ipp_25auGwa4eEWUeCOBfCZkwtwqFey
          type: dashboard
    

    Create IpRestriction Resource

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

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

    IpPolicyIds List<string>

    the set of IP policy identifiers that are used to enforce the restriction

    Type string

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    Description string

    human-readable description of this IP restriction. optional, max 255 bytes.

    Enforced bool

    true if the IP restriction will be enforced. if false, only warnings will be issued

    Metadata string

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    IpPolicyIds []string

    the set of IP policy identifiers that are used to enforce the restriction

    Type string

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    Description string

    human-readable description of this IP restriction. optional, max 255 bytes.

    Enforced bool

    true if the IP restriction will be enforced. if false, only warnings will be issued

    Metadata string

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    ipPolicyIds List<String>

    the set of IP policy identifiers that are used to enforce the restriction

    type String

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    description String

    human-readable description of this IP restriction. optional, max 255 bytes.

    enforced Boolean

    true if the IP restriction will be enforced. if false, only warnings will be issued

    metadata String

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    ipPolicyIds string[]

    the set of IP policy identifiers that are used to enforce the restriction

    type string

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    description string

    human-readable description of this IP restriction. optional, max 255 bytes.

    enforced boolean

    true if the IP restriction will be enforced. if false, only warnings will be issued

    metadata string

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    ip_policy_ids Sequence[str]

    the set of IP policy identifiers that are used to enforce the restriction

    type str

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    description str

    human-readable description of this IP restriction. optional, max 255 bytes.

    enforced bool

    true if the IP restriction will be enforced. if false, only warnings will be issued

    metadata str

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    ipPolicyIds List<String>

    the set of IP policy identifiers that are used to enforce the restriction

    type String

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    description String

    human-readable description of this IP restriction. optional, max 255 bytes.

    enforced Boolean

    true if the IP restriction will be enforced. if false, only warnings will be issued

    metadata String

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    Outputs

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

    Get an existing IpRestriction 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?: IpRestrictionState, opts?: CustomResourceOptions): IpRestriction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            enforced: Optional[bool] = None,
            ip_policy_ids: Optional[Sequence[str]] = None,
            metadata: Optional[str] = None,
            type: Optional[str] = None) -> IpRestriction
    func GetIpRestriction(ctx *Context, name string, id IDInput, state *IpRestrictionState, opts ...ResourceOption) (*IpRestriction, error)
    public static IpRestriction Get(string name, Input<string> id, IpRestrictionState? state, CustomResourceOptions? opts = null)
    public static IpRestriction get(String name, Output<String> id, IpRestrictionState 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:
    Description string

    human-readable description of this IP restriction. optional, max 255 bytes.

    Enforced bool

    true if the IP restriction will be enforced. if false, only warnings will be issued

    IpPolicyIds List<string>

    the set of IP policy identifiers that are used to enforce the restriction

    Metadata string

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    Type string

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    Description string

    human-readable description of this IP restriction. optional, max 255 bytes.

    Enforced bool

    true if the IP restriction will be enforced. if false, only warnings will be issued

    IpPolicyIds []string

    the set of IP policy identifiers that are used to enforce the restriction

    Metadata string

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    Type string

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    description String

    human-readable description of this IP restriction. optional, max 255 bytes.

    enforced Boolean

    true if the IP restriction will be enforced. if false, only warnings will be issued

    ipPolicyIds List<String>

    the set of IP policy identifiers that are used to enforce the restriction

    metadata String

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    type String

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    description string

    human-readable description of this IP restriction. optional, max 255 bytes.

    enforced boolean

    true if the IP restriction will be enforced. if false, only warnings will be issued

    ipPolicyIds string[]

    the set of IP policy identifiers that are used to enforce the restriction

    metadata string

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    type string

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    description str

    human-readable description of this IP restriction. optional, max 255 bytes.

    enforced bool

    true if the IP restriction will be enforced. if false, only warnings will be issued

    ip_policy_ids Sequence[str]

    the set of IP policy identifiers that are used to enforce the restriction

    metadata str

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    type str

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    description String

    human-readable description of this IP restriction. optional, max 255 bytes.

    enforced Boolean

    true if the IP restriction will be enforced. if false, only warnings will be issued

    ipPolicyIds List<String>

    the set of IP policy identifiers that are used to enforce the restriction

    metadata String

    arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.

    type String

    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: dashboard, api, agent, and endpoints

    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