Package com.hashicorp.cdktf
Class FileProvisioner.Builder
java.lang.Object
com.hashicorp.cdktf.FileProvisioner.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FileProvisioner>
- Enclosing interface:
FileProvisioner
@Stability(Experimental)
public static final class FileProvisioner.Builder
extends Object
implements software.amazon.jsii.Builder<FileProvisioner>
A builder for
FileProvisioner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.connection
(SSHProvisionerConnection connection) Sets the value ofFileProvisioner.getConnection()
connection
(WinrmProvisionerConnection connection) Sets the value ofFileProvisioner.getConnection()
Sets the value ofFileProvisioner.getContent()
destination
(String destination) Sets the value ofFileProvisioner.getDestination()
Sets the value ofFileProvisioner.getSource()
Sets the value ofFileProvisioner.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
destination
Sets the value ofFileProvisioner.getDestination()
- Parameters:
destination
- The source file or directory. This parameter is required. Specify it either relative to the current working directory or as an absolute path. This argument cannot be combined with content.- Returns:
this
-
type
Sets the value ofFileProvisioner.getType()
- Parameters:
type
- the value to be set. This parameter is required.- Returns:
this
-
connection
@Stability(Experimental) public FileProvisioner.Builder connection(SSHProvisionerConnection connection) Sets the value ofFileProvisioner.getConnection()
- Parameters:
connection
- Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.- Returns:
this
-
connection
@Stability(Experimental) public FileProvisioner.Builder connection(WinrmProvisionerConnection connection) Sets the value ofFileProvisioner.getConnection()
- Parameters:
connection
- Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.- Returns:
this
-
content
Sets the value ofFileProvisioner.getContent()
- Parameters:
content
- The destination path to write to on the remote system. See Destination Paths below for more information.- Returns:
this
-
source
Sets the value ofFileProvisioner.getSource()
- Parameters:
source
- The direct content to copy on the destination. If destination is a file, the content will be written on that file. In case of a directory, a file named tf-file-content is created inside that directory. We recommend using a file as the destination when using content. This argument cannot be combined with source.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<FileProvisioner>
- Returns:
- a new instance of
FileProvisioner
- Throws:
NullPointerException
- if any required attribute was not provided
-