public static final class GuestPolicies.SoftwareRecipe extends GeneratedMessageV3 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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
ARTIFACTS_FIELD_NUMBER
public static final int ARTIFACTS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
DESIRED_STATE_FIELD_NUMBER
public static final int DESIRED_STATE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
INSTALL_STEPS_FIELD_NUMBER
public static final int INSTALL_STEPS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
UPDATE_STEPS_FIELD_NUMBER
public static final int UPDATE_STEPS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
VERSION_FIELD_NUMBER
public static final int VERSION_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static GuestPolicies.SoftwareRecipe getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static GuestPolicies.SoftwareRecipe.Builder newBuilder()
newBuilder(GuestPolicies.SoftwareRecipe prototype)
public static GuestPolicies.SoftwareRecipe.Builder newBuilder(GuestPolicies.SoftwareRecipe prototype)
public static GuestPolicies.SoftwareRecipe parseDelimitedFrom(InputStream input)
public static GuestPolicies.SoftwareRecipe parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static GuestPolicies.SoftwareRecipe parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.SoftwareRecipe parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static GuestPolicies.SoftwareRecipe parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.SoftwareRecipe parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.SoftwareRecipe parseFrom(CodedInputStream input)
public static GuestPolicies.SoftwareRecipe parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.SoftwareRecipe parseFrom(InputStream input)
public static GuestPolicies.SoftwareRecipe parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static GuestPolicies.SoftwareRecipe parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.SoftwareRecipe parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<GuestPolicies.SoftwareRecipe> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getArtifacts(int index)
public GuestPolicies.SoftwareRecipe.Artifact getArtifacts(int index)
Resources available to be used in the steps in the recipe.
repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;
Parameter |
---|
Name | Description |
index | int
|
getArtifactsCount()
public int getArtifactsCount()
Resources available to be used in the steps in the recipe.
repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;
Returns |
---|
Type | Description |
int | |
getArtifactsList()
public List<GuestPolicies.SoftwareRecipe.Artifact> getArtifactsList()
Resources available to be used in the steps in the recipe.
repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;
getArtifactsOrBuilder(int index)
public GuestPolicies.SoftwareRecipe.ArtifactOrBuilder getArtifactsOrBuilder(int index)
Resources available to be used in the steps in the recipe.
repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;
Parameter |
---|
Name | Description |
index | int
|
getArtifactsOrBuilderList()
public List<? extends GuestPolicies.SoftwareRecipe.ArtifactOrBuilder> getArtifactsOrBuilderList()
Resources available to be used in the steps in the recipe.
repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3;
Returns |
---|
Type | Description |
List<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder> | |
getDefaultInstanceForType()
public GuestPolicies.SoftwareRecipe getDefaultInstanceForType()
getDesiredState()
public GuestPolicies.DesiredState getDesiredState()
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;
getDesiredStateValue()
public int getDesiredStateValue()
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 |
---|
Type | Description |
int | The enum numeric value on the wire for desiredState.
|
getInstallSteps(int index)
public GuestPolicies.SoftwareRecipe.Step getInstallSteps(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 |
---|
Name | Description |
index | int
|
getInstallStepsCount()
public int getInstallStepsCount()
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 |
---|
Type | Description |
int | |
getInstallStepsList()
public List<GuestPolicies.SoftwareRecipe.Step> getInstallStepsList()
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;
getInstallStepsOrBuilder(int index)
public GuestPolicies.SoftwareRecipe.StepOrBuilder getInstallStepsOrBuilder(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 |
---|
Name | Description |
index | int
|
getInstallStepsOrBuilderList()
public List<? extends GuestPolicies.SoftwareRecipe.StepOrBuilder> getInstallStepsOrBuilderList()
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 |
---|
Type | Description |
List<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> | |
getName()
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.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
---|
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
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.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
---|
Type | Description |
ByteString | The bytes for name.
|
getParserForType()
public Parser<GuestPolicies.SoftwareRecipe> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getUpdateSteps(int index)
public GuestPolicies.SoftwareRecipe.Step getUpdateSteps(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 |
---|
Name | Description |
index | int
|
getUpdateStepsCount()
public int getUpdateStepsCount()
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 |
---|
Type | Description |
int | |
getUpdateStepsList()
public List<GuestPolicies.SoftwareRecipe.Step> getUpdateStepsList()
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;
getUpdateStepsOrBuilder(int index)
public GuestPolicies.SoftwareRecipe.StepOrBuilder getUpdateStepsOrBuilder(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 |
---|
Name | Description |
index | int
|
getUpdateStepsOrBuilderList()
public List<? extends GuestPolicies.SoftwareRecipe.StepOrBuilder> getUpdateStepsOrBuilderList()
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 |
---|
Type | Description |
List<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> | |
getVersion()
public String getVersion()
The version of this software recipe. Version can be up to 4 period
separated numbers (e.g. 12.34.56.78).
string version = 2;
Returns |
---|
Type | Description |
String | The version.
|
getVersionBytes()
public ByteString getVersionBytes()
The version of this software recipe. Version can be up to 4 period
separated numbers (e.g. 12.34.56.78).
string version = 2;
Returns |
---|
Type | Description |
ByteString | The bytes for version.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public GuestPolicies.SoftwareRecipe.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected GuestPolicies.SoftwareRecipe.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public GuestPolicies.SoftwareRecipe.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides