1. Packages
  2. Splight
  3. API Docs
  4. File
splight v1.2.13 published on Friday, Feb 14, 2025 by splightplatform

splight.File

Explore with Pulumi AI

Example Usage

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[FileRelatedAssetArgs]] = None,
         tags: Optional[Sequence[FileTagArgs]] = None)
func NewFile(ctx *Context, name string, args FileArgs, opts ...ResourceOption) (*File, error)
public File(string name, FileArgs args, CustomResourceOptions? opts = null)
public File(String name, FileArgs args)
public File(String name, FileArgs args, CustomResourceOptions options)
type: splight:File
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. FileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. FileArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. FileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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[]
    {
        new Splight.Inputs.FileRelatedAssetArgs
        {
            Id = "string",
            Name = "string",
        },
    },
    Tags = new[]
    {
        new Splight.Inputs.FileTagArgs
        {
            Id = "string",
            Name = "string",
        },
    },
});
Copy
example, err := splight.NewFile(ctx, "fileResource", &splight.FileArgs{
	Path:        pulumi.String("string"),
	Description: pulumi.String("string"),
	Parent:      pulumi.String("string"),
	RelatedAssets: splight.FileRelatedAssetArray{
		&splight.FileRelatedAssetArgs{
			Id:   pulumi.String("string"),
			Name: pulumi.String("string"),
		},
	},
	Tags: splight.FileTagArray{
		&splight.FileTagArgs{
			Id:   pulumi.String("string"),
			Name: pulumi.String("string"),
		},
	},
})
Copy
var fileResource = new File("fileResource", FileArgs.builder()
    .path("string")
    .description("string")
    .parent("string")
    .relatedAssets(FileRelatedAssetArgs.builder()
        .id("string")
        .name("string")
        .build())
    .tags(FileTagArgs.builder()
        .id("string")
        .name("string")
        .build())
    .build());
Copy
file_resource = splight.File("fileResource",
    path="string",
    description="string",
    parent="string",
    related_assets=[{
        "id": "string",
        "name": "string",
    }],
    tags=[{
        "id": "string",
        "name": "string",
    }])
Copy
const fileResource = new splight.File("fileResource", {
    path: "string",
    description: "string",
    parent: "string",
    relatedAssets: [{
        id: "string",
        name: "string",
    }],
    tags: [{
        id: "string",
        name: "string",
    }],
});
Copy
type: splight:File
properties:
    description: string
    parent: string
    path: string
    relatedAssets:
        - id: string
          name: string
    tags:
        - id: string
          name: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The File resource accepts the following input properties:

Path
This property is required.
Changes to this property will trigger replacement.
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
RelatedAssets List<Splight.Splight.Inputs.FileRelatedAsset>
related assets of the resource
Tags List<Splight.Splight.Inputs.FileTag>
tags of the resource
Path
This property is required.
Changes to this property will trigger replacement.
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
RelatedAssets []FileRelatedAssetArgs
related assets of the resource
Tags []FileTagArgs
tags of the resource
path
This property is required.
Changes to this property will trigger replacement.
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
relatedAssets List<FileRelatedAsset>
related assets of the resource
tags List<FileTag>
tags of the resource
path
This property is required.
Changes to this property will trigger replacement.
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
relatedAssets FileRelatedAsset[]
related assets of the resource
tags FileTag[]
tags of the resource
path
This property is required.
Changes to this property will trigger replacement.
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
related_assets Sequence[FileRelatedAssetArgs]
related assets of the resource
tags Sequence[FileTagArgs]
tags of the resource
path
This property is required.
Changes to this property will trigger replacement.
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
relatedAssets List<Property Map>
related assets of the resource
tags List<Property Map>
tags of the resource

Outputs

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

Checksum string
Id string
The provider-assigned unique ID for this managed resource.
Uploaded bool
Checksum string
Id string
The provider-assigned unique ID for this managed resource.
Uploaded bool
checksum String
id String
The provider-assigned unique ID for this managed resource.
uploaded Boolean
checksum string
id string
The provider-assigned unique ID for this managed resource.
uploaded boolean
checksum str
id str
The provider-assigned unique ID for this managed resource.
uploaded bool
checksum String
id String
The provider-assigned unique ID for this managed resource.
uploaded Boolean

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[FileRelatedAssetArgs]] = None,
        tags: Optional[Sequence[FileTagArgs]] = None,
        uploaded: Optional[bool] = 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)
resources:  _:    type: splight:File    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Checksum string
Description string
complementary information to describe the file
Parent string
the id reference for a folder to be placed in
Path Changes to this property will trigger replacement. string
the path for the file resource in your system
RelatedAssets List<Splight.Splight.Inputs.FileRelatedAsset>
related assets of the resource
Tags List<Splight.Splight.Inputs.FileTag>
tags of the resource
Uploaded bool
Checksum string
Description string
complementary information to describe the file
Parent string
the id reference for a folder to be placed in
Path Changes to this property will trigger replacement. string
the path for the file resource in your system
RelatedAssets []FileRelatedAssetArgs
related assets of the resource
Tags []FileTagArgs
tags of the resource
Uploaded bool
checksum String
description String
complementary information to describe the file
parent String
the id reference for a folder to be placed in
path Changes to this property will trigger replacement. String
the path for the file resource in your system
relatedAssets List<FileRelatedAsset>
related assets of the resource
tags List<FileTag>
tags of the resource
uploaded Boolean
checksum string
description string
complementary information to describe the file
parent string
the id reference for a folder to be placed in
path Changes to this property will trigger replacement. string
the path for the file resource in your system
relatedAssets FileRelatedAsset[]
related assets of the resource
tags FileTag[]
tags of the resource
uploaded boolean
checksum str
description str
complementary information to describe the file
parent str
the id reference for a folder to be placed in
path Changes to this property will trigger replacement. str
the path for the file resource in your system
related_assets Sequence[FileRelatedAssetArgs]
related assets of the resource
tags Sequence[FileTagArgs]
tags of the resource
uploaded bool
checksum String
description String
complementary information to describe the file
parent String
the id reference for a folder to be placed in
path Changes to this property will trigger replacement. String
the path for the file resource in your system
relatedAssets List<Property Map>
related assets of the resource
tags List<Property Map>
tags of the resource
uploaded Boolean

Supporting Types

FileRelatedAsset
, FileRelatedAssetArgs

Id This property is required. string
asset id
Name This property is required. string
asset name
Id This property is required. string
asset id
Name This property is required. string
asset name
id This property is required. String
asset id
name This property is required. String
asset name
id This property is required. string
asset id
name This property is required. string
asset name
id This property is required. str
asset id
name This property is required. str
asset name
id This property is required. String
asset id
name This property is required. String
asset name

FileTag
, FileTagArgs

Id This property is required. string
tag id
Name This property is required. string
tag name
Id This property is required. string
tag id
Name This property is required. string
tag name
id This property is required. String
tag id
name This property is required. String
tag name
id This property is required. string
tag id
name This property is required. string
tag name
id This property is required. str
tag id
name This property is required. str
tag name
id This property is required. String
tag id
name This property is required. String
tag name

Import

$ pulumi import splight:index/file:File [options] splight_file.<name> <file_id>
Copy

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.