Google Cloud OS Config v1alpha API - Class OSPolicy.Types.Resource.Types.FileResource (2.0.0-alpha03)

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

Reference documentation and code samples for the Google Cloud OS Config v1alpha API class OSPolicy.Types.Resource.Types.FileResource.

A resource that manages the state of a file.

Inheritance

object > OSPolicy.Types.Resource.Types.FileResource

Namespace

Google.Cloud.OsConfig.V1Alpha

Assembly

Google.Cloud.OsConfig.V1Alpha.dll

Constructors

FileResource()

public FileResource()

FileResource(FileResource)

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

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
OSPolicyTypesResourceTypesFile

HasContent

public bool HasContent { get; }

Gets whether the "content" field is set

Property Value
TypeDescription
bool

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
OSPolicyTypesResourceTypesFileResourceSourceOneofCase

State

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

Required. Desired state of the file.

Property Value
TypeDescription
OSPolicyTypesResourceTypesFileResourceTypesDesiredState