Google Cloud OS Config v1 API - Class OSPolicy.Types.Resource (2.4.0)

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

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

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(Resource)

public Resource(OSPolicy.Types.Resource other)
Parameter
Name Description
other OSPolicyTypesResource

Properties

Exec

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

Exec resource

Property Value
Type Description
OSPolicyTypesResourceTypesExecResource

File

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

File resource

Property Value
Type Description
OSPolicyTypesResourceTypesFileResource

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

Pkg

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

Package resource

Property Value
Type Description
OSPolicyTypesResourceTypesPackageResource

Repository

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

Package repository resource

Property Value
Type Description
OSPolicyTypesResourceTypesRepositoryResource

ResourceTypeCase

public OSPolicy.Types.Resource.ResourceTypeOneofCase ResourceTypeCase { get; }
Property Value
Type Description
OSPolicyTypesResourceResourceTypeOneofCase