Class OSPolicy.Types.Resource (1.7.0)

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

An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc.

The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state.

Inheritance

Object > OSPolicy.Types.Resource

Namespace

Google.Cloud.OsConfig.V1

Assembly

Google.Cloud.OsConfig.V1.dll

Constructors

Resource()

public Resource()

Resource(OSPolicy.Types.Resource)

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

Properties

Exec

public OSPolicy.Types.Resource.Types.ExecResource Exec { get; set; }

Exec resource

Property Value
TypeDescription
OSPolicy.Types.Resource.Types.ExecResource

File

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

File resource

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

Id

public string Id { get; set; }

Required. The id of the resource with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the OS policy.
Property Value
TypeDescription
String

Pkg

public OSPolicy.Types.Resource.Types.PackageResource Pkg { get; set; }

Package resource

Property Value
TypeDescription
OSPolicy.Types.Resource.Types.PackageResource

Repository

public OSPolicy.Types.Resource.Types.RepositoryResource Repository { get; set; }

Package repository resource

Property Value
TypeDescription
OSPolicy.Types.Resource.Types.RepositoryResource

ResourceTypeCase

public OSPolicy.Types.Resource.ResourceTypeOneofCase ResourceTypeCase { get; }
Property Value
TypeDescription
OSPolicy.Types.Resource.ResourceTypeOneofCase