1. Packages
  2. Splight
  3. API Docs
  4. Secret
splight v1.2.2 published on Friday, Nov 8, 2024 by splightplatform

splight.Secret

Explore with Pulumi AI

splight logo
splight v1.2.2 published on Friday, Nov 8, 2024 by splightplatform

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as splight from "@splightplatform/pulumi-splight";
    
    const mySecret = new splight.Secret("mySecret", {rawValue: "My Secret Value"});
    
    import pulumi
    import pulumi_splight as splight
    
    my_secret = splight.Secret("mySecret", raw_value="My Secret Value")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/splightplatform/pulumi-splight/sdk/go/splight"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := splight.NewSecret(ctx, "mySecret", &splight.SecretArgs{
    			RawValue: pulumi.String("My Secret Value"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Splight = Splight.Splight;
    
    return await Deployment.RunAsync(() => 
    {
        var mySecret = new Splight.Secret("mySecret", new()
        {
            RawValue = "My Secret Value",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.splight.Secret;
    import com.pulumi.splight.SecretArgs;
    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 mySecret = new Secret("mySecret", SecretArgs.builder()
                .rawValue("My Secret Value")
                .build());
    
        }
    }
    
    resources:
      mySecret:
        type: splight:Secret
        properties:
          rawValue: My Secret Value
    

    Create Secret Resource

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

    Constructor syntax

    new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);
    @overload
    def Secret(resource_name: str,
               args: SecretArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Secret(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               raw_value: Optional[str] = None,
               name: Optional[str] = None)
    func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)
    public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)
    public Secret(String name, SecretArgs args)
    public Secret(String name, SecretArgs args, CustomResourceOptions options)
    
    type: splight:Secret
    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 SecretArgs
    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 SecretArgs
    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 SecretArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretArgs
    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 secretResource = new Splight.Secret("secretResource", new()
    {
        RawValue = "string",
        Name = "string",
    });
    
    example, err := splight.NewSecret(ctx, "secretResource", &splight.SecretArgs{
    	RawValue: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    })
    
    var secretResource = new Secret("secretResource", SecretArgs.builder()
        .rawValue("string")
        .name("string")
        .build());
    
    secret_resource = splight.Secret("secretResource",
        raw_value="string",
        name="string")
    
    const secretResource = new splight.Secret("secretResource", {
        rawValue: "string",
        name: "string",
    });
    
    type: splight:Secret
    properties:
        name: string
        rawValue: string
    

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

    RawValue string
    Name string
    RawValue string
    Name string
    rawValue String
    name String
    rawValue string
    name string
    rawValue String
    name String

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Value string
    Id string
    The provider-assigned unique ID for this managed resource.
    Value string
    id String
    The provider-assigned unique ID for this managed resource.
    value String
    id string
    The provider-assigned unique ID for this managed resource.
    value string
    id str
    The provider-assigned unique ID for this managed resource.
    value str
    id String
    The provider-assigned unique ID for this managed resource.
    value String

    Look up Existing Secret Resource

    Get an existing Secret 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?: SecretState, opts?: CustomResourceOptions): Secret
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            raw_value: Optional[str] = None,
            value: Optional[str] = None) -> Secret
    func GetSecret(ctx *Context, name string, id IDInput, state *SecretState, opts ...ResourceOption) (*Secret, error)
    public static Secret Get(string name, Input<string> id, SecretState? state, CustomResourceOptions? opts = null)
    public static Secret get(String name, Output<String> id, SecretState 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:
    Name string
    RawValue string
    Value string
    Name string
    RawValue string
    Value string
    name String
    rawValue String
    value String
    name string
    rawValue string
    value string
    name str
    raw_value str
    value str
    name String
    rawValue String
    value String

    Import

    $ pulumi import splight:index/secret:Secret [options] splight_secret.<name> <secret_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    splight splightplatform/pulumi-splight
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the splight Terraform Provider.
    splight logo
    splight v1.2.2 published on Friday, Nov 8, 2024 by splightplatform