Class GuestPolicies.SoftwareRecipe.Builder (2.5.4)

Stay organized with collections Save and categorize content based on your preferences.
public static final class GuestPolicies.SoftwareRecipe.Builder extends GeneratedMessageV3.Builder<GuestPolicies.SoftwareRecipe.Builder> implements GuestPolicies.SoftwareRecipeOrBuilder

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.

Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllArtifacts(Iterable<? extends GuestPolicies.SoftwareRecipe.Artifact> values)

public GuestPolicies.SoftwareRecipe.Builder addAllArtifacts(Iterable<? extends GuestPolicies.SoftwareRecipe.Artifact> values)

Resources available to be used in the steps in the recipe.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact>
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addAllInstallSteps(Iterable<? extends GuestPolicies.SoftwareRecipe.Step> values)

public GuestPolicies.SoftwareRecipe.Builder addAllInstallSteps(Iterable<? extends GuestPolicies.SoftwareRecipe.Step> values)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step>
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addAllUpdateSteps(Iterable<? extends GuestPolicies.SoftwareRecipe.Step> values)

public GuestPolicies.SoftwareRecipe.Builder addAllUpdateSteps(Iterable<? extends GuestPolicies.SoftwareRecipe.Step> values)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step>
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addArtifacts(GuestPolicies.SoftwareRecipe.Artifact value)

public GuestPolicies.SoftwareRecipe.Builder addArtifacts(GuestPolicies.SoftwareRecipe.Artifact value)

Resources available to be used in the steps in the recipe.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;

Parameter
NameDescription
valueGuestPolicies.SoftwareRecipe.Artifact
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addArtifacts(GuestPolicies.SoftwareRecipe.Artifact.Builder builderForValue)

public GuestPolicies.SoftwareRecipe.Builder addArtifacts(GuestPolicies.SoftwareRecipe.Artifact.Builder builderForValue)

Resources available to be used in the steps in the recipe.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;

Parameter
NameDescription
builderForValueGuestPolicies.SoftwareRecipe.Artifact.Builder
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addArtifacts(int index, GuestPolicies.SoftwareRecipe.Artifact value)

public GuestPolicies.SoftwareRecipe.Builder addArtifacts(int index, GuestPolicies.SoftwareRecipe.Artifact value)

Resources available to be used in the steps in the recipe.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;

Parameters
NameDescription
indexint
valueGuestPolicies.SoftwareRecipe.Artifact
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addArtifacts(int index, GuestPolicies.SoftwareRecipe.Artifact.Builder builderForValue)

public GuestPolicies.SoftwareRecipe.Builder addArtifacts(int index, GuestPolicies.SoftwareRecipe.Artifact.Builder builderForValue)

Resources available to be used in the steps in the recipe.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;

Parameters
NameDescription
indexint
builderForValueGuestPolicies.SoftwareRecipe.Artifact.Builder
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addArtifactsBuilder()

public GuestPolicies.SoftwareRecipe.Artifact.Builder addArtifactsBuilder()

Resources available to be used in the steps in the recipe.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;

Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Artifact.Builder

addArtifactsBuilder(int index)

public GuestPolicies.SoftwareRecipe.Artifact.Builder addArtifactsBuilder(int index)

Resources available to be used in the steps in the recipe.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Artifact.Builder

addInstallSteps(GuestPolicies.SoftwareRecipe.Step value)

public GuestPolicies.SoftwareRecipe.Builder addInstallSteps(GuestPolicies.SoftwareRecipe.Step value)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;

Parameter
NameDescription
valueGuestPolicies.SoftwareRecipe.Step
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addInstallSteps(GuestPolicies.SoftwareRecipe.Step.Builder builderForValue)

public GuestPolicies.SoftwareRecipe.Builder addInstallSteps(GuestPolicies.SoftwareRecipe.Step.Builder builderForValue)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;

Parameter
NameDescription
builderForValueGuestPolicies.SoftwareRecipe.Step.Builder
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addInstallSteps(int index, GuestPolicies.SoftwareRecipe.Step value)

