1. Packages
  2. Splight
  3. API Docs
  4. AssetMetadata
splight v0.1.24 published on Friday, Jun 28, 2024 by splightplatform

splight.AssetMetadata

Explore with Pulumi AI

splight logo
splight v0.1.24 published on Friday, Jun 28, 2024 by splightplatform

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as splight from "@splightplatform/pulumi-splight";
    
    const assetTestMetadata = new splight.AssetMetadata("assetTestMetadata", {
        type: "Number",
        unit: "meters",
        value: JSON.stringify(10),
        asset: "1234-1234-1234-1234",
    });
    
    import pulumi
    import json
    import pulumi_splight as splight
    
    asset_test_metadata = splight.AssetMetadata("assetTestMetadata",
        type="Number",
        unit="meters",
        value=json.dumps(10),
        asset="1234-1234-1234-1234")
    
    package main
    
    import (
    	"encoding/json"
    
    	"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 {
    		tmpJSON0, err := json.Marshal(10)
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = splight.NewAssetMetadata(ctx, "assetTestMetadata", &splight.AssetMetadataArgs{
    			Type:  pulumi.String("Number"),
    			Unit:  pulumi.String("meters"),
    			Value: pulumi.String(json0),
    			Asset: pulumi.String("1234-1234-1234-1234"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Splight = Splight.Splight;
    
    return await Deployment.RunAsync(() => 
    {
        var assetTestMetadata = new Splight.AssetMetadata("assetTestMetadata", new()
        {
            Type = "Number",
            Unit = "meters",
            Value = JsonSerializer.Serialize(10),
            Asset = "1234-1234-1234-1234",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.splight.AssetMetadata;
    import com.pulumi.splight.AssetMetadataArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 assetTestMetadata = new AssetMetadata("assetTestMetadata", AssetMetadataArgs.builder()
                .type("Number")
                .unit("meters")
                .value(serializeJson(
                    10))
                .asset("1234-1234-1234-1234")
                .build());
    
        }
    }
    
    resources:
      assetTestMetadata:
        type: splight:AssetMetadata
        properties:
          type: Number
          unit: meters
          value:
            fn::toJSON: 10
          asset: 1234-1234-1234-1234
    

    Create AssetMetadata Resource

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

    Constructor syntax

    new AssetMetadata(name: string, args: AssetMetadataArgs, opts?: CustomResourceOptions);
    @overload
    def AssetMetadata(resource_name: str,
                      args: AssetMetadataArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def AssetMetadata(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      asset: Optional[str] = None,
                      type: Optional[str] = None,
                      value: Optional[str] = None,
                      name: Optional[str] = None,
                      unit: Optional[str] = None)
    func NewAssetMetadata(ctx *Context, name string, args AssetMetadataArgs, opts ...ResourceOption) (*AssetMetadata, error)
    public AssetMetadata(string name, AssetMetadataArgs args, CustomResourceOptions? opts = null)
    public AssetMetadata(String name, AssetMetadataArgs args)
    public AssetMetadata(String name, AssetMetadataArgs args, CustomResourceOptions options)
    
    type: splight:AssetMetadata
    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 AssetMetadataArgs
    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 AssetMetadataArgs
    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 AssetMetadataArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AssetMetadataArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AssetMetadataArgs
    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 assetMetadataResource = new Splight.AssetMetadata("assetMetadataResource", new()
    {
        Asset = "string",
        Type = "string",
        Value = "string",
        Name = "string",
        Unit = "string",
    });
    
    example, err := splight.NewAssetMetadata(ctx, "assetMetadataResource", &splight.AssetMetadataArgs{
    	Asset: pulumi.String("string"),
    	Type:  pulumi.String("string"),
    	Value: pulumi.String("string"),
    	Name:  pulumi.String("string"),
    	Unit:  pulumi.String("string"),
    })
    
    var assetMetadataResource = new AssetMetadata("assetMetadataResource", AssetMetadataArgs.builder()
        .asset("string")
        .type("string")
        .value("string")
        .name("string")
        .unit("string")
        .build());
    
    asset_metadata_resource = splight.AssetMetadata("assetMetadataResource",
        asset="string",
        type="string",
        value="string",
        name="string",
        unit="string")
    
    const assetMetadataResource = new splight.AssetMetadata("assetMetadataResource", {
        asset: "string",
        type: "string",
        value: "string",
        name: "string",
        unit: "string",
    });
    
    type: splight:AssetMetadata
    properties:
        asset: string
        name: string
        type: string
        unit: string
        value: string
    

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

    Asset string
    reference to the asset to be linked to
    Type string
    [string|boolean|number] type of the data to be ingested in this attribute
    Value string
    metadata value
    Name string
    name of the resource
    Unit string
    optional reference to the unit of the measure
    Asset string
    reference to the asset to be linked to
    Type string
    [string|boolean|number] type of the data to be ingested in this attribute
    Value string
    metadata value
    Name string
    name of the resource
    Unit string
    optional reference to the unit of the measure
    asset String
    reference to the asset to be linked to
    type String
    [string|boolean|number] type of the data to be ingested in this attribute
    value String
    metadata value
    name String
    name of the resource
    unit String
    optional reference to the unit of the measure
    asset string
    reference to the asset to be linked to
    type string
    [string|boolean|number] type of the data to be ingested in this attribute
    value string
    metadata value
    name string
    name of the resource
    unit string
    optional reference to the unit of the measure
    asset str
    reference to the asset to be linked to
    type str
    [string|boolean|number] type of the data to be ingested in this attribute
    value str
    metadata value
    name str
    name of the resource
    unit str
    optional reference to the unit of the measure
    asset String
    reference to the asset to be linked to
    type String
    [string|boolean|number] type of the data to be ingested in this attribute
    value String
    metadata value
    name String
    name of the resource
    unit String
    optional reference to the unit of the measure

    Outputs

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

    Get an existing AssetMetadata 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?: AssetMetadataState, opts?: CustomResourceOptions): AssetMetadata
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            asset: Optional[str] = None,
            name: Optional[str] = None,
            type: Optional[str] = None,
            unit: Optional[str] = None,
            value: Optional[str] = None) -> AssetMetadata
    func GetAssetMetadata(ctx *Context, name string, id IDInput, state *AssetMetadataState, opts ...ResourceOption) (*AssetMetadata, error)
    public static AssetMetadata Get(string name, Input<string> id, AssetMetadataState? state, CustomResourceOptions? opts = null)
    public static AssetMetadata get(String name, Output<String> id, AssetMetadataState 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:
    Asset string
    reference to the asset to be linked to
    Name string
    name of the resource
    Type string
    [string|boolean|number] type of the data to be ingested in this attribute
    Unit string
    optional reference to the unit of the measure
    Value string
    metadata value
    Asset string
    reference to the asset to be linked to
    Name string
    name of the resource
    Type string
    [string|boolean|number] type of the data to be ingested in this attribute
    Unit string
    optional reference to the unit of the measure
    Value string
    metadata value
    asset String
    reference to the asset to be linked to
    name String
    name of the resource
    type String
    [string|boolean|number] type of the data to be ingested in this attribute
    unit String
    optional reference to the unit of the measure
    value String
    metadata value
    asset string
    reference to the asset to be linked to
    name string
    name of the resource
    type string
    [string|boolean|number] type of the data to be ingested in this attribute
    unit string
    optional reference to the unit of the measure
    value string
    metadata value
    asset str
    reference to the asset to be linked to
    name str
    name of the resource
    type str
    [string|boolean|number] type of the data to be ingested in this attribute
    unit str
    optional reference to the unit of the measure
    value str
    metadata value
    asset String
    reference to the asset to be linked to
    name String
    name of the resource
    type String
    [string|boolean|number] type of the data to be ingested in this attribute
    unit String
    optional reference to the unit of the measure
    value String
    metadata value

    Import

    $ pulumi import splight:index/assetMetadata:AssetMetadata [options] splight_asset_metadata.<name> <asset_metadata_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 v0.1.24 published on Friday, Jun 28, 2024 by splightplatform