Reference documentation and code samples for the Cloud OS Config V1 API class Google::Cloud::OsConfig::V1::OSPolicy::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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#exec
def exec() -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource
-
(::Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource) — Exec resource
Note: The following fields are mutually exclusive:
exec
,pkg
,repository
,file
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#exec=
def exec=(value) -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource
-
value (::Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource) — Exec resource
Note: The following fields are mutually exclusive:
exec
,pkg
,repository
,file
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource) — Exec resource
Note: The following fields are mutually exclusive:
exec
,pkg
,repository
,file
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#file
def file() -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::FileResource
-
(::Google::Cloud::OsConfig::V1::OSPolicy::Resource::FileResource) — File resource
Note: The following fields are mutually exclusive:
file
,pkg
,repository
,exec
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#file=
def file=(value) -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::FileResource
-
value (::Google::Cloud::OsConfig::V1::OSPolicy::Resource::FileResource) — File resource
Note: The following fields are mutually exclusive:
file
,pkg
,repository
,exec
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::OsConfig::V1::OSPolicy::Resource::FileResource) — File resource
Note: The following fields are mutually exclusive:
file
,pkg
,repository
,exec
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#id
def id() -> ::String
-
(::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.
#id=
def id=(value) -> ::String
-
value (::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.
-
(::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
def pkg() -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::PackageResource
-
(::Google::Cloud::OsConfig::V1::OSPolicy::Resource::PackageResource) — Package resource
Note: The following fields are mutually exclusive:
pkg
,repository
,exec
,file
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#pkg=
def pkg=(value) -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::PackageResource
-
value (::Google::Cloud::OsConfig::V1::OSPolicy::Resource::PackageResource) — Package resource
Note: The following fields are mutually exclusive:
pkg
,repository
,exec
,file
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::OsConfig::V1::OSPolicy::Resource::PackageResource) — Package resource
Note: The following fields are mutually exclusive:
pkg
,repository
,exec
,file
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#repository
def repository() -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::RepositoryResource
-
(::Google::Cloud::OsConfig::V1::OSPolicy::Resource::RepositoryResource) — Package repository resource
Note: The following fields are mutually exclusive:
repository
,pkg
,exec
,file
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#repository=
def repository=(value) -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::RepositoryResource
-
value (::Google::Cloud::OsConfig::V1::OSPolicy::Resource::RepositoryResource) — Package repository resource
Note: The following fields are mutually exclusive:
repository
,pkg
,exec
,file
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::OsConfig::V1::OSPolicy::Resource::RepositoryResource) — Package repository resource
Note: The following fields are mutually exclusive:
repository
,pkg
,exec
,file
. If a field in that set is populated, all other fields in the set will automatically be cleared.