public GuestPolicies.SoftwareRecipe.Builder addInstallSteps(int index, GuestPolicies.SoftwareRecipe.Step value)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;

Parameters
NameDescription
indexint
valueGuestPolicies.SoftwareRecipe.Step
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addInstallSteps(int index, GuestPolicies.SoftwareRecipe.Step.Builder builderForValue)

public GuestPolicies.SoftwareRecipe.Builder addInstallSteps(int index, GuestPolicies.SoftwareRecipe.Step.Builder builderForValue)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;

Parameters
NameDescription
indexint
builderForValueGuestPolicies.SoftwareRecipe.Step.Builder
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addInstallStepsBuilder()

public GuestPolicies.SoftwareRecipe.Step.Builder addInstallStepsBuilder()

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;

Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Step.Builder

addInstallStepsBuilder(int index)

public GuestPolicies.SoftwareRecipe.Step.Builder addInstallStepsBuilder(int index)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Step.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GuestPolicies.SoftwareRecipe.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder
Overrides

addUpdateSteps(GuestPolicies.SoftwareRecipe.Step value)

public GuestPolicies.SoftwareRecipe.Builder addUpdateSteps(GuestPolicies.SoftwareRecipe.Step value)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;

Parameter
NameDescription
valueGuestPolicies.SoftwareRecipe.Step
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addUpdateSteps(GuestPolicies.SoftwareRecipe.Step.Builder builderForValue)

public GuestPolicies.SoftwareRecipe.Builder addUpdateSteps(GuestPolicies.SoftwareRecipe.Step.Builder builderForValue)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;

Parameter
NameDescription
builderForValueGuestPolicies.SoftwareRecipe.Step.Builder
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addUpdateSteps(int index, GuestPolicies.SoftwareRecipe.Step value)

public GuestPolicies.SoftwareRecipe.Builder addUpdateSteps(int index, GuestPolicies.SoftwareRecipe.Step value)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;

Parameters
NameDescription
indexint
valueGuestPolicies.SoftwareRecipe.Step
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addUpdateSteps(int index, GuestPolicies.SoftwareRecipe.Step.Builder builderForValue)

public GuestPolicies.SoftwareRecipe.Builder addUpdateSteps(int index, GuestPolicies.SoftwareRecipe.Step.Builder builderForValue)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;

Parameters
NameDescription
indexint
builderForValueGuestPolicies.SoftwareRecipe.Step.Builder
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

addUpdateStepsBuilder()

public GuestPolicies.SoftwareRecipe.Step.Builder addUpdateStepsBuilder()

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;

Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Step.Builder

addUpdateStepsBuilder(int index)

public GuestPolicies.SoftwareRecipe.Step.Builder addUpdateStepsBuilder(int index)

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Step.Builder

build()

public GuestPolicies.SoftwareRecipe build()
Returns
TypeDescription
GuestPolicies.SoftwareRecipe

buildPartial()

public GuestPolicies.SoftwareRecipe buildPartial()
Returns
TypeDescription
GuestPolicies.SoftwareRecipe

clear()

public GuestPolicies.SoftwareRecipe.Builder clear()
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder
Overrides

clearArtifacts()

public GuestPolicies.SoftwareRecipe.Builder clearArtifacts()

Resources available to be used in the steps in the recipe.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;

Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

clearDesiredState()

public GuestPolicies.SoftwareRecipe.Builder clearDesiredState()

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.

.google.cloud.osconfig.v1beta.DesiredState desired_state = 6;

Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public GuestPolicies.SoftwareRecipe.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder
Overrides

clearInstallSteps()

public GuestPolicies.SoftwareRecipe.Builder clearInstallSteps()

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.

repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4;

Returns
TypeDescription
GuestPolicies.SoftwareRecipe.Builder

clearName()

public GuestPolicies.SoftwareRecipe.Builder clearName()

Required. Unique identifier for the recipe. Only one recipe with a given name is installed on an instance. Names are also used to identify r