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

ngrok.Credential

Explore with Pulumi AI

Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok agent to connect the ngrok service as your account. They are installed with the ngrok authtoken command or by specifying it in the ngrok.yml configuration file with the authtoken property.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ngrok = PiersKarsenbarg.Ngrok;

return await Deployment.RunAsync(() => 
{
    var example = new Ngrok.Credential("example", new()
    {
        Description = "development cred for alan@example.com",
    });

});
Copy
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.NewCredential(ctx, "example", &ngrok.CredentialArgs{
			Description: pulumi.String("development cred for alan@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ngrok.Credential;
import com.pulumi.ngrok.CredentialArgs;
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 Credential("example", CredentialArgs.builder()        
            .description("development cred for alan@example.com")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as ngrok from "@pierskarsenbarg/ngrok";

const example = new ngrok.Credential("example", {description: "development cred for alan@example.com"});
Copy
import pulumi
import pierskarsenbarg_pulumi_ngrok as ngrok

example = ngrok.Credential("example", description="development cred for alan@example.com")
Copy
resources:
  example:
    type: ngrok:Credential
    properties:
      description: development cred for alan@example.com
Copy

Create Credential Resource

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

Constructor syntax

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

@overload
def Credential(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               acls: Optional[Sequence[str]] = None,
               description: Optional[str] = None,
               metadata: Optional[str] = None)
func NewCredential(ctx *Context, name string, args *CredentialArgs, opts ...ResourceOption) (*Credential, error)
public Credential(string name, CredentialArgs? args = null, CustomResourceOptions? opts = null)
public Credential(String name, CredentialArgs args)
public Credential(String name, CredentialArgs args, CustomResourceOptions options)
type: ngrok:Credential
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 CredentialArgs
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 CredentialArgs
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 CredentialArgs
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 CredentialArgs
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. CredentialArgs
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 credentialResource = new Ngrok.Credential("credentialResource", new()
{
    Acls = new[]
    {
        "string",
    },
    Description = "string",
    Metadata = "string",
});
Copy
example, err := ngrok.NewCredential(ctx, "credentialResource", &ngrok.CredentialArgs{
	Acls: pulumi.StringArray{
		pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	Metadata:    pulumi.String("string"),
})
Copy
var credentialResource = new Credential("credentialResource", CredentialArgs.builder()
    .acls("string")
    .description("string")
    .metadata("string")
    .build());
Copy
credential_resource = ngrok.Credential("credentialResource",
    acls=["string"],
    description="string",
    metadata="string")
Copy
const credentialResource = new ngrok.Credential("credentialResource", {
    acls: ["string"],
    description: "string",
    metadata: "string",
});
Copy
type: ngrok:Credential
properties:
    acls:
        - string
    description: string
    metadata: string
Copy

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

Acls List<string>
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
Description string
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
Metadata string
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
Acls []string
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
Description string
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
Metadata string
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
acls List<String>
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
description String
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
metadata String
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
acls string[]
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
description string
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
metadata string
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
acls Sequence[str]
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
description str
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
metadata str
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
acls List<String>
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
description String
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
metadata String
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.

Outputs

All input properties are implicitly available as output properties. Additionally, the Credential resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Token string
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
Id string
The provider-assigned unique ID for this managed resource.
Token string
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
id String
The provider-assigned unique ID for this managed resource.
token String
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
id string
The provider-assigned unique ID for this managed resource.
token string
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
id str
The provider-assigned unique ID for this managed resource.
token str
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
id String
The provider-assigned unique ID for this managed resource.
token String
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.

Look up Existing Credential Resource

Get an existing Credential 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?: CredentialState, opts?: CustomResourceOptions): Credential
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        acls: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        metadata: Optional[str] = None,
        token: Optional[str] = None) -> Credential
func GetCredential(ctx *Context, name string, id IDInput, state *CredentialState, opts ...ResourceOption) (*Credential, error)
public static Credential Get(string name, Input<string> id, CredentialState? state, CustomResourceOptions? opts = null)
public static Credential get(String name, Output<String> id, CredentialState state, CustomResourceOptions options)
resources:  _:    type: ngrok:Credential    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:
Acls List<string>
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
Description string
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
Metadata string
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
Token Changes to this property will trigger replacement. string
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
Acls []string
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
Description string
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
Metadata string
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
Token Changes to this property will trigger replacement. string
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
acls List<String>
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
description String
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
metadata String
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
token Changes to this property will trigger replacement. String
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
acls string[]
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
description string
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
metadata string
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
token Changes to this property will trigger replacement. string
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
acls Sequence[str]
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
description str
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
metadata str
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
token Changes to this property will trigger replacement. str
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.
acls List<String>
optional list of ACL rules. If unspecified, the credential will have no restrictions. The only allowed ACL rule at this time is the bind rule. The bind rule allows the caller to restrict what domains and addresses the token is allowed to bind. For example, to allow the token to open a tunnel on example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind rules may specify a leading wildcard to match multiple domains with a common suffix. For example, you may specify a rule of bind:*.example.com which will allow x.example.com, y.example.com, *.example.com, etc. A rule of '*' is equivalent to no acl at all and will explicitly permit all actions.
description String
human-readable description of who or what will use the credential to authenticate. Optional, max 255 bytes.
metadata String
arbitrary user-defined machine-readable data of this credential. Optional, max 4096 bytes.
token Changes to this property will trigger replacement. String
the credential's authtoken that can be used to authenticate an ngrok client. This value is only available one time, on the API response from credential creation, otherwise it is null.

Package Details

Repository
ngrok pierskarsenbarg/pulumi-ngrok
License
Apache-2.0
Notes
This Pulumi package is based on the ngrok Terraform Provider.