Class: Google::Apis::OsconfigV1beta::GuestPolicy
- Inherits:
-
Object
- Object
- Google::Apis::OsconfigV1beta::GuestPolicy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/osconfig_v1beta/classes.rb,
generated/google/apis/osconfig_v1beta/representations.rb,
generated/google/apis/osconfig_v1beta/representations.rb
Overview
An OS Config resource representing a guest configuration policy. These policies represent the desired state for VM instance guest environments including packages to install or remove, package repository configurations, and software to install.
Instance Attribute Summary collapse
-
#assignment ⇒ Google::Apis::OsconfigV1beta::Assignment
An assignment represents the group or groups of VM instances that the policy applies to.
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
Description of the guest policy.
-
#etag ⇒ String
The etag for this guest policy.
-
#name ⇒ String
Required.
-
#package_repositories ⇒ Array<Google::Apis::OsconfigV1beta::PackageRepository>
A list of package repositories to configure on the VM instance.
-
#packages ⇒ Array<Google::Apis::OsconfigV1beta::Package>
The software packages to be managed by this policy.
-
#recipes ⇒ Array<Google::Apis::OsconfigV1beta::SoftwareRecipe>
A list of Recipes to install on the VM instance.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GuestPolicy
constructor
A new instance of GuestPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GuestPolicy
Returns a new instance of GuestPolicy.
663 664 665 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 663 def initialize(**args) update!(**args) end |
Instance Attribute Details
#assignment ⇒ Google::Apis::OsconfigV1beta::Assignment
An assignment represents the group or groups of VM instances that the policy
applies to. If an assignment is empty, it applies to all VM instances.
Otherwise, the targeted VM instances must meet all the criteria specified. So
if both labels and zones are specified, the policy applies to VM instances
with those labels and in those zones.
Corresponds to the JSON property assignment
615 616 617 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 615 def assignment @assignment end |
#create_time ⇒ String
Output only. Time this guest policy was created.
Corresponds to the JSON property createTime
620 621 622 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 620 def create_time @create_time end |
#description ⇒ String
Description of the guest policy. Length of the description is limited to 1024
characters.
Corresponds to the JSON property description
626 627 628 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 626 def description @description end |
#etag ⇒ String
The etag for this guest policy. If this is provided on update, it must match
the server's etag.
Corresponds to the JSON property etag
632 633 634 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 632 def etag @etag end |
#name ⇒ String
Required. Unique name of the resource in this project using one of the
following forms: projects/
project_number/guestPolicies/
guest_policy_id`.
Corresponds to the JSON property
name`
638 639 640 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 638 def name @name end |
#package_repositories ⇒ Array<Google::Apis::OsconfigV1beta::PackageRepository>
A list of package repositories to configure on the VM instance. This is done
before any other configs are applied so they can use these repos. Package
repositories are only configured if the corresponding package manager(s) are
available.
Corresponds to the JSON property packageRepositories
646 647 648 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 646 def package_repositories @package_repositories end |
#packages ⇒ Array<Google::Apis::OsconfigV1beta::Package>
The software packages to be managed by this policy.
Corresponds to the JSON property packages
651 652 653 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 651 def packages @packages end |
#recipes ⇒ Array<Google::Apis::OsconfigV1beta::SoftwareRecipe>
A list of Recipes to install on the VM instance.
Corresponds to the JSON property recipes
656 657 658 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 656 def recipes @recipes end |
#update_time ⇒ String
Output only. Last time this guest policy was updated.
Corresponds to the JSON property updateTime
661 662 663 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 661 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
668 669 670 671 672 673 674 675 676 677 678 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 668 def update!(**args) @assignment = args[:assignment] if args.key?(:assignment) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @etag = args[:etag] if args.key?(:etag) @name = args[:name] if args.key?(:name) @package_repositories = args[:package_repositories] if args.key?(:package_repositories) @packages = args[:packages] if args.key?(:packages) @recipes = args[:recipes] if args.key?(:recipes) @update_time = args[:update_time] if args.key?(:update_time) end |