Class OSPolicy.Types.Resource.Types.FileResource (1.7.0)

public sealed class FileResource : IMessage<OSPolicy.Types.Resource.Types.FileResource>, IEquatable<OSPolicy.Types.Resource.Types.FileResource>, IDeepCloneable<OSPolicy.Types.Resource.Types.FileResource>, IBufferMessage, IMessage

A resource that manages the state of a file.

Inheritance

Object > OSPolicy.Types.Resource.Types.FileResource

Namespace

Google.Cloud.OsConfig.V1

Assembly

Google.Cloud.OsConfig.V1.dll

Constructors

FileResource()

public FileResource()

FileResource(OSPolicy.Types.Resource.Types.FileResource)

public FileResource(OSPolicy.Types.Resource.Types.FileResource other)
Parameter
NameDescription
otherOSPolicy.Types.Resource.Types.FileResource

Properties

Content

public string Content { get; set; }

A a file with this content. The size of the content is limited to 1024 characters.

Property Value
TypeDescription
String

File

public OSPolicy.Types.Resource.Types.File File { get; set; }

A remote or local source.

Property Value
TypeDescription
OSPolicy.Types.Resource.Types.File

Path

public string Path { get; set; }

Required. The absolute path of the file within the VM.

Property Value
TypeDescription
String

Permissions

public string Permissions { get; set; }

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

Property Value
TypeDescription
String

SourceCase

public OSPolicy.Types.Resource.Types.FileResource.SourceOneofCase SourceCase { get; }
Property Value
TypeDescription
OSPolicy.Types.Resource.Types.FileResource.SourceOneofCase

State

public OSPolicy.Types.Resource.Types.FileResource.Types.DesiredState State { get; set; }

Required. Desired state of the file.

Property Value
TypeDescription
OSPolicy.Types.Resource.Types.FileResource.Types.DesiredState