Reference documentation and code samples for the Google Cloud OsConfig V1 Client class FileResource.
A resource that manages the state of a file.
Generated from protobuf message google.cloud.osconfig.v1.OSPolicy.Resource.FileResource
Namespace
Google \ Cloud \ OsConfig \ V1 \ OSPolicy \ ResourceMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ file
↳ content
string
A a file with this content. The size of the content is limited to 1024 characters.
↳ path
string
Required. The absolute path of the file within the VM.
↳ state
int
Required. Desired state of the file.
↳ permissions
string
Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
getFile
A remote or local source.
hasFile
setFile
A remote or local source.
$this
getContent
A a file with this content.
The size of the content is limited to 1024 characters.
string
hasContent
setContent
A a file with this content.
The size of the content is limited to 1024 characters.
var
string
$this
getPath
Required. The absolute path of the file within the VM.
string
setPath
Required. The absolute path of the file within the VM.
var
string
$this
getState
Required. Desired state of the file.
int
setState
Required. Desired state of the file.
var
int
$this
getPermissions
Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission.
Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
string
setPermissions
Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission.
Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
var
string
$this
getSource
string