1. Packages
  2. Checkpoint Provider
  3. API Docs
  4. PutFile
checkpoint 2.9.0 published on Monday, Apr 14, 2025 by checkpointsw

checkpoint.PutFile

Explore with Pulumi AI

checkpoint logo
checkpoint 2.9.0 published on Monday, Apr 14, 2025 by checkpointsw

    This resource allows you to add a new file to a Check Point machine.
    NOTE: This is GAIA API resource and require set provider context to gaia_api.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as checkpoint from "@pulumi/checkpoint";
    
    const putFile1 = new checkpoint.PutFile("putFile1", {
        fileName: "/path/to/file2/terrafile2.txt",
        textContent: "It's a terrafile!",
    });
    
    import pulumi
    import pulumi_checkpoint as checkpoint
    
    put_file1 = checkpoint.PutFile("putFile1",
        file_name="/path/to/file2/terrafile2.txt",
        text_content="It's a terrafile!")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/checkpoint/v2/checkpoint"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := checkpoint.NewPutFile(ctx, "putFile1", &checkpoint.PutFileArgs{
    			FileName:    pulumi.String("/path/to/file2/terrafile2.txt"),
    			TextContent: pulumi.String("It's a terrafile!"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Checkpoint = Pulumi.Checkpoint;
    
    return await Deployment.RunAsync(() => 
    {
        var putFile1 = new Checkpoint.PutFile("putFile1", new()
        {
            FileName = "/path/to/file2/terrafile2.txt",
            TextContent = "It's a terrafile!",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.checkpoint.PutFile;
    import com.pulumi.checkpoint.PutFileArgs;
    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 putFile1 = new PutFile("putFile1", PutFileArgs.builder()
                .fileName("/path/to/file2/terrafile2.txt")
                .textContent("It's a terrafile!")
                .build());
    
        }
    }
    
    resources:
      putFile1:
        type: checkpoint:PutFile
        properties:
          fileName: /path/to/file2/terrafile2.txt
          textContent: It's a terrafile!
    

    Create PutFile Resource

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

    Constructor syntax

    new PutFile(name: string, args: PutFileArgs, opts?: CustomResourceOptions);
    @overload
    def PutFile(resource_name: str,
                args: PutFileArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def PutFile(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                file_name: Optional[str] = None,
                text_content: Optional[str] = None,
                override: Optional[bool] = None,
                put_file_id: Optional[str] = None)
    func NewPutFile(ctx *Context, name string, args PutFileArgs, opts ...ResourceOption) (*PutFile, error)
    public PutFile(string name, PutFileArgs args, CustomResourceOptions? opts = null)
    public PutFile(String name, PutFileArgs args)
    public PutFile(String name, PutFileArgs args, CustomResourceOptions options)
    
    type: checkpoint:PutFile
    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 PutFileArgs
    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 PutFileArgs
    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 PutFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PutFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PutFileArgs
    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 putFileResource = new Checkpoint.PutFile("putFileResource", new()
    {
        FileName = "string",
        TextContent = "string",
        Override = false,
        PutFileId = "string",
    });
    
    example, err := checkpoint.NewPutFile(ctx, "putFileResource", &checkpoint.PutFileArgs{
    	FileName:    pulumi.String("string"),
    	TextContent: pulumi.String("string"),
    	Override:    pulumi.Bool(false),
    	PutFileId:   pulumi.String("string"),
    })
    
    var putFileResource = new PutFile("putFileResource", PutFileArgs.builder()
        .fileName("string")
        .textContent("string")
        .override(false)
        .putFileId("string")
        .build());
    
    put_file_resource = checkpoint.PutFile("putFileResource",
        file_name="string",
        text_content="string",
        override=False,
        put_file_id="string")
    
    const putFileResource = new checkpoint.PutFile("putFileResource", {
        fileName: "string",
        textContent: "string",
        override: false,
        putFileId: "string",
    });
    
    type: checkpoint:PutFile
    properties:
        fileName: string
        override: false
        putFileId: string
        textContent: string
    

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

    FileName string
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    TextContent string
    Content to add to the new file.
    Override bool
    If the file already exists, indicates whether to overwrite it.
    PutFileId string
    FileName string
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    TextContent string
    Content to add to the new file.
    Override bool
    If the file already exists, indicates whether to overwrite it.
    PutFileId string
    fileName String
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    textContent String
    Content to add to the new file.
    override Boolean
    If the file already exists, indicates whether to overwrite it.
    putFileId String
    fileName string
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    textContent string
    Content to add to the new file.
    override boolean
    If the file already exists, indicates whether to overwrite it.
    putFileId string
    file_name str
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    text_content str
    Content to add to the new file.
    override bool
    If the file already exists, indicates whether to overwrite it.
    put_file_id str
    fileName String
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    textContent String
    Content to add to the new file.
    override Boolean
    If the file already exists, indicates whether to overwrite it.
    putFileId String

    Outputs

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

    Get an existing PutFile 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?: PutFileState, opts?: CustomResourceOptions): PutFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            file_name: Optional[str] = None,
            override: Optional[bool] = None,
            put_file_id: Optional[str] = None,
            text_content: Optional[str] = None) -> PutFile
    func GetPutFile(ctx *Context, name string, id IDInput, state *PutFileState, opts ...ResourceOption) (*PutFile, error)
    public static PutFile Get(string name, Input<string> id, PutFileState? state, CustomResourceOptions? opts = null)
    public static PutFile get(String name, Output<String> id, PutFileState state, CustomResourceOptions options)
    resources:  _:    type: checkpoint:PutFile    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:
    FileName string
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    Override bool
    If the file already exists, indicates whether to overwrite it.
    PutFileId string
    TextContent string
    Content to add to the new file.
    FileName string
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    Override bool
    If the file already exists, indicates whether to overwrite it.
    PutFileId string
    TextContent string
    Content to add to the new file.
    fileName String
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    override Boolean
    If the file already exists, indicates whether to overwrite it.
    putFileId String
    textContent String
    Content to add to the new file.
    fileName string
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    override boolean
    If the file already exists, indicates whether to overwrite it.
    putFileId string
    textContent string
    Content to add to the new file.
    file_name str
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    override bool
    If the file already exists, indicates whether to overwrite it.
    put_file_id str
    text_content str
    Content to add to the new file.
    fileName String
    Filename include the desired path. The file will be created in the user home directory if the full path wasn't provided.
    override Boolean
    If the file already exists, indicates whether to overwrite it.
    putFileId String
    textContent String
    Content to add to the new file.

    Package Details

    Repository
    checkpoint checkpointsw/terraform-provider-checkpoint
    License
    Notes
    This Pulumi package is based on the checkpoint Terraform Provider.
    checkpoint logo
    checkpoint 2.9.0 published on Monday, Apr 14, 2025 by checkpointsw