splight.File
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as splight from "@splightplatform/pulumi-splight";
const fileInnerTest = new splight.File("fileInnerTest", {
description: "Sample file for testing inner file",
parent: "1234-1234-1234-1234",
path: "./variables.tf",
});
import pulumi
import pulumi_splight as splight
file_inner_test = splight.File("fileInnerTest",
description="Sample file for testing inner file",
parent="1234-1234-1234-1234",
path="./variables.tf")
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.NewFile(ctx, "fileInnerTest", &splight.FileArgs{
Description: pulumi.String("Sample file for testing inner file"),
Parent: pulumi.String("1234-1234-1234-1234"),
Path: pulumi.String("./variables.tf"),
})
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 fileInnerTest = new Splight.File("fileInnerTest", new()
{
Description = "Sample file for testing inner file",
Parent = "1234-1234-1234-1234",
Path = "./variables.tf",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.splight.File;
import com.pulumi.splight.FileArgs;
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 fileInnerTest = new File("fileInnerTest", FileArgs.builder()
.description("Sample file for testing inner file")
.parent("1234-1234-1234-1234")
.path("./variables.tf")
.build());
}
}
resources:
fileInnerTest:
type: splight:File
properties:
description: Sample file for testing inner file
parent: 1234-1234-1234-1234
path: ./variables.tf
Create File Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new File(name: string, args: FileArgs, opts?: CustomResourceOptions);
@overload
def File(resource_name: str,
args: FileArgs,
opts: Optional[ResourceOptions] = None)
@overload
def File(resource_name: str,
opts: Optional[ResourceOptions] = None,
path: Optional[str] = None,
description: Optional[str] = None,
parent: Optional[str] = None,
related_assets: Optional[Sequence[str]] = None)
func NewFile(ctx *Context, name string, args FileArgs, opts ...ResourceOption) (*File, error)
public File(string name, FileArgs args, CustomResourceOptions? opts = null)
type: splight:File
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 FileArgs
- 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 FileArgs
- 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 FileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FileArgs
- 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 fileResource = new Splight.File("fileResource", new()
{
Path = "string",
Description = "string",
Parent = "string",
RelatedAssets = new[]
{
"string",
},
});
example, err := splight.NewFile(ctx, "fileResource", &splight.FileArgs{
Path: pulumi.String("string"),
Description: pulumi.String("string"),
Parent: pulumi.String("string"),
RelatedAssets: pulumi.StringArray{
pulumi.String("string"),
},
})
var fileResource = new File("fileResource", FileArgs.builder()
.path("string")
.description("string")
.parent("string")
.relatedAssets("string")
.build());
file_resource = splight.File("fileResource",
path="string",
description="string",
parent="string",
related_assets=["string"])
const fileResource = new splight.File("fileResource", {
path: "string",
description: "string",
parent: "string",
relatedAssets: ["string"],
});
type: splight:File
properties:
description: string
parent: string
path: string
relatedAssets:
- string
File 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 File resource accepts the following input properties:
- Path string
- the path for the file resource in your system
- Description string
- complementary information to describe the file
- Parent string
- the id reference for a folder to be placed in
- List<string>
- assets to be linked
- Path string
- the path for the file resource in your system
- Description string
- complementary information to describe the file
- Parent string
- the id reference for a folder to be placed in
- []string
- assets to be linked
- path String
- the path for the file resource in your system
- description String
- complementary information to describe the file
- parent String
- the id reference for a folder to be placed in
- List<String>
- assets to be linked
- path string
- the path for the file resource in your system
- description string
- complementary information to describe the file
- parent string
- the id reference for a folder to be placed in
- string[]
- assets to be linked
- path str
- the path for the file resource in your system
- description str
- complementary information to describe the file
- parent str
- the id reference for a folder to be placed in
- Sequence[str]
- assets to be linked
- path String
- the path for the file resource in your system
- description String
- complementary information to describe the file
- parent String
- the id reference for a folder to be placed in
- List<String>
- assets to be linked
Outputs
All input properties are implicitly available as output properties. Additionally, the File resource produces the following output properties:
Look up Existing File Resource
Get an existing File 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?: FileState, opts?: CustomResourceOptions): File
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
checksum: Optional[str] = None,
description: Optional[str] = None,
parent: Optional[str] = None,
path: Optional[str] = None,
related_assets: Optional[Sequence[str]] = None) -> File
func GetFile(ctx *Context, name string, id IDInput, state *FileState, opts ...ResourceOption) (*File, error)
public static File Get(string name, Input<string> id, FileState? state, CustomResourceOptions? opts = null)
public static File get(String name, Output<String> id, FileState 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.
- Checksum string
- Description string
- complementary information to describe the file
- Parent string
- the id reference for a folder to be placed in
- Path string
- the path for the file resource in your system
- List<string>
- assets to be linked
- Checksum string
- Description string
- complementary information to describe the file
- Parent string
- the id reference for a folder to be placed in
- Path string
- the path for the file resource in your system
- []string
- assets to be linked
- checksum String
- description String
- complementary information to describe the file
- parent String
- the id reference for a folder to be placed in
- path String
- the path for the file resource in your system
- List<String>
- assets to be linked
- checksum string
- description string
- complementary information to describe the file
- parent string
- the id reference for a folder to be placed in
- path string
- the path for the file resource in your system
- string[]
- assets to be linked
- checksum str
- description str
- complementary information to describe the file
- parent str
- the id reference for a folder to be placed in
- path str
- the path for the file resource in your system
- Sequence[str]
- assets to be linked
- checksum String
- description String
- complementary information to describe the file
- parent String
- the id reference for a folder to be placed in
- path String
- the path for the file resource in your system
- List<String>
- assets to be linked
Import
$ pulumi import splight:index/file:File [options] splight_file.<name> <file_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.