Class: Google::Apis::OsconfigV1beta::SoftwareRecipe
- Inherits:
-
Object
- Object
- Google::Apis::OsconfigV1beta::SoftwareRecipe
- 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
A software recipe is a set of instructions for installing and configuring a
piece of software. It consists of a set of artifacts that are downloaded, and
a set of steps that install, configure, and/or update the software. Recipes
support installing and updating software from artifacts in the following
formats: Zip archive, Tar archive, Windows MSI, Debian package, and RPM
package. Additionally, recipes support executing a script (either defined in a
file or directly in this api) in bash, sh, cmd, and powershell. Updating a
software recipe If a recipe is assigned to an instance and there is a recipe
with the same name but a lower version already installed and the assigned
state of the recipe is UPDATED
, then the recipe is updated to the new
version. Script Working Directories Each script or execution step is run in
its own temporary directory which is deleted after completing the step.
Instance Attribute Summary collapse
-
#artifacts ⇒ Array<Google::Apis::OsconfigV1beta::SoftwareRecipeArtifact>
Resources available to be used in the steps in the recipe.
-
#desired_state ⇒ String
Default is INSTALLED.
-
#install_steps ⇒ Array<Google::Apis::OsconfigV1beta::SoftwareRecipeStep>
Actions to be taken for installing this recipe.
-
#name ⇒ String
Required.
-
#update_steps ⇒ Array<Google::Apis::OsconfigV1beta::SoftwareRecipeStep>
Actions to be taken for updating this recipe.
-
#version ⇒ String
The version of this software recipe.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SoftwareRecipe
constructor
A new instance of SoftwareRecipe.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SoftwareRecipe
Returns a new instance of SoftwareRecipe.
2043 2044 2045 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 2043 def initialize(**args) update!(**args) end |
Instance Attribute Details
#artifacts ⇒ Array<Google::Apis::OsconfigV1beta::SoftwareRecipeArtifact>
Resources available to be used in the steps in the recipe.
Corresponds to the JSON property artifacts
2001 2002 2003 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 2001 def artifacts @artifacts end |
#desired_state ⇒ String
Default is INSTALLED. The desired state the agent should maintain for this
recipe. INSTALLED: The software recipe is installed on the instance but won't
be updated to new versions. UPDATED: The software recipe is installed on the
instance. The recipe is updated to a higher version, if a higher version of
the recipe is assigned to this instance. REMOVE: Remove is unsupported for
software recipes and attempts to create or update a recipe to the REMOVE state
is rejected.
Corresponds to the JSON property desiredState
2012 2013 2014 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 2012 def desired_state @desired_state end |
#install_steps ⇒ Array<Google::Apis::OsconfigV1beta::SoftwareRecipeStep>
Actions to be taken for installing this recipe. On failure it stops executing
steps and does not attempt another installation. Any steps taken (including
partially completed steps) are not rolled back.
Corresponds to the JSON property installSteps
2019 2020 2021 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 2019 def install_steps @install_steps end |
#name ⇒ String
Required. Unique identifier for the recipe. Only one recipe with a given name
is installed on an instance. Names are also used to identify resources which
helps to determine whether guest policies have conflicts. This means that
requests to create multiple recipes with the same name and version are
rejected since they could potentially have conflicting assignments.
Corresponds to the JSON property name
2028 2029 2030 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 2028 def name @name end |
#update_steps ⇒ Array<Google::Apis::OsconfigV1beta::SoftwareRecipeStep>
Actions to be taken for updating this recipe. On failure it stops executing
steps and does not attempt another update for this recipe. Any steps taken (
including partially completed steps) are not rolled back.
Corresponds to the JSON property updateSteps
2035 2036 2037 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 2035 def update_steps @update_steps end |
#version ⇒ String
The version of this software recipe. Version can be up to 4 period separated
numbers (e.g. 12.34.56.78).
Corresponds to the JSON property version
2041 2042 2043 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 2041 def version @version end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2048 2049 2050 2051 2052 2053 2054 2055 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 2048 def update!(**args) @artifacts = args[:artifacts] if args.key?(:artifacts) @desired_state = args[:desired_state] if args.key?(:desired_state) @install_steps = args[:install_steps] if args.key?(:install_steps) @name = args[:name] if args.key?(:name) @update_steps = args[:update_steps] if args.key?(:update_steps) @version = args[:version] if args.key?(:version) end |