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

checkpoint.ManagementPutFile

Explore with Pulumi AI

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

    This command resource allows you to execute Check Point Put File.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as checkpoint from "@pulumi/checkpoint";
    
    const putFile = new checkpoint.ManagementPutFile("putFile", {
        fileContent: `first line
     second line
    `,
        fileName: "myfile.txt",
        filePath: "/home/admin/",
        targets: ["corporate-gateway"],
    });
    
    import pulumi
    import pulumi_checkpoint as checkpoint
    
    put_file = checkpoint.ManagementPutFile("putFile",
        file_content="""first line
     second line
    """,
        file_name="myfile.txt",
        file_path="/home/admin/",
        targets=["corporate-gateway"])
    
    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.NewManagementPutFile(ctx, "putFile", &checkpoint.ManagementPutFileArgs{
    			FileContent: pulumi.String("first line\n second line\n"),
    			FileName:    pulumi.String("myfile.txt"),
    			FilePath:    pulumi.String("/home/admin/"),
    			Targets: pulumi.StringArray{
    				pulumi.String("corporate-gateway"),
    			},
    		})
    		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 putFile = new Checkpoint.ManagementPutFile("putFile", new()
        {
            FileContent = @"first line
     second line
    ",
            FileName = "myfile.txt",
            FilePath = "/home/admin/",
            Targets = new[]
            {
                "corporate-gateway",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.checkpoint.ManagementPutFile;
    import com.pulumi.checkpoint.ManagementPutFileArgs;
    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 putFile = new ManagementPutFile("putFile", ManagementPutFileArgs.builder()
                .fileContent("""
    first line
     second line
                """)
                .fileName("myfile.txt")
                .filePath("/home/admin/")
                .targets("corporate-gateway")
                .build());
    
        }
    }
    
    resources:
      putFile:
        type: checkpoint:ManagementPutFile
        properties:
          fileContent: |
            first line
             second line        
          fileName: myfile.txt
          filePath: /home/admin/
          targets:
            - corporate-gateway
    

    How To Use

    Make sure this command will be executed in the right execution order.

    Create ManagementPutFile Resource

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

    Constructor syntax

    new ManagementPutFile(name: string, args: ManagementPutFileArgs, opts?: CustomResourceOptions);
    @overload
    def ManagementPutFile(resource_name: str,
                          args: ManagementPutFileArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def ManagementPutFile(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          targets: Optional[Sequence[str]] = None,
                          comments: Optional[str] = None,
                          file_content: Optional[str] = None,
                          file_name: Optional[str] = None,
                          file_path: Optional[str] = None,
                          management_put_file_id: Optional[str] = None)
    func NewManagementPutFile(ctx *Context, name string, args ManagementPutFileArgs, opts ...ResourceOption) (*ManagementPutFile, error)
    public ManagementPutFile(string name, ManagementPutFileArgs args, CustomResourceOptions? opts = null)
    public ManagementPutFile(String name, ManagementPutFileArgs args)
    public ManagementPutFile(String name, ManagementPutFileArgs args, CustomResourceOptions options)
    
    type: checkpoint:ManagementPutFile
    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 ManagementPutFileArgs
    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 ManagementPutFileArgs
    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 ManagementPutFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ManagementPutFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ManagementPutFileArgs
    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 managementPutFileResource = new Checkpoint.ManagementPutFile("managementPutFileResource", new()
    {
        Targets = new[]
        {
            "string",
        },
        Comments = "string",
        FileContent = "string",
        FileName = "string",
        FilePath = "string",
        ManagementPutFileId = "string",
    });
    
    example, err := checkpoint.NewManagementPutFile(ctx, "managementPutFileResource", &checkpoint.ManagementPutFileArgs{
    	Targets: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Comments:            pulumi.String("string"),
    	FileContent:         pulumi.String("string"),
    	FileName:            pulumi.String("string"),
    	FilePath:            pulumi.String("string"),
    	ManagementPutFileId: pulumi.String("string"),
    })
    
    var managementPutFileResource = new ManagementPutFile("managementPutFileResource", ManagementPutFileArgs.builder()
        .targets("string")
        .comments("string")
        .fileContent("string")
        .fileName("string")
        .filePath("string")
        .managementPutFileId("string")
        .build());
    
    management_put_file_resource = checkpoint.ManagementPutFile("managementPutFileResource",
        targets=["string"],
        comments="string",
        file_content="string",
        file_name="string",
        file_path="string",
        management_put_file_id="string")
    
    const managementPutFileResource = new checkpoint.ManagementPutFile("managementPutFileResource", {
        targets: ["string"],
        comments: "string",
        fileContent: "string",
        fileName: "string",
        filePath: "string",
        managementPutFileId: "string",
    });
    
    type: checkpoint:ManagementPutFile
    properties:
        comments: string
        fileContent: string
        fileName: string
        filePath: string
        managementPutFileId: string
        targets:
            - string
    

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

    Targets List<string>
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    Comments string
    Comments string.
    FileContent string
    Text file content.
    FileName string
    Text file name.
    FilePath string
    Text file target path.
    ManagementPutFileId string
    Targets []string
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    Comments string
    Comments string.
    FileContent string
    Text file content.
    FileName string
    Text file name.
    FilePath string
    Text file target path.
    ManagementPutFileId string
    targets List<String>
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    comments String
    Comments string.
    fileContent String
    Text file content.
    fileName String
    Text file name.
    filePath String
    Text file target path.
    managementPutFileId String
    targets string[]
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    comments string
    Comments string.
    fileContent string
    Text file content.
    fileName string
    Text file name.
    filePath string
    Text file target path.
    managementPutFileId string
    targets Sequence[str]
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    comments str
    Comments string.
    file_content str
    Text file content.
    file_name str
    Text file name.
    file_path str
    Text file target path.
    management_put_file_id str
    targets List<String>
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    comments String
    Comments string.
    fileContent String
    Text file content.
    fileName String
    Text file name.
    filePath String
    Text file target path.
    managementPutFileId String

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Tasks List<string>
    Collection of asynchronous task unique identifiers.
    Id string
    The provider-assigned unique ID for this managed resource.
    Tasks []string
    Collection of asynchronous task unique identifiers.
    id String
    The provider-assigned unique ID for this managed resource.
    tasks List<String>
    Collection of asynchronous task unique identifiers.
    id string
    The provider-assigned unique ID for this managed resource.
    tasks string[]
    Collection of asynchronous task unique identifiers.
    id str
    The provider-assigned unique ID for this managed resource.
    tasks Sequence[str]
    Collection of asynchronous task unique identifiers.
    id String
    The provider-assigned unique ID for this managed resource.
    tasks List<String>
    Collection of asynchronous task unique identifiers.

    Look up Existing ManagementPutFile Resource

    Get an existing ManagementPutFile 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?: ManagementPutFileState, opts?: CustomResourceOptions): ManagementPutFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comments: Optional[str] = None,
            file_content: Optional[str] = None,
            file_name: Optional[str] = None,
            file_path: Optional[str] = None,
            management_put_file_id: Optional[str] = None,
            targets: Optional[Sequence[str]] = None,
            tasks: Optional[Sequence[str]] = None) -> ManagementPutFile
    func GetManagementPutFile(ctx *Context, name string, id IDInput, state *ManagementPutFileState, opts ...ResourceOption) (*ManagementPutFile, error)
    public static ManagementPutFile Get(string name, Input<string> id, ManagementPutFileState? state, CustomResourceOptions? opts = null)
    public static ManagementPutFile get(String name, Output<String> id, ManagementPutFileState state, CustomResourceOptions options)
    resources:  _:    type: checkpoint:ManagementPutFile    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:
    Comments string
    Comments string.
    FileContent string
    Text file content.
    FileName string
    Text file name.
    FilePath string
    Text file target path.
    ManagementPutFileId string
    Targets List<string>
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    Tasks List<string>
    Collection of asynchronous task unique identifiers.
    Comments string
    Comments string.
    FileContent string
    Text file content.
    FileName string
    Text file name.
    FilePath string
    Text file target path.
    ManagementPutFileId string
    Targets []string
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    Tasks []string
    Collection of asynchronous task unique identifiers.
    comments String
    Comments string.
    fileContent String
    Text file content.
    fileName String
    Text file name.
    filePath String
    Text file target path.
    managementPutFileId String
    targets List<String>
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    tasks List<String>
    Collection of asynchronous task unique identifiers.
    comments string
    Comments string.
    fileContent string
    Text file content.
    fileName string
    Text file name.
    filePath string
    Text file target path.
    managementPutFileId string
    targets string[]
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    tasks string[]
    Collection of asynchronous task unique identifiers.
    comments str
    Comments string.
    file_content str
    Text file content.
    file_name str
    Text file name.
    file_path str
    Text file target path.
    management_put_file_id str
    targets Sequence[str]
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    tasks Sequence[str]
    Collection of asynchronous task unique identifiers.
    comments String
    Comments string.
    fileContent String
    Text file content.
    fileName String
    Text file name.
    filePath String
    Text file target path.
    managementPutFileId String
    targets List<String>
    On what targets to execute this command. Targets may be identified by their name, or object unique identifier.targets blocks are documented below.
    tasks List<String>
    Collection of asynchronous task unique identifiers.

    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