Class: Google::Apis::OsconfigV1beta::GuestPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/osconfig_v1beta/classes.rb,
lib/google/apis/osconfig_v1beta/representations.rb,
lib/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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GuestPolicy

Returns a new instance of GuestPolicy.



767
768
769
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 767

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#assignmentGoogle::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



719
720
721
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 719

def assignment
  @assignment
end

#create_timeString

Output only. Time this guest policy was created. Corresponds to the JSON property createTime

Returns:

  • (String)


724
725
726
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 724

def create_time
  @create_time
end

#descriptionString

Description of the guest policy. Length of the description is limited to 1024 characters. Corresponds to the JSON property description

Returns:

  • (String)


730
731
732
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 730

def description
  @description
end

#etagString

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

Returns:

  • (String)


736
737
738
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 736

def etag
  @etag
end

#nameString

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 propertyname`

Returns:

  • (String)


742
743
744
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 742

def name
  @name
end

#package_repositoriesArray<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



750
751
752
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 750

def package_repositories
  @package_repositories
end

#packagesArray<Google::Apis::OsconfigV1beta::Package>

The software packages to be managed by this policy. Corresponds to the JSON property packages



755
756
757
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 755

def packages
  @packages
end

#recipesArray<Google::Apis::OsconfigV1beta::SoftwareRecipe>

A list of Recipes to install on the VM instance. Corresponds to the JSON property recipes



760
761
762
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 760

def recipes
  @recipes
end

#update_timeString

Output only. Last time this guest policy was updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


765
766
767
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 765

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



772
773
774
775
776
777
778
779
780
781
782
# File 'lib/google/apis/osconfig_v1beta/classes.rb', line 772

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