public sealed class 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 v1alpha 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.
Implements
IMessage<OSPolicy.Types.Resource>, IEquatable<OSPolicy.Types.Resource>, IDeepCloneable<OSPolicy.Types.Resource>, IBufferMessage, IMessageNamespace
Google.Cloud.OsConfig.V1AlphaAssembly
Google.Cloud.OsConfig.V1Alpha.dll
Constructors
Resource()
public Resource()
Resource(OSPolicy.Types.Resource)
public Resource(OSPolicy.Types.Resource other)
Parameter | |
---|---|
Name | Description |
other | OSPolicy.Types.Resource |
Properties
Exec
public OSPolicy.Types.Resource.Types.ExecResource Exec { get; set; }
Exec resource
Property Value | |
---|---|
Type | Description |
OSPolicy.Types.Resource.Types.ExecResource |
File
public OSPolicy.Types.Resource.Types.FileResource File { get; set; }
File resource
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
String |
Pkg
public OSPolicy.Types.Resource.Types.PackageResource Pkg { get; set; }
Package resource
Property Value | |
---|---|
Type | Description |
OSPolicy.Types.Resource.Types.PackageResource |
Repository
public OSPolicy.Types.Resource.Types.RepositoryResource Repository { get; set; }
Package repository resource
Property Value | |
---|---|
Type | Description |
OSPolicy.Types.Resource.Types.RepositoryResource |
ResourceTypeCase
public OSPolicy.Types.Resource.ResourceTypeOneofCase ResourceTypeCase { get; }
Property Value | |
---|---|
Type | Description |
OSPolicy.Types.Resource.ResourceTypeOneofCase |