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)
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[]
{
new Splight.Inputs.FileRelatedAssetArgs
{
Id = "string",
Name = "string",
},
},
Tags = new[]
{
new Splight.Inputs.FileTagArgs
{
Id = "string",
Name = "string",
},
},
});
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"),
},
},
})
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());
file_resource = splight.File("fileResource",
path="string",
description="string",
parent="string",
related_assets=[{
"id": "string",
"name": "string",
}],
tags=[{
"id": "string",
"name": "string",
}])
const fileResource = new splight.File("fileResource", {
path: "string",
description: "string",
parent: "string",
relatedAssets: [{
id: "string",
name: "string",
}],
tags: [{
id: "string",
name: "string",
}],
});
type: splight:File
properties:
description: string
parent: string
path: string
relatedAssets:
- id: string
name: string
tags:
- id: string
name: 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
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 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<Splight.
Splight. Inputs. File Related Asset> - related assets of the resource
- List<Splight.
Splight. Inputs. File Tag> - tags of the resource
- 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
- []File
Related Asset Args - related assets of the resource
- []File
Tag Args - tags of the resource
- 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<File
Related Asset> - related assets of the resource
- List<File
Tag> - tags of the resource
- 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
- File
Related Asset[] - related assets of the resource
- File
Tag[] - tags of the resource
- 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[File
Related Asset Args] - related assets of the resource
- Sequence[File
Tag Args] - tags of the resource
- 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<Property Map>
- related assets of the resource
- 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:
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)
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<Splight.
Splight. Inputs. File Related Asset> - related assets of the resource
- List<Splight.
Splight. Inputs. File Tag> - 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 string
- the path for the file resource in your system
- []File
Related Asset Args - related assets of the resource
- []File
Tag Args - 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 String
- the path for the file resource in your system
- List<File
Related Asset> - related assets of the resource
- List<File
Tag> - 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 string
- the path for the file resource in your system
- File
Related Asset[] - related assets of the resource
- File
Tag[] - 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 str
- the path for the file resource in your system
- Sequence[File
Related Asset Args] - related assets of the resource
- Sequence[File
Tag Args] - 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 String
- the path for the file resource in your system
- List<Property Map>
- related assets of the resource
- List<Property Map>
- tags of the resource
- uploaded Boolean
Supporting Types
FileRelatedAsset, FileRelatedAssetArgs
FileTag, FileTagArgs
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.