Package-level declarations

Types

Link copied to clipboard
data class AptSettingsResponse(val excludes: List<String>, val exclusivePackages: List<String>, val type: String)

Apt patching is completed by executing apt-get update && apt-get upgrade. Additional options can be set to control how this is executed.

Link copied to clipboard
data class ExecStepConfigResponse(val allowedSuccessCodes: List<Int>, val gcsObject: GcsObjectResponse, val interpreter: String, val localPath: String)

Common configurations for an ExecStep.

Link copied to clipboard
data class ExecStepResponse(val linuxExecStepConfig: ExecStepConfigResponse, val windowsExecStepConfig: ExecStepConfigResponse)

A step that runs an executable for a PatchJob.

Link copied to clipboard
data class FixedOrPercentResponse(val fixed: Int, val percent: Int)

Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value.

Link copied to clipboard
data class GcsObjectResponse(val bucket: String, val generationNumber: String, val object: String)

Cloud Storage object representation.

Link copied to clipboard
data class GetOsPolicyAssignmentResult(val baseline: Boolean, val deleted: Boolean, val description: String, val etag: String, val instanceFilter: OSPolicyAssignmentInstanceFilterResponse, val name: String, val osPolicies: List<OSPolicyResponse>, val reconciling: Boolean, val revisionCreateTime: String, val revisionId: String, val rollout: OSPolicyAssignmentRolloutResponse, val rolloutState: String, val uid: String)
Link copied to clipboard
data class GetPatchDeploymentResult(val createTime: String, val description: String, val duration: String, val instanceFilter: PatchInstanceFilterResponse, val lastExecuteTime: String, val name: String, val oneTimeSchedule: OneTimeScheduleResponse, val patchConfig: PatchConfigResponse, val recurringSchedule: RecurringScheduleResponse, val rollout: PatchRolloutResponse, val state: String, val updateTime: String)
Link copied to clipboard

Googet patching is performed by running googet update.

Link copied to clipboard
data class MonthlyScheduleResponse(val monthDay: Int, val weekDayOfMonth: WeekDayOfMonthResponse)

Represents a monthly schedule. An example of a valid monthly schedule is "on the third Tuesday of the month" or "on the 15th of the month".

Link copied to clipboard
data class OneTimeScheduleResponse(val executeTime: String)

Sets the time for a one time patch deployment. Timestamp is in RFC3339 text format.

data class OSPolicyAssignmentInstanceFilterInventoryResponse(val osShortName: String, val osVersion: String)

VM inventory details.

Link copied to clipboard

Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them.

Link copied to clipboard

Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: env=prod and type=webserver will only be applicable for those VMs with both labels present.

Link copied to clipboard
data class OSPolicyAssignmentRolloutResponse(val disruptionBudget: FixedOrPercentResponse, val minWaitDuration: String)

Message to configure the rollout at the zonal level for the OS policy assignment.

Link copied to clipboard
data class OSPolicyInventoryFilterResponse(val osShortName: String, val osVersion: String)

Filtering criteria to select VMs based on inventory details.

Link copied to clipboard
data class OSPolicyResourceExecResourceExecResponse(val args: List<String>, val file: OSPolicyResourceFileResponse, val interpreter: String, val outputFilePath: String, val script: String)

A file or script to execute.

Link copied to clipboard

A resource that allows executing scripts on the VM. The ExecResource has 2 stages: validate and enforce and both stages accept a script as an argument to execute. When the ExecResource is applied by the agent, it first executes the script in the validate stage. The validate stage can signal that the ExecResource is already in the desired state by returning an exit code of 100. If the ExecResource is not in the desired state, it should return an exit code of 101. Any other exit code returned by this stage is considered an error. If the ExecResource is not in the desired state based on the exit code from the validate stage, the agent proceeds to execute the script from the enforce stage. If the ExecResource is already in the desired state, the enforce stage will not be run. Similar to validate stage, the enforce stage should return an exit code of 100 to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of 100 was chosen over 0 (and 101 vs 1) to have an explicit indicator of in desired state, not in desired state and errors. Because, for example, Powershell will always return an exit code of 0 unless an exit statement is provided in the script. So, for reasons of consistency and being explicit, exit codes 100 and 101 were chosen.

Link copied to clipboard
data class OSPolicyResourceFileGcsResponse(val bucket: String, val generation: String, val object: String)

Specifies a file available as a Cloud Storage Object.

Link copied to clipboard
data class OSPolicyResourceFileRemoteResponse(val sha256Checksum: String, val uri: String)

Specifies a file available via some URI.

Link copied to clipboard
data class OSPolicyResourceFileResourceResponse(val content: String, val file: OSPolicyResourceFileResponse, val path: String, val permissions: String, val state: String)

A resource that manages the state of a file.

