1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. FileStoreFile
Harness v0.1.1 published on Friday, Jul 12, 2024 by Pulumi

harness.platform.FileStoreFile

Explore with Pulumi AI

harness logo
Harness v0.1.1 published on Friday, Jul 12, 2024 by Pulumi

    Resource for creating files in Harness.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    // Create file
    const example = new harness.platform.FileStoreFile("example", {
        orgId: "org_id",
        projectId: "project_id",
        identifier: "identifier",
        name: "name",
        description: "description",
        tags: [
            "foo:bar",
            "baz:qux",
        ],
        parentIdentifier: "parent_identifier",
        fileContentPath: "file_content_path",
        mimeType: "mime_type",
        fileUsage: "MANIFEST_FILE|CONFIG|SCRIPT",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    # Create file
    example = harness.platform.FileStoreFile("example",
        org_id="org_id",
        project_id="project_id",
        identifier="identifier",
        name="name",
        description="description",
        tags=[
            "foo:bar",
            "baz:qux",
        ],
        parent_identifier="parent_identifier",
        file_content_path="file_content_path",
        mime_type="mime_type",
        file_usage="MANIFEST_FILE|CONFIG|SCRIPT")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create file
    		_, err := platform.NewFileStoreFile(ctx, "example", &platform.FileStoreFileArgs{
    			OrgId:       pulumi.String("org_id"),
    			ProjectId:   pulumi.String("project_id"),
    			Identifier:  pulumi.String("identifier"),
    			Name:        pulumi.String("name"),
    			Description: pulumi.String("description"),
    			Tags: pulumi.StringArray{
    				pulumi.String("foo:bar"),
    				pulumi.String("baz:qux"),
    			},
    			ParentIdentifier: pulumi.String("parent_identifier"),
    			FileContentPath:  pulumi.String("file_content_path"),
    			MimeType:         pulumi.String("mime_type"),
    			FileUsage:        pulumi.String("MANIFEST_FILE|CONFIG|SCRIPT"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        // Create file
        var example = new Harness.Platform.FileStoreFile("example", new()
        {
            OrgId = "org_id",
            ProjectId = "project_id",
            Identifier = "identifier",
            Name = "name",
            Description = "description",
            Tags = new[]
            {
                "foo:bar",
                "baz:qux",
            },
            ParentIdentifier = "parent_identifier",
            FileContentPath = "file_content_path",
            MimeType = "mime_type",
            FileUsage = "MANIFEST_FILE|CONFIG|SCRIPT",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.FileStoreFile;
    import com.pulumi.harness.platform.FileStoreFileArgs;
    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) {
            // Create file
            var example = new FileStoreFile("example", FileStoreFileArgs.builder()
                .orgId("org_id")
                .projectId("project_id")
                .identifier("identifier")
                .name("name")
                .description("description")
                .tags(            
                    "foo:bar",
                    "baz:qux")
                .parentIdentifier("parent_identifier")
                .fileContentPath("file_content_path")
                .mimeType("mime_type")
                .fileUsage("MANIFEST_FILE|CONFIG|SCRIPT")
                .build());
    
        }
    }
    
    resources:
      # Create file
      example:
        type: harness:platform:FileStoreFile
        properties:
          orgId: org_id
          projectId: project_id
          identifier: identifier
          name: name
          description: description
          tags:
            - foo:bar
            - baz:qux
          parentIdentifier: parent_identifier
          fileContentPath: file_content_path
          mimeType: mime_type
          fileUsage: MANIFEST_FILE|CONFIG|SCRIPT
    

    Create FileStoreFile Resource

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

    Constructor syntax

    new FileStoreFile(name: string, args: FileStoreFileArgs, opts?: CustomResourceOptions);
    @overload
    def FileStoreFile(resource_name: str,
                      args: FileStoreFileArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def FileStoreFile(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      identifier: Optional[str] = None,
                      parent_identifier: Optional[str] = None,
                      content: Optional[str] = None,
                      description: Optional[str] = None,
                      file_content_path: Optional[str] = None,
                      file_usage: Optional[str] = None,
                      mime_type: Optional[str] = None,
                      name: Optional[str] = None,
                      org_id: Optional[str] = None,
                      project_id: Optional[str] = None,
                      tags: Optional[Sequence[str]] = None)
    func NewFileStoreFile(ctx *Context, name string, args FileStoreFileArgs, opts ...ResourceOption) (*FileStoreFile, error)
    public FileStoreFile(string name, FileStoreFileArgs args, CustomResourceOptions? opts = null)
    public FileStoreFile(String name, FileStoreFileArgs args)
    public FileStoreFile(String name, FileStoreFileArgs args, CustomResourceOptions options)
    
    type: harness:platform:FileStoreFile
    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 FileStoreFileArgs
    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 FileStoreFileArgs
    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 FileStoreFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FileStoreFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FileStoreFileArgs
    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 fileStoreFileResource = new Harness.Platform.FileStoreFile("fileStoreFileResource", new()
    {
        Identifier = "string",
        ParentIdentifier = "string",
        Content = "string",
        Description = "string",
        FileContentPath = "string",
        FileUsage = "string",
        MimeType = "string",
        Name = "string",
        OrgId = "string",
        ProjectId = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := platform.NewFileStoreFile(ctx, "fileStoreFileResource", &platform.FileStoreFileArgs{
    	Identifier:       pulumi.String("string"),
    	ParentIdentifier: pulumi.String("string"),
    	Content:          pulumi.String("string"),
    	Description:      pulumi.String("string"),
    	FileContentPath:  pulumi.String("string"),
    	FileUsage:        pulumi.String("string"),
    	MimeType:         pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	OrgId:            pulumi.String("string"),
    	ProjectId:        pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var fileStoreFileResource = new FileStoreFile("fileStoreFileResource", FileStoreFileArgs.builder()
        .identifier("string")
        .parentIdentifier("string")
        .content("string")
        .description("string")
        .fileContentPath("string")
        .fileUsage("string")
        .mimeType("string")
        .name("string")
        .orgId("string")
        .projectId("string")
        .tags("string")
        .build());
    
    file_store_file_resource = harness.platform.FileStoreFile("fileStoreFileResource",
        identifier="string",
        parent_identifier="string",
        content="string",
        description="string",
        file_content_path="string",
        file_usage="string",
        mime_type="string",
        name="string",
        org_id="string",
        project_id="string",
        tags=["string"])
    
    const fileStoreFileResource = new harness.platform.FileStoreFile("fileStoreFileResource", {
        identifier: "string",
        parentIdentifier: "string",
        content: "string",
        description: "string",
        fileContentPath: "string",
        fileUsage: "string",
        mimeType: "string",
        name: "string",
        orgId: "string",
        projectId: "string",
        tags: ["string"],
    });
    
    type: harness:platform:FileStoreFile
    properties:
        content: string
        description: string
        fileContentPath: string
        fileUsage: string
        identifier: string
        mimeType: string
        name: string
        orgId: string
        parentIdentifier: string
        projectId: string
        tags:
            - string
    

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

    Identifier string
    Unique identifier of the resource.
    ParentIdentifier string
    File parent identifier on Harness File Store
    Content string
    File content stored on Harness File Store
    Description string
    Description of the resource.
    FileContentPath string
    File content path to be upladed on Harness File Store
    FileUsage string
    File usage. Valid options are ManifestFile, Config, Script
    MimeType string
    File mime type
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Tags List<string>
    Tags to associate with the resource.
    Identifier string
    Unique identifier of the resource.
    ParentIdentifier string
    File parent identifier on Harness File Store
    Content string
    File content stored on Harness File Store
    Description string
    Description of the resource.
    FileContentPath string
    File content path to be upladed on Harness File Store
    FileUsage string
    File usage. Valid options are ManifestFile, Config, Script
    MimeType string
    File mime type
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Tags []string
    Tags to associate with the resource.
    identifier String
    Unique identifier of the resource.
    parentIdentifier String
    File parent identifier on Harness File Store
    content String
    File content stored on Harness File Store
    description String
    Description of the resource.
    fileContentPath String
    File content path to be upladed on Harness File Store
    fileUsage String
    File usage. Valid options are ManifestFile, Config, Script
    mimeType String
    File mime type
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.
    identifier string
    Unique identifier of the resource.
    parentIdentifier string
    File parent identifier on Harness File Store
    content string
    File content stored on Harness File Store
    description string
    Description of the resource.
    fileContentPath string
    File content path to be upladed on Harness File Store
    fileUsage string
    File usage. Valid options are ManifestFile, Config, Script
    mimeType string
    File mime type
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    tags string[]
    Tags to associate with the resource.
    identifier str
    Unique identifier of the resource.
    parent_identifier str
    File parent identifier on Harness File Store
    content str
    File content stored on Harness File Store
    description str
    Description of the resource.
    file_content_path str
    File content path to be upladed on Harness File Store
    file_usage str
    File usage. Valid options are ManifestFile, Config, Script
    mime_type str
    File mime type
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    tags Sequence[str]
    Tags to associate with the resource.
    identifier String
    Unique identifier of the resource.
    parentIdentifier String
    File parent identifier on Harness File Store
    content String
    File content stored on Harness File Store
    description String
    Description of the resource.
    fileContentPath String
    File content path to be upladed on Harness File Store
    fileUsage String
    File usage. Valid options are ManifestFile, Config, Script
    mimeType String
    File mime type
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.

    Outputs

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

    CreatedBies List<FileStoreFileCreatedBy>
    Created by
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifiedAt int
    Last modified at
    LastModifiedBies List<FileStoreFileLastModifiedBy>
    Last modified by
    Path string
    Harness File Store file path
    CreatedBies []FileStoreFileCreatedBy
    Created by
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifiedAt int
    Last modified at
    LastModifiedBies []FileStoreFileLastModifiedBy
    Last modified by
    Path string
    Harness File Store file path
    createdBies List<FileStoreFileCreatedBy>
    Created by
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifiedAt Integer
    Last modified at
    lastModifiedBies List<FileStoreFileLastModifiedBy>
    Last modified by
    path String
    Harness File Store file path
    createdBies FileStoreFileCreatedBy[]
    Created by
    id string
    The provider-assigned unique ID for this managed resource.
    lastModifiedAt number
    Last modified at
    lastModifiedBies FileStoreFileLastModifiedBy[]
    Last modified by
    path string
    Harness File Store file path
    created_bies Sequence[FileStoreFileCreatedBy]
    Created by
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified_at int
    Last modified at
    last_modified_bies Sequence[FileStoreFileLastModifiedBy]
    Last modified by
    path str
    Harness File Store file path
    createdBies List<Property Map>
    Created by
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifiedAt Number
    Last modified at
    lastModifiedBies List<Property Map>
    Last modified by
    path String
    Harness File Store file path

    Look up Existing FileStoreFile Resource

    Get an existing FileStoreFile 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?: FileStoreFileState, opts?: CustomResourceOptions): FileStoreFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            content: Optional[str] = None,
            created_bies: Optional[Sequence[FileStoreFileCreatedByArgs]] = None,
            description: Optional[str] = None,
            file_content_path: Optional[str] = None,
            file_usage: Optional[str] = None,
            identifier: Optional[str] = None,
            last_modified_at: Optional[int] = None,
            last_modified_bies: Optional[Sequence[FileStoreFileLastModifiedByArgs]] = None,
            mime_type: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            parent_identifier: Optional[str] = None,
            path: Optional[str] = None,
            project_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None) -> FileStoreFile
    func GetFileStoreFile(ctx *Context, name string, id IDInput, state *FileStoreFileState, opts ...ResourceOption) (*FileStoreFile, error)
    public static FileStoreFile Get(string name, Input<string> id, FileStoreFileState? state, CustomResourceOptions? opts = null)
    public static FileStoreFile get(String name, Output<String> id, FileStoreFileState 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:
    Content string
    File content stored on Harness File Store
    CreatedBies List<FileStoreFileCreatedBy>
    Created by
    Description string
    Description of the resource.
    FileContentPath string
    File content path to be upladed on Harness File Store
    FileUsage string
    File usage. Valid options are ManifestFile, Config, Script
    Identifier string
    Unique identifier of the resource.
    LastModifiedAt int
    Last modified at
    LastModifiedBies List<FileStoreFileLastModifiedBy>
    Last modified by
    MimeType string
    File mime type
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ParentIdentifier string
    File parent identifier on Harness File Store
    Path string
    Harness File Store file path
    ProjectId string
    Unique identifier of the project.
    Tags List<string>
    Tags to associate with the resource.
    Content string
    File content stored on Harness File Store
    CreatedBies []FileStoreFileCreatedByArgs
    Created by
    Description string
    Description of the resource.
    FileContentPath string
    File content path to be upladed on Harness File Store
    FileUsage string
    File usage. Valid options are ManifestFile, Config, Script
    Identifier string
    Unique identifier of the resource.
    LastModifiedAt int
    Last modified at
    LastModifiedBies []FileStoreFileLastModifiedByArgs
    Last modified by
    MimeType string
    File mime type
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ParentIdentifier string
    File parent identifier on Harness File Store
    Path string
    Harness File Store file path
    ProjectId string
    Unique identifier of the project.
    Tags []string
    Tags to associate with the resource.
    content String
    File content stored on Harness File Store
    createdBies List<FileStoreFileCreatedBy>
    Created by
    description String
    Description of the resource.
    fileContentPath String
    File content path to be upladed on Harness File Store
    fileUsage String
    File usage. Valid options are ManifestFile, Config, Script
    identifier String
    Unique identifier of the resource.
    lastModifiedAt Integer
    Last modified at
    lastModifiedBies List<FileStoreFileLastModifiedBy>
    Last modified by
    mimeType String
    File mime type
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    parentIdentifier String
    File parent identifier on Harness File Store
    path String
    Harness File Store file path
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.
    content string
    File content stored on Harness File Store
    createdBies FileStoreFileCreatedBy[]
    Created by
    description string
    Description of the resource.
    fileContentPath string
    File content path to be upladed on Harness File Store
    fileUsage string
    File usage. Valid options are ManifestFile, Config, Script
    identifier string
    Unique identifier of the resource.
    lastModifiedAt number
    Last modified at
    lastModifiedBies FileStoreFileLastModifiedBy[]
    Last modified by
    mimeType string
    File mime type
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    parentIdentifier string
    File parent identifier on Harness File Store
    path string
    Harness File Store file path
    projectId string
    Unique identifier of the project.
    tags string[]
    Tags to associate with the resource.
    content str
    File content stored on Harness File Store
    created_bies Sequence[FileStoreFileCreatedByArgs]
    Created by
    description str
    Description of the resource.
    file_content_path str
    File content path to be upladed on Harness File Store
    file_usage str
    File usage. Valid options are ManifestFile, Config, Script
    identifier str
    Unique identifier of the resource.
    last_modified_at int
    Last modified at
    last_modified_bies Sequence[FileStoreFileLastModifiedByArgs]
    Last modified by
    mime_type str
    File mime type
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    parent_identifier str
    File parent identifier on Harness File Store
    path str
    Harness File Store file path
    project_id str
    Unique identifier of the project.
    tags Sequence[str]
    Tags to associate with the resource.
    content String
    File content stored on Harness File Store
    createdBies List<Property Map>
    Created by
    description String
    Description of the resource.
    fileContentPath String
    File content path to be upladed on Harness File Store
    fileUsage String
    File usage. Valid options are ManifestFile, Config, Script
    identifier String
    Unique identifier of the resource.
    lastModifiedAt Number
    Last modified at
    lastModifiedBies List<Property Map>
    Last modified by
    mimeType String
    File mime type
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    parentIdentifier String
    File parent identifier on Harness File Store
    path String
    Harness File Store file path
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.

    Supporting Types

    FileStoreFileCreatedBy, FileStoreFileCreatedByArgs

    Email string
    User email
    Name string
    User name
    Email string
    User email
    Name string
    User name
    email String
    User email
    name String
    User name
    email string
    User email
    name string
    User name
    email str
    User email
    name str
    User name
    email String
    User email
    name String
    User name

    FileStoreFileLastModifiedBy, FileStoreFileLastModifiedByArgs

    Email string
    User email
    Name string
    User name
    Email string
    User email
    Name string
    User name
    email String
    User email
    name String
    User name
    email string
    User email
    name string
    User name
    email str
    User email
    name str
    User name
    email String
    User email
    name String
    User name

    Import

    Import account level file

    $ pulumi import harness:platform/fileStoreFile:FileStoreFile example <identifier>
    

    Import org level file

    $ pulumi import harness:platform/fileStoreFile:FileStoreFile example <org_id><identifier>
    

    Import org level file

    $ pulumi import harness:platform/fileStoreFile:FileStoreFile example <org_id><project_id><identifier>
    

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

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.1.1 published on Friday, Jul 12, 2024 by Pulumi