ns1.Tsigkey
Explore with Pulumi AI
Provides a NS1 TSIG Key resource. This can be used to create, modify, and delete TSIG keys.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ns1 from "@pulumi/ns1";
const example = new ns1.Tsigkey("example", {
name: "ExampleTsigKey",
algorithm: "hmac-sha256",
secret: "Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA==",
});
import pulumi
import pulumi_ns1 as ns1
example = ns1.Tsigkey("example",
name="ExampleTsigKey",
algorithm="hmac-sha256",
secret="Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA==")
package main
import (
"github.com/pulumi/pulumi-ns1/sdk/v3/go/ns1"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ns1.NewTsigkey(ctx, "example", &ns1.TsigkeyArgs{
Name: pulumi.String("ExampleTsigKey"),
Algorithm: pulumi.String("hmac-sha256"),
Secret: pulumi.String("Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA=="),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ns1 = Pulumi.Ns1;
return await Deployment.RunAsync(() =>
{
var example = new Ns1.Tsigkey("example", new()
{
Name = "ExampleTsigKey",
Algorithm = "hmac-sha256",
Secret = "Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA==",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ns1.Tsigkey;
import com.pulumi.ns1.TsigkeyArgs;
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 Tsigkey("example", TsigkeyArgs.builder()
.name("ExampleTsigKey")
.algorithm("hmac-sha256")
.secret("Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA==")
.build());
}
}
resources:
example:
type: ns1:Tsigkey
properties:
name: ExampleTsigKey
algorithm: hmac-sha256
secret: Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA==
NS1 Documentation
Create Tsigkey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Tsigkey(name: string, args: TsigkeyArgs, opts?: CustomResourceOptions);
@overload
def Tsigkey(resource_name: str,
args: TsigkeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Tsigkey(resource_name: str,
opts: Optional[ResourceOptions] = None,
algorithm: Optional[str] = None,
secret: Optional[str] = None,
name: Optional[str] = None)
func NewTsigkey(ctx *Context, name string, args TsigkeyArgs, opts ...ResourceOption) (*Tsigkey, error)
public Tsigkey(string name, TsigkeyArgs args, CustomResourceOptions? opts = null)
public Tsigkey(String name, TsigkeyArgs args)
public Tsigkey(String name, TsigkeyArgs args, CustomResourceOptions options)
type: ns1:Tsigkey
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 TsigkeyArgs
- 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 TsigkeyArgs
- 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 TsigkeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TsigkeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TsigkeyArgs
- 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 tsigkeyResource = new Ns1.Tsigkey("tsigkeyResource", new()
{
Algorithm = "string",
Secret = "string",
Name = "string",
});
example, err := ns1.NewTsigkey(ctx, "tsigkeyResource", &ns1.TsigkeyArgs{
Algorithm: pulumi.String("string"),
Secret: pulumi.String("string"),
Name: pulumi.String("string"),
})
var tsigkeyResource = new Tsigkey("tsigkeyResource", TsigkeyArgs.builder()
.algorithm("string")
.secret("string")
.name("string")
.build());
tsigkey_resource = ns1.Tsigkey("tsigkeyResource",
algorithm="string",
secret="string",
name="string")
const tsigkeyResource = new ns1.Tsigkey("tsigkeyResource", {
algorithm: "string",
secret: "string",
name: "string",
});
type: ns1:Tsigkey
properties:
algorithm: string
name: string
secret: string
Tsigkey 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 Tsigkey resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the Tsigkey 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 Tsigkey Resource
Get an existing Tsigkey 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?: TsigkeyState, opts?: CustomResourceOptions): Tsigkey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
algorithm: Optional[str] = None,
name: Optional[str] = None,
secret: Optional[str] = None) -> Tsigkey
func GetTsigkey(ctx *Context, name string, id IDInput, state *TsigkeyState, opts ...ResourceOption) (*Tsigkey, error)
public static Tsigkey Get(string name, Input<string> id, TsigkeyState? state, CustomResourceOptions? opts = null)
public static Tsigkey get(String name, Output<String> id, TsigkeyState 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.
Import
$ pulumi import ns1:index/tsigkey:Tsigkey importTest <name>`
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- NS1 pulumi/pulumi-ns1
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ns1
Terraform Provider.