Reference documentation and code samples for the Google Cloud OsConfig V1 Client class 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.
Generated from protobuf message google.cloud.osconfig.v1.OSPolicy.Resource
Namespace
Google \ Cloud \ OsConfig \ V1 \ OSPolicyMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ id
string
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.
↳ pkg
↳ repository
↳ exec
↳ file
getId
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.
string
setId
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.
var
string
$this
getPkg
Package resource
hasPkg
setPkg
Package resource
$this
getRepository
Package repository resource
hasRepository
setRepository
Package repository resource
$this
getExec
Exec resource
hasExec
setExec
Exec resource
$this
getFile
File resource
hasFile
setFile
File resource
$this
getResourceType
string