1. Packages
  2. NS1
  3. API Docs
  4. Tsigkey
NS1 v3.0.0 published on Friday, Mar 17, 2023 by Pulumi

ns1.Tsigkey

Explore with Pulumi AI

ns1 logo
NS1 v3.0.0 published on Friday, Mar 17, 2023 by Pulumi

    Provides a NS1 TSIG Key resource. This can be used to create, modify, and delete TSIG keys.

    NS1 Documentation

    TSIG Keys Api Doc

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Ns1 = Pulumi.Ns1;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ns1.Tsigkey("example", new()
        {
            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{
    			Algorithm: pulumi.String("hmac-sha256"),
    			Secret:    pulumi.String("Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA=="),
    		})
    		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.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()        
                .algorithm("hmac-sha256")
                .secret("Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA==")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_ns1 as ns1
    
    example = ns1.Tsigkey("example",
        algorithm="hmac-sha256",
        secret="Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA==")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as ns1 from "@pulumi/ns1";
    
    const example = new ns1.Tsigkey("example", {
        algorithm: "hmac-sha256",
        secret: "Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA==",
    });
    
    resources:
      example:
        type: ns1:Tsigkey
        properties:
          algorithm: hmac-sha256
          secret: Ok1qR5IW1ajVka5cHPEJQIXfLyx5V3PSkFBROAzOn21JumDq6nIpoj6H8rfj5Uo+Ok55ZWQ0Wgrf302fDscHLA==
    

    Create Tsigkey Resource

    new Tsigkey(name: string, args: TsigkeyArgs, opts?: CustomResourceOptions);
    @overload
    def Tsigkey(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                algorithm: Optional[str] = None,
                name: Optional[str] = None,
                secret: Optional[str] = None)
    @overload
    def Tsigkey(resource_name: str,
                args: TsigkeyArgs,
                opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The Tsigkey resource accepts the following input properties:

    Algorithm string

    The algorithm used to hash the TSIG key's secret.

    Secret string

    The key's secret to be hashed.

    Name string

    The free form name of the tsigkey.

    Algorithm string

    The algorithm used to hash the TSIG key's secret.

    Secret string

    The key's secret to be hashed.

    Name string

    The free form name of the tsigkey.

    algorithm String

    The algorithm used to hash the TSIG key's secret.

    secret String

    The key's secret to be hashed.

    name String

    The free form name of the tsigkey.

    algorithm string

    The algorithm used to hash the TSIG key's secret.

    secret string

    The key's secret to be hashed.

    name string

    The free form name of the tsigkey.

    algorithm str

    The algorithm used to hash the TSIG key's secret.

    secret str

    The key's secret to be hashed.

    name str

    The free form name of the tsigkey.

    algorithm String

    The algorithm used to hash the TSIG key's secret.

    secret String

    The key's secret to be hashed.

    name String

    The free form name of the tsigkey.

    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.
    The following state arguments are supported:
    Algorithm string

    The algorithm used to hash the TSIG key's secret.

    Name string

    The free form name of the tsigkey.

    Secret string

    The key's secret to be hashed.

    Algorithm string

    The algorithm used to hash the TSIG key's secret.

    Name string

    The free form name of the tsigkey.

    Secret string

    The key's secret to be hashed.

    algorithm String

    The algorithm used to hash the TSIG key's secret.

    name String

    The free form name of the tsigkey.

    secret String

    The key's secret to be hashed.

    algorithm string

    The algorithm used to hash the TSIG key's secret.

    name string

    The free form name of the tsigkey.

    secret string

    The key's secret to be hashed.

    algorithm str

    The algorithm used to hash the TSIG key's secret.

    name str

    The free form name of the tsigkey.

    secret str

    The key's secret to be hashed.

    algorithm String

    The algorithm used to hash the TSIG key's secret.

    name String

    The free form name of the tsigkey.

    secret String

    The key's secret to be hashed.

    Import

     $ pulumi import ns1:index/tsigkey:Tsigkey importTest <name>`
    

    Package Details

    Repository
    NS1 pulumi/pulumi-ns1
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the ns1 Terraform Provider.

    ns1 logo
    NS1 v3.0.0 published on Friday, Mar 17, 2023 by Pulumi