|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
// Copyright 2019 Google LLC. |
|
|
|
|
// Copyright 2020 Google LLC |
|
|
|
|
// |
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
// you may not use this file except in compliance with the License. |
|
|
|
@ -11,7 +11,6 @@ |
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
|
|
|
// See the License for the specific language governing permissions and |
|
|
|
|
// limitations under the License. |
|
|
|
|
// |
|
|
|
|
|
|
|
|
|
syntax = "proto3"; |
|
|
|
|
|
|
|
|
@ -36,8 +35,8 @@ message GuestPolicy { |
|
|
|
|
pattern: "projects/{project}/guestPolicies/{guest_policy}" |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Required. Unique name of the resource in this project using one of the |
|
|
|
|
// following forms: |
|
|
|
|
// Required. Unique name of the resource in this project using one of the following |
|
|
|
|
// forms: |
|
|
|
|
// `projects/{project_number}/guestPolicies/{guest_policy_id}`. |
|
|
|
|
string name = 1 [(google.api.field_behavior) = REQUIRED]; |
|
|
|
|
|
|
|
|
@ -46,40 +45,21 @@ message GuestPolicy { |
|
|
|
|
string description = 2; |
|
|
|
|
|
|
|
|
|
// Output only. Time this guest policy was created. |
|
|
|
|
google.protobuf.Timestamp create_time = 3 |
|
|
|
|
[(google.api.field_behavior) = OUTPUT_ONLY]; |
|
|
|
|
google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; |
|
|
|
|
|
|
|
|
|
// Output only. Last time this guest policy was updated. |
|
|
|
|
google.protobuf.Timestamp update_time = 4 |
|
|
|
|
[(google.api.field_behavior) = OUTPUT_ONLY]; |
|
|
|
|
google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; |
|
|
|
|
|
|
|
|
|
// Required. Specifies the VM instances that are assigned to this policy. This |
|
|
|
|
// allows you to target sets or groups of VM instances by different parameters |
|
|
|
|
// such as labels, names, OS, or zones. |
|
|
|
|
// Required. Specifies the VM instances that are assigned to this policy. This allows |
|
|
|
|
// you to target sets or groups of VM instances by different parameters such |
|
|
|
|
// as labels, names, OS, or zones. |
|
|
|
|
// |
|
|
|
|
// If left empty, all VM instances underneath this policy are targeted. |
|
|
|
|
// |
|
|
|
|
// |
|
|
|
|
// Conflict Management |
|
|
|
|
// |
|
|
|
|
// At the same level in the resource hierarchy (that is within a project), the |
|
|
|
|
// service prevents the creation of multiple policies that conflict with |
|
|
|
|
// each other. If there are multiple policies that specify the same config |
|
|
|
|
// (eg. package, software recipe, repository, etc.), the service ensures |
|
|
|
|
// that no VM instance could potentially receive instructions from both |
|
|
|
|
// policies. To create multiple policies that specify different versions of a |
|
|
|
|
// package or different configs for different operating systems, each policy |
|
|
|
|
// must be mutually exclusive in their targeting according to labels, OS, or |
|
|
|
|
// other criteria. |
|
|
|
|
// |
|
|
|
|
// Different configs are identified for conflicts in different ways. Packages |
|
|
|
|
// are identified by their name and the package manager(s) they target. |
|
|
|
|
// Package repositories are identified by their unique id where applicable. |
|
|
|
|
// Some package managers don't have a unique identifier for repositories and |
|
|
|
|
// where that's the case, no uniqueness is validated by the service. |
|
|
|
|
// |
|
|
|
|
// Note that if OS Inventory is disabled, a VM instance cannot assign a policy |
|
|
|
|
// that targets by OS because the service sees the OS as unknown. |
|
|
|
|
// each other. For more information, see how the service [handles assignment |
|
|
|
|
// conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts). |
|
|
|
|
Assignment assignment = 6 [(google.api.field_behavior) = REQUIRED]; |
|
|
|
|
|
|
|
|
|
// The software packages to be managed by this policy. |
|
|
|
@ -110,8 +90,8 @@ message Assignment { |
|
|
|
|
// Represents a group of VM intances that can be identified as having all |
|
|
|
|
// these labels, for example "env=prod and app=web". |
|
|
|
|
message GroupLabel { |
|
|
|
|
// GCE instance labels that must be present for an instance to be included |
|
|
|
|
// in this assignment group. |
|
|
|
|
// Google Compute Engine instance labels that must be present for an |
|
|
|
|
// instance to be included in this assignment group. |
|
|
|
|
map<string, string> labels = 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -156,7 +136,7 @@ message Assignment { |
|
|
|
|
// Targets VM instances whose name starts with one of these prefixes. |
|
|
|
|
// |
|
|
|
|
// Like labels, this is another way to group VM instances when targeting |
|
|
|
|
// configs, for example prefix=”prod-”. |
|
|
|
|
// configs, for example prefix="prod-". |
|
|
|
|
// |
|
|
|
|
// Only supported for project-level policies. |
|
|
|
|
repeated string instance_name_prefixes = 4; |
|
|
|
@ -213,9 +193,9 @@ message Package { |
|
|
|
|
GOO = 5; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Required. The name of the package. A package is uniquely identified for |
|
|
|
|
// conflict validation by checking the package name and the manager(s) that |
|
|
|
|
// the package targets. |
|
|
|
|
// Required. The name of the package. A package is uniquely identified for conflict |
|
|
|
|
// validation by checking the package name and the manager(s) that the |
|
|
|
|
// package targets. |
|
|
|
|
string name = 1 [(google.api.field_behavior) = REQUIRED]; |
|
|
|
|
|
|
|
|
|
// The desired_state the agent should maintain for this package. The |
|
|
|
@ -259,8 +239,7 @@ message AptRepository { |
|
|
|
|
// Required. Distribution of this repository. |
|
|
|
|
string distribution = 3 [(google.api.field_behavior) = REQUIRED]; |
|
|
|
|
|
|
|
|
|
// Required. List of components for this repository. Must contain at least one |
|
|
|
|
// item. |
|
|
|
|
// Required. List of components for this repository. Must contain at least one item. |
|
|
|
|
repeated string components = 4 [(google.api.field_behavior) = REQUIRED]; |
|
|
|
|
|
|
|
|
|
// URI of the key file for this repository. The agent maintains |
|
|
|
@ -392,15 +371,15 @@ message SoftwareRecipe { |
|
|
|
|
string checksum = 2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Specifies an artifact available as a Cloud Storage object. |
|
|
|
|
// Specifies an artifact available as a Google Cloud Storage object. |
|
|
|
|
message Gcs { |
|
|
|
|
// Bucket of the Cloud Storage object. |
|
|
|
|
// Bucket of the Google Cloud Storage object. |
|
|
|
|
// Given an example URL: |
|
|
|
|
// `https://storage.googleapis.com/my-bucket/foo/bar#1234567` |
|
|
|
|
// this value would be `my-bucket`. |
|
|
|
|
string bucket = 1; |
|
|
|
|
|
|
|
|
|
// Name of the Cloud Storage object. |
|
|
|
|
// Name of the Google Cloud Storage object. |
|
|
|
|
// As specified [here] |
|
|
|
|
// (https://cloud.google.com/storage/docs/naming#objectnames) |
|
|
|
|
// Given an example URL: |
|
|
|
@ -409,14 +388,14 @@ message SoftwareRecipe { |
|
|
|
|
string object = 2; |
|
|
|
|
|
|
|
|
|
// Must be provided if allow_insecure is false. |
|
|
|
|
// Generation number of the Cloud Storage object. |
|
|
|
|
// Generation number of the Google Cloud Storage object. |
|
|
|
|
// `https://storage.googleapis.com/my-bucket/foo/bar#1234567` |
|
|
|
|
// this value would be `1234567`. |
|
|
|
|
int64 generation = 3; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Required. Id of the artifact, which the installation and update steps of |
|
|
|
|
// this recipe can reference. Artifacts in a recipe cannot have the same id. |
|
|
|
|
// Required. Id of the artifact, which the installation and update steps of this |
|
|
|
|
// recipe can reference. Artifacts in a recipe cannot have the same id. |
|
|
|
|
string id = 1 [(google.api.field_behavior) = REQUIRED]; |
|
|
|
|
|
|
|
|
|
// A specific type of artifact. |
|
|
|
@ -424,7 +403,7 @@ message SoftwareRecipe { |
|
|
|
|
// A generic remote artifact. |
|
|
|
|
Remote remote = 2; |
|
|
|
|
|
|
|
|
|
// A Cloud Storage artifact. |
|
|
|
|
// A Google Cloud Storage artifact. |
|
|
|
|
Gcs gcs = 3; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -432,7 +411,7 @@ message SoftwareRecipe { |
|
|
|
|
// based on the artifact type: |
|
|
|
|
// |
|
|
|
|
// Remote: A checksum must be specified, and only protocols with |
|
|
|
|
// transport-layer security are permitted. |
|
|
|
|
// transport-layer security are permitted. |
|
|
|
|
// GCS: An object generation number must be specified. |
|
|
|
|
bool allow_insecure = 4; |
|
|
|
|
} |
|
|
|
@ -575,7 +554,7 @@ message SoftwareRecipe { |
|
|
|
|
// The script interpreter to use to run the script. If no interpreter is |
|
|
|
|
// specified the script is executed directly, which likely |
|
|
|
|
// only succeed for scripts with |
|
|
|
|
// [shebang lines](https://en.wikipedia.org/wiki/Shebang_(Unix)). |
|
|
|
|
// [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
|
|
|
|
Interpreter interpreter = 3; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -604,8 +583,8 @@ message SoftwareRecipe { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Required. Unique identifier for the recipe. Only one recipe with a given |
|
|
|
|
// name is installed on an instance. |
|
|
|
|
// 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 |
|
|
|
@ -671,8 +650,8 @@ message CreateGuestPolicyRequest { |
|
|
|
|
|
|
|
|
|
// A request message for retrieving a guest policy. |
|
|
|
|
message GetGuestPolicyRequest { |
|
|
|
|
// Required. The resource name of the guest policy using one of the following |
|
|
|
|
// forms: `projects/{project_number}/guestPolicies/{guest_policy_id}`. |
|
|
|
|
// Required. The resource name of the guest policy using one of the following forms: |
|
|
|
|
// `projects/{project_number}/guestPolicies/{guest_policy_id}`. |
|
|
|
|
string name = 1 [ |
|
|
|
|
(google.api.field_behavior) = REQUIRED, |
|
|
|
|
(google.api.resource_reference) = { |
|
|
|
@ -722,8 +701,8 @@ message UpdateGuestPolicyRequest { |
|
|
|
|
|
|
|
|
|
// A request message for deleting a guest policy. |
|
|
|
|
message DeleteGuestPolicyRequest { |
|
|
|
|
// Required. The resource name of the guest policy using one of the following |
|
|
|
|
// forms: `projects/{project_number}/guestPolicies/{guest_policy_id}`. |
|
|
|
|
// Required. The resource name of the guest policy using one of the following forms: |
|
|
|
|
// `projects/{project_number}/guestPolicies/{guest_policy_id}`. |
|
|
|
|
string name = 1 [ |
|
|
|
|
(google.api.field_behavior) = REQUIRED, |
|
|
|
|
(google.api.resource_reference) = { |
|
|
|
@ -739,17 +718,17 @@ message LookupEffectiveGuestPolicyRequest { |
|
|
|
|
string instance = 1 [(google.api.field_behavior) = REQUIRED]; |
|
|
|
|
|
|
|
|
|
// Short name of the OS running on the instance. The OS Config agent only |
|
|
|
|
// provideS this field for targeting if OS Inventory is enabled for that |
|
|
|
|
// provides this field for targeting if OS Inventory is enabled for that |
|
|
|
|
// instance. |
|
|
|
|
string os_short_name = 2; |
|
|
|
|
|
|
|
|
|
// Version of the OS running on the instance. The OS Config agent only |
|
|
|
|
// provide this field for targeting if OS Inventory is enabled for that |
|
|
|
|
// provides this field for targeting if OS Inventory is enabled for that |
|
|
|
|
// VM instance. |
|
|
|
|
string os_version = 3; |
|
|
|
|
|
|
|
|
|
// Architecture of OS running on the instance. The OS Config agent only |
|
|
|
|
// provide this field for targeting if OS Inventory is enabled for that |
|
|
|
|
// provides this field for targeting if OS Inventory is enabled for that |
|
|
|
|
// instance. |
|
|
|
|
string os_architecture = 4; |
|
|
|
|
} |
|
|
|
|