1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. PtsFile
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.PtsFile

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a pts file

    NOTE: Modification is not currently supported, please go to the console to modify.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const file = new tencentcloud.PtsFile("file", {
        fileId: "file-de2dbaf8",
        headerInFile: false,
        kind: 3,
        lineCount: 0,
        projectId: "project-45vw7v82",
        size: 10799,
        type: "text/plain",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    file = tencentcloud.PtsFile("file",
        file_id="file-de2dbaf8",
        header_in_file=False,
        kind=3,
        line_count=0,
        project_id="project-45vw7v82",
        size=10799,
        type="text/plain")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewPtsFile(ctx, "file", &tencentcloud.PtsFileArgs{
    			FileId:       pulumi.String("file-de2dbaf8"),
    			HeaderInFile: pulumi.Bool(false),
    			Kind:         pulumi.Float64(3),
    			LineCount:    pulumi.Float64(0),
    			ProjectId:    pulumi.String("project-45vw7v82"),
    			Size:         pulumi.Float64(10799),
    			Type:         pulumi.String("text/plain"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var file = new Tencentcloud.PtsFile("file", new()
        {
            FileId = "file-de2dbaf8",
            HeaderInFile = false,
            Kind = 3,
            LineCount = 0,
            ProjectId = "project-45vw7v82",
            Size = 10799,
            Type = "text/plain",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.PtsFile;
    import com.pulumi.tencentcloud.PtsFileArgs;
    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 file = new PtsFile("file", PtsFileArgs.builder()
                .fileId("file-de2dbaf8")
                .headerInFile(false)
                .kind(3)
                .lineCount(0)
                .projectId("project-45vw7v82")
                .size(10799)
                .type("text/plain")
                .build());
    
        }
    }
    
    resources:
      file:
        type: tencentcloud:PtsFile
        properties:
          fileId: file-de2dbaf8
          headerInFile: false
          kind: 3
          lineCount: 0
          projectId: project-45vw7v82
          size: 10799
          type: text/plain
    

    Create PtsFile Resource

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

    Constructor syntax

    new PtsFile(name: string, args: PtsFileArgs, opts?: CustomResourceOptions);
    @overload
    def PtsFile(resource_name: str,
                args: PtsFileArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def PtsFile(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                kind: Optional[float] = None,
                type: Optional[str] = None,
                size: Optional[float] = None,
                project_id: Optional[str] = None,
                file_id: Optional[str] = None,
                line_count: Optional[float] = None,
                header_in_file: Optional[bool] = None,
                name: Optional[str] = None,
                header_columns: Optional[Sequence[str]] = None,
                pts_file_id: Optional[str] = None,
                head_lines: Optional[Sequence[str]] = None,
                tail_lines: Optional[Sequence[str]] = None,
                file_infos: Optional[Sequence[PtsFileFileInfoArgs]] = None)
    func NewPtsFile(ctx *Context, name string, args PtsFileArgs, opts ...ResourceOption) (*PtsFile, error)
    public PtsFile(string name, PtsFileArgs args, CustomResourceOptions? opts = null)
    public PtsFile(String name, PtsFileArgs args)
    public PtsFile(String name, PtsFileArgs args, CustomResourceOptions options)
    
    type: tencentcloud:PtsFile
    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 PtsFileArgs
    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 PtsFileArgs
    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 PtsFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PtsFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PtsFileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    FileId string
    File id.
    Kind double
    File kind, parameter file-1, protocol file-2, request file-3.
    ProjectId string
    Project id.
    Size double
    File size.
    Type string
    File type, folder-folder.
    FileInfos List<PtsFileFileInfo>
    Files in a folder.
    HeadLines List<string>
    The first few lines of data.
    HeaderColumns List<string>
    Meter head.
    HeaderInFile bool
    Whether the header is in the file.
    LineCount double
    Line count.
    Name string
    File name.
    PtsFileId string
    ID of the resource.
    TailLines List<string>
    The last few lines of data.
    FileId string
    File id.
    Kind float64
    File kind, parameter file-1, protocol file-2, request file-3.
    ProjectId string
    Project id.
    Size float64
    File size.
    Type string
    File type, folder-folder.
    FileInfos []PtsFileFileInfoArgs
    Files in a folder.
    HeadLines []string
    The first few lines of data.
    HeaderColumns []string
    Meter head.
    HeaderInFile bool
    Whether the header is in the file.
    LineCount float64
    Line count.
    Name string
    File name.
    PtsFileId string
    ID of the resource.
    TailLines []string
    The last few lines of data.
    fileId String
    File id.
    kind Double
    File kind, parameter file-1, protocol file-2, request file-3.
    projectId String
    Project id.
    size Double
    File size.
    type String
    File type, folder-folder.
    fileInfos List<PtsFileFileInfo>
    Files in a folder.
    headLines List<String>
    The first few lines of data.
    headerColumns List<String>
    Meter head.
    headerInFile Boolean
    Whether the header is in the file.
    lineCount Double
    Line count.
    name String
    File name.
    ptsFileId String
    ID of the resource.
    tailLines List<String>
    The last few lines of data.
    fileId string
    File id.
    kind number
    File kind, parameter file-1, protocol file-2, request file-3.
    projectId string
    Project id.
    size number
    File size.
    type string
    File type, folder-folder.
    fileInfos PtsFileFileInfo[]
    Files in a folder.
    headLines string[]
    The first few lines of data.
    headerColumns string[]
    Meter head.
    headerInFile boolean
    Whether the header is in the file.
    lineCount number
    Line count.
    name string
    File name.
    ptsFileId string
    ID of the resource.
    tailLines string[]
    The last few lines of data.
    file_id str
    File id.
    kind float
    File kind, parameter file-1, protocol file-2, request file-3.
    project_id str
    Project id.
    size float
    File size.
    type str
    File type, folder-folder.
    file_infos Sequence[PtsFileFileInfoArgs]
    Files in a folder.
    head_lines Sequence[str]
    The first few lines of data.
    header_columns Sequence[str]
    Meter head.
    header_in_file bool
    Whether the header is in the file.
    line_count float
    Line count.
    name str
    File name.
    pts_file_id str
    ID of the resource.
    tail_lines Sequence[str]
    The last few lines of data.
    fileId String
    File id.
    kind Number
    File kind, parameter file-1, protocol file-2, request file-3.
    projectId String
    Project id.
    size Number
    File size.
    type String
    File type, folder-folder.
    fileInfos List<Property Map>
    Files in a folder.
    headLines List<String>
    The first few lines of data.
    headerColumns List<String>
    Meter head.
    headerInFile Boolean
    Whether the header is in the file.
    lineCount Number
    Line count.
    name String
    File name.
    ptsFileId String
    ID of the resource.
    tailLines List<String>
    The last few lines of data.

    Outputs

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

    Get an existing PtsFile 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?: PtsFileState, opts?: CustomResourceOptions): PtsFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            file_id: Optional[str] = None,
            file_infos: Optional[Sequence[PtsFileFileInfoArgs]] = None,
            head_lines: Optional[Sequence[str]] = None,
            header_columns: Optional[Sequence[str]] = None,
            header_in_file: Optional[bool] = None,
            kind: Optional[float] = None,
            line_count: Optional[float] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            pts_file_id: Optional[str] = None,
            size: Optional[float] = None,
            tail_lines: Optional[Sequence[str]] = None,
            type: Optional[str] = None) -> PtsFile
    func GetPtsFile(ctx *Context, name string, id IDInput, state *PtsFileState, opts ...ResourceOption) (*PtsFile, error)
    public static PtsFile Get(string name, Input<string> id, PtsFileState? state, CustomResourceOptions? opts = null)
    public static PtsFile get(String name, Output<String> id, PtsFileState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:PtsFile    get:      id: ${id}
    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:
    FileId string
    File id.
    FileInfos List<PtsFileFileInfo>
    Files in a folder.
    HeadLines List<string>
    The first few lines of data.
    HeaderColumns List<string>
    Meter head.
    HeaderInFile bool
    Whether the header is in the file.
    Kind double
    File kind, parameter file-1, protocol file-2, request file-3.
    LineCount double
    Line count.
    Name string
    File name.
    ProjectId string
    Project id.
    PtsFileId string
    ID of the resource.
    Size double
    File size.
    TailLines List<string>
    The last few lines of data.
    Type string
    File type, folder-folder.
    FileId string
    File id.
    FileInfos []PtsFileFileInfoArgs
    Files in a folder.
    HeadLines []string
    The first few lines of data.
    HeaderColumns []string
    Meter head.
    HeaderInFile bool
    Whether the header is in the file.
    Kind float64
    File kind, parameter file-1, protocol file-2, request file-3.
    LineCount float64
    Line count.
    Name string
    File name.
    ProjectId string
    Project id.
    PtsFileId string
    ID of the resource.
    Size float64
    File size.
    TailLines []string
    The last few lines of data.
    Type string
    File type, folder-folder.
    fileId String
    File id.
    fileInfos List<PtsFileFileInfo>
    Files in a folder.
    headLines List<String>
    The first few lines of data.
    headerColumns List<String>
    Meter head.
    headerInFile Boolean
    Whether the header is in the file.
    kind Double
    File kind, parameter file-1, protocol file-2, request file-3.
    lineCount Double
    Line count.
    name String
    File name.
    projectId String
    Project id.
    ptsFileId String
    ID of the resource.
    size Double
    File size.
    tailLines List<String>
    The last few lines of data.
    type String
    File type, folder-folder.
    fileId string
    File id.
    fileInfos PtsFileFileInfo[]
    Files in a folder.
    headLines string[]
    The first few lines of data.
    headerColumns string[]
    Meter head.
    headerInFile boolean
    Whether the header is in the file.
    kind number
    File kind, parameter file-1, protocol file-2, request file-3.
    lineCount number
    Line count.
    name string
    File name.
    projectId string
    Project id.
    ptsFileId string
    ID of the resource.
    size number
    File size.
    tailLines string[]
    The last few lines of data.
    type string
    File type, folder-folder.
    file_id str
    File id.
    file_infos Sequence[PtsFileFileInfoArgs]
    Files in a folder.
    head_lines Sequence[str]
    The first few lines of data.
    header_columns Sequence[str]
    Meter head.
    header_in_file bool
    Whether the header is in the file.
    kind float
    File kind, parameter file-1, protocol file-2, request file-3.
    line_count float
    Line count.
    name str
    File name.
    project_id str
    Project id.
    pts_file_id str
    ID of the resource.
    size float
    File size.
    tail_lines Sequence[str]
    The last few lines of data.
    type str
    File type, folder-folder.
    fileId String
    File id.
    fileInfos List<Property Map>
    Files in a folder.
    headLines List<String>
    The first few lines of data.
    headerColumns List<String>
    Meter head.
    headerInFile Boolean
    Whether the header is in the file.
    kind Number
    File kind, parameter file-1, protocol file-2, request file-3.
    lineCount Number
    Line count.
    name String
    File name.
    projectId String
    Project id.
    ptsFileId String
    ID of the resource.
    size Number
    File size.
    tailLines List<String>
    The last few lines of data.
    type String
    File type, folder-folder.

    Supporting Types

    PtsFileFileInfo, PtsFileFileInfoArgs

    FileId string
    File id.
    Name string
    File name.
    Size double
    File size.
    Type string
    File type.
    UpdatedAt string
    Update time.
    FileId string
    File id.
    Name string
    File name.
    Size float64
    File size.
    Type string
    File type.
    UpdatedAt string
    Update time.
    fileId String
    File id.
    name String
    File name.
    size Double
    File size.
    type String
    File type.
    updatedAt String
    Update time.
    fileId string
    File id.
    name string
    File name.
    size number
    File size.
    type string
    File type.
    updatedAt string
    Update time.
    file_id str
    File id.
    name str
    File name.
    size float
    File size.
    type str
    File type.
    updated_at str
    Update time.
    fileId String
    File id.
    name String
    File name.
    size Number
    File size.
    type String
    File type.
    updatedAt String
    Update time.

    Import

    pts file can be imported using the project_id#file_id, e.g.

    $ pulumi import tencentcloud:index/ptsFile:PtsFile file project-45vw7v82#file-de2dbaf8
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack