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

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
Name Description
other OSPolicyTypesResourceTypesFileResource

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
Type Description
string

File

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

A remote or local source.

Property Value
Type Description
OSPolicyTypesResourceTypesFile

HasContent

public bool HasContent { get; }

Gets whether the "content" field is set

Property Value
Type Description
bool

Path

public string Path { get; set; }

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

Property Value
Type Description
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
Type Description
string

SourceCase

public OSPolicy.Types.Resource.Types.FileResource.SourceOneofCase SourceCase { get; }
Property Value
Type Description
OSPolicyTypesResourceTypesFileResourceSourceOneofCase

State

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

Required. Desired state of the file.

Property Value
Type Description
OSPolicyTypesResourceTypesFileResourceTypesDesiredState