- 2.53.0 (latest)
- 2.51.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.6
- 2.4.3
- 2.3.2
A client to OS Config API
The interfaces provided are listed below, along with usage samples.
OsConfigServiceClient
Service Description: OS Config API
The OS Config service is a server-side component that you can use to manage package installations and patch jobs for virtual machine instances.
Sample for OsConfigServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
PatchJobs.ExecutePatchJobRequest request =
PatchJobs.ExecutePatchJobRequest.newBuilder()
.setParent("parent-995424086")
.setDescription("description-1724546052")
.setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build())
.setPatchConfig(PatchJobs.PatchConfig.newBuilder().build())
.setDuration(Duration.newBuilder().build())
.setDryRun(true)
.setDisplayName("displayName1714148973")
.setRollout(PatchJobs.PatchRollout.newBuilder().build())
.build();
PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request);
}
Classes
Common
Common.FixedOrPercent
Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value.
Protobuf type google.cloud.osconfig.v1beta.FixedOrPercent
Common.FixedOrPercent.Builder
Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value.
Protobuf type google.cloud.osconfig.v1beta.FixedOrPercent
GuestPolicies
GuestPolicies.AptRepository
Represents a single Apt package repository. This repository is added to
a repo file that is stored at
/etc/apt/sources.list.d/google_osconfig.list
.
Protobuf type google.cloud.osconfig.v1beta.AptRepository
GuestPolicies.AptRepository.Builder
Represents a single Apt package repository. This repository is added to
a repo file that is stored at
/etc/apt/sources.list.d/google_osconfig.list
.
Protobuf type google.cloud.osconfig.v1beta.AptRepository
GuestPolicies.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.
Protobuf type google.cloud.osconfig.v1beta.Assignment
GuestPolicies.Assignment.Builder
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.
Protobuf type google.cloud.osconfig.v1beta.Assignment
GuestPolicies.Assignment.GroupLabel
Represents a group of VM intances that can be identified as having all these labels, for example "env=prod and app=web".
Protobuf type google.cloud.osconfig.v1beta.Assignment.GroupLabel
GuestPolicies.Assignment.GroupLabel.Builder
Represents a group of VM intances that can be identified as having all these labels, for example "env=prod and app=web".
Protobuf type google.cloud.osconfig.v1beta.Assignment.GroupLabel
GuestPolicies.Assignment.OsType
Defines the criteria for selecting VM Instances by OS type.
Protobuf type google.cloud.osconfig.v1beta.Assignment.OsType
GuestPolicies.Assignment.OsType.Builder
Defines the criteria for selecting VM Instances by OS type.
Protobuf type google.cloud.osconfig.v1beta.Assignment.OsType
GuestPolicies.CreateGuestPolicyRequest
A request message for creating a guest policy.
Protobuf type google.cloud.osconfig.v1beta.CreateGuestPolicyRequest
GuestPolicies.CreateGuestPolicyRequest.Builder
A request message for creating a guest policy.
Protobuf type google.cloud.osconfig.v1beta.CreateGuestPolicyRequest
GuestPolicies.DeleteGuestPolicyRequest
A request message for deleting a guest policy.
Protobuf type google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest
GuestPolicies.DeleteGuestPolicyRequest.Builder
A request message for deleting a guest policy.
Protobuf type google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest
GuestPolicies.EffectiveGuestPolicy
The effective guest policy that applies to a VM instance.
Protobuf type google.cloud.osconfig.v1beta.EffectiveGuestPolicy
GuestPolicies.EffectiveGuestPolicy.Builder
The effective guest policy that applies to a VM instance.
Protobuf type google.cloud.osconfig.v1beta.EffectiveGuestPolicy
GuestPolicies.EffectiveGuestPolicy.SourcedPackage
A guest policy package including its source.
Protobuf type google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage
GuestPolicies.EffectiveGuestPolicy.SourcedPackage.Builder
A guest policy package including its source.
Protobuf type google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage
GuestPolicies.EffectiveGuestPolicy.SourcedPackageRepository
A guest policy package repository including its source.
Protobuf type
google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository
GuestPolicies.EffectiveGuestPolicy.SourcedPackageRepository.Builder
A guest policy package repository including its source.
Protobuf type
google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository
GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe
A guest policy recipe including its source.
Protobuf type google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe
GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe.Builder
A guest policy recipe including its source.
Protobuf type
google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe
GuestPolicies.GetGuestPolicyRequest
A request message for retrieving a guest policy.
Protobuf type google.cloud.osconfig.v1beta.GetGuestPolicyRequest
GuestPolicies.GetGuestPolicyRequest.Builder
A request message for retrieving a guest policy.
Protobuf type google.cloud.osconfig.v1beta.GetGuestPolicyRequest
GuestPolicies.GooRepository
Represents a Goo package repository. These is added to a repo file that is stored at C:/ProgramData/GooGet/repos/google_osconfig.repo.
Protobuf type google.cloud.osconfig.v1beta.GooRepository
GuestPolicies.GooRepository.Builder
Represents a Goo package repository. These is added to a repo file that is stored at C:/ProgramData/GooGet/repos/google_osconfig.repo.
Protobuf type google.cloud.osconfig.v1beta.GooRepository
GuestPolicies.GuestPolicy
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.
Protobuf type google.cloud.osconfig.v1beta.GuestPolicy
GuestPolicies.GuestPolicy.Builder
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.
Protobuf type google.cloud.osconfig.v1beta.GuestPolicy
GuestPolicies.ListGuestPoliciesRequest
A request message for listing guest policies.
Protobuf type google.cloud.osconfig.v1beta.ListGuestPoliciesRequest
GuestPolicies.ListGuestPoliciesRequest.Builder
A request message for listing guest policies.
Protobuf type google.cloud.osconfig.v1beta.ListGuestPoliciesRequest
GuestPolicies.ListGuestPoliciesResponse
A response message for listing guest policies.
Protobuf type google.cloud.osconfig.v1beta.ListGuestPoliciesResponse
GuestPolicies.ListGuestPoliciesResponse.Builder
A response message for listing guest policies.
Protobuf type google.cloud.osconfig.v1beta.ListGuestPoliciesResponse
GuestPolicies.LookupEffectiveGuestPolicyRequest
A request message for getting the effective guest policy assigned to the instance.
Protobuf type google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest
GuestPolicies.LookupEffectiveGuestPolicyRequest.Builder
A request message for getting the effective guest policy assigned to the instance.
Protobuf type google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest
GuestPolicies.Package
Package is a reference to the software package to be installed or removed.
The agent on the VM instance uses the system package manager to apply the
config.
These are the commands that the agent uses to install or remove
packages.
Apt
install: apt-get update && apt-get -y install package1 package2 package3
remove: apt-get -y remove package1 package2 package3
Yum
install: yum -y install package1 package2 package3
remove: yum -y remove package1 package2 package3
Zypper
install: zypper install package1 package2 package3
remove: zypper rm package1 package2
Googet
install: googet -noconfirm install package1 package2 package3
remove: googet -noconfirm remove package1 package2 package3
Protobuf type google.cloud.osconfig.v1beta.Package
GuestPolicies.Package.Builder
Package is a reference to the software package to be installed or removed.
The agent on the VM instance uses the system package manager to apply the
config.
These are the commands that the agent uses to install or remove
packages.
Apt
install: apt-get update && apt-get -y install package1 package2 package3
remove: apt-get -y remove package1 package2 package3
Yum
install: yum -y install package1 package2 package3
remove: yum -y remove package1 package2 package3
Zypper
install: zypper install package1 package2 package3
remove: zypper rm package1 package2
Googet
install: googet -noconfirm install package1 package2 package3
remove: googet -noconfirm remove package1 package2 package3
Protobuf type google.cloud.osconfig.v1beta.Package
GuestPolicies.PackageRepository
A package repository.
Protobuf type google.cloud.osconfig.v1beta.PackageRepository
GuestPolicies.PackageRepository.Builder
A package repository.
Protobuf type google.cloud.osconfig.v1beta.PackageRepository
GuestPolicies.SoftwareRecipe
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
GuestPolicies.SoftwareRecipe.Artifact
Specifies a resource to be used in the recipe.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact
GuestPolicies.SoftwareRecipe.Artifact.Builder
Specifies a resource to be used in the recipe.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact
GuestPolicies.SoftwareRecipe.Artifact.Gcs
Specifies an artifact available as a Google Cloud Storage object.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs
GuestPolicies.SoftwareRecipe.Artifact.Gcs.Builder
Specifies an artifact available as a Google Cloud Storage object.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs
GuestPolicies.SoftwareRecipe.Artifact.Remote
Specifies an artifact available via some URI.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote
GuestPolicies.SoftwareRecipe.Artifact.Remote.Builder
Specifies an artifact available via some URI.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote
GuestPolicies.SoftwareRecipe.Builder
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
GuestPolicies.SoftwareRecipe.Step
An action that can be taken as part of installing or updating a recipe.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step
GuestPolicies.SoftwareRecipe.Step.Builder
An action that can be taken as part of installing or updating a recipe.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step
GuestPolicies.SoftwareRecipe.Step.CopyFile
Copies the artifact to the specified path on the instance.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile
GuestPolicies.SoftwareRecipe.Step.CopyFile.Builder
Copies the artifact to the specified path on the instance.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile
GuestPolicies.SoftwareRecipe.Step.ExecFile
Executes an artifact or local file.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile
GuestPolicies.SoftwareRecipe.Step.ExecFile.Builder
Executes an artifact or local file.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile
GuestPolicies.SoftwareRecipe.Step.ExtractArchive
Extracts an archive of the type specified in the specified directory.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive
GuestPolicies.SoftwareRecipe.Step.ExtractArchive.Builder
Extracts an archive of the type specified in the specified directory.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive
GuestPolicies.SoftwareRecipe.Step.InstallDpkg
Installs a deb via dpkg.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg
GuestPolicies.SoftwareRecipe.Step.InstallDpkg.Builder
Installs a deb via dpkg.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg
GuestPolicies.SoftwareRecipe.Step.InstallMsi
Installs an MSI file.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi
GuestPolicies.SoftwareRecipe.Step.InstallMsi.Builder
Installs an MSI file.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi
GuestPolicies.SoftwareRecipe.Step.InstallRpm
Installs an rpm file via the rpm utility.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm
GuestPolicies.SoftwareRecipe.Step.InstallRpm.Builder
Installs an rpm file via the rpm utility.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm
GuestPolicies.SoftwareRecipe.Step.RunScript
Runs a script through an interpreter.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript
GuestPolicies.SoftwareRecipe.Step.RunScript.Builder
Runs a script through an interpreter.
Protobuf type google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript
GuestPolicies.UpdateGuestPolicyRequest
A request message for updating a guest policy.
Protobuf type google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest
GuestPolicies.UpdateGuestPolicyRequest.Builder
A request message for updating a guest policy.
Protobuf type google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest
GuestPolicies.YumRepository
Represents a single Yum package repository. This repository is added to a
repo file that is stored at /etc/yum.repos.d/google_osconfig.repo
.
Protobuf type google.cloud.osconfig.v1beta.YumRepository
GuestPolicies.YumRepository.Builder
Represents a single Yum package repository. This repository is added to a
repo file that is stored at /etc/yum.repos.d/google_osconfig.repo
.
Protobuf type google.cloud.osconfig.v1beta.YumRepository
GuestPolicies.ZypperRepository
Represents a single Zypper package repository. This repository is added to a
repo file that is stored at /etc/zypp/repos.d/google_osconfig.repo
.
Protobuf type google.cloud.osconfig.v1beta.ZypperRepository
GuestPolicies.ZypperRepository.Builder
Represents a single Zypper package repository. This repository is added to a
repo file that is stored at /etc/zypp/repos.d/google_osconfig.repo
.
Protobuf type google.cloud.osconfig.v1beta.ZypperRepository
GuestPolicyName
GuestPolicyName.Builder
Builder for projects/{project}/guestPolicies/{guest_policy}.