Link copied to clipboard
data class OSPolicyResourceFileResponse(val allowInsecure: Boolean, val gcs: OSPolicyResourceFileGcsResponse, val localPath: String, val remote: OSPolicyResourceFileRemoteResponse)

A remote or local file.

Link copied to clipboard

Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the OSFilter specified within the resource group.

A package managed by APT. - install: apt-get update && apt-get -y install [name] - remove: apt-get -y remove [name]

A deb package file. dpkg packages only support INSTALLED state.

A package managed by GooGet. - install: googet -noconfirm install package - remove: googet -noconfirm remove package

An MSI package. MSI packages only support INSTALLED state.

An RPM package file. RPM packages only support INSTALLED state.

A package managed by YUM. - install: yum -y install package - remove: yum -y remove package

A package managed by Zypper. - install: zypper -y install package - remove: zypper -y rm package

data class OSPolicyResourceRepositoryResourceAptRepositoryResponse(val archiveType: String, val components: List<String>, val distribution: String, val gpgKey: String, val uri: String)

Represents a single apt package repository. These will be added to a repo file that will be managed at /etc/apt/sources.list.d/google_osconfig.list.

Represents a Goo package repository. These are added to a repo file that is managed at C:/ProgramData/GooGet/repos/google_osconfig.repo.

data class OSPolicyResourceRepositoryResourceYumRepositoryResponse(val baseUrl: String, val displayName: String, val gpgKeys: List<String>)

Represents a single yum package repository. These are added to a repo file that is managed at /etc/yum.repos.d/google_osconfig.repo.

data class OSPolicyResourceRepositoryResourceZypperRepositoryResponse(val baseUrl: String, val displayName: String, val gpgKeys: List<String>)

Represents a single zypper package repository. These are added to a repo file that is managed at /etc/zypp/repos.d/google_osconfig.repo.

Link copied to clipboard

An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state.

Link copied to clipboard
data class OSPolicyResponse(val allowNoResourceGroupMatch: Boolean, val description: String, val mode: String, val resourceGroups: List<OSPolicyResourceGroupResponse>)

An OS policy defines the desired state configuration for a VM.

Link copied to clipboard
data class PatchConfigResponse(val apt: AptSettingsResponse, val goo: GooSettingsResponse, val migInstancesAllowed: Boolean, val postStep: ExecStepResponse, val preStep: ExecStepResponse, val rebootConfig: String, val windowsUpdate: WindowsUpdateSettingsResponse, val yum: YumSettingsResponse, val zypper: ZypperSettingsResponse)

Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance.

Link copied to clipboard

Targets a group of VM instances by using their assigned labels. Labels are key-value pairs. A GroupLabel is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following GroupLabel: {"env":"test", "app":"web"}. This means that the patch job is applied to VMs that have both the labels env=test and app=web.

Link copied to clipboard
data class PatchInstanceFilterResponse(val all: Boolean, val groupLabels: List<PatchInstanceFilterGroupLabelResponse>, val instanceNamePrefixes: List<String>, val instances: List<String>, val zones: List<String>)

A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones.

Link copied to clipboard
data class PatchRolloutResponse(val disruptionBudget: FixedOrPercentResponse, val mode: String)

Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs.

Link copied to clipboard
data class RecurringScheduleResponse(val endTime: String, val frequency: String, val lastExecuteTime: String, val monthly: MonthlyScheduleResponse, val nextExecuteTime: String, val startTime: String, val timeOfDay: TimeOfDayResponse, val timeZone: TimeZoneResponse, val weekly: WeeklyScheduleResponse)

Sets the time for recurring patch deployments.

Link copied to clipboard
data class TimeOfDayResponse(val hours: Int, val minutes: Int, val nanos: Int, val seconds: Int)

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp.

Link copied to clipboard
data class TimeZoneResponse(val version: String)

Represents a time zone from the IANA Time Zone Database.

Link copied to clipboard
data class WeekDayOfMonthResponse(val dayOfWeek: String, val dayOffset: Int, val weekOrdinal: Int)

Represents one week day in a month. An example is "the 4th Sunday".

Link copied to clipboard
data class WeeklyScheduleResponse(val dayOfWeek: String)

Represents a weekly schedule.

Link copied to clipboard
data class WindowsUpdateSettingsResponse(val classifications: List<String>, val excludes: List<String>, val exclusivePatches: List<String>)

Windows patching is performed using the Windows Update Agent.

Link copied to clipboard
data class YumSettingsResponse(val excludes: List<String>, val exclusivePackages: List<String>, val minimal: Boolean, val security: Boolean)

Yum patching is performed by executing yum update. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms.

Link copied to clipboard
data class ZypperSettingsResponse(val categories: List<String>, val excludes: List<String>, val exclusivePatches: List<String>, val severities: List<String>, val withOptional: Boolean, val withUpdate: Boolean)

Zypper patching is performed by running zypper patch. See also https://en.opensuse.org/SDB:Zypper_manual.